drop this.globalData.real_ip
This commit is contained in:
parent
7d64eb480d
commit
1273514c4e
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user