-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
89 lines (78 loc) · 2.22 KB
/
app.js
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
/**
* @file 小程序入口
* @author liuxiaojiea
*/
'use strict';
export default {
config: {
pages: [
'components/productDetail/index',
'pages/home/index',
'pages/menu/index',
'pages/car/index',
'pages/user/index'
],
window: {
navigationBarBackgroundColor: '#845d32',
navigationBarTextStyle: 'white',
backgroundTextStyle: 'light',
enablePullDownRefresh: false,
backgroundColor: '#ccc',
navigationBarTitleText: '小米有品'
},
tabBar: {
color: '#666666',
selectedColor: '#845f3f',
list: [{
"pagePath": "pages/home/index",
"iconPath":"common/img/theOrder.png",
"selectedIconPath":"",
"text": "首页"
}, {
"pagePath": "pages/menu/index",
"iconPath":"common/img/theOrder.png",
"text": "分类"
}, {
"pagePath": "pages/car/index",
"iconPath":"common/img/theOrder.png",
"text": "购物车"
}, {
"pagePath": "pages/user/index",
"iconPath":"common/img/theOrder.png",
"text": "我的"
}]
},
networkTimeout: {
request: 30000
},
/* eslint-disable fecs-camelcase */
_quickEnv: {
networkTimeout: null,
package: 'com.okam.demo',
name: 'okam-quick',
versionCode: '2',
icon: '/common/img/okm.png'
}
/* eslint-enable fecs-camelcase */
},
$promisifyApis: [
'getSystemInfo', 'request'
],
globalData: {
host: 'http://localhost:8088'
},
async onLaunch() {
let result = await this.$api.getSystemInfo();
console.log('launch system info', result);
console.log('show onLaunch...');
},
onShow() {
this.$api.getSystemInfo().then(function (res) {
console.log('systemInfo', res);
});
console.log('show app...');
},
onHide() {
console.log('hide app...');
}
};