chengjie 5 yıl önce
ebeveyn
işleme
9f8fe5b1bf

+ 1 - 1
app.js

@@ -23,7 +23,7 @@ App({
23 23
     }
24 24
   },
25 25
   globalData: {
26
-    Version: "1.2.10",
26
+    Version: "1.2.12",
27 27
     IsProduction: true,
28 28
     ProgramID: 106,
29 29
     AppID: "wx313a8f2c0741efe1",

BIN
pages/images/02037.png


BIN
pages/images/02038.png


BIN
pages/images/02039.png


BIN
pages/images/02040.png


BIN
pages/images/02041.png


BIN
pages/images/02042.png


BIN
pages/images/02043.png


BIN
pages/images/02044.png


BIN
pages/images/02045.png


BIN
pages/images/02046.png


BIN
pages/images/02047.png


BIN
pages/images/02048.png


+ 1 - 11
pages/index/index.js

@@ -253,17 +253,7 @@ Page({
253 253
     });
254 254
 
255 255
     updateManager.onUpdateReady(function () {
256
-      wx.showModal({
257
-        title: '更新提示',
258
-        content: '新版本已经准备好,是否重启应用?',
259
-        success: function (res) {
260
-          if (res.confirm) {
261
-            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
262
-            updateManager.applyUpdate()
263
-          }
264
-        }
265
-      });
266
-
256
+      updateManager.applyUpdate();
267 257
     });
268 258
   },
