-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
63 lines (53 loc) · 1.33 KB
/
config.ts
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
/* eslint-disable*/
const subappPageA = "pages/index/index";
const subappPageb = 'pages/index2/index';
const config = {
event : {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
'app:componentDidShow' : (arg) => {
console.log('subapp 启动');
console.log('持续检测用户当前订单是否偏离导航,触发安全机制。');
},
'app:componentDidHide' : (arg) => {
console.log('subapp 启动');
console.log('推入后台暂停检测');
},
},
};
const subPackages = [
{
root : 'doraSubappExample',
name : 'doraSubappExample',
pages : [
subappPageA,
],
},
];
const AppPHHbirdWechatMP = {
...config,
subPackages : subPackages,
};
const AppPHHbirdAlipayMP = {
...config,
subPackages : subPackages
};
const AppPHHbirdBaiduMP = {
...config,
subPackages : subPackages
};
const AppPHHbirdH5 = {
...config,
subPackages : subPackages //放入子包
};
if (process.env.APPNAME === 'myBaiduApp') {
module.exports = AppPHHbirdBaiduMP;
} else if (process.env.APPNAME === 'myWechatApp') {
module.exports = AppPHHbirdWechatMP;
} else if (process.env.APPNAME === 'myAlipayApp') {
module.exports = AppPHHbirdAlipayMP;
} else if (process.env.APPNAME === 'myH5App') {
module.exports = AppPHHbirdH5;
} else {
module.exports = {};
}