董国庆
2026-02-14 473d865daf3d53b2bee066ca12e613192602425a
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
// 预发
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 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 XP_APPID_MAP = {
  weapp: '"xxxxxxx"', // 用户中心登录appId
};
const XP_SECRET_MAP = {
  weapp: '"xxxxxxx"', // 用户中心登录密钥
};
const PLATFORM_APPID_MAP = {
  weapp: '"xxxxxxx"', // 微信小程序平台 appId
};
 
const GIO_CONFIG = {
  accountId: '"xxxxxxx"', // 埋点平台id
  dataSourceId: {
    weapp: '"xxxxxxx"', // 埋点数据源id
  },
  host: '"https://collect.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,
    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,
  },
  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, // 不改变函数名称
                },
              },
            ],
          },
        },
      })
    },
  },
};