chengjie 6 年之前
父节点
当前提交
88b80847ea
共有 2 个文件被更改,包括 18 次插入20 次删除
  1. 1 1
      app.js
  2. 17 19
      pages/index/index.js

+ 1 - 1
app.js

@@ -14,7 +14,7 @@ App({
14
     this.globalData.systemInfo = wx.getSystemInfoSync();
14
     this.globalData.systemInfo = wx.getSystemInfoSync();
15
   },
15
   },
16
   globalData: {
16
   globalData: {
17
-    version: "1.1.5",
17
+    version: "1.1.6",
18
     IsProduction: true,
18
     IsProduction: true,
19
     ProgramID: 105,
19
     ProgramID: 105,
20
     AppID: "wx1fef080f74481cbd",
20
     AppID: "wx1fef080f74481cbd",

+ 17 - 19
pages/index/index.js

@@ -46,7 +46,7 @@ Page({
46
     });
46
     });
47
 
47
 
48
     this.getUserInfo();
48
     this.getUserInfo();
49
-    
49
+
50
     this.updateProgram();
50
     this.updateProgram();
51
   },
51
   },
52
   //得到用户信息
52
   //得到用户信息
@@ -152,10 +152,10 @@ Page({
152
               isShow = 1;
152
               isShow = 1;
153
             }
153
             }
154
           }
154
           }
155
-          app.globalData.IsShow = data.IsShow;
155
+          app.globalData.IsShow = isShow;
156
 
156
 
157
           app.globalData.IsLocked = data.IsLocked;
157
           app.globalData.IsLocked = data.IsLocked;
158
-          
158
+
159
           //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
159
           //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
160
           that.getQuestionType(function () {
160
           that.getQuestionType(function () {
161
 
161
 
@@ -218,26 +218,24 @@ Page({
218
   },
218
   },
219
   getPriceList: function () {
219
   getPriceList: function () {
220
     var that = this;
220
     var that = this;
221
-    if (!wx.getStorageSync("ProductPrice")) {
222
-      server.getData('ProductPayPriceList500', function (data) {
223
-        if (data) {
224
-          var arrProduct = JSON.parse(common.Decrypt(data));
225
-          var programList = server.getProgramList();
226
-          for (var j = 0; j < arrProduct.length; j++) {
227
-            arrProduct[j].ProductList = [];
228
-            var arr = arrProduct[j].ProductNum.split(",");
229
-            for (var k = 0; k < arr.length; k++) {
230
-              for (var i = 0; i < programList.length; i++) {
231
-                if (programList[i].ID == arr[k]) {
232
-                  arrProduct[j].ProductList.push(programList[i]);
233
-                }
221
+    server.getData('ProductPayPriceList500', function (data) {
222
+      if (data) {
223
+        var arrProduct = JSON.parse(common.Decrypt(data));
224
+        var programList = server.getProgramList();
225
+        for (var j = 0; j < arrProduct.length; j++) {
226
+          arrProduct[j].ProductList = [];
227
+          var arr = arrProduct[j].ProductNum.split(",");
228
+          for (var k = 0; k < arr.length; k++) {
229
+            for (var i = 0; i < programList.length; i++) {
230
+              if (programList[i].ID == arr[k]) {
231
+                arrProduct[j].ProductList.push(programList[i]);
234
               }
232
               }
235
             }
233
             }
236
           }
234
           }
237
-          wx.setStorageSync("ProductPrice", arrProduct);
238
         }
235
         }
239
-      });
240
-    }
236
+        wx.setStorageSync("ProductPrice", arrProduct);
237
+      }
238
+    });
241
   },
239
   },
242
   updateProgram: function () {
240
   updateProgram: function () {
243
     const updateManager = wx.getUpdateManager();
241
     const updateManager = wx.getUpdateManager();