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
| var help = require('/util/help.js');
| var api = require('./util/api.js');
| const user = require('./util/user.js');
| var $this;
| App({
| themeColor: "#0080FF",
| appKey: '1000002',
| version: 1,
| logined: false,
| baseUrl: 'https://api.j.banliapp.com',
| onLaunch(options) {
| $this = this;
| // 第一次打开
| // options.query == {number:1}
| console.info('App onLaunch');
| my.hideFavoriteMenu();
|
|
| api.getConfig({
| success: function (res) {
| if (res.code == 0) {
| $this.shareInfo = res.data.shareInfo;
| //保存参数
| help.cacheConfig(res.data);
| }
| }
| });
| user.init();
| },
|
| //全局分享函数
| onShareAppMessage(obj) {
|
| return $this.shareInfo;
| },
|
| onShow(options) {
| // 从后台被 scheme 重新打开
| // options.query == {number:1}
| },
| });
|
|