董国庆
2026-03-02 b9bda408edef23a3bc2683c1aaffd782519e7842
发线上
3个文件已修改
16 ■■■■■ 已修改文件
config/dev.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/websocket.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/dev.js
@@ -19,10 +19,10 @@
// const ROBOTAXI_HOST = '"http://192.168.110.80:8000"'; // 打车接口域名
// const ROBOTAXI_WS_HOST = '"ws://192.168.110.34:8888/websocket"';
const ROBOTAXI_HOST = '"http://221.182.45.100:8000"';
const ROBOTAXI_WS_HOST = '"ws://221.182.45.100:8888/websocket"';
// const ROBOTAXI_HOST = '"https://rt-api.deploy-test.xiaopeng.com"';
// const ROBOTAXI_WS_HOST = '"wss://rt-api.deploy-test.xiaopeng.com/websocket"';
// const ROBOTAXI_HOST = '"http://221.182.45.100:8000"';
// const ROBOTAXI_WS_HOST = '"ws://221.182.45.100:8888/websocket"';
const ROBOTAXI_HOST = '"https://rt-api.deploy-test.xiaopeng.com"';
const ROBOTAXI_WS_HOST = '"wss://rt-api.deploy-test.xiaopeng.com/websocket"';
const XP_APPID_MAP = {
  weapp: '"xp_cs_wom"',
src/utils/request.ts
@@ -151,7 +151,7 @@
  // 获取uid
  const uid = await getStorage(_UID) || '-1';
  header['XP-Uid'] = '20260227200715' || uid.toString();
  header['XP-Uid'] = uid.toString();
  // 获取设备id
  header['XP-Deviceid'] = Taro.getStorageSync('wxOpenId') || 'default_device_id';
src/utils/websocket.ts
@@ -42,7 +42,7 @@
    const uid = await getStorage(_UID) || '-1';
    const task = Taro.connectSocket({
      header: {
        'XP-Uid': '20260227200715' || uid.toString(),
        'XP-Uid':  uid.toString(),
      },
      url: this.url,
      success: () => { },
@@ -88,7 +88,7 @@
        this.reconnectAttempts = 0;
        this.startHeartbeat();
        const uid = await getStorage(_UID) || '-1';
        this.send({ type: 'auth', appUserId: '20260227200715', timestamp: Date.now() });
        this.send({ type: 'auth', appUserId: uid.toString(), timestamp: Date.now() });
        this.notifyListeners('open', { status: 'connected' });
      });
@@ -136,7 +136,7 @@
      this.reconnectAttempts = 0;
      this.startHeartbeat();
      const uid = await getStorage(_UID) || '-1';
      this.send({ type: 'auth', appUserId: '20260227200715', timestamp: Date.now() });
      this.send({ type: 'auth', appUserId: uid.toString(), timestamp: Date.now() });
      this.notifyListeners('open', { status: 'connected' });
    });