chengjie 6 years ago
parent
commit
88b80847ea
2 changed files with 18 additions and 20 deletions
  1. 1 1
      app.js
  2. 17 19
      pages/index/index.js

+ 1 - 1
app.js

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

+ 17 - 19
pages/index/index.js

@@ -46,7 +46,7 @@ Page({
46 46
     });
47 47
 
48 48
     this.getUserInfo();
49
-    
49
+
50 50
     this.updateProgram();
51 51
   },
52 52
   //得到用户信息
@@ -152,10 +152,10 @@ Page({
152 152
               isShow = 1;
153 153
             }
154 154
           }
155
-          app.globalData.IsShow = data.IsShow;
155
+          app.globalData.IsShow = isShow;
156 156
 
157 157
           app.globalData.IsLocked = data.IsLocked;
158
-          
158
+
159 159
           //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
160 160
           that.getQuestionType(function () {
161 161
 
@@ -218,26 +218,24 @@ Page({
218 218
   },
219 219
   getPriceList: function () {
220 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 240
   updateProgram: function () {
243 241
     const updateManager = wx.getUpdateManager();