chengjie vor 6 Jahren
Ursprung
Commit
af8e1e4a9f
2 geänderte Dateien mit 23 neuen und 12 gelöschten Zeilen
  1. 1 1
      app.js
  2. 22 11
      pages/other/help.js

+ 1 - 1
app.js

@@ -26,7 +26,7 @@ App({
26 26
     }
27 27
   },
28 28
   globalData: {
29
-    Version: "1.4.3",
29
+    Version: "1.4.4",
30 30
     IsProduction: true,
31 31
     ShareTitle: "高效学习从秒过开始",
32 32
     SharePath: "pages/index/index",

+ 22 - 11
pages/other/help.js

@@ -15,19 +15,30 @@ Page({
15 15
     id=options.id;
16 16
     idchild=options.idchild;
17 17
 
18
-    var list = wx.getStorageSync("MiaoguoTipsList");
19
-
20
-    that.setData({
21
-      Containnerheight: main.getWindowHeight(),
22
-      Item:list[options.id].List[options.idchild],
23
-      IsShare:options.IsShare,
24
-    });
18
+    that.init(function(list){
19
+      that.setData({
20
+        Containnerheight: main.getWindowHeight(),
21
+        Item: list[options.id].List[options.idchild],
22
+        IsShare: options.IsShare,
23
+      });
25 24
 
26
-    wx.setNavigationBarColor({
27
-      frontColor: "#000000",
28
-      backgroundColor: "#ffffff",
25
+      wx.setNavigationBarColor({
26
+        frontColor: "#000000",
27
+        backgroundColor: "#ffffff",
28
+      });
29 29
     });
30
-    
30
+  },
31
+  init: function (callback) {
32
+    var that = this;
33
+    var list = wx.getStorageSync("MiaoguoTipsList");
34
+    if (!list){
35
+      main.getData("GetMiaoguoTipsList", function (data) {
36
+        callback(data);
37
+        wx.setStorageSync("MiaoguoTipsList", data);
38
+      });
39
+    }
40
+    else
41
+      callback(list);
31 42
   },
32 43
   goto: function (e) {
33 44
     if (this.data.IsShare==1){