269 259
   onShareAppMessage: function () {

+ 60 - 0
pages/main/index.wxml

@@ -75,6 +75,66 @@
75 75
             </view>
76 76
           </view>
77 77
         </view>
78
+        <view class="btn" bindtap="goto" data-url="../main/list?id=7">
79
+          <view class="btn1">
80
+            <view class="panel1 FlexRow">
81
+              <image src='../images/02037.png' class="img" />
82
+            </view>
83
+            <view class="panel2 FlexRow">
84
+              <image src='../images/02038.png' class="img2" />
85
+            </view>
86
+          </view>
87
+        </view>
88
+        <view class="btn" bindtap="goto" data-url="../main/list?id=8">
89
+          <view class="btn1">
90
+            <view class="panel1 FlexRow">
91
+              <image src='../images/02041.png' class="img" />
92
+            </view>
93
+            <view class="panel2 FlexRow">
94
+              <image src='../images/02042.png' class="img2" />
95
+            </view>
96
+          </view>
97
+        </view>
98
+        <view class="btn" bindtap="goto" data-url="../main/list?id=9">
99
+          <view class="btn1">
100
+            <view class="panel1 FlexRow">
101
+              <image src='../images/02039.png' class="img" />
102
+            </view>
103
+            <view class="panel2 FlexRow">
104
+              <image src='../images/02040.png' class="img2" />
105
+            </view>
106
+          </view>
107
+        </view>
108
+        <view class="btn" bindtap="goto" data-url="../main/list?id=10">
109
+          <view class="btn1">
110
+            <view class="panel1 FlexRow">
111
+              <image src='../images/02043.png' class="img" />
112
+            </view>
113
+            <view class="panel2 FlexRow">
114
+              <image src='../images/02044.png' class="img2" />
115
+            </view>
116
+          </view>
117
+        </view>
118
+        <view class="btn" bindtap="goto" data-url="../main/list?id=11">
119
+          <view class="btn1">
120
+            <view class="panel1 FlexRow">
121
+              <image src='../images/02045.png' class="img" />
122
+            </view>
123
+            <view class="panel2 FlexRow">
124
+              <image src='../images/02046.png' class="img2" />
125
+            </view>
126
+          </view>
127
+        </view>
128
+        <view class="btn" bindtap="goto" data-url="../main/list?id=12">
129
+          <view class="btn1">
130
+            <view class="panel1 FlexRow">
131
+              <image src='../images/02047.png' class="img" />
132
+            </view>
133
+            <view class="panel2 FlexRow">
134
+              <image src='../images/02048.png' class="img2" />
135
+            </view>
136
+          </view>
137
+        </view>
78 138
       </view>
79 139
     </view>
80 140
     <view class="index7 FlexRow">

+ 1 - 1
pages/main/index.wxss

@@ -71,7 +71,7 @@
71 71
 
72 72
 .index2{
73 73
   width:100%;
74
-  height:1486rpx;
74
+  height:2876rpx;
75 75
   background-color: #DFC7A4;
76 76
   justify-content: flex-start;
77 77
 }

+ 14 - 1
pages/main/list.js

@@ -88,10 +88,23 @@ Page({
88 88
       imgNum = "12";
89 89
     else
90 90
       imgNum = "0" + imgNum;
91
+    
91 92
     this.setData({
92 93
       List: result.Units,
93
-      topImage: "../images/040" + imgNum + ".png"
94 94
     });
95
+
96
+    if (Number(imgNum)<=6){
97
+      this.setData({
98
+        topImage: "../images/040" + imgNum + ".png"
99
+      });
100
+    }
101
+    else{
102
+      this.setData({
103
+        IsRemind:false,
104
+      });
105
+      wx.setStorageSync('IsRemind', false);
106
+    }
107
+
95 108
     wx.setNavigationBarTitle({
96 109
       title: result.Name,
97 110
     });

+ 1 - 1
pages/main/list.wxml

@@ -1,7 +1,7 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Height}}rpx;'>
2 2
   <view class="top line"></view>
3 3
   <view class="top2 top line1 line"></view>
4
-  <image src='{{topImage}}' class="topImage" />
4
+  <image wx:if="{{topImage}}" src='{{topImage}}' class="topImage" />
5 5
 
6 6
   <view class="line"></view>
7 7
 

+ 23 - 20
pages/main/search.js

@@ -4,8 +4,7 @@ import server from '../../utils/main';
4 4
 const app = getApp();
5 5
 
6 6
 Page({
7
-  data: {
8
-  },
7
+  data: {},
9 8
   onLoad: function (options) {
10 9
     this.setData({
11 10
       Height: common.getSystemHeight(),
@@ -17,22 +16,24 @@ Page({
17 16
     var result = [];
18 17
     var arr = JSON.parse(wx.getStorageSync("HanziAll"));
19 18
     for (var i = 0; i < arr.length; i++) {
20
-      var rnd1 = common.random(0, arr[i].Units.length - 1);
21
-      var rnd2 = common.random(0, arr[i].Units[rnd1].Words.length - 1);
19
+      if (arr[i].Units && arr[i].Units.length>0) {
20
+        var rnd1 = common.random(0, arr[i].Units.length - 1);
21
+        var rnd2 = common.random(0, arr[i].Units[rnd1].Words.length - 1);
22 22
 
23
-      var isfinished = false;
24
-      var arrReview = wx.getStorageSync("ReviewList");
25
-      for (var l = 0; l < arrReview.length; l++) {
26
-        if (arrReview[l].Word == arr[i].Units[rnd1].Words[rnd2].Name) {
27
-          isfinished = true;
28
-          break;
23
+        var isfinished = false;
24
+        var arrReview = wx.getStorageSync("ReviewList");
25
+        for (var l = 0; l < arrReview.length; l++) {
26
+          if (arrReview[l].Word == arr[i].Units[rnd1].Words[rnd2].Name) {
27
+            isfinished = true;
28
+            break;
29
+          }
29 30
         }
31
+        arr[i].Units[rnd1].Words[rnd2].BookID = arr[i].ID;
32
+        arr[i].Units[rnd1].Words[rnd2].UnitID = arr[i].Units[rnd1].ID;
33
+        arr[i].Units[rnd1].Words[rnd2].WordID = rnd2;
34
+        arr[i].Units[rnd1].Words[rnd2].IsFinished = isfinished;
35
+        result.push(arr[i].Units[rnd1].Words[rnd2]);
30 36
       }
31
-      arr[i].Units[rnd1].Words[rnd2].BookID = arr[i].ID;
32
-      arr[i].Units[rnd1].Words[rnd2].UnitID = arr[i].Units[rnd1].ID;
33
-      arr[i].Units[rnd1].Words[rnd2].WordID = rnd2;
34
-      arr[i].Units[rnd1].Words[rnd2].IsFinished = isfinished;
35
-      result.push(arr[i].Units[rnd1].Words[rnd2]);
36 37
     }
37 38
     return result;
38 39
   },
@@ -54,15 +55,13 @@ Page({
54 55
           wx.navigateTo({
55 56
             url: "../main/detail?Type=search",
56 57
           });
57
-        }
58
-        else {
58
+        } else {
59 59
           that.setData({
60 60
             IsSearchResult: true,
61 61
           });
62 62
         }
63 63
       });
64
-    }
65
-    else {
64
+    } else {
66 65
       that.setData({
67 66
         IsSearchResult: true,
68 67
       });
@@ -70,7 +69,11 @@ Page({
70 69
   },
71 70
   goto: function (e) {
72 71
     var word = e.currentTarget.dataset.word;
73
-    this.researchWord({ detail: { value: word } });
72
+    this.researchWord({
73
+      detail: {
74
+        value: word
75
+      }
76
+    });
74 77
   },
75 78
   onShareAppMessage: function () {
76 79
     return {