fix: 修复金额格式化精度并传递electronicAreaId参数
- 在fetchMapData中向getNearestSite调用添加遗漏的electronicAreaId参数
- 将formatMoney的金额显示精度从1位小数修正为2位小数,确保金额显示准确
| | |
| | | // 2. 只有在运营区域内才获取附近站点 |
| | | let sites: any = { points: [] }; |
| | | if (isInside) { |
| | | sites = await getNearestSite({ latitude: lat, longitude: lng }).catch(e => { |
| | | sites = await getNearestSite({ latitude: lat, longitude: lng, electronicAreaId }).catch(e => { |
| | | return { points: [] }; |
| | | }); |
| | | // 兼容处理 |
| | |
| | | if (Number.isNaN(num)) { |
| | | return '--'; |
| | | } |
| | | return num.toFixed(1); |
| | | return num.toFixed(2); |
| | | }; |
| | | |
| | | export const formatNumber = (value: any, digits = 1) => { |
| | |
| | | const uid = await getStorage(_UID) || '-1'; |
| | | const task = Taro.connectSocket({ |
| | | header: { |
| | | 'XP-Uid': '20260227200715' || uid.toString(), |
| | | 'XP-Uid': uid.toString(), |
| | | }, |
| | | url: this.url, |
| | | success: () => { }, |
| | |
| | | this.reconnectAttempts = 0; |
| | | this.startHeartbeat(); |
| | | const uid = await getStorage(_UID) || '-1'; |
| | | this.send({ type: 'auth', appUserId: '20260227200715' || uid.toString(), timestamp: Date.now() }); |
| | | this.send({ type: 'auth', appUserId: uid.toString(), timestamp: Date.now() }); |
| | | this.notifyListeners('open', { status: 'connected' }); |
| | | }); |
| | | |
| | |
| | | this.reconnectAttempts = 0; |
| | | this.startHeartbeat(); |
| | | const uid = await getStorage(_UID) || '-1'; |
| | | this.send({ type: 'auth', appUserId:'20260227200715' || uid.toString(), timestamp: Date.now() }); |
| | | this.send({ type: 'auth', appUserId: uid.toString(), timestamp: Date.now() }); |
| | | this.notifyListeners('open', { status: 'connected' }); |
| | | }); |
| | | |