From 1273514c4ef0dfe2bb2290d9b58cfbe1c2231981 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Wed, 29 Oct 2025 21:31:50 +0000 Subject: [PATCH] drop this.globalData.real_ip --- scanner/CLAUDE.md | 1 - scanner/app.js | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/scanner/CLAUDE.md b/scanner/CLAUDE.md index e292a0b..6145d9d 100644 --- a/scanner/CLAUDE.md +++ b/scanner/CLAUDE.md @@ -26,7 +26,6 @@ This is a WeChat Mini Program called "徵象" (emblem-scanner) for QR code scann **Global Data:** - `server_url`: 'https://themblem.com' - main API endpoint - `session_id`: Generated unique session identifier -- `real_ip`: User's IP address fetched from external service - `worker`: WebAssembly worker for QR processing ## Development Commands diff --git a/scanner/app.js b/scanner/app.js index 0dd5847..a38d565 100644 --- a/scanner/app.js +++ b/scanner/app.js @@ -16,7 +16,6 @@ App({ // 发送 res.code 到后台换取 openId, sessionKey, unionId } }) - this.get_real_ip(); // On iOS, the js runtime is reported to be too slow for wasm, use experimental JIT worker. // https://developers.weixin.qq.com/community/develop/doc/000cac2319cbd8ecdc7f062eb53400 this.globalData.get_worker = () => { @@ -38,18 +37,5 @@ App({ userInfo: null, server_url: 'https://themblem.com', session_id: make_new_session_id(), - }, - - get_real_ip() { - this.globalData.real_ip = "0.0.0.0"; - wx.request({ - url: "https://whatsmyip.themblem.com", - success: (res) => { - var rip = res.data; - console.log("my real ip:", rip); - this.globalData.real_ip = rip; - } - } - ); } })