卢春龙
2026-08-17 f525b6c3cc105bd1a997d893937689bebcc9570d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// 预发
const OFFICIAL_HOST = '"https://www.cs-pre.xiaopeng.com"';
const EVENT_HOST = '"https://event.cs-pre.xiaopeng.com"';
const SSO_HOST = '"https://sso.deploy-test.xiaopeng.com"';
const BBS_HOST = '"https://bbs.deploy-test.xiaopeng.com"';
const USER_HOST = '"https://ur.deploy-test.xiaopeng.com"';
const MARKET_HOST = '"https://mall.cs-pre.xiaopeng.com"';
const P_MARKET_HOST = '"https://pmall.cs-pre.xiaopeng.com"';
const MINI_HOST = '"https://miniprogram.cs-pre.xiaopeng.com"';
const MINI_BIZ_HOST = '"https://apps-biz.deploy-test.xiaopeng.com"';
const BURYING_POINT = '"https://appdata-pub.xiaopeng.com"';
const INVITER_HOST = '"https://guodashuai.51vip.biz"';
const TASK_HOST = '"https://xper.deploy-test.xiaopeng.com"';
const DOMIAN_VALUE = '"DEV"';
const CAR_CONTROL_HOST = '"https://miniprogram.cs-pre.xiaopeng.com"';
const CAR_CONTROL_BIZ_HOST = '"https://apps-biz.deploy-test.xiaopeng.com"';
const PAY_HOST = '"https://pay.deploy-test.xiaopeng.com"';
const COMMON_OSS_HOST = '"https://spre.xiaopeng.com"'; // 官渠通用 oss 资源前缀
const ADMIN_OSS_HOST = '"https://pre-xps01.xiaopeng.com"'; // 运营后台上传的额文件的 oss 域名
 
// 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-ws.deploy-test.xiaopeng.com/websocket"';
const AMAP_KEY = '"8157fdfa13878d3f7bf69c560c8a846a"';
const INVOICE_URL = '"https://pay.deploy-test.xiaopeng.com/invoice.html?bizType=rt#/entry"';
const INVOICE_CHARGE_URL = '"https://pay.deploy-test.xiaopeng.com/invoice.html?bizType=rt&orderNo=#/charge"';
 
const XP_APPID_MAP = {
  weapp: '"xp_cs_wom"',
};
 
const XP_SECRET_MAP = {
  weapp: '"7OmygYfd8dyCigN3"',
};
 
const PLATFORM_APPID_MAP = {
  weapp: '"wx57bb0455a168278b"',
};
 
const GIO_CONFIG = {
  accountId: '"89a922449121f7c2"', // 埋点平台id
  dataSourceId: {
    weapp: '"9abffa1fe7a0b35e"', // 埋点数据源id
  },
  host: '"https://collect.test.xiaopeng.com"',
}
 
const P5_RESERVE_URL = '"https://event.cs-pre.xiaopeng.com/suiz5w.html"';
 
const LDX_RESERVE_URL = '"https://event.cs-pre.xiaopeng.com/98cwj2.html?ch=00058&ps=event"';
 
const E_CARD_CH = '"00090"';
 
const UID = '"uid_dev"';
 
const CASHIER_SEARCH_TIME = 120;
 
// weapp / swan / alipay / h5 / rn / tt / qq / quickapp
const ENV = process.env.TARO_ENV;
 
module.exports = {
  env: {
    NODE_ENV: '"development"'
  },
  defineConstants: {
    OFFICIAL_HOST,
    EVENT_HOST,
    SSO_HOST,
    BBS_HOST,
    USER_HOST,
    MARKET_HOST,
    P_MARKET_HOST,
    PAY_HOST,
    MINI_HOST,
    INVITER_HOST,
    TASK_HOST,
    BURYING_POINT,
    DOMIAN_VALUE,
    CAR_CONTROL_HOST,
    CAR_CONTROL_BIZ_HOST,
    XP_APPID: XP_APPID_MAP[ENV],
    XP_SECRET: XP_SECRET_MAP[ENV],
    PLATFORM_APPID: PLATFORM_APPID_MAP[ENV],
    P5_RESERVE_URL,
    LDX_RESERVE_URL,
    E_CARD_CH,
    UID,
    CASHIER_SEARCH_TIME,
    GIO_CONFIG: {
      ...GIO_CONFIG,
      dataSourceId: GIO_CONFIG.dataSourceId[ENV],
    },
    COMMON_OSS_HOST,
    ADMIN_OSS_HOST,
    ROBOTAXI_HOST,
    ROBOTAXI_WS_HOST,
    AMAP_KEY,
    INVOICE_URL,
    INVOICE_CHARGE_URL,
  },
  mini: {
    // webpackChain (chain) {
    //    chain.plugin('analyzer')
    //       .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
    //    },
    webpackChain: (chain) => {
      chain.merge({
        plugin: {
          install: {
            plugin: require('terser-webpack-plugin'),
            args: [
              {
                terserOptions: {
                  compress: true, // 默认使用terser压缩
                  // mangle: false,
                  keep_classnames: true, // 不改变class名称
                  keep_fnames: true, // 不改变函数名称
                },
              },
            ],
          },
          buildDone: {
            plugin: require('./BuildDonePlugin'),
          },
        },
      })
    },
  },
};