chengjie пре 4 година
родитељ
комит
d815cb03b1

+ 1 - 1
app.js

@@ -1,6 +1,6 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "2.1.15",
3
+    Version: "2.1.18",
4 4
     IsProduction: true,
5 5
     ShareTitle: "高效学习从秒过开始",
6 6
     SharePath: "pages/index/index",

BIN
pages/images/zhishijianyan_70x75.png


+ 34 - 25
pages/index/accredit.js

@@ -6,7 +6,7 @@ var urlRedirectTo = "";
6 6
 
7 7
 Page({
8 8
   data: {
9
-    ShowNotice:false,
9
+    ShowNotice: false,
10 10
   },
11 11
   onLoad: function (options) {
12 12
     urlRedirectTo = options.url;
@@ -18,10 +18,10 @@ Page({
18 18
     this.init();
19 19
 
20 20
     if (!app.globalData.userInfo)
21
-      app.globalData.userInfo={};
21
+      app.globalData.userInfo = {};
22 22
   },
23 23
   init: function () {
24
-    var that=this;
24
+    var that = this;
25 25
     main.getData("GetAccreditInfo?IsShow=" + app.globalData.userInfo.IsShow, function (data) {
26 26
       that.setData({
27 27
         Info: data,
@@ -39,8 +39,7 @@ Page({
39 39
               that.getUserInfo();
40 40
             },
41 41
           })
42
-        }
43
-        else {
42
+        } else {
44 43
           that.getUserInfo();
45 44
         }
46 45
       }
@@ -49,27 +48,37 @@ Page({
49 48
   //得到用户信息
50 49
   getUserInfo: function () {
51 50
     var that = this
52
-    //调用登录接口
53
-    wx.login({
54
-      success: function (res0) {
55
-        wx.getUserInfo({
56
-          withCredentials: true,
57
-          success: function (res) {
58
-            app.globalData.userInfo.Code = res0.code;
59
-            app.globalData.userInfo.iv = res.iv;
60
-            app.globalData.userInfo.encryptedData = res.encryptedData;
61 51
 
62
-            app.globalData.userInfo.NickName = res.userInfo.nickName;
63
-            app.globalData.userInfo.AvatarUrl = res.userInfo.avatarUrl;
52
+    wx.getUserProfile({
53
+      desc: "沟通需要",
54
+      success: function (res2) {
55
+        app.globalData.userInfo.NickName = res2.userInfo.nickName;
56
+        app.globalData.userInfo.AvatarUrl = res2.userInfo.avatarUrl;
57
+
58
+        //调用登录接口
59
+        wx.login({
60
+          success: function (res0) {
61
+            // wx.getUserInfo({
62
+            //   withCredentials: true,
63
+            //   success: function (res) {
64
+                 app.globalData.userInfo.Code = res0.code;
65
+            //     app.globalData.userInfo.iv = res.iv;
66
+            //     app.globalData.userInfo.encryptedData = res.encryptedData;
64 67
 
65
-            that.login(app.globalData.userInfo, res.userInfo);
66
-          },
67
-          fail: function (res) {
68
-            that.gotoReturn();
68
+            that.login(app.globalData.userInfo, res2.userInfo);
69
+            //   },
70
+            //   fail: function (res) {
71
+            //     that.gotoReturn();
72
+            //   }
73
+            // });
69 74
           }
70 75
         });
71 76
       },
77
+      fail: function (res) {
78
+        console.log(res);
79
+      }
72 80
     });
81
+
73 82
   },
74 83
   login: function (param, param2) {
75 84
     var that = this;
@@ -98,20 +107,20 @@ Page({
98 107
       app.globalData.userInfo.City = data.City;
99 108
       app.globalData.userInfo.Province = data.Province;
100 109
       app.globalData.userInfo.Country = data.Country;
101
-      
102
-      app.globalData.userInfo.IsMember=data.IsMember;
110
+
111
+      app.globalData.userInfo.IsMember = data.IsMember;
103 112
 
104 113
       if (app.globalData.userInfo.UserID)
105
-        main.buildInitData(function(){
114
+        main.buildInitData(function () {
106 115
           that.gotoReturn();
107 116
         });
108
-      else{
117
+      else {
109 118
         app.globalData.userInfo.UserID = data.UserID;
110 119
         that.gotoReturn();
111 120
       }
112 121
     });
113 122
   },
114
-  gotoReturn:function(){
123
+  gotoReturn: function () {
115 124
     wx.navigateBack({
116 125
       delta: 1
117 126
     });

+ 8 - 3
pages/index/accredit.wxml

@@ -9,13 +9,18 @@
9 9
     <button bindtap="gotoReturn" class="btn2 btn FlexRow">
10 10
       <view>{{Info.Btn2}}</view>
11 11
     </button>
12
-    <button open-type="getUserInfo" bindgetuserinfo="goto" class="btn2 btn FlexRow">
12
+    <button catchtap="getUserInfo" class="btn2 btn FlexRow">
13 13
       <view>{{Info.Btn1}}</view>
14 14
     </button>
15 15
   </view>
16
-  <button wx:if="{{Info.Btn3}}" open-type="getUserInfo" bindgetuserinfo="goto" class="btn FlexRow">
16
+  <!-- <button wx:if="{{Info.Btn3}}" open-type="getUserInfo" bindgetuserinfo="goto" class="btn FlexRow">
17 17
     <image src="../images/universalpic_share_white_52x40.png" class="universalpic_share_white_52x40" />
18 18
     <view>{{Info.Btn3}}</view>
19 19
   </button>
20
-
20
+   -->
21
+   <button wx:if="{{Info.Btn3}}" catchtap="getUserInfo" class="btn FlexRow">
22
+    <image src="../images/universalpic_share_white_52x40.png" class="universalpic_share_white_52x40" />
23
+    <view>{{Info.Btn3}}</view>
24
+  </button>
25
+  
21 26
 </view>

+ 10 - 68
pages/index/index.js

@@ -2,23 +2,6 @@ import common from '../../utils/util';
2 2
 import main from '../../utils/main';
3 3
 
4 4
 const app = getApp();
5
-const arrSentence = [
6
-  "荀子曰:\n君子博学而日参省乎己,\n则知明而行无过矣",
7
-  "为什么订正过的题目还会错?\n天天秒过,反复巩固,不再出错",
8
-  "子曰:\n学而时习之,不亦说乎。",
9
-  "秒过之前,错字连篇\n秒过之后,错字罕见",
10
-  "子曰:\n学而不思则罔\n思而不学则殆",
11
-  "记忆是思考的残留物\n唯有不断思考才能记住",
12
-  "荀子曰:\n青,取之于蓝,而青于蓝\n冰,水为之,而寒于水",
13
-  "舒适区练习不会带来改变\n只有刻意练习才能提高",
14
-  "荀子曰:\n不积跬步,无以至千里\n不积小流,无以成江海",
15
-  "死记硬背? No! \n测试可以知晓自己\n问题在哪里。",
16
-  "荀子曰:\n骐骥一跃,不能十步\n驽马十驾,功在不舍",
17
-  "同一时间反复练习?No! \n要间隔练习、穿插练习、换环境练习",
18
-  "荀子曰:\n锲而舍之,朽木不折\n锲而不舍,金石可镂",
19
-  "所谓的粗心\n只是对细节缺乏敏感\n秒过关注每个细节",
20
-  "孟子曰:\n故天将降大任于是人也\n必先苦其心志,劳其筋骨\n饿其体肤……",
21
-];
22 5
 
23 6
 var timeout1 = 0, timeout3=0;
24 7
 var timeoutRedirect=0;
@@ -77,7 +60,6 @@ Page({
77 60
         });
78 61
       }
79 62
       else if (options.type == "lesson" || options.type == "video") {
80
-        //console.log("Lesson:" + options.LessonID);
81 63
         app.globalData.LessonID = options.LessonID;
82 64
         if (options.LessonPage)
83 65
           app.globalData.LessonPage = options.LessonPage;
@@ -147,7 +129,7 @@ Page({
147 129
         var pid=options.PrintID;
148 130
         if (!pid)
149 131
           pid=options.P;
150
-        var puid=options.U;
132
+        var puid=options.PUserID;
151 133
         this.setData({
152 134
           gotoType: "other",
153 135
           gotoUrl: "../main/mainlist?PrintID="+pid+"&PrintUserID="+puid,
@@ -163,7 +145,6 @@ Page({
163 145
     this.setData({
164 146
       IsRefresh: false,
165 147
       Containnerheight: main.getWindowHeight(),
166
-      //Sentence: arrSentence[common.random(0, arrSentence.length - 1)],
167 148
       Sentence:common.random(1, 9),
168 149
     });
169 150
 
@@ -187,54 +168,21 @@ Page({
187 168
         app.globalData.userInfo = {};
188 169
         app.globalData.userInfo.Code = res0.code;
189 170
         console.log("Time2:" + new Date().getTime());
190
-        wx.getSetting({
191
-          scope: "scope.userInfo",
192
-          success(res) {
193
-            if (!res.authSetting['scope.userInfo']) {
194
-              app.globalData.userInfo.nickName = "陌生用户";
195
-              app.globalData.userInfo.language = "";
196
-              app.globalData.userInfo.gender = "0";
197
-              app.globalData.userInfo.city = "";
198
-              app.globalData.userInfo.province = "";
199
-              app.globalData.userInfo.country = "";
200
-              app.globalData.userInfo.avatarUrl = "../images/universalpic_face_default_blue_120x120.png";
201
-              that.login(app.globalData.userInfo);
202
-            }
203
-            else {
204
-              wx.getUserInfo({
205
-                withCredentials: false,
206
-                success: function (res) {
207
-                  console.log("Time3:" + new Date().getTime());
208
-                  app.globalData.userInfo = res.userInfo;
209
-
210
-                  app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
211
-                  app.globalData.userInfo.AvatarUrl = app.globalData.userInfo.avatarUrl;
212
-
213
-                  app.globalData.userInfo.Code = res0.code;
214
-                  that.login(app.globalData.userInfo);
215
-
216
-                },
217
-                fail: function (res) {
218
-                  that.login(app.globalData.userInfo);
219
-                }
220
-              });
221
-
222
-            }
223
-          }
224
-        });
171
+        app.globalData.userInfo.nickName = "陌生用户";
172
+        app.globalData.userInfo.language = "";
173
+        app.globalData.userInfo.gender = "0";
174
+        app.globalData.userInfo.city = "";
175
+        app.globalData.userInfo.province = "";
176
+        app.globalData.userInfo.country = "";
177
+        app.globalData.userInfo.avatarUrl = "../images/universalpic_face_default_blue_120x120.png";
178
+        that.login(app.globalData.userInfo);        
225 179
       },
226
-      fail: function () {
227
-
228
-      }
180
+      fail: function () {}
229 181
     });
230 182
   },
231 183
 
232 184
   login: function (param) {
233 185
     var that = this;
234
-    //var userSource = wx.getLaunchOptionsSync();
235
-    //console.log("userSource1:" + userSource.scene);
236
-    //console.log("userSource2:" + app.globalData.userSource);
237
-
238 186
     main.getLocalHost(function () {
239 187
       main.postData('MiaoguoLogin', {
240 188
         Code: param.Code,
@@ -329,13 +277,10 @@ Page({
329 277
               }, 2000);
330 278
             }
331 279
             main.getUserConfig();
332
-
333 280
           }
334 281
           that.getBaiduToken();
335
-          
336 282
         }
337 283
       });
338
-
339 284
     });
340 285
   },
341 286
   getBaiduToken: function () {
@@ -347,7 +292,6 @@ Page({
347 292
 
348 293
     updateManager.onCheckForUpdate(function (res) {
349 294
       // 请求完新版本信息的回调
350
-      //console.log(res.hasUpdate)
351 295
     });
352 296
 
353 297
     updateManager.onUpdateReady(function () {
@@ -363,11 +307,9 @@ Page({
363 307
           wx.removeStorageSync("HanziUpdateTime");
364 308
           wx.removeStorageSync("HanziAll");
365 309
           wx.removeStorageSync("EnglishAll");
366
-          // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
367 310
           updateManager.applyUpdate();
368 311
         }
369 312
       });
370
-
371 313
     });
372 314
   },
373 315
   

+ 13 - 6
pages/main/cardmain.js

@@ -29,9 +29,14 @@ Page({
29 29
     }
30 30
    
31 31
   },
32
+  onPullDownRefresh: function () {
33
+    var that=this;
34
+    app.globalData.FolderList=[];
35
+    that.getFolderList();
36
+    wx.stopPullDownRefresh();
37
+  },
32 38
   onShow:function(){
33 39
     this.init();
34
-
35 40
     if (wx.getStorageSync("TempCardNoSaved")) {
36 41
       wx.navigateTo({
37 42
         url: '../other/recover',
@@ -100,11 +105,6 @@ Page({
100 105
       }
101 106
     });
102 107
   },
103
-  gotoDefault:function(){
104
-    wx.reLaunch({
105
-      url: './default',
106
-    });
107
-  },
108 108
   goto: function (e) {
109 109
     var url = e.currentTarget.dataset.url;
110 110
     wx.navigateTo({
@@ -223,6 +223,13 @@ Page({
223 223
       IsShowOrder:false,
224 224
     });
225 225
   },
226
+
227
+  gotoReLaunch: function (e) {
228
+    var url=e.currentTarget.dataset.url;
229
+    wx.reLaunch({
230
+      url: url,
231
+    });
232
+  },
226 233
   onShareAppMessage: function () {
227 234
     return {
228 235
       title: app.globalData.ShareTitle,

+ 2 - 1
pages/main/cardmain.json

@@ -1,3 +1,4 @@
1 1
 {
2
-  "navigationBarTitleText": "题卡"
2
+  "navigationBarTitleText": "题卡",
3
+  "enablePullDownRefresh": true
3 4
 }

+ 19 - 25
pages/main/cardmain.wxml

@@ -51,32 +51,24 @@
51 51
       <image class="richang_80x90" src='../images/jinji_80x90.png' />
52 52
     </view>
53 53
   </view>
54
-  <view class="panelItem3 FlexRow">
55
-    <view class="panelItem41 FlexRow" bindtap="goto" data-url="../test/index">
56
-      <view class="panelItem311 FlexColumn">
57
-        <view>知识检验</view>
58
-        <view class="panelItem4111">生字单词先检后练</view>
59
-      </view>
60
-      <image class="zhishijianyan_70x75" src='../images/zhishijianyan_70x75.png' />
61
-    </view>
62
-    <view class="panelItem41 FlexRow" bindtap="goto" data-url="../other/help?id=0&idchild=1">
63
-      <view class="panelItem311 FlexColumn">
64
-        <view>秒过官网</view>
65
-        <view class="panelItem4111">高效制作和管理题卡</view>
66
-      </view>
67
-      <image class="zhishijianyan_70x75" src='../images/wangzhan_70x75.png' />
54
+  <view class="panelItem5 FlexRow" bindtap="goto" data-url="../other/help?id=0&idchild=1">
55
+    <view class="panelItem51 FlexRow" >
56
+      <view>秒过官网</view>
57
+      <view class="panelItem511">高效制作和管理题卡</view>
68 58
     </view>
59
+    <image class="zhishijianyan_70x75" src='../images/wangzhan_70x75.png' />
60
+   
69 61
   </view>
70 62
 
71 63
 
72
-  <block wx:if="{{IsYearReport}}">
64
+  <!-- <block wx:if="{{IsYearReport}}">
73 65
     <view class="panelItem5 FlexRow" bindtap="goto" data-url="../other/annualreport">
74 66
       <view class="panelItem51 FlexColumn">
75 67
         2020年度秒过用户年报
76 68
       </view>
77 69
       <image class="report_20201231_04" src='{{ImagePath}}web/report_20201231_04.png' />
78 70
     </view>
79
-  </block>
71
+  </block> -->
80 72
 
81 73
   <view class="panelItem6 FlexRow" wx:if="{{FolderArr}}">
82 74
     <view class="panelItem61 FlexColumn">
@@ -104,8 +96,7 @@
104 96
     <view wx:for="{{FolderArr}}" wx:key="index" class="panelFolder0 panelFolder FlexColumn" 
105 97
     bindtap="getList" data-folderid="{{item.ID}}" data-name="{{item.Name}}" data-color="{{item.ColorName}}" data-icon="{{item.IconName}}">
106 98
       <view class="panelFolder1 FlexColumn" style="background-color: {{item.ColorName}};">
107
-        <image src='{{ImagePath}}web/{{item.IconName}}.png'
108
-          style="width:{{item.Width}}rpx;height:{{item.Height}}rpx;" />
99
+        <image src='{{ImagePath}}web/{{item.IconName}}.png?1' class="folderImage" />
109 100
       </view>
110 101
       <view class="panelItem72">
111 102
         {{item.Name}}
@@ -120,19 +111,22 @@
120 111
   <view class="panelHeight160" wx:if="{{FolderArr}}"></view>
121 112
   <view wx:if="{{IsIPad}}" style="width:100%;height:150rpx;"></view>
122 113
 
123
-  <view class='panelBottom FlexColumn'>
114
+  <view class='panelBottom FlexColumn' catchtap="">
124 115
     <view class='panelBottom1 FlexRow'>
125
-      <view class='panelBottom11 FlexColumn' bindtap="gotoDefault">
116
+      <view class='panelBottom11 FlexColumn' catchtap="gotoReLaunch" data-url="../test/index">
117
+        <view>检验</view>
118
+      </view>
119
+      <view class='panelBottom11 FlexColumn' catchtap="gotoReLaunch" data-url="../main/default">
126 120
         <view>练习</view>
127 121
       </view>
122
+      <view class='panelBottom11 FlexColumn' catchtap="goto" data-url="../main/add?type=add&id=0">
123
+        <image class="tabbar_add_red_70x70" src='../images/tabbar_add_red_70x70.png' />
124
+      </view>
128 125
       <view class='panelBottom11 FlexColumn'>
129 126
         <view class='text5'>题卡</view>
130 127
       </view>
131
-      <view class='panelBottom11 FlexColumn' bindtap="goto" data-url="./add?type=add&id=0">
132
-        <image class="tabbar_add_red_70x70" src='../images/tabbar_add_red_70x70.png' />
133
-      </view>
134
-      <view class='panelBottom12 FlexColumn' bindtap="goto" data-url="../other/userbook">
135
-        <view class='text51'>用户手册</view>
128
+      <view class='panelBottom11 FlexColumn' catchtap="goto" data-url="../other/userbook">
129
+        <view>手册</view>
136 130
       </view>
137 131
     </view>
138 132
 

+ 16 - 21
pages/main/cardmain.wxss

@@ -104,29 +104,9 @@
104 104
   margin-right: 30rpx;
105 105
 }
106 106
 
107
-.panelItem41{
108
-  width:345rpx;
109
-  height:180rpx;
110
-  background-color: #fff;
111
-  border-radius: 20rpx;
112
-  justify-content: space-between;
113
-  margin: 0 10rpx;
114
-}
115
-
116
-.panelItem4111{
117
-  font-size:20rpx;
118
-  color:#1e1e1e;
119
-}
120
-.zhishijianyan_70x75{
121
-  width:70rpx;
122
-  height:75rpx;
123
-  margin-right: 30rpx;
124
-}
125
-
126
-
127 107
 .panelItem5{
128 108
   width:710rpx;
129
-  height:145rpx;
109
+  height:105rpx;
130 110
   background-color: #fff;
131 111
   border-radius: 20rpx;
132 112
   justify-content: space-between;
@@ -138,6 +118,16 @@
138 118
   font-size:32rpx;
139 119
   margin-left: 40rpx;
140 120
 }
121
+.panelItem511{
122
+  color:#4d4d4d;
123
+  font-size:20rpx;
124
+  margin-left: 30rpx;
125
+}
126
+.zhishijianyan_70x75{
127
+  width:50rpx;
128
+  height:54rpx;
129
+  margin-right: 30rpx;
130
+}
141 131
 
142 132
 .report_20201231_04{
143 133
   width:139rpx;
@@ -431,4 +421,9 @@
431 421
   background-color: #5282FA;
432 422
   color:#fff;
433 423
   font-size:32rpx;
424
+}
425
+
426
+.folderImage{
427
+  width:150rpx;
428
+  height:150rpx;
434 429
 }

+ 17 - 15
pages/main/default.js

@@ -49,7 +49,7 @@ Page({
49 49
     var that = this;
50 50
     if (app.globalData.userInfo.IsNewUser && app.globalData.userInfo.IsNewUser == 1 && app.globalData.userInfo.IsShow == 1) {
51 51
       if (app.globalData.userInfo.Subscribe == 0) {
52
-        wx.redirectTo({
52
+        wx.navigateTo({
53 53
           url: '../other/newuser',
54 54
         });
55 55
       }
@@ -57,7 +57,12 @@ Page({
57 57
     else {
58 58
       wx.getSetting({
59 59
         success(res) {
60
-          if (res.authSetting['scope.userInfo'] || app.globalData.userInfo.IsShow == 0) {
60
+          if (app.globalData.userInfo.NickName=="陌生用户" && app.globalData.userInfo.IsMember==1 && app.globalData.userInfo.IsShow == 1){
61
+            wx.navigateTo({
62
+              url: '../index/accredit',
63
+            });
64
+          }
65
+          else{
61 66
             if (!app.globalData.userInfo.IsMember && app.globalData.userInfo.IsShow == 1) {
62 67
               if (app.globalData.userInfo.Subscribe == 1) {
63 68
                 wx.navigateTo({
@@ -115,19 +120,15 @@ Page({
115 120
 
116 121
             that.isNoSavedCard();
117 122
 
118
-          }
119
-          else {
120
-            wx.navigateTo({
121
-              url: '../index/accredit',
122
-            });
123
-          }
123
+            if (res.authSetting['scope.record'] === true) {
124
+              app.globalData.IsRecorderAccredit = 1;
125
+            }
126
+            else if (res.authSetting['scope.record'] === false) {
127
+              app.globalData.IsRecorderAccredit = -1;
128
+            }
124 129
 
125
-          if (res.authSetting['scope.record'] === true) {
126
-            app.globalData.IsRecorderAccredit = 1;
127
-          }
128
-          else if (res.authSetting['scope.record'] === false) {
129
-            app.globalData.IsRecorderAccredit = -1;
130 130
           }
131
+          
131 132
         }
132 133
       });
133 134
     }
@@ -282,9 +283,10 @@ Page({
282 283
     }
283 284
   },
284 285
   
285
-  gotoCardmain: function () {
286
+  gotoReLaunch: function (e) {
287
+    var url=e.currentTarget.dataset.url;
286 288
     wx.reLaunch({
287
-      url: './cardmain',
289
+      url: url,
288 290
     });
289 291
   },
290 292
   showUserID:function(){

+ 11 - 8
pages/main/default.wxml

@@ -17,22 +17,25 @@
17 17
 
18 18
   <view class="setting{{IsIPad}}" catchtap="goto" data-url="../plan/studyplan"></view>
19 19
   
20
-  <view class='panelBottom FlexColumn'>
20
+  <view class='panelBottom FlexColumn' catchtap="">
21 21
 
22 22
     <image class="study_index_footer" src='../images/practise_index_footer.png' />
23 23
 
24 24
     <view class='panelBottom1 FlexRow'>
25
+      <view class='panelBottom11 FlexColumn' catchtap="gotoReLaunch" data-url="../test/index">
26
+        <view>检验</view>
27
+      </view>
25 28
       <view class='panelBottom11 FlexColumn'>
26 29
         <view class='text5'>练习</view>
27 30
       </view>
28
-      <view class='panelBottom11 FlexColumn' bindtap='gotoCardmain'>
29
-        <view>题卡</view>
30
-      </view>
31
-      <view class='panelBottom11 FlexColumn' bindtap="goto" data-url="./add?type=add&id=0">
31
+      <view class='panelBottom11 FlexColumn' catchtap="goto" data-url="../main/add?type=add&id=0">
32 32
         <image class="tabbar_add_red_70x70" src='../images/tabbar_add_red_70x70.png' />
33 33
       </view>
34
-      <view class='panelBottom12 FlexColumn' bindtap="goto" data-url="../other/userbook">
35
-        <view class='text51'>用户手册</view>
34
+      <view class='panelBottom11 FlexColumn' catchtap='gotoReLaunch' data-url="../main/cardmain">
35
+        <view>题卡</view>
36
+      </view>
37
+      <view class='panelBottom11 FlexColumn' catchtap="goto" data-url="../other/userbook">
38
+        <view>手册</view>
36 39
       </view>
37 40
     </view>
38 41
     <view class="iphone10plus" wx:if="{{IsIPhoneX}}"></view>
@@ -83,7 +86,7 @@
83 86
     <view class="panel2 FlexRow">
84 87
       <input class='input2 input' type="number"  always-embed="true"  placeholder="版本号" value="{{VersionID}}" bindinput="onKeyInput" data-type="versionid"/>
85 88
       <button class="btn2" bindtap="setVersionStart" data-versionid="{{VersionID}}" data-flag="1">开通</button>
86
-      <button class="btn2" bindtap="setVersionStart" data-versionid="{{VersionID}}" data-flag="-1">关闭</button>
89
+      <!-- <button class="btn2" bindtap="setVersionStart" data-versionid="{{VersionID}}" data-flag="-1">关闭</button> -->
87 90
     </view>
88 91
 </view>
89 92
 

+ 62 - 17
pages/main/detail.js

@@ -270,12 +270,14 @@ Page({
270 270
       for (var j = 0; j < nMax[0]; j++) {
271 271
         if (indexNew < arrNew.length) {
272 272
           arrNew[indexNew].IsNew = true;
273
+          delete arrNew[indexNew].IsHistory;
273 274
           TaskList.push(arrNew[indexNew++]);
274 275
         }
275 276
       }
276 277
       for (var j = 0; j < nMax[1]; j++) {
277 278
         if (indexHistory < arrHistory.length) {
278 279
           arrHistory[indexHistory].IsHistory = true;
280
+          delete arrHistory[indexHistory].IsNew;
279 281
           TaskList.push(arrHistory[indexHistory++]);
280 282
         }
281 283
       }
@@ -284,7 +286,8 @@ Page({
284 286
     that.data.NumberReview = listTaskReview.length;
285 287
     for (var i = 0; i < listTaskReview.length; i++) {
286 288
       listTaskReview[i].IsReview = true;
287
-
289
+      delete listTaskReview[i].IsNew;
290
+      delete listTaskReview[i].IsHistory;
288 291
       TaskList.push(listTaskReview[i]);
289 292
     }
290 293
 
@@ -487,6 +490,7 @@ Page({
487 490
     this.setData({
488 491
       TaskInfo: TaskList[0],
489 492
       IsMore: false,
493
+      Title:"",
490 494
     });
491 495
   },
492 496
   //回到上一张题卡
@@ -509,7 +513,15 @@ Page({
509 513
       card.Card.Number3 = card.Number3Old;
510 514
       card.Card.Number3Str = card.Number3StrOld;
511 515
 
512
-      if (card.IsReviewOld)
516
+
517
+      delete card.Card.IsNew;
518
+      delete card.Card.IsHistory;
519
+      delete card.Card.IsReview;
520
+      if (card.IsNewOld)
521
+        card.Card.IsNew = card.IsNewOld;
522
+      else if (card.IsHistoryOld)
523
+        card.Card.IsHistory = card.IsHistoryOld;
524
+      else if (card.IsReviewOld)
513 525
         card.Card.IsReview = card.IsReviewOld;
514 526
 
515 527
       //去除重复
@@ -556,12 +568,18 @@ Page({
556 568
       card[0].IsFinally = true;
557 569
       card[0].LimitTime = common.formatTime(new Date(), "/", true) + " 23:59:59";
558 570
       TaskList.push(card[0]);
571
+
572
+      if (currentFolderID>=0){
573
+        that.setCurrentFolder({currentTarget:{dataset:{folderid:currentFolderID}}});
574
+      }
575
+      
559 576
       that.setData({
560 577
         IsShowAnswer: [0, 0],
561 578
         TaskInfo: TaskList[0],
562 579
         CanUndo: 1,
563 580
         Recommend: 0,
564 581
         IsShowOrder: false,
582
+        Title:"",
565 583
       });
566 584
     } else {
567 585
       //若是没有选择了卡单,或者刚刚选择卡单
@@ -584,6 +602,12 @@ Page({
584 602
         finishCard.Number2StrOld = TaskList[0].Number2Str;
585 603
         finishCard.Number3Old = TaskList[0].Number3;
586 604
         finishCard.Number3StrOld = TaskList[0].Number3Str;
605
+        if (TaskList[0].IsNew)
606
+          finishCard.IsNewOld = TaskList[0].IsNew;
607
+        if (TaskList[0].IsHistory)
608
+          finishCard.IsHistoryOld = TaskList[0].IsHistory;
609
+        if (TaskList[0].IsReview)
610
+          finishCard.IsReviewOld = TaskList[0].IsReview;
587 611
 
588 612
 
589 613
         //若是当前题卡更改学习计划
@@ -605,7 +629,7 @@ Page({
605 629
               var minute = Number(time.substr(0, time.indexOf("m")));
606 630
               TaskList[0].LimitTime = common.formatTime(common.addDate("n", minute, new Date()));
607 631
               //若是新建,则10m 1d 4d
608
-              if (TaskList[0].IsNew) {
632
+              if (TaskList[0].IsNew || TaskList[0].IsReview) {
609 633
                 if (minute == 1) {
610 634
                   TaskList[0].Number0 = "1m";
611 635
                   TaskList[0].Number2 = "10m";
@@ -641,9 +665,10 @@ Page({
641 665
                 delete TaskList[0].Number3Str;
642 666
               }
643 667
 
644
-              finishCard.IsReviewOld = TaskList[0].IsReview;
645
-
646 668
               TaskList[0].IsReview = true;
669
+              delete TaskList[0].IsNew;
670
+              delete TaskList[0].IsHistory;
671
+              
647 672
               TaskList.push(TaskList[0]);
648 673
             }
649 674
             //若是天月年
@@ -699,29 +724,30 @@ Page({
699 724
       that.data.NumberReview = 0;
700 725
       for (var i = 0; i < TaskList.length; i++) {
701 726
         if (TaskList[i].IsReview) {
702
-          if (TaskList[i].LimitTime < common.formatTime(new Date())) {
703
-            var card = TaskList.splice(i, 1);
704
-            TaskList.unshift(card[0]);
705
-          }
706 727
           that.data.NumberReview++;
707 728
         } else if (TaskList[i].IsNew) {
708 729
           that.data.NumberNew++;
709 730
         } else if (TaskList[i].IsHistory) {
710 731
           that.data.NumberHistory++;
711 732
         }
712
-        if (TaskList[i].IsFinally) {
713
-          var card = TaskList.splice(i, 1);
714
-          TaskList.push(card[0]);
715
-        }
733
+      }
734
+
735
+      //到时题卡马上显示
736
+      for (var i = 0; i < TaskList.length; i++) {
737
+        if (TaskList[i].IsReview) {
738
+          if (TaskList[i].LimitTime < common.formatTime(new Date())) {
739
+            var card = TaskList.splice(i, 1);
740
+            TaskList.unshift(card[0]);
741
+          }
742
+        } 
716 743
       }
717 744
 
718 745
       currentFolderStart = false;
719 746
       //若选择了卡单
720 747
       var bFolder=false;
721 748
       if (currentFolderID>=0){
722
-
723 749
         for(var i=0;i<TaskList.length;i++){
724
-          if (TaskList[i].FolderID==currentFolderID){
750
+          if (TaskList[i].FolderID==currentFolderID && !TaskList[i].IsFinally){
725 751
             var card = TaskList.splice(i, 1);
726 752
             TaskList.unshift(card[0]);
727 753
             bFolder=true;
@@ -730,6 +756,14 @@ Page({
730 756
         }
731 757
       }
732 758
 
759
+      //挪到最后题卡继续挪到最后
760
+      for (var i = 0; i < TaskList.length; i++) {
761
+        if (TaskList[i].IsFinally) {
762
+          var card = TaskList.splice(i, 1);
763
+          TaskList.push(card[0]);
764
+        }
765
+      }
766
+
733 767
       //console.log(JSON.stringify(TaskList[0]));
734 768
       //如果所有任务完成
735 769
       if (that.data.NumberNew == 0 &&
@@ -981,14 +1015,23 @@ Page({
981 1015
     for (var j = 0; j < FolderList.length; j++) {
982 1016
       FolderList[j].Total = 0;
983 1017
       for (var i = 0; i < TaskList.length; i++) {
984
-        if (TaskList[i].FolderID == FolderList[j].FolderID) {
1018
+        if (TaskList[i].FolderID == FolderList[j].FolderID 
1019
+          && !TaskList[i].IsFinally) {
985 1020
           FolderList[j].Total++;
986 1021
         }
987 1022
       }
988 1023
     }
1024
+    var FolderListLength=FolderList.length;
989 1025
     for (var j = 0; j < FolderList.length; j++) {
990 1026
       if (FolderList[j].Total == 0){
991
-        FolderList.splice(j--,1);
1027
+        FolderListLength--;
1028
+      }
1029
+    }
1030
+
1031
+    var IsFinallyCount=0;
1032
+    for (var j = 0; j < TaskList.length; j++) {
1033
+      if (TaskList[j].IsFinally){
1034
+        IsFinallyCount++;
992 1035
       }
993 1036
     }
994 1037
 
@@ -998,6 +1041,8 @@ Page({
998 1041
       IsMore: false,
999 1042
       IsShowOrder: false,
1000 1043
       FolderList: FolderList,
1044
+      FolderListLength:FolderListLength,
1045
+      IsFinallyCount:IsFinallyCount,
1001 1046
       Title: " ",
1002 1047
     });
1003 1048
   },

+ 13 - 7
pages/main/detail.wxml

@@ -7,15 +7,15 @@
7 7
       <block wx:if="{{!Title}}">
8 8
         <view class="FlexColumn">
9 9
           <view class='panelNumber1'>{{NumberNew}}</view>
10
-          <view hidden="{{!TaskInfo.IsNew || TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
10
+          <view hidden="{{TaskInfo.IsHistory || TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
11 11
         </view>
12 12
         <view class="FlexColumn">
13 13
           <view class='panelNumber1'>{{NumberHistory}}</view>
14
-          <view hidden="{{!TaskInfo.IsHistory || TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
14
+          <view hidden="{{TaskInfo.IsNew || TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
15 15
         </view>
16 16
         <view class="FlexColumn">
17 17
           <view class='panelNumber1'>{{NumberReview}}</view>
18
-          <view hidden="{{!TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
18
+          <view hidden="{{TaskInfo.IsNew || TaskInfo.IsHistory}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
19 19
         </view>
20 20
         <view class="FlexColumn">
21 21
           <view class='panelNumber2 panelNumber1'>{{NumberNew+NumberReview+NumberHistory}}</view>
@@ -284,16 +284,22 @@
284 284
           <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
285 285
 			  </view>
286 286
       </view>
287
-      <view class="FolderTitle" wx:if="{{FolderList.length>1 || FolderList[0].FolderID>0}}">可优先出题的卡单</view>
288
-      <view class="FolderTitle" wx:if="{{FolderList.length==1 && FolderList[0].FolderID==0}}">任务量里没有卡单</view>
287
+      <view class="FolderTitle" wx:if="{{FolderListLength>1 || FolderList[0].FolderID>0}}">任务量里包含以下卡单可优先出题</view>
288
+      <view class="FolderTitle" wx:if="{{(FolderListLength==1 && FolderList[0].FolderID==0) || (FolderListLength==0)}}">当前任务量里没有可优先的卡单</view>
289 289
       <view class="FolderItem0 FolderItem FlexRow" wx:for="{{FolderList}}" catchtap="setCurrentFolder" data-folderid='{{item.FolderID}}'
290
-       wx:key="*this" wx:if="{{item.FolderID!=0}}">
290
+       wx:key="*this" wx:if="{{item.FolderID!=0 && item.Total!=0}}">
291 291
         <view class="FolderItem1">{{item.FolderName}}</view>
292 292
         <view class="MenuRight FlexRow">
293 293
           <view class="FolderItem2 FolderItem1">{{item.Total}}张</view>  
294 294
           <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
295 295
 			  </view>
296 296
       </view>
297
+      <block wx:if="{{IsFinallyCount && IsFinallyCount>0}}">
298
+        <view class="FolderTitle">提醒:有 {{IsFinallyCount}} 张题卡挪到最后练习</view>
299
+        <view class="FolderTitle2">中途退出练习,以上信息均会更新,「挪到最后」不会保留。</view>
300
+      </block>
301
+      <view class="FolderTitle" wx:if="{{IsFinallyCount && IsFinallyCount>0 && FolderList[0].FolderID==0 && FolderList[0].Total==0}}">点「关闭」练完它们</view>
302
+      
297 303
       <view style="height:60rpx"></view>
298 304
     </scroll-view>
299 305
     <view class='numberContainerFooter105 FlexRow' style="background-color:{{Color.BackColor}};">
@@ -304,7 +310,7 @@
304 310
       <switch class="switch" checked="{{IsFolderPractice}}" bindchange="saveIsFolderPractice"/>
305 311
     </view>
306 312
     <view class="numberContaineFooter FlexRow" catchtap='closeNumberContainner'  style="background-color:{{Color.BackColor}};z-index:50;">
307
-      <view>取消</view>
313
+      <view>关闭</view>
308 314
     </view>
309 315
   </view>
310 316
 </view>

+ 6 - 0
pages/main/detail.wxss

@@ -841,4 +841,10 @@ page{
841 841
 .numberContainerFooter10512{
842 842
   font-size:20rpx;
843 843
   color:rgba(255, 255, 255, 0.6);
844
+}
845
+
846
+.FolderTitle2{
847
+  margin: 4rpx 0 0 50rpx;
848
+  font-size:20rpx;
849
+  color:rgba(255, 255, 255, 0.6);
844 850
 }

+ 1 - 1
pages/main/folderEdit.wxml

@@ -29,7 +29,7 @@
29 29
   </view>
30 30
   <view class="panel5 FlexRow" >
31 31
     <view class="panel51 FlexColumn" style="background-color:{{FolderColor}}" bindtap="changeIcon" data-color="{{FolderColor}}" data-icon="{{FolderIcon.ImageUrl}}">
32
-      <image class="{{FolderIcon.ImageUrl}}" src='{{ImagePath}}web/{{FolderIcon.ImageUrl}}.png' style="width:{{FolderIcon.Width}}rpx;height:{{FolderIcon.Height}}rpx;" />
32
+      <image class="{{FolderIcon.ImageUrl}}" src='{{ImagePath}}web/{{FolderIcon.ImageUrl}}.png?1' style="width:150rpx;height:150rpx;" />
33 33
       <view class="panel511" >
34 34
         更换
35 35
       </view>

+ 1 - 1
pages/main/folderIcon.wxml

@@ -30,7 +30,7 @@
30 30
 
31 31
   <view class="panel3 FlexRow" style="background-color:{{BackColor}}">
32 32
     <view class="{{item.SelectIcon}} panel31 FlexRow" wx:for="{{IconArr}}" wx:key="index" bindtap="selectIcon" data-index="{{index}}">
33
-      <image src='{{ImagePath}}web/{{item.ImageUrl}}.png' style="width:{{item.Width}}rpx;height:{{item.Height}}rpx;"/>
33
+      <image src='{{ImagePath}}web/{{item.ImageUrl}}.png?1' style="width:150rpx;height:150rpx;"/>
34 34
     </view>
35 35
   </view>
36 36
 </view>

+ 3 - 0
pages/main/mainlist.js

@@ -113,6 +113,9 @@ Page({
113 113
         PrintID: options.PrintID,
114 114
       });
115 115
 
116
+      console.log("options.PrintUserID:"+options.PrintUserID);
117
+      console.log("app.globalData.userInfo.UserID:"+app.globalData.userInfo.UserID);
118
+      
116 119
       if (options.PrintUserID!=app.globalData.userInfo.UserID){
117 120
         wx.showModal({
118 121
           title: '提醒',

+ 2 - 0
pages/main/systemsetting.js

@@ -7,6 +7,7 @@ Page({
7 7
   data: {
8 8
     IsShow: 0,
9 9
     HasSound: true,
10
+    ShowUserID:"000000000"
10 11
   },
11 12
   onLoad: function (options) {
12 13
     var that = this;
@@ -16,6 +17,7 @@ Page({
16 17
       ProgramName: app.globalData.ProgramName,
17 18
       Version: app.globalData.Version,
18 19
       IsShow: app.globalData.userInfo.IsShow,
20
+      ShowUserID:app.globalData.userInfo.ShowUserID,
19 21
     });
20 22
 
21 23
     common.getStorageValue(this, "HasSound", true, function () {

+ 1 - 1
pages/main/systemsetting.wxml

@@ -20,7 +20,7 @@
20 20
   <view class="panelItem00 panelItem FlexRow" bindtap='updateMember'>
21 21
     重启小程序
22 22
   </view>
23
-  <view class='lineFooter'></view>
23
+  <view class="text2">{{ShowUserID}}</view>
24 24
   <view style='width:100%;height:50rpx;'></view>
25 25
   <text class='text1' bindtap="gotoPayCustom">©2019 秒过™学习\n唱意教育微信小程序 版本 {{Version}}</text>
26 26
   <view style='width:100%;height:100rpx;'></view>

+ 7 - 0
pages/main/systemsetting.wxss

@@ -58,4 +58,11 @@
58 58
   font-size:24rpx;
59 59
   text-align: center;
60 60
   color:#787878;
61
+}
62
+
63
+.text2{
64
+  font-size:24rpx;
65
+  text-align: center;
66
+  color:#787878;
67
+  margin:50rpx 0 0 0;
61 68
 }

+ 9 - 16
pages/other/newuser.js

@@ -16,23 +16,11 @@ Page({
16 16
   onLoad: function (options) {
17 17
     var that = this;
18 18
     backgroundAudioManager = wx.getBackgroundAudioManager();
19
-    wx.getSetting({
20
-      success(res) {
21
-        if (res.authSetting['scope.userInfo'] || app.globalData.userInfo.IsShow == 0) {
22
-          that.setData({
23
-            Containnerheight: main.getWindowHeight(),
24
-          });
25
-      
26
-          that.init(options.index);
27
-
28
-        }
29
-        else {
30
-          wx.navigateTo({
31
-            url: '../index/accredit',
32
-          });
33
-        }
34
-      }
19
+    that.setData({
20
+      Containnerheight: main.getWindowHeight(),
35 21
     });
22
+      
23
+    that.init(options.index);
36 24
   },
37 25
   init: function (index) {
38 26
     var that = this;
@@ -127,6 +115,11 @@ Page({
127 115
         backgroundColorTop: "#ffffff",
128 116
         backgroundColor: "#ffffff",
129 117
       });
118
+      if (app.globalData.userInfo.NickName=="陌生用户" && app.globalData.userInfo.IsShow == 1){
119
+        wx.navigateTo({
120
+          url: '../index/accredit',
121
+        });
122
+      }
130 123
     });
131 124
   },
132 125
   copyManager: function () {

+ 39 - 12
pages/test/index.js

@@ -8,9 +8,10 @@ var testGradeArr=constant.testGradeArr;
8 8
 Page({
9 9
   data: {
10 10
     List: [],
11
-    IsSelectGrade: false,
12 11
     TestSelectGrade: 0,
13
-
12
+    IsIPhoneX: app.globalData.IsIPhoneX,
13
+    IsIPad:app.globalData.IsIPad,
14
+    ScrollLeft:0,
14 15
   },
15 16
   onLoad: function (options) {
16 17
     if (options.UserID){
@@ -21,6 +22,7 @@ Page({
21 22
     var that = this;
22 23
     that.setData({
23 24
       Containnerheight: main.getWindowHeight(),
25
+      Subject:"CHN",
24 26
     });
25 27
 
26 28
     main.getHanzi(function (arr) {
@@ -34,21 +36,19 @@ Page({
34 36
   onShow: function () {
35 37
     this.getTestReportList();
36 38
   },
37
-  showSelectGrade: function () {
38
-    var that = this;
39
-    that.setData({
40
-      IsSelectGrade: true,
41
-    });
42
-  },
43
-  closeSelectGrade: function () {
39
+  selectSubject:function(e){
40
+    var subject=e.currentTarget.dataset.type;
44 41
     var that = this;
45 42
     that.setData({
46
-      IsSelectGrade: false,
43
+      Subject: subject,
47 44
     });
48 45
   },
49 46
   goto: function (e) {
50 47
     var url = e.currentTarget.dataset.url;
51
-    if (e.currentTarget.dataset.type=="Shici"){
48
+    if (url=="../other/userbook"){
49
+
50
+    }
51
+    else if (e.currentTarget.dataset.type=="Shici"){
52 52
       var name1=e.currentTarget.dataset.name1;
53 53
       name1=name1.replace("语文古诗文","语文");
54 54
       url="./item?testtype=recite&name1="+name1+"&bookid="+e.currentTarget.dataset.bookid;
@@ -137,6 +137,7 @@ Page({
137 137
           var item = that.data.GradeArr[j];
138 138
           for (var k = 0; k < item.List.length; k++) {
139 139
             item.List[k].Finished = Math.round(100 * item.List[k].Finish / item.List[k].Total);
140
+            item.List[k].NameStr=item.List[k].Name.replace("语文","");
140 141
           }
141 142
         }
142 143
 
@@ -154,6 +155,27 @@ Page({
154 155
               }
155 156
             }
156 157
           });
158
+
159
+          if (that.data.TestSelectGrade<9){
160
+            that.setData({
161
+              Subject:"CHN",
162
+            });
163
+            if (that.data.TestSelectGrade>4){
164
+              that.setData({
165
+                ScrollLeft:500,
166
+              });
167
+            }
168
+          }
169
+          else{
170
+            that.setData({
171
+              Subject:"ENG",
172
+            });
173
+            if (that.data.TestSelectGrade>11){
174
+              that.setData({
175
+                ScrollLeft:500,
176
+              });
177
+            }
178
+          }
157 179
         });
158 180
       }
159 181
     });
@@ -167,7 +189,6 @@ Page({
167 189
       TestSelectGrade: index,
168 190
       GradeArr: this.data.GradeArr,
169 191
     });
170
-    this.closeSelectGrade();
171 192
     wx.setStorageSync("TestSelectGrade", index);
172 193
   },
173 194
   gotoTestReportInfo: function (e) {
@@ -183,6 +204,12 @@ Page({
183 204
   onUnload: function () {
184 205
     wx.removeStorageSync("UserTestReport");
185 206
   },
207
+  gotoReLaunch: function (e) {
208
+    var url=e.currentTarget.dataset.url;
209
+    wx.reLaunch({
210
+      url: url,
211
+    });
212
+  },
186 213
   onShareAppMessage: function () {
187 214
     return {
188 215
       title: app.globalData.ShareTitle,

+ 67 - 41
pages/test/index.wxml

@@ -1,37 +1,61 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <view class="panelTop FlexRow" bindtap="showSelectGrade">
2
+  <!-- <view class="panelTop FlexRow" bindtap="showSelectGrade">
3 3
     <view class="panelTop1">{{GradeArr[TestSelectGrade].Name2}}</view>
4 4
     <view class="panelTop2 FlexRow">
5 5
       <image class="universalpic_menu_blue_26x26" src="../images/universalpic_menu_blue_26x26.png"></image>
6 6
       <view>更改年级科目</view>
7 7
     </view>
8
+  </view> -->
9
+  <view class="panelTop FlexRow">
10
+    <view class="panelTop1 FlexColumn" catchtap="selectSubject" data-type="CHN">
11
+      <view>语文</view>
12
+      <view class="panelTopLine" wx:if="{{Subject=='CHN'}}"></view>
13
+      <view class="panelTopLine0 panelTopLine" wx:if="{{Subject!='CHN'}}"></view>
14
+    </view>
15
+    <view class="panelTop1 FlexColumn" catchtap="selectSubject" data-type="ENG">
16
+      <view>英语</view>
17
+      <view class="panelTopLine" wx:if="{{Subject=='ENG'}}"></view>
18
+      <view class="panelTopLine0 panelTopLine" wx:if="{{Subject!='ENG'}}"></view>
19
+    </view>
8 20
   </view>
9 21
   <view class="panelLine"></view>
10
-  <scroll-view scroll-x class="panelCard FlexRow">
11
-    <view class="Card" wx:for="{{GradeArr[TestSelectGrade].List}}" wx:key="index" bindtap="goto" data-type="{{item.Type}}" data-bookid="{{item.ID}}" data-name1="{{GradeArr[TestSelectGrade].Name}} {{item.Name}} {{item.Name2}}">
12
-      <image class="examine_subject_a001" src="{{item.Image}}"></image>
13
-      <view class="Card1">{{item.Name}}</view>
14
-      <view class="Card2">{{item.Name2}}</view>
15
-      <view class="Card3">检验过</view>
16
-      <view class="Card4 FlexRow">
17
-        <view class="Progress FlexRow">
18
-          <view class="Progress1" style="width:{{item.Finished}}%;"></view>
22
+  <view class="panel FlexColumn">
23
+    <scroll-view scroll-x class="panelTab FlexRow" scroll-left="{{ScrollLeft}}">
24
+      <view class="Tab0"></view>
25
+      <view class="Tab{{item.Select}} Tab" wx:for="{{GradeArr}}" wx:key="index" wx:if="{{item.Type==Subject}}"
26
+       catchtap='onSelectGrade' data-value='{{index}}'>
27
+        {{item.Name}}
28
+      </view>
29
+    </scroll-view>
30
+    <scroll-view scroll-x class="panelCard FlexRow">
31
+      <view class="Card0"></view>
32
+      <view class="Card" wx:for="{{GradeArr[TestSelectGrade].List}}" wx:key="index" bindtap="goto"
33
+        data-type="{{item.Type}}" data-bookid="{{item.ID}}"
34
+        data-name1="{{GradeArr[TestSelectGrade].Name}} {{item.Name}} {{item.Name2}}">
35
+        <image class="examine_subject_a001" src="{{item.Image}}"></image>
36
+        <view class="Card1">{{item.NameStr}}</view>
37
+        <view class="Card2">{{item.Name2}}</view>
38
+        <view class="Card3">检验过</view>
39
+        <view class="Card4 FlexRow">
40
+          <view class="Progress FlexRow">
41
+            <view class="Progress1" style="width:{{item.Finished}}%;"></view>
42
+          </view>
43
+          <view class="Number">{{item.Finished}}%</view>
19 44
         </view>
20
-        <view class="Number">{{item.Finished}}%</view>
21 45
       </view>
22
-    </view>
23
-    <view class="Card0"></view>
24
-  </scroll-view>
46
+    </scroll-view>
47
+  </view>
48
+
25 49
   <view class="panelList FlexColumn">
26 50
     <view class="panelListTitle FlexRow">
27
-      <view>报告汇总</view>
51
+      <view>检验报告</view>
28 52
     </view>
29 53
     <block wx:if="{{TestReport.length==0}}">
30 54
       <image class="examine_clipboard_80x80" src="../images/examine_clipboard_80x80.png"></image>
31 55
       <text class="panelListContent">您还没有做过知识检验,选择科目开始检验吧,\n检验后的报告将显示在这里。\n</text>
32 56
     </block>
33 57
 
34
-    <block wx:if="{{TestReport.length>0 && index<20}}" wx:for="{{TestReport}}" wx:key="index">
58
+    <block wx:if="{{TestReport.length>0 && index<10}}" wx:for="{{TestReport}}" wx:key="index">
35 59
 
36 60
       <view class="Item FlexRow" bindtap="gotoTestReportInfo" data-id="{{item.ID}}">
37 61
         <view class="Item1 FlexColumn">
@@ -45,10 +69,14 @@
45 69
         <view class="Item2 FlexColumn">
46 70
           <view class="ItemDate">{{item.CreateTime}}</view>
47 71
           <view class="ItemNumber FlexRow">
48
-            <image wx:if="{{item.TestType=='read' && item.IsFinished==1}}" class="examine_willread_gray_22x22" src="../images/examine_willread_green_22x22.png"></image>
49
-            <image wx:if="{{item.TestType=='read' && item.IsFinished==0}}" class="examine_willread_gray_22x22" src="../images/examine_willread_gray_22x22.png"></image>
50
-            <image wx:if="{{item.TestType=='write' && item.IsFinished==1}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_green_22x22.png"></image>
51
-            <image wx:if="{{item.TestType=='write' && item.IsFinished==0}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_gray_22x22.png"></image>
72
+            <image wx:if="{{item.TestType=='read' && item.IsFinished==1}}" class="examine_willread_gray_22x22"
73
+              src="../images/examine_willread_green_22x22.png"></image>
74
+            <image wx:if="{{item.TestType=='read' && item.IsFinished==0}}" class="examine_willread_gray_22x22"
75
+              src="../images/examine_willread_gray_22x22.png"></image>
76
+            <image wx:if="{{item.TestType=='write' && item.IsFinished==1}}" class="examine_willwrite_gray_22x22"
77
+              src="../images/examine_willwrite_green_22x22.png"></image>
78
+            <image wx:if="{{item.TestType=='write' && item.IsFinished==0}}" class="examine_willwrite_gray_22x22"
79
+              src="../images/examine_willwrite_gray_22x22.png"></image>
52 80
             <image class="universalpic_checked_gray_14x12" src="../images/universalpic_checked_gray_14x12.png"></image>
53 81
             <view class="Number2">{{item.TestRightStr.length}}</view>
54 82
             <image class="universalpic_wrong_gray_12x12" src="../images/universalpic_wrong_gray_12x12.png"></image>
@@ -63,30 +91,28 @@
63 91
     </block>
64 92
 
65 93
   </view>
94
+  <view style="width:100%;height:150rpx;"></view>
66 95
 
67
-</view>
68
-
69
-<!-- 更多功能 -->
70
-<view wx:if="{{IsSelectGrade}}" class="numberContainer FlexColumn" style='height:{{Containnerheight}}rpx;'>
71
-  <view class="numberContainerFooter1 FlexColumn">
72
-    <view class='lineFooter'></view>
73
-    <view class='numberContainerFooter101 FlexRow'>
74
-      <view>
75
-        <image class="universalpic_people_black_30x30" src='../images/universalpic_people_black_30x30.png' />
96
+  <view class='panelBottom FlexColumn' catchtap="">
97
+    <view class='panelBottom1 FlexRow'>
98
+      <view class='panelBottom11 FlexColumn'>
99
+        <view class='text5'>检验</view>
76 100
       </view>
77
-      <view class='numberContainerFooter11 FlexColumn'>
78
-        <view class='numberContainerFooter111'>选择年级科目</view>
79
-        <view class='numberContainerFooter113'>目前仅小学初中阶段如下科目开放试用</view>
80
-        <view class='numberContainerFooter112 FlexRow'>
81
-          <view class='numberContainerFooter1121{{item.Select}}' wx:for="{{GradeArr}}" wx:key="index" catchtap='onSelectGrade' data-value='{{index}}'>{{item.Name2}}</view>
82
-        </view>
83
-        <view style="width:100%;height:40rpx;"></view>
101
+      <view class='panelBottom11 FlexColumn' catchtap="gotoReLaunch" data-url="../main/default">
102
+        <view>练习</view>
103
+      </view>
104
+      <view class='panelBottom11 FlexColumn' catchtap="goto" data-url="../main/add?type=add&id=0">
105
+        <image class="tabbar_add_red_70x70" src='../images/tabbar_add_red_70x70.png' />
106
+      </view>
107
+      <view class='panelBottom11 FlexColumn' catchtap="gotoReLaunch" data-url="../main/cardmain">
108
+        <view>题卡</view>
109
+      </view>
110
+      <view class='panelBottom11 FlexColumn' catchtap="goto" data-url="../other/userbook">
111
+        <view>手册</view>
84 112
       </view>
85 113
     </view>
114
+
115
+    <view class="iphone10plus" wx:if="{{IsIPhoneX}}"></view>
86 116
   </view>
87
-  
88
-  <view class='lineFooter'></view>
89
-  <view class="numberContaineFooter FlexRow" catchtap='closeSelectGrade'>
90
-    <view>关闭</view>
91
-  </view>
117
+
92 118
 </view>

+ 103 - 7
pages/test/index.wxss

@@ -3,18 +3,27 @@
3 3
 }
4 4
 .panelTop{
5 5
   width:100%;
6
-  justify-content: space-between;
7
-  height:106rpx;
6
+  height:110rpx;
8 7
   background-color: #fff;
9 8
   position: fixed;
10 9
   z-index: 10;
11 10
   top:0;
12 11
   border-bottom:1rpx solid #d2d2d2; 
12
+  align-items: flex-end;
13 13
 }
14 14
 
15 15
 .panelTop1{
16
+  width:160rpx;
16 17
   font-size:32rpx;
17
-  margin-left: 30rpx;
18
+}
19
+.panelTopLine{
20
+  width:160rpx;
21
+  height:14rpx;
22
+  margin-top: 20rpx;
23
+  background-color: #1E1E1E;
24
+}
25
+.panelTopLine0{
26
+  background-color: #fff;
18 27
 }
19 28
 
20 29
 .panelTop2{
@@ -31,10 +40,43 @@
31 40
 
32 41
 .panelLine{
33 42
   width:100%;
34
-  height:106rpx;
43
+  height:110rpx;
44
+  background-color: #f0f0f0;
45
+}
46
+.panel{
47
+  width:100%;
48
+  height:533rpx;
35 49
   background-color: #f0f0f0;
36 50
 }
37 51
 
52
+.panelTab{
53
+  width:100%;
54
+  background-color: #F0F0F0;
55
+  display: flex;
56
+  white-space: nowrap;
57
+}
58
+
59
+.Tab{
60
+  height:60rpx;
61
+  line-height: 60rpx;
62
+  margin:30rpx 20rpx 0 0;
63
+  font-size:24rpx;
64
+  background-color: #fff;
65
+  border-radius: 10rpx;
66
+  display: inline-block;
67
+  text-align: center;
68
+  padding:0 20rpx;
69
+}
70
+.Tab0{
71
+  width:20rpx;
72
+  height:60rpx;
73
+  display: inline-block;
74
+}
75
+.TabSelect{
76
+  background-color: #5282FA;
77
+  color:#fff;
78
+}
79
+
38 80
 .panelCard{
39 81
   width:100%;
40 82
   height:443rpx;
@@ -49,11 +91,11 @@
49 91
   border-radius: 10rpx;
50 92
   background-color: #fff;
51 93
   display: inline-block;
52
-  margin: 50rpx 0 0 30rpx;
94
+  margin: 45rpx 30rpx 0 0;
53 95
   position: relative;
54 96
 }
55 97
 .Card0{
56
-  width:30rpx;
98
+  width:20rpx;
57 99
   height:343rpx;
58 100
   display: inline-block;
59 101
 }
@@ -324,4 +366,58 @@
324 366
   margin: 30rpx 30rpx 0 0;
325 367
   font-size:24rpx;
326 368
   padding: 0 30rpx;
327
-}
369
+}
370
+
371
+/* 底部导航************************* */
372
+.panelBottom {
373
+  position: fixed;
374
+  bottom: 0;
375
+  width: 100%;
376
+}
377
+.panelBottom1 {
378
+  width: 100%;
379
+  background-color: #fff;
380
+  border-top:1rpx solid #d2d2d2;
381
+}
382
+
383
+.panelBottom11 {
384
+  color:#9B9B9B;
385
+  height:98rpx;
386
+  width:150rpx;
387
+  font-size:36rpx;
388
+}
389
+
390
+.panelBottom12 {
391
+  color:#9B9B9B;
392
+  height:98rpx;
393
+  width:300rpx;
394
+  font-size:36rpx;
395
+}
396
+
397
+.text5{
398
+  color:#1e1e1e;
399
+}
400
+.text51{
401
+  width:220rpx;
402
+  text-align: right;
403
+}
404
+.universalpic_indicator_right_gray{
405
+  width:16rpx;
406
+  height:26rpx;
407
+  margin-left: 30rpx;
408
+  margin-right:30rpx;
409
+}
410
+.universalpic_fav_default_gray_26x24{
411
+  width:26rpx;
412
+  height:24rpx;
413
+  margin-right: 20rpx;
414
+}
415
+.iphone10plus{
416
+  width:100%;
417
+  height:30rpx;
418
+  background-color: #fff;
419
+}
420
+.tabbar_add_red_70x70 {
421
+  width: 70rpx;
422
+  height: 70rpx;
423
+}

+ 7 - 0
pages/test/item.js

@@ -181,6 +181,7 @@ Page({
181 181
       TestType: options.testtype,
182 182
       TestName1: options.name1,
183 183
       TestName2: options.name2,
184
+      UnitID:options.unitsid,
184 185
     });
185 186
 
186 187
     var wordStr="";
@@ -216,6 +217,10 @@ Page({
216 217
           if (options.testtype=="read"){
217 218
             taskInfo.TagWidth=212;
218 219
             taskInfo.FontSize=108;
220
+            if (taskInfo.Content[1].Content.length>=16)
221
+              taskInfo.FontSize=48;
222
+            else if (taskInfo.Content[1].Content.length>=12)
223
+              taskInfo.FontSize=64;
219 224
           }
220 225
           else{
221 226
             taskInfo.TagWidth=186;
@@ -455,6 +460,8 @@ Page({
455 460
       TestTask.TestType = this.data.TestType;
456 461
       TestTask.IsFinished = isFinished;
457 462
       TestTask.Name = this.data.TestName1 + "#" + this.data.TestName2;
463
+      if (this.data.UnitID)
464
+        TestTask.Name+="#"+this.data.UnitID
458 465
       TestTask.List = TaskList;
459 466
       TestTask.BookID=this.data.BookID;
460 467
       wx.setStorageSync("TestTask", TestTask);

+ 7 - 1
pages/test/list.js

@@ -21,6 +21,8 @@ Page({
21 21
       if (!arr) {
22 22
         wx.removeStorageSync("HanziUpdateTime");
23 23
         wx.removeStorageSync("HanziAll");
24
+        wx.removeStorageSync("NewConceptEngList");
25
+        wx.removeStorageSync("CambridgeEngList");
24 26
         main.getHanzi(function (arr) {
25 27
           that.init(options);
26 28
         });
@@ -39,7 +41,11 @@ Page({
39 41
     });
40 42
     var arr = [];
41 43
     var listType="hanzi";
42
-    if (that.data.BookID > 120){
44
+    if (that.data.BookID > 130){
45
+      arr = wx.getStorageSync("CambridgeEngList");
46
+      listType="english";
47
+    }
48
+    else if (that.data.BookID > 120){
43 49
       arr = wx.getStorageSync("NewConceptEngList");
44 50
       listType="english";
45 51
     }

+ 3 - 1
pages/test/list.wxml

@@ -1,6 +1,8 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2 2
 	<view class="text1" wx:if="{{ListType!='english'}}">请对照课本选择字组</view>
3
-	<view class="text1" wx:if="{{ListType=='english'}}">将词汇等分成若干单元以便分批检验,分割方法并无特殊含义</view>
3
+	<view class="text1" wx:if="{{ListType=='english' && BookID<120}}">将词汇等分成若干单元以便分批检验,分割方法并无特殊含义</view>
4
+	<view class="text1" wx:if="{{ListType=='english' && BookID>120 && BookID<130}}">词汇根据Lesson分组</view>
5
+	<view class="textNull" wx:if="{{ListType=='english' && BookID>130 && BookID<140}}"></view>
4 6
 
5 7
 	<block wx:for="{{List}}" wx:key="index">
6 8
 		<view class="PanelItem FlexColumn" bindtap="onShowFrame" data-id="{{item.ID}}">

+ 3 - 0
pages/test/list.wxss

@@ -8,6 +8,9 @@
8 8
   color:#787878;
9 9
   font-weight: 400;
10 10
 }
11
+.textNull{
12
+  margin: 30rpx 0 0 0;
13
+}
11 14
 
12 15
 .PanelItem{
13 16
   width:100%;

+ 2 - 0
pages/test/report.js

@@ -96,6 +96,8 @@ Page({
96 96
       if (TestTask.Name && TestTask.Name.indexOf("#") > 0) {
97 97
         name = TestTask.Name;
98 98
         name = name.substr(name.indexOf("#") + 1);
99
+        if (name.indexOf("#")>0)
100
+          name = name.substr(0,name.indexOf("#"));
99 101
         if (TestTask.TestType == "read")
100 102
           name += " 会念";
101 103
         else if (TestTask.TestType == "recite")

+ 4 - 2
pages/test/wordlist.js

@@ -25,15 +25,17 @@ Page({
25 25
         arr= wx.getStorageSync("EnglishAll");
26 26
       else if (bookid>120 && bookid<130)
27 27
         arr= wx.getStorageSync("NewConceptEngList");
28
+      else if (bookid>=130 && bookid<140)
29
+        arr= wx.getStorageSync("CambridgeEngList");
28 30
     }
29 31
     arr = JSON.parse(arr);
30 32
     var unitsid = Number(options.unitsid);
31
-    var id = Number(options.id);
33
+    var id = options.id;
32 34
     for (var i = 0; i < arr.length; i++) {
33 35
       if (arr[i].ID == unitsid) {
34 36
         var list = arr[i].Units;
35 37
         for (var j = 0; j < list.length; j++) {
36
-          if (list[j].ID==id){
38
+          if (list[j].ID.toString()==id.toString()){
37 39
             unitsName = list[j].Name;
38 40
             words = list[j].Words;
39 41
           }

+ 1 - 1
project.config.json

@@ -36,7 +36,7 @@
36 36
     "useApiHostProcess": false
37 37
   },
38 38
   "compileType": "miniprogram",
39
-  "libVersion": "2.11.3",
39
+  "libVersion": "2.15.0",
40 40
   "appid": "wx84b3feac6069eec3",
41 41
   "projectname": "miaoguo_master",
42 42
   "debugOptions": {

+ 48 - 4
utils/constant.js

@@ -215,6 +215,7 @@ module.exports = {
215 215
   testGradeArr: [{
216 216
     Name: "一年级",
217 217
     Name2: "语文一年级",
218
+    Type:"CHN",
218 219
     Select: "Select",
219 220
     List: [{
220 221
       ID: 1,
@@ -235,7 +236,7 @@ module.exports = {
235 236
     }, {
236 237
       ID: 25,
237 238
       Type: "Shici",
238
-      Name: "语文古诗",
239
+      Name: "语文古诗",
239 240
       Name2: "上学期",
240 241
       Finish: 0,
241 242
       Total: 1,
@@ -269,6 +270,7 @@ module.exports = {
269 270
   {
270 271
     Name: "二年级",
271 272
     Name2: "语文二年级",
273
+    Type:"CHN",
272 274
     Select: "",
273 275
     List: [{
274 276
       ID: 3,
@@ -323,6 +325,7 @@ module.exports = {
323 325
   {
324 326
     Name: "三年级",
325 327
     Name2: "语文三年级",
328
+    Type:"CHN",
326 329
     Select: "",
327 330
     List: [{
328 331
       ID: 5,
@@ -377,6 +380,7 @@ module.exports = {
377 380
   {
378 381
     Name: "四年级",
379 382
     Name2: "语文四年级",
383
+    Type:"CHN",
380 384
     Select: "",
381 385
     List: [{
382 386
       ID: 7,
@@ -431,6 +435,7 @@ module.exports = {
431 435
   {
432 436
     Name: "五年级",
433 437
     Name2: "语文五年级",
438
+    Type:"CHN",
434 439
     Select: "",
435 440
     List: [{
436 441
       ID: 9,
@@ -486,6 +491,7 @@ module.exports = {
486 491
   {
487 492
     Name: "六年级",
488 493
     Name2: "语文六年级",
494
+    Type:"CHN",
489 495
     Select: "",
490 496
     List: [
491 497
       {
@@ -526,6 +532,7 @@ module.exports = {
526 532
   {
527 533
     Name: "七年级",
528 534
     Name2: "语文七年级",
535
+    Type:"CHN",
529 536
     Select: "",
530 537
     List: [
531 538
       {
@@ -550,6 +557,7 @@ module.exports = {
550 557
   {
551 558
     Name: "八年级",
552 559
     Name2: "语文八年级",
560
+    Type:"CHN",
553 561
     Select: "",
554 562
     List: [
555 563
       {
@@ -574,6 +582,7 @@ module.exports = {
574 582
   {
575 583
     Name: "九年级",
576 584
     Name2: "语文九年级",
585
+    Type:"CHN",
577 586
     Select: "",
578 587
     List: [
579 588
       {
@@ -596,8 +605,9 @@ module.exports = {
596 605
     ]
597 606
   },
598 607
   {
599
-    Name: "英语常用单词",
600
-    Name2: "英语常用单词",
608
+    Name: "英语基础",
609
+    Name2: "英语基础",
610
+    Type:"ENG",
601 611
     Select: "",
602 612
     List: [
603 613
       {
@@ -608,7 +618,16 @@ module.exports = {
608 618
         Finish: 0,
609 619
         Total: 26,
610 620
         Image: "../images/examine_subject_b005.png"
611
-      },{
621
+      },
622
+    ]
623
+  },
624
+  {
625
+    Name: "英语常用单词",
626
+    Name2: "英语常用单词",
627
+    Type:"ENG",
628
+    Select: "",
629
+    List: [
630
+      {
612 631
         ID: 101,
613 632
         Type: "Word",
614 633
         Name: "常用单词1",
@@ -657,6 +676,7 @@ module.exports = {
657 676
   },{
658 677
     Name: "新概念英语单词",
659 678
     Name2: "新概念英语单词",
679
+    Type:"ENG",
660 680
     Select: "",
661 681
     List: [
662 682
       {
@@ -696,6 +716,30 @@ module.exports = {
696 716
         Image: "../images/examine_subject_c004.png"
697 717
       }
698 718
     ]
719
+  },{
720
+    Name: "剑桥英语单词",
721
+    Name2: "剑桥英语单词",
722
+    Type:"ENG",
723
+    Select: "",
724
+    List: [
725
+      {
726
+        ID: 131,
727
+        Type: "Word",
728
+        Name: "KET分类单词",
729
+        Name2: "词汇528",
730
+        Finish: 0,
731
+        Total: 17,
732
+        Image: "../images/examine_subject_c001.png"
733
+      },{
734
+        ID: 132,
735
+        Type: "Word",
736
+        Name: "PET分类单词",
737
+        Name2: "词汇1374",
738
+        Finish: 0,
739
+        Total: 54,
740
+        Image: "../images/examine_subject_c002.png"
741
+      }
742
+    ]
699 743
   }],
700 744
   arrPinyin: [
701 745
     ['a1', 'ā', ['阿']],

+ 24 - 20
utils/main.js

@@ -873,34 +873,33 @@ function GetTestReportInfo(reportid, callback) {
873 873
 
874 874
       if (name1[0].indexOf("英语") >= 0) {
875 875
         //console.log("英语");
876
-        var arrEnglist = wx.getStorageSync("EnglishAll");
877
-        if (arrEnglist)
878
-          arrEnglist = JSON.parse(arrEnglist);
879
-        else
880
-          arrEnglist = [];
881
-        
876
+        var wordStr = "";
882 877
         var userTestReportInfo = UserTestReport[n];
883 878
         var bookid = userTestReportInfo.BookID;
884 879
 
885
-        var wordStr = "";
886
-        if (name1[1]=="英文字母"){
887
-          bookid=100;
888
-          wordStr="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
889
-        }
890
-        else{
891
-          for (var i = 0; i < arrEnglist.length; i++) {
892
-            if (arrEnglist[i].Name == name1[1]) {
893
-              for (var j = 0; j < arrEnglist[i].Units.length; j++) {
894
-                if (arrEnglist[i].Units[j].Name == name2) {
895
-                  wordStr = arrEnglist[i].Units[j].Words.join(",");
896
-                  break;
880
+        
881
+        var arrEnglist = [];
882
+        if (bookid<120){
883
+          arrEnglist = wx.getStorageSync("EnglishAll");
884
+          arrEnglist = JSON.parse(arrEnglist);
885
+          if (name1[1]=="英文字母"){
886
+            bookid=100;
887
+            wordStr="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
888
+          }
889
+          else{
890
+            for (var i = 0; i < arrEnglist.length; i++) {
891
+              if (arrEnglist[i].Name == name1[1]) {
892
+                for (var j = 0; j < arrEnglist[i].Units.length; j++) {
893
+                  if (arrEnglist[i].Units[j].Name == name2) {
894
+                    wordStr = arrEnglist[i].Units[j].Words.join(",");
895
+                    break;
896
+                  }
897 897
                 }
898 898
               }
899 899
             }
900 900
           }
901 901
         }
902
-        
903
-        
902
+
904 903
         var tempRight = "," + userTestReportInfo.TestRightStr + ",";
905 904
         var tempWrong = "," + userTestReportInfo.TestWrongStr + ",";
906 905
         var tempSkip = "," + userTestReportInfo.TestSkipStr + ",";
@@ -910,6 +909,9 @@ function GetTestReportInfo(reportid, callback) {
910 909
         if (bookid>120 && bookid<=124){
911 910
           unitsid=Number(name2.replace("Lesson ",""));
912 911
         }
912
+        else if (bookid>130 && bookid<=140 && UserTestReport[n].Name[2]){
913
+          unitsid=Number(UserTestReport[n].Name[2]);
914
+        }
913 915
 
914 916
         getData('GetTestEnglishWords?UserID=' + app.globalData.userInfo.UserID+'&BookID='+bookid+'&LessonID='+unitsid+ '&Words=' + wordStr+"&TestType="+userTestReportInfo.TestType, function (data) {
915 917
           if (data) {
@@ -1118,8 +1120,10 @@ function getHanzi(callback) {
1118 1120
 
1119 1121
         var arrEng = common.Decrypt(data.EngList);
1120 1122
         var arrNewConceptEngList = common.Decrypt(data.NewConceptEngList);
1123
+        var arrCambridgeEngList = common.Decrypt(data.CambridgeEngList);
1121 1124
         wx.setStorageSync("EnglishAll", arrEng);
1122 1125
         wx.setStorageSync("NewConceptEngList", arrNewConceptEngList);
1126
+        wx.setStorageSync("CambridgeEngList", arrCambridgeEngList);
1123 1127
         wx.setStorageSync("HanziUpdateTime", data.UpdateTime);
1124 1128
       } else {
1125 1129
         arr = wx.getStorageSync("HanziAll");

+ 5 - 0
utils/util.js

@@ -367,6 +367,10 @@ function Trim(str) { //删除左右两端的空格
367 367
   return str.replace(/(^\s*)|(\s*$)/g, "");
368 368
 }
369 369
 
370
+function IsNumber(value) {//判断是否是数字,true:是,false:不是
371
+  return !isNaN(value);
372
+}
373
+
370 374
 module.exports = {
371 375
   formatTime: formatTime,
372 376
   formatDateCHS: formatDateCHS,
@@ -388,6 +392,7 @@ module.exports = {
388 392
   addDate: addDate,
389 393
   diffDate: diffDate,
390 394
   Trim: Trim,
395
+  IsNumber:IsNumber,
391 396
   checkIsArray: checkIsArray,
392 397
   formatDateENG: formatDateENG,
393 398
 }