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
| let pages: any = [];
| let subPackages: any = [];
| let tabBar: any = {};
| let plugins: any;
| let requiredPrivateInfos: any = [];
| let singlePage: any = {};
|
| if (process.env.TARO_ENV === 'weapp') {
| pages = [
| // 'pages/home/index',
| 'pages/xpeng/index',
| // 'pages/driveNew/index',
| 'pages/user/index',
| 'pages/user/login',
| 'pages/map/index',
| ];
|
| subPackages = [
| {
| root: 'robotaxi',
| pages: [
| 'pages/demo/index',
| ],
| }
| ];
|
| tabBar = {
| position: 'bottom',
| color: '#B2B2B2',
| selectedColor: '#000000',
| backgroundColor: '#fff',
| borderStyle: 'white',
| custom: false,
| list: [
| // {
| // pagePath: 'pages/home/index',
| // text: '发现',
| // iconPath: './assets/tabbar/tab_icon_home.png',
| // selectedIconPath: './assets/tabbar/tab_icon_home_act.png',
| // },
| // {
| // pagePath: 'pages/driveNew/index',
| // text: '试驾',
| // iconPath: './assets/tabbar/tab_icon_drive.png',
| // selectedIconPath: './assets/tabbar/tab_icon_drive_act.png',
| // },
| {
| pagePath: 'pages/xpeng/index',
| text: '购车',
| iconPath: './assets/tabbar/tab_icon_buy.png',
| selectedIconPath: './assets/tabbar/tab_icon_buy_act.png',
| },
| {
| pagePath: 'pages/map/index',
| text: '充电',
| iconPath: './assets/tabbar/tab_icon_map.png',
| selectedIconPath: './assets/tabbar/tab_icon_map_act.png',
| },
| {
| pagePath: 'pages/user/index',
| text: '我的',
| iconPath: './assets/tabbar/tab_icon_mine.png',
| selectedIconPath: './assets/tabbar/tab_icon_mine_act.png',
| },
| ],
| };
|
| plugins = {
| };
|
| requiredPrivateInfos = [
| 'getLocation',
| ];
|
| singlePage = {
| "navigationBarFit": "squeezed"
| };
| }
|
| const config: any = {
| pages,
| subPackages,
|
| window: {
| backgroundTextStyle: 'dark',
| navigationBarBackgroundColor: '#fff',
| navigationBarTitleText: ' ',
| navigationBarTextStyle: 'black',
| navigationStyle: 'default', // custom
| // backgroundColorTop: '#f00'
| // renderingMode: 'seperated',
| // mixedRenderComponents: ['video', 'map', 'canvas'],
| },
| networkTimeout: {
| request: 60000,
| connectSocket: 60000,
| uploadFile: 60000,
| downloadFile: 60000,
| },
| debug: false,
| resizable: false,
| requiredBackgroundModes: [ 'audio' ],
| permission: {
| 'scope.userLocation': {
| desc: '您的位置信息将用于定位就近的门店'
| }
| },
| }
|
| if (process.env.TARO_ENV !== 'jd') {
| config.tabBar = tabBar;
| }
|
| if (process.env.TARO_ENV === 'alipay') {
| config.window.allowsBounceVertical = 'NO';
| }
|
| if (plugins) {
| config.plugins = plugins;
| }
|
| if (requiredPrivateInfos) {
| config.requiredPrivateInfos = requiredPrivateInfos;
| }
|
| if (singlePage) {
| config.singlePage = singlePage;
| }
|
| export default config;
|
|