chengjie 2 年之前
父節點
當前提交
669763fdcb
共有 2 個文件被更改,包括 59 次插入22 次删除
  1. 23 22
      app.js
  2. 36 0
      project.private.config.json

+ 23 - 22
app.js

@@ -1,29 +1,8 @@
1 1
 //app.js
2 2
 App({
3
-  onLaunch: function (options) {
4
-    this.getSystemInfo();
5
-    if (options && options.scene) {
6
-      //console.log("scene:" + options.scene);
7
-      this.globalData.userSource = options.scene;
8
-    }
9
-  },
10
-  getSystemInfo: function () {
11
-    this.globalData.systemInfo = wx.getSystemInfoSync();
12
-    if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
13
-      this.globalData.IsIOS = false;
14
-      this.globalData.IsAndroid = true;
15
-    }
16
-    else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
17
-      this.globalData.IsIOS = true;
18
-      this.globalData.IsAndroid = false;
19
-    }
20 3
 
21
-    if (this.globalData.systemInfo.model.indexOf("iPad") >= 0) {
22
-      this.globalData.IsIPad = true;
23
-    }
24
-  },
25 4
   globalData: {
26
-    Version: "1.2.16",
5
+    Version: "1.2.20",
27 6
     IsProduction: true,
28 7
     //IsProduction: false,
29 8
     ProgramID: 106,
@@ -60,5 +39,27 @@ App({
60 39
     IsShowMiaoguo:false,
61 40
     IsRefresh: false,
62 41
     IsShowGift:0,
42
+  },
43
+  onLaunch: function (options) {
44
+    this.getSystemInfo();
45
+    if (options && options.scene) {
46
+      //console.log("scene:" + options.scene);
47
+      this.globalData.userSource = options.scene;
48
+    }
49
+  },
50
+  getSystemInfo: function () {
51
+    this.globalData.systemInfo = wx.getSystemInfoSync();
52
+    if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
53
+      this.globalData.IsIOS = false;
54
+      this.globalData.IsAndroid = true;
55
+    }
56
+    else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
57
+      this.globalData.IsIOS = true;
58
+      this.globalData.IsAndroid = false;
59
+    }
60
+
61
+    if (this.globalData.systemInfo.model.indexOf("iPad") >= 0) {
62
+      this.globalData.IsIPad = true;
63
+    }
63 64
   }
64 65
 })

+ 36 - 0
project.private.config.json

@@ -0,0 +1,36 @@
1
+{
2
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
3
+  "condition": {
4
+    "miniprogram": {
5
+      "list": [
6
+        {
7
+          "name": "首页",
8
+          "pathName": "pages/main/index",
9
+          "query": ""
10
+        },
11
+        {
12
+          "name": "列表",
13
+          "pathName": "pages/main/list",
14
+          "query": ""
15
+        },
16
+        {
17
+          "name": "详情页",
18
+          "pathName": "pages/main/detail",
19
+          "query": "bookid=1&unitid=1&wordid=0"
20
+        },
21
+        {
22
+          "name": "\b搜索",
23
+          "pathName": "pages/main/search",
24
+          "query": ""
25
+        },
26
+        {
27
+          "name": "/package4/main/paylist",
28
+          "pathName": "/package4/main/paylist",
29
+          "query": "",
30
+          "launchMode": "default",
31
+          "scene": null
32
+        }
33
+      ]
34
+    }
35
+  }
36
+}