chengjie 4 年之前
父節點
當前提交
ee3f834ebb

+ 2 - 2
app.js

@@ -1,7 +1,7 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "2.1.0",
4
-    IsProduction: false,
3
+    Version: "2.1.8",
4
+    IsProduction: true,
5 5
     ShareTitle: "高效学习从秒过开始",
6 6
     SharePath: "pages/index/index",
7 7
     ShareImage: '../images/program_screenshot_main.png',

二進制
pages/images/universalpic_autoread_gray_30x23.png


二進制
pages/images/universalpic_han_fff20_28x25.png


二進制
pages/images/universalpic_han_gray_28x25.png


+ 1 - 1
pages/index/index.js

@@ -291,7 +291,7 @@ Page({
291 291
           wx.removeStorageSync("UserName");
292 292
 
293 293
           // //测试****************
294
-          // var url = '../main/mainlist';
294
+          // var url = '../other/newuser';
295 295
           // wx.redirectTo({
296 296
           //   url: url,
297 297
           // });

+ 22 - 4
pages/main/add.js

@@ -20,6 +20,7 @@ var innerAudioContext;
20 20
 var isViolate = false; //是否是违禁词
21 21
 var isFirstAdd = true;//是第一个填加
22 22
 var isAddFolder = false;//用于新增卡单时用
23
+var isCancel=false;//是否放弃题卡内容
23 24
 
24 25
 Page({
25 26
   data: {
@@ -58,8 +59,17 @@ Page({
58 59
   getBarInfo(e) {
59 60
     var h=e.detail.topBarHeight;
60 61
     h=h*2;
62
+
63
+    var h2=0;
64
+    var h3=0;
65
+    if (app.globalData.IsIPad){
66
+      h2=-68;
67
+      h3=-100;
68
+    }
61 69
     this.setData({ 
62
-       topBarHeight: h,
70
+      topBarHeight: h,
71
+      topBarHeightIPad: h2,
72
+      topBarHeightIPad2: h3,
63 73
     })
64 74
   },
65 75
   onLoad: function (options) {
@@ -241,7 +251,7 @@ Page({
241 251
     }
242 252
     if (!(that.data && that.data.Field && that.data.Field[1].length == 0 &&
243 253
       that.data.Field[2].length == 0 &&
244
-      that.data.Field[3].length == 0)) {
254
+      that.data.Field[3].length == 0) && !isCancel) {
245 255
       if (!isViolate && (that.data.UpdateType == "add" || that.data.UpdateType == "add2")) {
246 256
         var card = {};
247 257
         card.MiaoguoCardID = that.data.MiaoguoCardID;
@@ -262,6 +272,7 @@ Page({
262 272
         wx.setStorageSync("TempCardNoSaved", card);
263 273
       }
264 274
     }
275
+    isCancel=false;
265 276
 
266 277
   },
267 278
   onUnload: function () {
@@ -289,13 +300,13 @@ Page({
289 300
     if (wx.getStorageSync("IsRemindContinuousNew")==1){
290 301
       wx.removeStorageSync('IsRemindContinuousNew');
291 302
     }
292
-
293 303
   },
294 304
   onClose: function () {
295 305
     wx.navigateBack({
296 306
       delta: 1,
297 307
     });
298
-
308
+    isCancel=true;
309
+    wx.removeStorageSync('TempCardNoSaved');
299 310
     clearInterval(intervalRecorder);
300 311
   },
301 312
   gotoAddItem: function (e) {
@@ -1818,6 +1829,13 @@ Page({
1818 1829
   },
1819 1830
   setCardType:function(e){
1820 1831
     var that=this;
1832
+    if (that.data.CardTypeTemp==1 || that.data.CardType==-1){
1833
+      var limittime=common.formatTime(new Date(),"-",true);
1834
+      that.setData({
1835
+        LimitTime:limittime,
1836
+        PracticeTimeStr:common.formatDateCHS(limittime),
1837
+      });
1838
+    }
1821 1839
     that.setData({
1822 1840
       CardType: Number(that.data.CardTypeTemp),
1823 1841
       PracticeCardType: constant1.arrStudyPattern[that.data.CardTypeTemp]+"题卡",

+ 9 - 9
pages/main/add.wxml

@@ -2,7 +2,7 @@
2 2
 </navigation-bar>
3 3
 
4 4
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;' hidden='{{!HiddenFieldEdit}}'>
5
-	<view class="panelTop FlexRow" style="top:{{topBarHeight}}rpx;">
5
+	<view class="panelTop FlexRow" style="top:{{topBarHeight+topBarHeightIPad}}rpx;">
6 6
 		<view class="panelLeft FlexRow">
7 7
 			<view class='panelTop1 FlexRow' catchtap='onClose'>
8 8
 				放弃
@@ -152,7 +152,7 @@
152 152
 			<view class="panelSave1" catchtap='onGotoList' wx:if="{{UpdateType=='add' || UpdateType=='add2'}}">
153 153
 				复查
154 154
 			</view>
155
-			<view class="panelSave1" catchtap='onClose' wx:if="{{UpdateType!='add' && UpdateType!='add2'}}">
155
+			<view class="panelSave1" wx:if="{{UpdateType!='add' && UpdateType!='add2'}}">
156 156
 				
157 157
 			</view>
158 158
 			<view class='{{BtnSaveSelectCss}} panelSave2' bindtap="saveCard">
@@ -206,7 +206,7 @@
206 206
 </view>
207 207
 
208 208
 <!-- 字段编辑 -->
209
-<view class="addItem container FlexColumn" style='height:{{Containnerheight}}rpx; top:{{topBarHeight}}rpx;'
209
+<view class="addItem container FlexColumn" style='height:{{Containnerheight}}rpx; top:{{topBarHeight+topBarHeightIPad}}rpx;'
210 210
 	hidden='{{HiddenFieldEdit || IsRecorder}}'>
211 211
 	<view class="panelItemTag FlexRow">
212 212
 
@@ -263,9 +263,9 @@
263 263
 	</view>
264 264
 	<view class='lineFooter'></view>
265 265
 	<view class='panelInput'>
266
-		<textarea class="input" style="height:{{InputHeight}}rpx;" maxlength='-1' show-confirm-bar="true"
267
-			value="{{FieldContent}}" focus="{{Focus}}" cursor="{{Cursor}}" bindinput="bindinputField" bindblur="onBindblur"
268
-			bindfocus="onBindFocus" data-id='{{FieldNumber}}' />
266
+		<textarea class="input" style="height:{{InputHeight+topBarHeightIPad2}}rpx;" maxlength='-1' show-confirm-bar="true"
267
+			value="{{FieldContent}}" focus="{{Focus}}" cursor="{{Cursor}}" 
268
+			bindinput="bindinputField" bindblur="onBindblur" bindfocus="onBindFocus" data-id='{{FieldNumber}}' />
269 269
 		</view>
270 270
   <view class='lineFooter'></view>
271 271
   <view class='panelBtnItem FlexColumn'>
@@ -365,8 +365,8 @@
365 365
 	
366 366
 </view>
367 367
 
368
-<view wx:if="{{IsHelp}}" class="HelpContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
369
-  <view class="HelpPanel1 FlexColumn">
368
+<view wx:if="{{IsHelp}}" class="HelpContainer container FlexColumn" style='height:{{Containnerheight}}rpx;top:{{topBarHeight}}rpx;'>
369
+  <view class="HelpPanel1 FlexColumn" style="bottom:{{topBarHeightIPad}}rpx;">
370 370
     <view class="HelpPanel11 FlexRow">
371 371
       <view class="HelpPanel111 FlexRow" catchtap="hiddenPanel">
372 372
         <image src='../images/universalpic_close_black_24x24.png' class="universalpic_close_black_24x24" />
@@ -409,7 +409,7 @@
409 409
 </view>
410 410
 
411 411
 <view wx:if="{{IsFolder}}" class="HelpContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
412
-  <view class="HelpPanel1 FlexColumn">
412
+  <view class="HelpPanel1 FlexColumn"  style="bottom:{{topBarHeightIPad-38}}rpx;">
413 413
     <view class="HelpPanel11 FlexRow">
414 414
       <view class="HelpPanel111 FlexRow" catchtap="hiddenPanel">
415 415
         <image src='../images/universalpic_close_black_24x24.png' class="universalpic_close_black_24x24" />

+ 30 - 133
pages/main/addInfomation.js

@@ -10,6 +10,7 @@ Page({
10 10
     Searching: false,
11 11
     SearchList: [],
12 12
     SearchInfo: "",
13
+    IsMore:true,
13 14
   },
14 15
   onLoad: function () {
15 16
     var that = this;
@@ -45,6 +46,7 @@ Page({
45 46
       }
46 47
       that.setData({
47 48
         SearchWord3: list,
49
+        IsMore:true,
48 50
       });
49 51
     });
50 52
 
@@ -96,9 +98,11 @@ Page({
96 98
       
97 99
       if (obj){
98 100
         main.updateSearchList(obj,function(){
101
+          updateData(that,search);
99 102
           wx.navigateTo({
100 103
             url: './addInfomationDetail',
101 104
           });
105
+          
102 106
         });
103 107
       }
104 108
       else{
@@ -109,146 +113,36 @@ Page({
109 113
         that.setData({
110 114
           SearchList: list,
111 115
           IsStart: true,
116
+          IsMore:true,
112 117
         });
113 118
 
114 119
         that.getCardList();
115 120
 
116
-        setTimeout(function () {
117
-          var arr = that.data.SearchTextList;
118
-          for (var i = 0; i < arr.length; i++) {
119
-            if (arr[i] == search) {
120
-              arr.splice(i, 1);
121
-              break;
122
-            }
123
-          }
124
-          arr.unshift(search);
125
-  
126
-          while (arr.length > 10) {
127
-            arr.pop();
128
-          }
129
-  
130
-          wx.setStorageSync("SearchTextList", arr);
131
-          that.setData({
132
-            SearchTextList: arr,
133
-          });
134
-        }, 2000);
121
+        updateData(that,search);
135 122
       }
136
-
137
-      
138 123
     });
139 124
 
140
-    // wx.showLoading({
141
-    //   title: '查询中',
142
-    // });
143
-    // var timeout=setTimeout(function () {
144
-    //   wx.hideLoading();
145
-    // }, 5000);
146
-
147
-    // var url = 'GetMiaoguoAISearch2?UserID=' + app.globalData.userInfo.UserID;
148
-    // url += "&Word=" + search;
149
-    // if (e.currentTarget.dataset.searchtype)
150
-    //   url += "&SearchType=" + e.currentTarget.dataset.searchtype;
151
-    // if (e.currentTarget.dataset.author)
152
-    //   url += "&Author=" + e.currentTarget.dataset.author;
153
-    // if (e.currentTarget.dataset.shiciurl)
154
-    //   url += "&ShiciUrl=" + e.currentTarget.dataset.shiciurl;
155
-
156
-    // main.getData(url, function (data) {
157
-    //   wx.hideLoading();
158
-    //   clearTimeout(timeout);
159
-    //   wx.setNavigationBarTitle({
160
-    //     title: "搜索结果"
161
-    //   });
162
-    //   if (data) {
163
-    //     //console.log(data);
164
-
165
-    //     if (data.List) {
166
-    //       var len = WORD_LENGTH;
167
-    //       var list = data.List;
168
-    //       for (var i = 0; i < list.length; i++) {
169
-    //         var item = list[i];
170
-    //         if (item.TypeName == "字词") {
171
-    //           if (item.Key.length == 1)
172
-    //             item.TypeName = "Z";
173
-    //           else
174
-    //             item.TypeName = "C";
175
-    //         } else if (item.TypeName == "诗词") {
176
-    //           item.TypeName = "S";
177
-    //           item.Remark = item.Author + " " + item.Dynasty;
178
-    //         } else if (item.TypeName == "翻译") {
179
-    //           item.TypeName = "D";
180
-    //         }
181
-
182
-    //         if (item.Content && item.Content.length > len)
183
-    //           item.Content = item.Content.substr(0, len) + "...";
184
-
185
-    //       }
186
-    //       that.setData({
187
-    //         SearchList: list,
188
-    //         IsStart: true,
189
-    //       });
190
-    //     } else if (data.CHN || data.ENG) {
191
-    //       var obj = {};
192
-    //       obj.Key = search;
193
-    //       obj.Value = data;
194
-    //       if (data.CHN && data.CHN.Author)
195
-    //         obj.Author = data.CHN.Author;
196
-    //       if (data.CHN && data.CHN.Dynasty)
197
-    //         obj.Dynasty = data.CHN.Dynasty;
198
-    //       if (data.CHN && data.CHN.PeomContent) {
199
-    //         obj.Type = "shici";
200
-    //         obj.TypeName = "诗词";
201
-    //         obj.Content = data.CHN.PeomContent.join("").substr(0, WORD_LENGTH);
202
-    //         obj.ShiciUrl = e.currentTarget.dataset.shiciurl;
203
-    //       } else if (data.CHN) {
204
-    //         obj.Type = "zici";
205
-    //         if (data.CHN.PinYin && data.CHN.PinYin[0] && data.CHN.PinYin[0].pinyin)
206
-    //           obj.Remark = data.CHN.PinYin[0].pinyin;
207
-    //         if (data.CHN.PinYin && data.CHN.PinYin[0] && data.CHN.PinYin[0].explain) {
208
-    //           obj.Content = data.CHN.PinYin[0].explain.substr(0, WORD_LENGTH);
209
-    //           obj.Content = obj.Content.replace("<p>", "");
210
-    //           obj.Content = obj.Content.replace("</p>", "");
211
-    //           if (obj.Content.length >= WORD_LENGTH)
212
-    //             obj.Content += "..."
213
-    //         }
214
-    //       }
215
-    //       if (data.ENG && !data.CHN) {
216
-    //         obj.Type = "eng";
217
-    //         obj.TypeName = "D";
218
-    //         if (data.ENG.Soundmark && data.ENG.Soundmark.Eng)
219
-    //           obj.Remark = data.ENG.Soundmark.Eng;
220
-    //         if (data.ENG.Paraphrase.length > 0) {
221
-    //           if (common.checkIsArray(data.ENG.Paraphrase) && data.ENG.Paraphrase[0].ParaphraseList)
222
-    //             obj.Content = data.ENG.Paraphrase[0].ParaphraseList.join("; ").substr(0, WORD_LENGTH);
223
-    //           else
224
-    //             obj.Content = data.ENG.Paraphrase.substr(0, WORD_LENGTH) + "...";
225
-    //         }
226
-    //       }
227
-
228
-    //       main.updateSearchList(obj);
125
+    function updateData(obj,search) {
126
+      setTimeout(function () {
127
+        var arr = obj.data.SearchTextList;
128
+        for (var i = 0; i < arr.length; i++) {
129
+          if (arr[i] == search) {
130
+            arr.splice(i, 1);
131
+            break;
132
+          }
133
+        }
134
+        arr.unshift(search);
229 135
 
230
-    //       app.globalData.TempSearchBackNumber = 2;
231
-    //       //app.globalData.CardList=[];
232
-    //       app.globalData.CardList2=[];
233
-    //       wx.navigateTo({
234
-    //         url: './addInfomationDetail',
235
-    //       });
236
-    //     }
237
-    //     else{
238
-    //       that.setData({
239
-    //         SearchList: [],
240
-    //         IsStart: true,
241
-    //       });
242
-    //     }
243
-    //   } else {
244
-    //     that.setData({
245
-    //       SearchList: [],
246
-    //       IsStart: true,
247
-    //     });
248
-    //   }
136
+        while (arr.length > 10) {
137
+          arr.pop();
138
+        }
249 139
 
250
-      
251
-    // });
140
+        wx.setStorageSync("SearchTextList", arr);
141
+        obj.setData({
142
+          SearchTextList: arr,
143
+        });
144
+      }, 2000);
145
+    }
252 146
   },
253 147
   getCardList: function () {
254 148
     var that = this;
@@ -337,9 +231,12 @@ Page({
337 231
       SearchWord3: that.data.SearchWord3,
338 232
     });
339 233
     wx.setStorageSync("SearchWord3", that.data.SearchWord3);
340
-
341 234
   },
342
-
235
+  setMoreHide:function(){
236
+    this.setData({
237
+      IsMore:false,
238
+    });
239
+  },
343 240
   onShareAppMessage: function () {
344 241
     return {
345 242
       title: app.globalData.ShareTitle,

+ 4 - 1
pages/main/addInfomation.wxml

@@ -94,7 +94,7 @@
94 94
       <view class="panelSearchDataOther FlexColumn">
95 95
         <view class="panelSearchDataOther2 FlexRow"  wx:for="{{SearchList}}" wx:key="index"
96 96
           bindtap='searchResult' data-search="{{item.Key}}" data-type="SearchList" data-author="{{item.Author}}"
97
-          data-searchtype="{{item.Type}}" data-shiciurl="{{item.Url}}">
97
+          data-searchtype="{{item.Type}}" data-shiciurl="{{item.Url}}" wx:if="{{(IsMore && index<4) || (!IsMore)}}">
98 98
           <view class="panelSearchDataImage{{item.TypeName}} panelSearchDataImage FlexColumn">
99 99
             <image wx:if="{{item.TypeName=='Z'}}" class="universalpic_dictionary_hanzi_black_54x26"
100 100
               src='../images/universalpic_dictionary_hanzi_black_54x26.png' />
@@ -113,6 +113,9 @@
113 113
           <view>
114 114
           </view>
115 115
         </view>
116
+
117
+        <view class="panelSearchMore" wx:if="{{SearchList.length>4 && IsMore}}" bindtap="setMoreHide">更多</view>
118
+
116 119
       </view>
117 120
     </view>
118 121
 

+ 10 - 0
pages/main/addInfomation.wxss

@@ -283,6 +283,16 @@
283 283
   margin-bottom: 30rpx;
284 284
 }
285 285
 
286
+.panelSearchMore{
287
+  width:710rpx;
288
+  height:110rpx;
289
+  background-color: #E3E3E3;
290
+  border-radius: 10rpx;
291
+  text-align: center;
292
+  line-height: 110rpx;
293
+  font-size: 36rpx;
294
+  margin-top:20rpx;
295
+}
286 296
 
287 297
 .panelHeight60{
288 298
   width:100%;

+ 22 - 2
pages/main/addInfomationDetail.wxml

@@ -62,6 +62,26 @@
62 62
     </view>
63 63
   </block>
64 64
 
65
+  <!-- 变调 -->
66
+  <block wx:if="{{Result.CHN.PinyinTone && Result.CHN.PinyinTone.length>0 && Result.CHN.PinYin[0].pinyin!=Result.CHN.PinyinTone}}">
67
+    <view class="panelTitle FlexColumn">
68
+      <view class="panelTitle1 FlexRow">
69
+        <image class="universalpic_soundwave_black_30x22" src='../images/universalpic_soundwave_black_30x22.png' />
70
+        <view class="panelTitle11">变调</view>
71
+      </view>
72
+      <view class="panelTitle2">口语中汉字的音节调值有变调现象,仅供参考。学习上请以教材为准。</view>
73
+    </view>
74
+
75
+    <view class="{{CSS.CHN_PinyinTone.Css1}} panelItem FlexRow" bindtap='getInputData' data-type="normal"  data-type="sound" 
76
+      data-content="{{Result.CHN.PinyinTone}}" data-css="CHN_PinyinTone" data-tag="拼音">
77
+      <view class="FlexRow">
78
+        <view class="{{CSS.CHN_PinyinTone.Css2}} panelSelect0">{{CSS.CHN_PinyinTone.Number}}</view>
79
+        <view class="panelItemText">{{Result.CHN.PinyinTone}}</view>
80
+      </view>
81
+      <view></view>
82
+    </view>
83
+  </block>
84
+
65 85
   <!-- 默写 -->
66 86
   <block wx:if="{{Result.CHN.TianKong && Result.CHN.TianKong.length>0}}">
67 87
     <view class="panelTitle FlexColumn">
@@ -278,7 +298,7 @@
278 298
       </view>
279 299
     </view>
280 300
     <view class="{{CSS.CHN_Author.Css1}} panelItem FlexRow" bindtap='getInputData' data-type="normal"
281
-      data-content="{{Result.CHN.Author}}" data-css="CHN_Author" data-tag="">
301
+      data-content="{{ Result.CHN.Dynasty+' '+Result.CHN.Author}}" data-css="CHN_Author" data-tag="">
282 302
       <view class="FlexRow">
283 303
         <view class="{{CSS.CHN_Author.Css2}} panelSelect0">{{CSS.CHN_Author.Number}}</view>
284 304
         <view class="panelItemText">{{Result.CHN.Dynasty}} {{Result.CHN.Author}}</view>
@@ -590,7 +610,7 @@
590 610
       </view>
591 611
       <view></view>
592 612
     </view>
593
-    <swiper class="HelpPanel2" indicator-dots="true" autoplay="true" interval="5000" duration="2000">
613
+    <swiper class="HelpPanel2" indicator-dots="true" autoplay="true" interval="10000" duration="500">
594 614
       <block wx:for="{{HelpArr}}" wx:key="*this">
595 615
         <swiper-item>
596 616
           <view class="HelpPanel12 FlexColumn">

+ 190 - 94
pages/main/detail.js

@@ -27,7 +27,7 @@ var tempPlayUrlLocal = "";
27 27
 var timeoutEveryCard = 0;
28 28
 var timeoutHide = 0;
29 29
 
30
-var cardTypeName="";
30
+var arrAutoAudio=[];
31 31
 
32 32
 Page({
33 33
   data: {
@@ -41,6 +41,9 @@ Page({
41 41
     StudyPlanArray: arrStudyPlan,
42 42
     TaskInfo: {},
43 43
     Color: {ID: 1},
44
+    IsAutoSound:false,//是否设置了自动播放
45
+    IsAutoSoundStart:false,//是否开始自动播放
46
+    Title:"",
44 47
   },
45 48
   onReady: function () {
46 49
     var that = this;
@@ -54,6 +57,9 @@ Page({
54 57
       that.audioCtx.setSrc(tempPlayUrl);
55 58
       that.audioCtx.play();
56 59
     });
60
+    innerAudioContext1.onEnded((res) => {
61
+      that.audioBindEnded();
62
+    });
57 63
 
58 64
     common.getStorageValue(that, "HasSound", true, function () {
59 65
       wx.setStorageSync("HasSound", that.data.HasSound);
@@ -71,14 +77,6 @@ Page({
71 77
       });
72 78
     }
73 79
 
74
-    var cardType = options.CardType;
75
-    if (!cardType)
76
-      cardType = 0;
77
-    cardTypeName=constant.arrStudyPattern[cardType]+"练习";
78
-    this.setData({
79
-      CardTypeName: cardTypeName,
80
-    });
81
-
82 80
     that.setData({
83 81
       Containnerheight: height,
84 82
       Containnerheight2: height - height2,
@@ -97,8 +95,7 @@ Page({
97 95
     this.getColor();
98 96
 
99 97
     this.getMemoryLevel();
100
- 
101
-
98
+    
102 99
     if (app.globalData.BaiduToken === "")
103 100
       main.getBaiduToken();
104 101
 
@@ -301,6 +298,8 @@ Page({
301 298
       CanUndo: 0,
302 299
     });
303 300
 
301
+    that.autoAudioPlayInit();
302
+
304 303
     listTaskFinished = [];
305 304
     that.timeCompute(); //起始时间
306 305
 
@@ -353,12 +352,15 @@ Page({
353 352
           that.data.IsShowAnswer[0] = 0;
354 353
           that.data.IsShowAnswer[1] = 0;
355 354
         } else {
356
-          if (!that.data.IsShowAnswer)
355
+          if (!that.data.IsShowAnswer){
357 356
             that.data.IsShowAnswer=[0,0];
357
+          }
358 358
           if (that.data.IsShowAnswer[0]==0 && that.data.IsShowAnswer[1]==0) {
359 359
             that.data.IsShowAnswer[0] = 1;
360
+            
360 361
             if (TaskList[0].ContentNew.Field[3].length == 0) {
361 362
               that.data.IsShowAnswer[1] = 1;
363
+              
362 364
               if (!that.data.TaskInfo.IsNew)
363 365
                 recommend = getRecommendTime();
364 366
               that.setData({
@@ -367,6 +369,7 @@ Page({
367 369
             }
368 370
           } else if (that.data.IsShowAnswer[0] && !that.data.IsShowAnswer[1]) {
369 371
             that.data.IsShowAnswer[1] = 1;
372
+            
370 373
             if (!that.data.TaskInfo.IsNew)
371 374
               recommend = getRecommendTime();
372 375
             that.setData({
@@ -377,6 +380,7 @@ Page({
377 380
         that.setData({
378 381
           IsShowAnswer: that.data.IsShowAnswer,
379 382
         });
383
+        that.autoAudioPlayInit();
380 384
 
381 385
         if (that.data.IsShowAnswer[1]){
382 386
           var query = wx.createSelectorQuery().in(that)
@@ -476,6 +480,7 @@ Page({
476 480
         CanUndo: canUndo,
477 481
         Recommend: 0,
478 482
       });
483
+      that.autoAudioPlayInit();
479 484
 
480 485
       wx.showToast({
481 486
         title: '回到上一张',
@@ -692,6 +697,8 @@ Page({
692 697
           IsMore: false,
693 698
         });
694 699
 
700
+        that.autoAudioPlayInit();
701
+
695 702
         if (btnnumber == "1") {
696 703
           that.setSoundFile(3);
697 704
           if (time == "1d") {
@@ -759,85 +766,6 @@ Page({
759 766
       main.setCollect(TaskList[0].MiaoguoCardID, TaskList[0].IsCollect);
760 767
     }
761 768
   },
762
-  playSound: function (e) {
763
-    clearTimeout(timeoutPlayAudio);
764
-
765
-    var that = this;
766
-    var str = e.currentTarget.dataset.content;
767
-    var url;
768
-    if (str == "recorder") {
769
-      url = e.currentTarget.dataset.soundmark;
770
-    } else if (str.indexOf("英 [") >= 0 || str.indexOf("美 [") >= 0) {
771
-      str = str.replace("英 [", "[");
772
-      str = str.replace("美 [", "[");
773
-      url = e.currentTarget.dataset.soundmark;
774
-    } else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark != "undefined") {
775
-      var soundmark = e.currentTarget.dataset.soundmark;
776
-      if (soundmark && soundmark.indexOf("http") < 0) {
777
-        url = app.globalData.audioUrlBaidu;
778
-        url = url.replace("[token]", app.globalData.BaiduToken);
779
-        url = url.replace("[word]", soundmark);
780
-      } else {
781
-        url = soundmark;
782
-      }
783
-    } else {
784
-      url = app.globalData.audioUrlBaidu;
785
-      url = url.replace("[token]", app.globalData.BaiduToken);
786
-      url = url.replace("[word]", str);
787
-    }
788
-
789
-
790
-    if (url.indexOf("http") > 0)
791
-      url = url.substr(url.indexOf("http"));
792
-    if (url.indexOf("'") > 0)
793
-      url = common.ReplaceAllString(url, "'", "");
794
-    url = url.replace("http://", "https://");
795
-
796
-    url = encodeURI(url);
797
-    if (!isPlaying || tempPlayUrl == "" || url != tempPlayUrl) {
798
-      isPlaying = true;
799
-      timeoutPlayAudio = setTimeout(function () {
800
-        isPlaying = false;
801
-      }, 60000);
802
-
803
-      wx.showLoading({
804
-        title: '音频下载中',
805
-        mask: true,
806
-      });
807
-      setTimeout(function () {
808
-        wx.hideLoading();
809
-      }, 30000);
810
-
811
-      wx.downloadFile({
812
-        url: url,
813
-        success(res) {
814
-          wx.hideLoading();
815
-          if (res.statusCode === 200) {
816
-            tempPlayUrlLocal = res.tempFilePath;
817
-            that.audioCtx.setSrc(res.tempFilePath);
818
-            that.audioCtx.play();
819
-            tempPlayUrl = url;
820
-          }
821
-        },
822
-        fail(err) {
823
-          wx.hideLoading();
824
-        }
825
-      });
826
-    } else {
827
-      this.audioCtx.pause();
828
-      if (innerAudioContext1)
829
-        innerAudioContext1.stop();
830
-      isPlaying = false;
831
-    }
832
-  },
833
-  audioBindEnded: function () {
834
-    isPlaying = false;
835
-  },
836
-  audioBindError: function (err) {
837
-    console.log(err);
838
-    innerAudioContext1.src = tempPlayUrlLocal;
839
-    innerAudioContext1.play();
840
-  },
841 769
   getTaskTime: function () {
842 770
     var that = this;
843 771
     var url = "GetMiaoguoTaskTime?";
@@ -863,7 +791,7 @@ Page({
863 791
           TodayTime: duration,
864 792
           Speed1: speed1 + "张题卡",
865 793
           Speed2: speed2,
866
-          CardTypeName:"报告",
794
+          Title:"报告",
867 795
         });
868 796
 
869 797
       }
@@ -874,7 +802,7 @@ Page({
874 802
       IsShowNumberInfo: true,
875 803
     });
876 804
     this.setData({
877
-      CardTypeName:"进度",
805
+      Title:"进度",
878 806
     });
879 807
   },
880 808
   closeNumberContainner: function () {
@@ -883,7 +811,7 @@ Page({
883 811
       IsMore: false,
884 812
     });
885 813
     this.setData({
886
-      CardTypeName: cardTypeName,
814
+      Title: "",
887 815
     });
888 816
   },
889 817
   showImage: function (e) {
@@ -1076,6 +1004,174 @@ Page({
1076 1004
       that.closeNumberContainner();
1077 1005
     });
1078 1006
   },
1007
+  switchSound:function(e){
1008
+    var that=this;
1009
+    var autoAudio=!that.data.IsAutoSound;
1010
+    that.setData({
1011
+      IsAutoSound:autoAudio,
1012
+    });
1013
+    if (autoAudio){
1014
+      wx.setStorageSync('IsAutoSound', 1);
1015
+      wx.showModal({
1016
+        title: '提醒',
1017
+        content: '如果题卡里有朗读和录音内容,开启后会按段落顺序逐个自动播放。界面右侧有停止按键。如不想被声音干扰,请关闭该功能。',
1018
+        showCancel: false,
1019
+        confirmText: "知道了",
1020
+        success(res) {
1021
+          
1022
+        },
1023
+      });
1024
+    }
1025
+    else{
1026
+      wx.setStorageSync('IsAutoSound', 0);
1027
+    }
1028
+  },
1029
+  autoAudioPlayInit:function(){
1030
+    var that=this;
1031
+    common.getStorageValue(that, "IsAutoSound", 0, function () {
1032
+      if (that.data.IsAutoSound==1){
1033
+        var taskInfo=that.data.TaskInfo;
1034
+        var field={};
1035
+        var fieldNumber=1;
1036
+        if (that.data.IsShowAnswer[0]==1)
1037
+          fieldNumber=2;
1038
+        if (that.data.IsShowAnswer[1]==1 && taskInfo.ContentNew.Field[3].length>0)
1039
+          fieldNumber=3;
1040
+        field=taskInfo.ContentNew.Field[fieldNumber];
1041
+        arrAutoAudio=[];
1042
+        for(var i=0;i<field.length;i++){
1043
+          if (field[i].Type=="sound" || field[i].Type=="recorder"){
1044
+            field[i].FieldNumber=fieldNumber;
1045
+            arrAutoAudio.push(field[i]);
1046
+          }
1047
+        }
1048
+        
1049
+        if (arrAutoAudio.length>0){
1050
+          that.setData({
1051
+            IsAutoSoundStart:true,
1052
+          });
1053
+          that.autoAudioPlayStart();  
1054
+        }
1055
+      }
1056
+    });
1057
+  },
1058
+  autoAudioPlayStart:function(){
1059
+    var that=this;
1060
+    if (arrAutoAudio.length>0){
1061
+      var item=arrAutoAudio[0];
1062
+      if (item.Type=="recorder")
1063
+        item.Content=item.Type;
1064
+      that.playSound({currentTarget:{dataset:{
1065
+        content:item.Content,
1066
+        soundmark:item.SoundMark,
1067
+        fieldid:item.FieldNumber,
1068
+      }}});
1069
+      arrAutoAudio.splice(0,1);
1070
+      
1071
+    }
1072
+  },
1073
+  autoAudioPlayEnd:function(){
1074
+    var that=this;
1075
+    arrAutoAudio=[];
1076
+    if (innerAudioContext1) {
1077
+      innerAudioContext1.stop();
1078
+    }
1079
+    that.audioCtx.pause();
1080
+  
1081
+    that.setData({
1082
+      IsAutoSoundStart:false,
1083
+    });
1084
+  },
1085
+  //音频播放结束
1086
+  audioBindEnded: function () {
1087
+    var that=this;
1088
+    isPlaying = false;
1089
+    if (arrAutoAudio.length>0){
1090
+      that.autoAudioPlayStart();
1091
+    }
1092
+    else{
1093
+      that.setData({
1094
+        IsAutoSoundStart:false,
1095
+      });
1096
+    }
1097
+  },
1098
+  audioBindError: function (err) {
1099
+    console.log(err);
1100
+    innerAudioContext1.src = tempPlayUrlLocal;
1101
+    innerAudioContext1.play();
1102
+  },
1103
+
1104
+  playSound: function (e) {
1105
+    clearTimeout(timeoutPlayAudio);
1106
+
1107
+    var that = this;
1108
+    var str = e.currentTarget.dataset.content;
1109
+    var url;
1110
+    if (str == "recorder") {
1111
+      url = e.currentTarget.dataset.soundmark;
1112
+    } else if (str.indexOf("英 [") >= 0 || str.indexOf("美 [") >= 0) {
1113
+      str = str.replace("英 [", "[");
1114
+      str = str.replace("美 [", "[");
1115
+      url = e.currentTarget.dataset.soundmark;
1116
+    } else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark != "undefined") {
1117
+      var soundmark = e.currentTarget.dataset.soundmark;
1118
+      if (soundmark && soundmark.indexOf("http") < 0) {
1119
+        url = app.globalData.audioUrlBaidu;
1120
+        url = url.replace("[token]", app.globalData.BaiduToken);
1121
+        url = url.replace("[word]", soundmark);
1122
+      } else {
1123
+        url = soundmark;
1124
+      }
1125
+    } else {
1126
+      url = app.globalData.audioUrlBaidu;
1127
+      url = url.replace("[token]", app.globalData.BaiduToken);
1128
+      url = url.replace("[word]", str);
1129
+    }
1130
+
1131
+
1132
+    if (url.indexOf("http") > 0)
1133
+      url = url.substr(url.indexOf("http"));
1134
+    if (url.indexOf("'") > 0)
1135
+      url = common.ReplaceAllString(url, "'", "");
1136
+    url = url.replace("http://", "https://");
1137
+
1138
+    url = encodeURI(url);
1139
+    if (!isPlaying || tempPlayUrl == "" || url != tempPlayUrl) {
1140
+      isPlaying = true;
1141
+      timeoutPlayAudio = setTimeout(function () {
1142
+        isPlaying = false;
1143
+      }, 60000);
1144
+
1145
+      wx.showLoading({
1146
+        title: '音频下载中',
1147
+        mask: true,
1148
+      });
1149
+      setTimeout(function () {
1150
+        wx.hideLoading();
1151
+      }, 30000);
1152
+
1153
+      wx.downloadFile({
1154
+        url: url,
1155
+        success(res) {
1156
+          wx.hideLoading();
1157
+          if (res.statusCode === 200) {
1158
+            tempPlayUrlLocal = res.tempFilePath;
1159
+            that.audioCtx.setSrc(res.tempFilePath);
1160
+            that.audioCtx.play();
1161
+            tempPlayUrl = url;
1162
+          }
1163
+        },
1164
+        fail(err) {
1165
+          wx.hideLoading();
1166
+        }
1167
+      });
1168
+    } else {
1169
+      this.audioCtx.pause();
1170
+      if (innerAudioContext1)
1171
+        innerAudioContext1.stop();
1172
+      isPlaying = false;
1173
+    }
1174
+  },
1079 1175
   goto: function (e) {
1080 1176
     var url = e.currentTarget.dataset.url;
1081 1177
     wx.navigateTo({

+ 47 - 20
pages/main/detail.wxml

@@ -1,8 +1,28 @@
1 1
 <import src="../template/cardShow.wxml" />
2
-<navigation-bar title="{{CardTypeName}}" show="true" left="true" background="{{Color.BackColor}}" color="#fff">
2
+<navigation-bar show="true" center="true" left="true" background="{{Color.BackColor}}" color="#fff">
3 3
     <view slot="left" bindtap="onClose">
4 4
       <view class="square">退出练习</view>
5 5
     </view>
6
+    <view slot="center" bindtap="showNumberContainner" class='panelNumber FlexRow'>
7
+      <block wx:if="{{!Title}}">
8
+        <view class="FlexColumn">
9
+          <view class='panelNumber1'>{{NumberNew}}</view>
10
+          <view hidden="{{!TaskInfo.IsNew || TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
11
+        </view>
12
+        <view class="FlexColumn">
13
+          <view class='panelNumber1'>{{NumberHistory}}</view>
14
+          <view hidden="{{!TaskInfo.IsHistory || TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
15
+        </view>
16
+        <view class="FlexColumn">
17
+          <view class='panelNumber1'>{{NumberReview}}</view>
18
+          <view hidden="{{!TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
19
+        </view>
20
+        <view class="FlexColumn">
21
+          <view class='panelNumber2 panelNumber1'>{{NumberNew+NumberReview+NumberHistory}}</view>
22
+        </view>
23
+      </block>
24
+      <block wx:if="{{Title}}">{{Title}}</block>
25
+    </view>
6 26
 </navigation-bar>
7 27
 
8 28
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}}' bindtap='onShowAnswer' data-type="all">
@@ -17,36 +37,31 @@
17 37
           <image hidden='{{!TaskInfo.IsCollect}}' src="../images/universalpic_star_tc0{{Color.ID}}_34x34.png" class='universalpic_star_gray_34x34' />
18 38
         </view>
19 39
       </view>
40
+      <view class='panelCancel FlexRow' catchtap="gotoEdit">
41
+        <view class='panelCancel0 FlexRow'>
42
+          <image src="../images/universalpic_edit_gray_25x25.png" class='universalpic_edit_gray_25x25' />
43
+        </view>
44
+      </view>
20 45
       <view class='panelCancel FlexRow' catchtap='onMore'>
21 46
         <view class='panelCancel0 FlexRow'>
22 47
           <image src="../images/universalpic_more_gray_32x8.png" class='universalpic_more_gray_32x8' />
23 48
         </view>
24 49
       </view>
25
-      <view class='panelNumber FlexRow' catchtap='showNumberContainner'>
26
-        <view class="FlexColumn">
27
-          <view class='panelNumber1'>{{NumberNew}}</view>
28
-          <view hidden="{{!TaskInfo.IsNew || TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
29
-        </view>
30
-        <view class="FlexColumn">
31
-          <view class='panelNumber1'>{{NumberHistory}}</view>
32
-          <view hidden="{{!TaskInfo.IsHistory || TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
33
-        </view>
34
-        <view class="FlexColumn">
35
-          <view class='panelNumber1'>{{NumberReview}}</view>
36
-          <view hidden="{{!TaskInfo.IsReview}}" class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
37
-        </view>
38
-        <view class="FlexColumn">
39
-          <view class='panelNumber2 panelNumber1'>{{NumberNew+NumberReview+NumberHistory}}</view>
50
+      
51
+      <view class='panelCancel FlexRow' wx:if="{{IsShowAnswer[0]==0}}">
52
+        <view class='panelCancel0 FlexRow'>
53
+          <image src="../images/universalpic_han_fff20_28x25.png" class='universalpic_han_gray_28x25' />
40 54
         </view>
41 55
       </view>
42
-      <view class='panelCancel FlexRow' catchtap="gotoEdit">
56
+      <view class='panelCancel FlexRow' catchtap='onPullDownRefresh' wx:if="{{IsShowAnswer[0]==1}}">
43 57
         <view class='panelCancel0 FlexRow'>
44
-          <image src="../images/universalpic_edit_gray_25x25.png" class='universalpic_edit_gray_25x25' />
58
+          <image src="../images/universalpic_han_gray_28x25.png" class='universalpic_han_gray_28x25' />
45 59
         </view>
46 60
       </view>
61
+      
47 62
       <view class='panelCancel FlexRow' wx:if="{{CanUndo==0}}">
48 63
         <view class='panelCancel0 FlexRow'>
49
-          <image src="../images/universalpic_undo_gray_26x20.png" class='universalpic_undo_white_30p_26x20' />
64
+          <image src="../images/universalpic_undo_white_30p_26x20.png" class='universalpic_undo_white_30p_26x20' />
50 65
         </view>
51 66
       </view>
52 67
       <view class='panelCancel FlexRow' catchtap='gotoPrev' wx:if="{{CanUndo==1}}">
@@ -61,6 +76,9 @@
61 76
 
62 77
     <template is="CardShow" data="{{Color:Color,Field:TaskInfo.ContentNew.Field,Tags:TaskInfo.ContentNew.Tags,IsShowAnswer:IsShowAnswer,TagWidth:TaskInfo.TagWidth,FontSize:TaskInfo.FontSize,TextSpace}}" />
63 78
 
79
+    <view class="StopAudioPlay FlexRow" wx:if="{{IsAutoSound && IsAutoSoundStart}}" style="background-color:{{Color.BackColor3}};" catchtap="autoAudioPlayEnd">
80
+      ■ 停止播放
81
+    </view>
64 82
     <view class='footer0'></view>
65 83
 
66 84
     <!-- 下方按钮 -->
@@ -208,7 +226,16 @@
208 226
       <view class='numberContainerFooter102 FlexRow' catchtap='saveCardType'>
209 227
         <image src="../images/universalpic_practisemodel_gray_30x28.png" class='universalpic_practisemodel_gray_30x28' />
210 228
         <view class='numberContainerFooter111'>把这张题卡归档</view>
211
-      </view>      
229
+      </view>
230
+            
231
+      <view class='lineFooter'></view>
232
+      
233
+      <view class='numberContainerFooter102 FlexRow'>
234
+        <image src="../images/universalpic_autoread_gray_30x23.png" class='universalpic_autoread_gray_30x23' />
235
+        <view class='numberContainerFooter111'>自动播放题卡里的声音</view>
236
+        <switch class="switch" color="#4CD964" checked="{{IsAutoSound}}" bindchange="switchSound"/>
237
+      </view>
238
+            
212 239
       <view class='lineFooter'></view>
213 240
     </view>
214 241
     <view class="numberContaineFooter FlexRow" catchtap='closeNumberContainner'>

+ 31 - 2
pages/main/detail.wxss

@@ -25,7 +25,7 @@ page{
25 25
 .panelCancel {
26 26
   width: 100rpx;
27 27
   height: 110rpx;
28
-  margin: 0 5rpx;
28
+  margin: 0 40rpx;
29 29
 }
30 30
 
31 31
 .panelCancel0 {
@@ -39,7 +39,10 @@ page{
39 39
   width: 26rpx;
40 40
   height: 19rpx;
41 41
 }
42
-
42
+.universalpic_han_gray_28x25{
43
+  width: 28rpx;
44
+  height: 25rpx;
45
+}
43 46
 .universalpic_more_gray_32x8 {
44 47
   width: 32rpx;
45 48
   height: 8rpx;
@@ -639,6 +642,7 @@ page{
639 642
   height: 132rpx;
640 643
   justify-content: flex-start;
641 644
 }
645
+
642 646
 .numberContainerFooter103{
643 647
   width:100%;
644 648
   height: 111rpx;
@@ -668,6 +672,12 @@ page{
668 672
   margin: 0 30rpx;
669 673
 }
670 674
 
675
+.universalpic_autoread_gray_30x23{
676
+  width:30rpx;
677
+  height:23rpx;
678
+  margin: 0 30rpx;
679
+}
680
+
671 681
 .universalpic_typesize_gray_30x18{
672 682
   width: 30rpx; 
673 683
   height: 18rpx;
@@ -710,3 +720,22 @@ page{
710 720
   border:3rpx solid #F1AB1E;
711 721
   color:#F1AB1E
712 722
 }
723
+
724
+.switch{
725
+  position: absolute;
726
+  right:30rpx;
727
+}
728
+
729
+.StopAudioPlay{
730
+  position: fixed;
731
+  top:278rpx;
732
+  right:0rpx;
733
+  width:170rpx;
734
+  height:70rpx;
735
+  border-top-left-radius: 35rpx;
736
+  border-bottom-left-radius: 35rpx;
737
+  z-index: 20;
738
+  font-size:20rpx;
739
+  color:#D2D2D2;
740
+  line-height: 70rpx;
741
+}

+ 1 - 1
pages/main/mainlist.js

@@ -400,7 +400,7 @@ Page({
400 400
         CardTypeStr: str,
401 401
       })
402 402
     } else {
403
-      if (that.data.CardType)
403
+      if (that.data.CardType || that.data.CardType==0)
404 404
         url += "&CardType=" + that.data.CardType;
405 405
     }
406 406
 

+ 1 - 1
pages/main/mainlist.wxml

@@ -2,7 +2,7 @@
2 2
   <view class="panelTopPanel FlexColumn">
3 3
     <view wx:if="{{Search}}" class="panelTop FlexRow">
4 4
       <view class="panelLeft FlexRow">
5
-        <view class="panelTopSearch FlexRow">
5
+        <view class="panelTopSearch FlexRow"  bindtap='onSearch'>
6 6
           <image class="universalpic_magnifier_gray_30x30" src='../images/universalpic_magnifier_gray_30x30.png' />
7 7
           <text class="panelTopSearchText">{{Search}}</text>
8 8
         </view>

+ 4 - 23
pages/main/preview.js

@@ -186,7 +186,7 @@ Page({
186 186
     }
187 187
 
188 188
     var card = {};
189
-    var prevId = 0, nextId = 0;
189
+    var prevId = 0, nextId = 0,index=0;
190 190
     for (var i = 0; i < list.length; i++) {
191 191
       if (this.data.MiaoguoCardID == list[i].MiaoguoCardID) {
192 192
         if (i > 0)
@@ -206,6 +206,7 @@ Page({
206 206
         card.CardType = list[i].CardType;
207 207
         card.FolderName=list[i].FolderName;
208 208
         card.Flag=list[i].Flag;
209
+        index=i+1;
209 210
         break;
210 211
       }
211 212
     }
@@ -274,6 +275,7 @@ Page({
274 275
       IsCollect: card.IsCollect,
275 276
       FolderName:card.FolderName,
276 277
       Flag:card.Flag,
278
+      CurrentIndex:index,
277 279
     });
278 280
 
279 281
     wx.pageScrollTo({
@@ -481,7 +483,7 @@ Page({
481 483
       var that = this;
482 484
       var strType="edit";
483 485
       if (e.currentTarget.dataset.type)
484
-        strType="edit1";
486
+        strType="edit2";
485 487
       var url='./add?type='+strType+'&id=' + that.data.MiaoguoCardID+"&opentype="+e.currentTarget.dataset.type;
486 488
       wx.navigateTo({
487 489
         url: url,
@@ -552,27 +554,6 @@ Page({
552 554
       duration: 500,
553 555
     });
554 556
   },
555
-  playNext: function (e) {
556
-    var that = this;
557
-    var div = e.currentTarget.dataset.div;
558
-    if (div == 1) {
559
-      this.data.CurrentIndex++;
560
-      if (this.data.CurrentIndex >= playList.length) {
561
-        this.data.CurrentIndex = playList.length - 1;
562
-      }
563
-    }
564
-    else {
565
-      this.data.CurrentIndex--;
566
-      if (this.data.CurrentIndex < 0)
567
-        this.data.CurrentIndex = 0;
568
-    }
569
-    that.setData({
570
-      CurrentIndex: this.data.CurrentIndex,
571
-      MiaoguoCardID: playList[this.data.CurrentIndex],
572
-      PlayListCount: playList.length,
573
-    });
574
-    that.init();
575
-  },
576 557
   showImage: function (e) {
577 558
     var name = e.currentTarget.dataset.name;
578 559
     if (name && name.length > 5) {

+ 5 - 4
pages/main/preview.wxml

@@ -35,12 +35,12 @@
35 35
     </view>
36 36
     <view class="panelTop1" style='background-color:{{Color.BackColor}};'></view>
37 37
   </block>
38
-  <block wx:if="{{!IsCardInfoCloseMenu && !PrintID}}">
38
+  <block wx:if="{{!IsCardInfoCloseMenu && !PrintID && ShowType!='share'}}">
39 39
     <view class="panelTop2 FlexColumn">
40 40
       <view class="panelTop2Item FlexRow" catchtap='editField' data-type="cardtype">
41 41
         <view class="left FlexRow">
42 42
           <image class="universalpic_diagram_black_30x28" src='../images/universalpic_diagram_black_30x28.png' />
43
-          <view class="panelTop2Item1"><block wx:if="{{CardType==1}}">紧急</block><block wx:if="{{CardType==0}}">日常</block><block wx:if="{{CardType==-1}}">归档</block>练习</view>
43
+          <view class="panelTop2Item1"><block wx:if="{{CardType==1}}">紧急练习</block><block wx:if="{{CardType==0}}">日常练习</block><block wx:if="{{CardType==-1}}">归档</block></view>
44 44
         </view>
45 45
         <image class="Arrow" src='../images/universalpic_indicator_right_gray.png' />
46 46
       </view>
@@ -88,12 +88,13 @@
88 88
       退出预览
89 89
     </view>
90 90
 
91
-    <view class="panelFooter FlexRow" wx:if="{{ShowType=='show' && !PrintID}}">
91
+    <view class="panelFooter FlexRow" wx:if="{{ShowType=='show'}}">
92 92
       <view class='btn1' wx:if="{{PrevID==0}}"></view>
93 93
       <view class='btn1 FlexRow' catchtap="previewNext" data-id="{{PrevID}}" wx:if="{{PrevID>0}}">
94 94
         <image class="universalpic_next_gray_30x30" src='../images/universalpic_prev_gray_30x30.png' />
95 95
       </view>
96
-      <button class="btn21" open-type='share'>分享给大家</button>
96
+      <button class="btn21" open-type='share' wx:if="{{!PrintID}}">分享给大家</button>
97
+      <view class='btn21' wx:if="{{PrintID}}">{{CurrentIndex}}</view>
97 98
       <view class='btn1 FlexRow' catchtap="previewNext" data-id="{{NextID}}" wx:if="{{NextID>0}}">
98 99
         <image class="universalpic_next_gray_30x30" src='../images/universalpic_next_gray_30x30.png' />
99 100
       </view>

+ 12 - 1
pages/main/searchCard.js

@@ -26,6 +26,7 @@ Page({
26 26
     });
27 27
   },
28 28
   onKeyInput: function (e) {
29
+    console.log("onKeyInput");
29 30
     var search = e.detail.value;
30 31
     var that = this;
31 32
     that.setData({
@@ -33,12 +34,16 @@ Page({
33 34
     });
34 35
   },
35 36
   onFocus: function (e) {
37
+    console.log("onFocus");
36 38
     var that = this;
37 39
     that.setData({
38 40
       Searching:true,
39 41
       IsNull:false,
40 42
     });
41 43
   },
44
+  onBindblur: function (e) {
45
+    console.log("onBindblur");
46
+  },
42 47
   onSearch: function (e) {
43 48
     if (e.currentTarget.dataset.search){
44 49
       this.data.SearchInfo = e.currentTarget.dataset.search;
@@ -108,7 +113,11 @@ Page({
108 113
   },
109 114
   getSearchData:function(){
110 115
     var that=this;
111
-    main.searchInfomation(that.data.SearchInfo,null,null,null,function(list,isList){
116
+    main.searchInfomation(that.data.SearchInfo,null,null,null,function(list,obj){
117
+      if ((!list || list.length==0) && obj){
118
+        list=[];
119
+        list.push(obj);
120
+      }
112 121
       that.setData({
113 122
         SearchList:list,
114 123
         Searching:false,
@@ -142,6 +151,7 @@ Page({
142 151
     
143 152
   },
144 153
   clearInput:function(){
154
+    console.log("clearInput");
145 155
     this.setData({
146 156
       SearchInfo:"",
147 157
       IsNull:false,
@@ -161,6 +171,7 @@ Page({
161 171
     });
162 172
     wx.removeStorageSync("SearchTextList");
163 173
   },
174
+  
164 175
   onShareAppMessage: function () {
165 176
     return {
166 177
       title: app.globalData.ShareTitle,

+ 1 - 1
pages/main/searchCard.wxml

@@ -3,7 +3,7 @@
3 3
     <view class="panelLeft FlexRow">
4 4
       <view class="panelTopSearch FlexRow">
5 5
         <image class="universalpic_magnifier_gray_30x30" src='../images/universalpic_magnifier_gray_30x30.png' />
6
-        <input class='input'  always-embed="true"  maxlength='50' focus='{{Focus}}' bindinput="onKeyInput" value="{{SearchInfo}}"
6
+        <input class='input'  always-embed="true"  maxlength='50' focus='{{Focus}}' bindinput="onKeyInput" bindblur="onBindblur" value="{{SearchInfo}}"
7 7
           placeholder="搜索我的题卡" confirm-type="search" bindconfirm="onSearch" bindfocus="onFocus" />
8 8
         
9 9
         <view class="clearData FlexRow" catchtap="clearInput" wx:if="{{SearchInfo}}">

+ 1 - 1
pages/other/lessonlist.js

@@ -39,7 +39,7 @@ Page({
39 39
     
40 40
     if (e.currentTarget.dataset.url){
41 41
       wx.navigateTo({
42
-        url: '../other/video?LessonID=' + id +idchild+"&imageurl="+e.currentTarget.dataset.imageurl+"&url="+e.currentTarget.dataset.url,
42
+        url: '../other/video?LessonID=' + id +idchild+"&imageurl="+e.currentTarget.dataset.imageurl+"&url="+e.currentTarget.dataset.url+"&title="+e.currentTarget.dataset.title,
43 43
       });
44 44
     }
45 45
     else{

+ 1 - 1
pages/other/lessonlist.wxml

@@ -12,7 +12,7 @@
12 12
           <view class="lineWidth720"></view>
13 13
         </view>
14 14
 
15
-        <view class="panelItem FlexRow" bindtap="gotoLesson" data-id="{{index+1}}" data-idchild="{{indexChild+1}}" data-url="{{itemChild.VideoUrl}}" data-imageurl="{{itemChild.ImageUrl}}">
15
+        <view class="panelItem FlexRow" bindtap="gotoLesson" data-id="{{index+1}}" data-idchild="{{indexChild+1}}" data-url="{{itemChild.VideoUrl}}" data-imageurl="{{itemChild.ImageUrl}}" data-title="{{itemChild.Title}}">
16 16
           <view class='panelItem1 FlexColumn'>
17 17
             <view class="panelTitle10">{{itemChild.Title}}</view>
18 18
           </view>

+ 90 - 6
pages/other/newuser.js

@@ -2,14 +2,20 @@ import common from '../../utils/util';
2 2
 import main from '../../utils/main';
3 3
 
4 4
 var app = getApp();
5
+var backgroundAudioManager;
5 6
 
6 7
 Page({
7 8
   data: {
8 9
     PanelShow: 0,
10
+    IsShowPay:false,
11
+    IsShowBtn:false,
12
+    IsShowMore:false,
13
+    IsPlay:false,
9 14
     ImagePath: app.globalData.uploadImageUrl,
10 15
   },
11 16
   onLoad: function (options) {
12 17
     var that = this;
18
+    backgroundAudioManager = wx.getBackgroundAudioManager();
13 19
     wx.getSetting({
14 20
       success(res) {
15 21
         if (res.authSetting['scope.userInfo'] || app.globalData.userInfo.IsShow == 0) {
@@ -17,11 +23,8 @@ Page({
17 23
             Containnerheight: main.getWindowHeight(),
18 24
           });
19 25
       
20
-          that.init();
21
-          wx.setNavigationBarColor({
22
-            frontColor: "#ffffff",
23
-            backgroundColor: "#9BD41C",
24
-          });
26
+          that.init(options.index);
27
+
25 28
         }
26 29
         else {
27 30
           wx.navigateTo({
@@ -31,16 +34,79 @@ Page({
31 34
       }
32 35
     });
33 36
   },
34
-  init: function () {
37
+  init: function (index) {
38
+    var that = this;
39
+    if (!index)
40
+      index=0;
41
+    main.getData("GetMiaoguoNewUserImageList", function (data) {
42
+      that.setData({
43
+        List: data[index].Images,
44
+        PageIndex:index,
45
+      });
46
+      wx.setNavigationBarTitle({
47
+        title: data[index].Name
48
+      });
49
+      wx.setNavigationBarColor({
50
+        frontColor: "#000000",
51
+        backgroundColor: data[index].BarColor,
52
+        backgroundColorTop: data[index].BarColor,
53
+      });
54
+
55
+      if (app.globalData.IsIPhoneX) {
56
+       that.setData({
57
+          IsIPad: "_IPhoneX",
58
+        });
59
+      }
60
+      
61
+    });
62
+  },
63
+  goto: function (e) {
64
+    var url = e.currentTarget.dataset.url;
65
+    
66
+    wx.navigateTo({
67
+      url: url,
68
+    });
69
+  },
70
+  showMore:function(){
71
+    this.setData({
72
+      IsShowMore:true,
73
+    })
74
+  },
75
+  scroll:function(e){
76
+    var that=this;
77
+    if (that.data.PanelShow==0 && that.data.PageIndex==0){
78
+      var query = wx.createSelectorQuery().in(that)
79
+      query.select('#Image4').boundingClientRect(function(res){
80
+        console.log(res.top);
81
+        if (res && res.top && res.top<0 && !that.data.IsShowBtn){
82
+          that.setData({
83
+            IsShowBtn:true,
84
+          });
85
+        }
86
+        else if (res && res.top && res.top>0 && that.data.IsShowBtn){
87
+          that.setData({
88
+            IsShowBtn:false,
89
+          });
90
+        }
91
+      }).exec();
92
+    }
93
+  },
94
+  showPay:function(){
35 95
     var that = this;
36 96
     main.getData("GetClassList?Flag=0", function (data) {
37 97
       if (data && data.length>0) {
38 98
         that.setData({
99
+          IsShowPay:true,
39 100
           StartDate: common.formatDateCHS(data[0].StartDate),
40 101
         })
41 102
       }
42 103
     });
43 104
   },
105
+  hidePay:function(){
106
+    this.setData({
107
+      IsShowPay:false,
108
+    });
109
+  },
44 110
   payMoney: function () {
45 111
     var that = this;
46 112
     var money = 1;
@@ -58,6 +124,7 @@ Page({
58 124
       });
59 125
       wx.setNavigationBarColor({
60 126
         frontColor: "#000000",
127
+        backgroundColorTop: "#ffffff",
61 128
         backgroundColor: "#ffffff",
62 129
       });
63 130
     });
@@ -80,6 +147,23 @@ Page({
80 147
       url: '../index/index',
81 148
     })
82 149
   },
150
+  play:function(){
151
+    var that=this;
152
+    var isPlay=!that.data.IsPlay;
153
+    if (isPlay){
154
+      that.data.List[11].Image="bm_sy_12b";
155
+      backgroundAudioManager.title = "暖暖爸致辞";
156
+      backgroundAudioManager.src = app.globalData.uploadImageUrl+"web/_lesson/nuannuanbazhici.m4a";
157
+    }
158
+    else{
159
+      that.data.List[11].Image="bm_sy_12a";
160
+      backgroundAudioManager.pause();
161
+    }
162
+    that.setData({
163
+      List:that.data.List,
164
+      IsPlay:isPlay,
165
+    });
166
+  },
83 167
   onShareAppMessage: function () {
84 168
     return {
85 169
       title: app.globalData.ShareTitle,

+ 3 - 2
pages/other/newuser.json

@@ -1,4 +1,5 @@
1 1
 {
2
-  "navigationBarBackgroundColor": "#9BD41C",
3
-  "navigationBarTextStyle": "white"
2
+  "navigationBarBackgroundColor": "#C9400C",
3
+  "navigationBarTextStyle": "black",
4
+  "backgroundColorTop":"#C9400C"
4 5
 }

+ 27 - 16
pages/other/newuser.wxml

@@ -1,24 +1,35 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2 2
 
3 3
   <block wx:if="{{PanelShow==0}}">
4
-    <image class="img" lazy-load="true" mode="widthFix" src='{{ImagePath}}web/promotion_leaflet_c01.png' />
5
-    <image class="img" lazy-load="true" mode="widthFix" src='{{ImagePath}}web/promotion_leaflet_c02.png' />
6
-    <image class="img" lazy-load="true" mode="widthFix" src='{{ImagePath}}web/promotion_leaflet_c03.png' />
7
-    <view class="panelBottom FlexRow">
8
-      <view class="panelBottom1 FlexColumn" wx:if="{{!StartDate}}">
9
-        <view class='text7'>7天手把手</view>
10
-        <view class='text8'>还您上手新方法</view>
11
-      </view>
12
-      <view class="panelBottom1 FlexColumn" wx:if="{{StartDate}}">
13
-        <view class='text7'>预计开班时间</view>
14
-        <view class='text8'>{{StartDate}}</view>
15
-      </view>
16
-      <view class="btn2 FlexColumn" bindtap="payMoney">
17
-        报名
4
+    <image id="Image{{index}}" wx:for="{{List}}" wx:key="*this" class="img" lazy-load="true" mode="widthFix" 
5
+    src='{{ImagePath}}web/{{item.Image}}.png' bindtap="{{item.BindTap}}" data-url="{{item.Url}}"  
6
+    bindtouchmove="scroll" wx:if="{{ (!IsShowMore && index<24) || IsShowMore}}"/>
7
+    <view bindtap="showMore" class="btn3 FlexRow" wx:if="{{!IsShowMore && PageIndex==0}}">更多评语</view>
8
+    <view style="height:150rpx;"></view>
9
+    <view wx:if="{{IsShowPay}}" class="panelBottom FlexColumn" style='height:{{Containnerheight}}rpx;' catchtap="hidePay">
10
+      <view class="panelBottom0 FlexColumn">
11
+        <text class="text1">欢迎您\n报名秒过新手培训</text>
12
+        <text class="text2">新手包仅售1元</text>
13
+        <view class="btn FlexColumn" catchtap="payMoney">
14
+          <image class="bm_sy_banner-zf" src='{{ImagePath}}web/bm_sy_banner-zf.png' />
15
+        </view>
16
+
17
+        <view class="panelBottom1 FlexColumn" wx:if="{{!StartDate}}">
18
+          <view class='text3'>7天手把手</view>
19
+          <view class='text4'>教您上手新方法</view>
20
+        </view>
21
+        <view class="panelBottom1 FlexColumn" wx:if="{{StartDate}}">
22
+          <view class='text3'>预计开班时间</view>
23
+          <view class='text4'>{{StartDate}}</view>
24
+        </view>
25
+        <image class="bm_sy_bg" src='{{ImagePath}}web/bm_sy_bg.png' />
26
+    </view>
27
+    </view>
28
+    <view class="panelShowPay{{IsIPad}} FlexColumn" wx:if="{{IsShowBtn}}" >
29
+      <view class="btn2 FlexRow">
30
+        <image class="bm_sy_banner-zf" src='{{ImagePath}}web/bm_sy_banner-bm.png' />
18 31
       </view>
19 32
     </view>
20
-    
21
-    <view style="height:140rpx;"></view>
22 33
   </block>
23 34
   <block wx:if="{{PanelShow==1}}">
24 35
     <image src="{{ImagePath}}web/trial_registration_xcode2.png" class="trial_registration_xcode2"></image>

+ 73 - 51
pages/other/newuser.wxss

@@ -1,93 +1,115 @@
1 1
 .container{
2
-  background-color: #ffffff;
2
+  background-color: #f8f8f8;
3 3
 }
4 4
 
5 5
 .img{
6 6
   width:100%;
7 7
 }
8 8
 
9
+.panelShowPay{
10
+  width:100%;
11
+  height:120rpx;
12
+  position: fixed;
13
+  bottom: 0;
14
+  z-index: 10;
15
+  background-color: #F8F8F8;
16
+  justify-content: flex-start;
17
+}
18
+.panelShowPay_IPhoneX{
19
+  width:100%;
20
+  height:140rpx;
21
+  position: fixed;
22
+  bottom: 0;
23
+  z-index: 10;
24
+  background-color: #F8F8F8;
25
+  justify-content: flex-start;
26
+}
27
+.btn2{
28
+  width:730rpx;
29
+  height:100rpx;
30
+  border-radius: 20rpx;
31
+  background-color: #FF970C;
32
+  margin-top:10rpx;
33
+}
9 34
 
10 35
 .panelBottom{
11 36
   width:100%;
12
-  height:140rpx;
37
+  position: fixed;
38
+  top: -1rpx;
39
+  background-color: rgba(0,0,0,0.5);
40
+  z-index: 20;
41
+}
42
+
43
+.panelBottom0{
44
+  width:100%;
45
+  height:700rpx;
13 46
   position: fixed;
14 47
   bottom: 0;
15
-  background-color: #329468;
48
+  background-color: #29365C;
16 49
   z-index: 10;
17
-  justify-content: space-between;
50
+  justify-content: flex-start;
51
+  color:#fff;
18 52
 }
19 53
 
20 54
 .panelBottom1{
21
-  margin-left: 30rpx;
55
+  position: absolute;
56
+  top: 515rpx;
57
+  left:119rpx;
22 58
   color:#fff;
23 59
   align-items: flex-start;
24 60
 }
25 61
 
26
-.text7{
27
-  font-size:24rpx;
28
-}
29
-
30
-.text8{
31
-  font-size:36rpx;
62
+.bm_sy_bg{
63
+  width:100%;
64
+  height:198rpx;
65
+  position: absolute;
66
+  bottom: 0;
32 67
 }
33 68
 
34
-
35 69
 .text1{
36
-  margin: 200rpx 0 0 0;
37
-  font-size:64rpx;
38
-  color:#329468;
70
+  margin: 75rpx 0 0 0;
71
+  font-size:36rpx;
72
+  text-align: center;
39 73
 }
40 74
 .text2{
41
-  margin: 10rpx 0 0 0;
42
-  font-size:36rpx;
75
+  margin: 30rpx 0 0 0;
76
+  font-size:64rpx;
43 77
 }
44 78
 .text3{
45
-  font-size:28rpx;
46
-  font-weight: 400;
47
-}
48
-
49
-.btn{
50
-  font-size:36rpx;
51
-  width:500rpx;
52
-  height:90rpx;
53
-  border-radius: 10rpx;
54
-  text-align: center;
55
-  line-height: 90rpx;
56
-  color:#fff;
57
-  background-color: #0071EF;
58
-  margin-top: 40rpx;
59
-}
60
-
61
-.btn2{
62
-  font-size:48rpx;
63
-  width:380rpx;
64
-  height:100rpx;
65
-  border-radius: 10rpx;
66
-  text-align: center;
67
-  line-height: 100rpx;
68
-  color:#1E1E1E;
69
-  background-color: #FFDD0C;
70
-  margin-right: 30rpx;
79
+  font-size:24rpx;
71 80
 }
72
-
73 81
 .text4{
74
-  margin: 60rpx 0 0 0;
75 82
   font-size:36rpx;
76 83
 }
77 84
 
78
-.text6{
79
-  margin: 100rpx 0 0 0;
85
+.btn{
80 86
   font-size:36rpx;
81
-  color:#329468;
87
+  width:580rpx;
88
+  height:130rpx;
89
+  border-radius: 20rpx;
82 90
   text-align: center;
91
+  line-height: 130rpx;
92
+  background-color: #FF970C;
93
+  margin-top: 30rpx;
83 94
 }
84 95
 
85
-.officialaccount{
86
-  width:700rpx;
87
-  margin: 50rpx;
96
+.bm_sy_banner-zf{
97
+  width:105rpx;
98
+  height:60rpx;
88 99
 }
89 100
 
90 101
 .trial_registration_xcode2{
91 102
   width:100%;
92 103
   height:910rpx;
104
+}
105
+
106
+.btn3{
107
+  font-size:36rpx;
108
+  width:650rpx;
109
+  height:110rpx;
110
+  border-radius: 20rpx;
111
+  text-align: center;
112
+  line-height: 110rpx;
113
+  border:2rpx solid #D2D2D2;
114
+  background-color: #fff;
93 115
 }

+ 4 - 4
pages/other/video.js

@@ -17,7 +17,7 @@ Page({
17 17
     });
18 18
     wx.setNavigationBarColor({
19 19
       frontColor: "#ffffff",
20
-      backgroundColor: "#000000",
20
+      backgroundColor: "#000000"
21 21
     });
22 22
 
23 23
     var LessonID = 2;
@@ -39,7 +39,7 @@ Page({
39 39
         ImageUrl:options.imageurl,
40 40
       });
41 41
       wx.setNavigationBarTitle({
42
-        title: options.Title,
42
+        title: options.title
43 43
       });
44 44
     }
45 45
     else{
@@ -53,7 +53,7 @@ Page({
53 53
             ImageUrl:data[LessonID-1].List[LessonPage-1].ImageUrl,
54 54
           });
55 55
           wx.setNavigationBarTitle({
56
-            title: data[LessonID-1].List[LessonPage-1].Title,
56
+            title: data[LessonID-1].List[LessonPage-1].Title
57 57
           });
58 58
         }
59 59
       });
@@ -83,7 +83,7 @@ Page({
83 83
     return {
84 84
       title: title,
85 85
       path: app.globalData.SharePath + '?type=video&LessonID=' + this.data.LessonID + '&LessonPage=' + this.data.LessonPage+'&UserID=' + app.globalData.userInfo.UserID,
86
-      imageUrl: imageUrl,
86
+      imageUrl: imageUrl
87 87
     }
88 88
   },
89 89
 })

+ 18 - 270
pages/test/index.js

@@ -1,7 +1,9 @@
1 1
 import common from '../../utils/util';
2 2
 import main from '../../utils/main';
3
+import constant from '../../utils/constant';
3 4
 
4 5
 const app = getApp();
6
+var testGradeArr=constant.testGradeArr;
5 7
 
6 8
 Page({
7 9
   data: {
@@ -46,282 +48,28 @@ Page({
46 48
   },
47 49
   goto: function (e) {
48 50
     var url = e.currentTarget.dataset.url;
51
+    if (e.currentTarget.dataset.type=="Shici"){
52
+      var name1=e.currentTarget.dataset.name1;
53
+      name1=name1.replace("语文古诗文","语文");
54
+      url="./item?testtype=recite&name1="+name1+"&bookid="+e.currentTarget.dataset.bookid;
55
+    }
56
+    else{
57
+      url="./list?name1="+e.currentTarget.dataset.name1+"&id="+e.currentTarget.dataset.bookid;
58
+    }
49 59
     wx.navigateTo({
50 60
       url: url,
51 61
     });
52 62
   },
53 63
   getTestReportList: function () {
54 64
     var that = this;
65
+    for(var i=0;i<testGradeArr.length;i++){
66
+      for(var j=0;j<testGradeArr[i].List.length;j++){
67
+        testGradeArr[i].List[j].Finish=0;
68
+      }
69
+    }
55 70
     that.setData({
56
-      GradeArr: [{
57
-          Name: "一年级",
58
-          Name2: "语文一年级",
59
-          Select: "Select",
60
-          List: [{
61
-            ID: 1,
62
-            Type: "Shizi",
63
-            Name: "语文识字",
64
-            Name2: "上学期",
65
-            Finish: 0,
66
-            Total: 12,
67
-            Image: "../images/examine_subject_a001.png"
68
-          }, {
69
-            ID: 13,
70
-            Type: "Shizi",
71
-            Name: "语文写字",
72
-            Name2: "上学期",
73
-            Finish: 0,
74
-            Total: 26,
75
-            Image: "../images/examine_subject_a001.png"
76
-          }, {
77
-            ID: 2,
78
-            Type: "Shizi",
79
-            Name: "语文识字",
80
-            Name2: "下学期",
81
-            Finish: 0,
82
-            Total: 14,
83
-            Image: "../images/examine_subject_a002.png"
84
-          }, {
85
-            ID: 14,
86
-            Type: "Shizi",
87
-            Name: "语文写字",
88
-            Name2: "下学期",
89
-            Finish: 0,
90
-            Total: 28,
91
-            Image: "../images/examine_subject_a002.png"
92
-          }]
93
-        },
94
-        {
95
-          Name: "二年级",
96
-          Name2: "语文二年级",
97
-          Select: "",
98
-          List: [{
99
-            ID: 3,
100
-            Type: "Shizi",
101
-            Name: "语文识字",
102
-            Name2: "上学期",
103
-            Finish: 0,
104
-            Total: 16,
105
-            Image: "../images/examine_subject_a003.png"
106
-          }, {
107
-            ID: 15,
108
-            Type: "Shizi",
109
-            Name: "语文写字",
110
-            Name2: "上学期",
111
-            Finish: 0,
112
-            Total: 28,
113
-            Image: "../images/examine_subject_a003.png"
114
-          }, {
115
-            ID: 4,
116
-            Type: "Shizi",
117
-            Name: "语文识字",
118
-            Name2: "下学期",
119
-            Finish: 0,
120
-            Total: 16,
121
-            Image: "../images/examine_subject_a004.png"
122
-          }, {
123
-            ID: 16,
124
-            Type: "Shizi",
125
-            Name: "语文写字",
126
-            Name2: "下学期",
127
-            Finish: 0,
128
-            Total: 29,
129
-            Image: "../images/examine_subject_a004.png"
130
-          }]
131
-        },
132
-        {
133
-          Name: "三年级",
134
-          Name2: "语文三年级",
135
-          Select: "",
136
-          List: [{
137
-            ID: 5,
138
-            Type: "Shizi",
139
-            Name: "语文识字",
140
-            Name2: "上学期",
141
-            Finish: 0,
142
-            Total: 16,
143
-            Image: "../images/examine_subject_a005.png"
144
-          }, {
145
-            ID: 17,
146
-            Type: "Shizi",
147
-            Name: "语文写字",
148
-            Name2: "上学期",
149
-            Finish: 0,
150
-            Total: 28,
151
-            Image: "../images/examine_subject_a005.png"
152
-          }, {
153
-            ID: 6,
154
-            Type: "Shizi",
155
-            Name: "语文识字",
156
-            Name2: "下学期",
157
-            Finish: 0,
158
-            Total: 16,
159
-            Image: "../images/examine_subject_a006.png"
160
-          }, {
161
-            ID: 18,
162
-            Type: "Shizi",
163
-            Name: "语文写字",
164
-            Name2: "下学期",
165
-            Finish: 0,
166
-            Total: 21,
167
-            Image: "../images/examine_subject_a006.png"
168
-          }]
169
-        },
170
-        {
171
-          Name: "四年级",
172
-          Name2: "语文四年级",
173
-          Select: "",
174
-          List: [{
175
-            ID: 7,
176
-            Type: "Shizi",
177
-            Name: "语文识字",
178
-            Name2: "上学期",
179
-            Finish: 0,
180
-            Total: 16,
181
-            Image: "../images/examine_subject_a007.png"
182
-          },  {
183
-            ID: 19,
184
-            Type: "Shizi",
185
-            Name: "语文写字",
186
-            Name2: "上学期",
187
-            Finish: 0,
188
-            Total: 20,
189
-            Image: "../images/examine_subject_a007.png"
190
-          }, {
191
-            ID: 8,
192
-            Type: "Shizi",
193
-            Name: "语文识字",
194
-            Name2: "下学期",
195
-            Finish: 0,
196
-            Total: 16,
197
-            Image: "../images/examine_subject_a008.png"
198
-          },  {
199
-            ID: 20,
200
-            Type: "Shizi",
201
-            Name: "语文写字",
202
-            Name2: "下学期",
203
-            Finish: 0,
204
-            Total: 20,
205
-            Image: "../images/examine_subject_a008.png"
206
-          }]
207
-        },
208
-        {
209
-          Name: "五年级",
210
-          Name2: "语文五年级",
211
-          Select: "",
212
-          List: [{
213
-            ID: 9,
214
-            Type: "Shizi",
215
-            Name: "语文识字",
216
-            Name2: "上学期",
217
-            Finish: 0,
218
-            Total: 16,
219
-            Image: "../images/examine_subject_a009.png"
220
-          }, {
221
-            ID: 21,
222
-            Type: "Shizi",
223
-            Name: "语文写字",
224
-            Name2: "上学期",
225
-            Finish: 0,
226
-            Total: 21,
227
-            Image: "../images/examine_subject_a009.png"
228
-          }, {
229
-            ID: 10,
230
-            Type: "Shizi",
231
-            Name: "语文识字",
232
-            Name2: "下学期",
233
-            Finish: 0,
234
-            Total: 16,
235
-            Image: "../images/examine_subject_a010.png"
236
-          }, {
237
-            ID: 22,
238
-            Type: "Shizi",
239
-            Name: "语文写字",
240
-            Name2: "下学期",
241
-            Finish: 0,
242
-            Total: 16,
243
-            Image: "../images/examine_subject_a010.png"
244
-          }
245
-        ]
246
-        },
247
-        {
248
-          Name: "六年级",
249
-          Name2: "语文六年级",
250
-          Select: "",
251
-          List: [
252
-            {
253
-              ID: 23,
254
-              Type: "Shizi",
255
-              Name: "语文写字",
256
-              Name2: "上学期",
257
-              Finish: 0,
258
-              Total: 18,
259
-              Image: "../images/examine_subject_a011.png"
260
-            }, {
261
-              ID: 24,
262
-              Type: "Shizi",
263
-              Name: "语文写字",
264
-              Name2: "下学期",
265
-              Finish: 0,
266
-              Total: 12,
267
-              Image: "../images/examine_subject_a012.png"
268
-            }, 
269
-          ]
270
-        },
271
-        {
272
-          Name: "英语常用单词",
273
-          Name2: "英语常用单词",
274
-          Select: "",
275
-          List: [
276
-            {
277
-              ID: 101,
278
-              Type: "Word",
279
-              Name: "常用单词1",
280
-              Name2: "词汇1~220",
281
-              Finish: 0,
282
-              Total: 22,
283
-              Image: "../images/examine_subject_b001.png"
284
-            },
285
-            {
286
-              ID: 102,
287
-              Type: "Word",
288
-              Name: "常用单词2",
289
-              Name2: "词汇221~500",
290
-              Finish: 0,
291
-              Total: 28,
292
-              Image: "../images/examine_subject_b002.png"
293
-            },
294
-            {
295
-              ID: 103,
296
-              Type: "Word",
297
-              Name: "常用单词3",
298
-              Name2: "词汇500~1000",
299
-              Finish: 0,
300
-              Total: 50,
301
-              Image: "../images/examine_subject_b003.png"
302
-            },
303
-            {
304
-              ID: 104,
305
-              Type: "Word",
306
-              Name: "常用单词4",
307
-              Name2: "词汇1001~1500",
308
-              Finish: 0,
309
-              Total: 50,
310
-              Image: "../images/examine_subject_b004.png"
311
-            },
312
-            {
313
-              ID: 105,
314
-              Type: "Word",
315
-              Name: "常用单词5",
316
-              Name2: "词汇1501~2000",
317
-              Finish: 0,
318
-              Total: 50,
319
-              Image: "../images/examine_subject_b005.png"
320
-            },
321
-          ]
322
-        },
323
-      ],
324
-    })
71
+      GradeArr: testGradeArr,
72
+    });
325 73
     var userid = app.globalData.userInfo.UserID;
326 74
     main.getData('GetTestReportList?UserID=' + userid, function (data) {
327 75
       if (data) {
@@ -339,7 +87,7 @@ Page({
339 87
           }
340 88
           dataTemp.push(data[i]);
341 89
 
342
-          if (data[i].Name[0].indexOf("英语")>=0){
90
+          if (data[i].Name[0].indexOf("英语")>=0 || data[i].Name[1].indexOf("古诗文")>=0){
343 91
             if (data[i].TestRightStr){
344 92
               data[i].TestRightStr=data[i].TestRightStr.split(",");
345 93
             }

+ 1 - 1
pages/test/index.wxml

@@ -8,7 +8,7 @@
8 8
   </view>
9 9
   <view class="panelLine"></view>
10 10
   <scroll-view scroll-x class="panelCard FlexRow">
11
-    <view class="Card" wx:for="{{GradeArr[TestSelectGrade].List}}" wx:key="index" bindtap="goto" data-url="./list?id={{item.ID}}&name1={{GradeArr[TestSelectGrade].Name}} {{item.Name}} {{item.Name2}}">
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 12
       <image class="examine_subject_a001" src="{{item.Image}}"></image>
13 13
       <view class="Card1">{{item.Name}}</view>
14 14
       <view class="Card2">{{item.Name2}}</view>

+ 54 - 6
pages/test/item.js

@@ -46,8 +46,12 @@ Page({
46 46
     if (options.type)
47 47
       that.init2(options);
48 48
     else{
49
-      if (options.bookid<=100)
50
-        that.init(options);
49
+      if (options.bookid<=100){
50
+        if (options.bookid>=25 && options.bookid<=36)
51
+          that.initAncientPoetry(options);
52
+        else
53
+          that.init(options);
54
+      }
51 55
       else
52 56
         that.initEng(options);
53 57
     }
@@ -135,6 +139,41 @@ Page({
135 139
     });
136 140
 
137 141
   },
142
+  initAncientPoetry:function(options){
143
+    var that=this;
144
+    that.setData({
145
+      TaskInfo: {},
146
+      TestType: options.testtype,
147
+      TestName1: options.name1,
148
+      TestName2: "古诗文",
149
+    });
150
+    main.getData('GetTestAncientPoetryList?UserID='+app.globalData.userInfo.UserID+'&BookID='+options.bookid, function (data) {
151
+      if (data) {
152
+        TaskList = [];
153
+        var list = data;
154
+        for (var k = 0; k < list.length; k++) {
155
+          var taskInfo = list[k];
156
+          
157
+          taskInfo.TagWidth=336;
158
+          if (taskInfo.Word.length>9)
159
+            taskInfo.FontSize=48;
160
+          else
161
+            taskInfo.FontSize=64;
162
+
163
+          taskInfo.ContentNew = main.changeStringToView(taskInfo.Content);
164
+          TaskList.push(taskInfo);
165
+        }
166
+
167
+        //TaskList = common.randomArray(TaskList);
168
+
169
+        that.setData({
170
+          TaskInfo: TaskList[0],
171
+          TaskLength: TaskList.length,
172
+          CurrentIndex: 0,
173
+        });
174
+      }
175
+    });
176
+  },
138 177
   initEng: function (options) {
139 178
     var that = this;
140 179
     that.setData({
@@ -159,14 +198,21 @@ Page({
159 198
         }
160 199
       }
161 200
     }
162
-    main.getData('GetTestEnglishWords?UserID='+app.globalData.userInfo.UserID+'&Words=' + wordStr, function (data) {
201
+    main.getData('GetTestEnglishWords?UserID='+app.globalData.userInfo.UserID+'&TestType='+options.testtype+'&Words=' + wordStr, function (data) {
163 202
       if (data) {
164 203
         TaskList = [];
165 204
         var words = data;
166 205
         for (var k = 0; k < words.length; k++) {
167 206
           var taskInfo = words[k];
168 207
 
169
-          taskInfo.TagWidth=364;
208
+          if (options.testtype=="read"){
209
+            taskInfo.TagWidth=212;
210
+            taskInfo.FontSize=108;
211
+          }
212
+          else{
213
+            taskInfo.TagWidth=186;
214
+            taskInfo.FontSize=36;
215
+          }
170 216
           taskInfo.ContentNew = main.changeStringToView(taskInfo.Content);
171 217
           TaskList.push(taskInfo);
172 218
         }
@@ -336,8 +382,10 @@ Page({
336 382
           wx.hideLoading();
337 383
           if (res.statusCode === 200) {
338 384
             tempPlayUrlLocal = res.tempFilePath;
339
-            that.audioCtx.setSrc(res.tempFilePath);
340
-            that.audioCtx.play();
385
+            if (that.audioCtx){
386
+              that.audioCtx.setSrc(res.tempFilePath);
387
+              that.audioCtx.play();
388
+            }
341 389
             tempPlayUrl = url;
342 390
           }
343 391
         },

+ 5 - 1
pages/test/list.js

@@ -177,8 +177,12 @@ Page({
177 177
           data.BookID=that.data.BookID;
178 178
           wx.setStorageSync("TestTask2", data); 
179 179
           that.onClose();
180
+          var url="./item?type=" + reporttype+"&bookid="+that.data.BookID;
181
+          var testtype=e.currentTarget.dataset.testtype;
182
+          if (testtype)
183
+            url+="&testtype="+testtype;
180 184
           wx.navigateTo({
181
-            url: "./item?type=" + reporttype+"&bookid="+that.data.BookID,
185
+            url: url,
182 186
           });
183 187
         });
184 188
       } else {

+ 30 - 20
pages/test/list.wxml

@@ -47,18 +47,20 @@
47 47
 				<image src="../images/universalpic_word_blue_30x30.png" class="universalpic_word_blue_30x30" />
48 48
 				<view class="SelectContainer1Text4">查看字表</view>
49 49
 			</view>
50
-			<view class="btnPanel FlexRow">
50
+			<view class="btnPanel FlexColumn">
51
+				
51 52
 				<view wx:if="{{SelectItem.TestTypeReadFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-url="./item?testtype=read&bookid={{BookID}}&unitsid={{SelectItem.ID}}&name1={{Name1}}&name2={{SelectItem.Name}}">
52 53
 					<image src="../images/examine_willread_gray_30x30.png" class="examine_willread_gray_30x30" />
53 54
 					<view class="SelectContainer1Text3">会念</view>
54 55
 				</view>
55
-
56 56
 				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="continue">
57 57
 					<image src="../images/examine_willread_green_30x30.png" class="examine_willread_gray_30x30" />
58 58
 					<view class="SelectContainer1Text3">会念 继续检验</view>
59 59
 				</view>
60 60
 
61
-
61
+				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="restart">
62
+					重新开始
63
+				</view>
62 64
 				<view wx:if="{{SelectItem.TestTypeWriteFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.WriteReportID}}" data-url="./item?testtype=write&bookid={{BookID}}&unitsid={{SelectItem.ID}}&name1={{Name1}}&name2={{SelectItem.Name}}">
63 65
 					<image src="../images/examine_willwrite_gray_27x27.png" class="examine_willwrite_gray_27x27" />
64 66
 					<view class="SelectContainer1Text3">会写</view>
@@ -68,15 +70,7 @@
68 70
 					<image src="../images/examine_willwrite_green_27x27.png" class="examine_willwrite_gray_27x27" />
69 71
 					<view class="SelectContainer1Text3">会写 继续检验</view>
70 72
 				</view>
71
-			</view>
72
-
73
-			<view class="btnPanel2 FlexRow">
74
-				<view wx:if="{{SelectItem.TestTypeReadFinished}}" class="btnPanel21"></view>
75
-				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="restart">
76
-					重新开始
77
-				</view>
78 73
 
79
-				<view wx:if="{{SelectItem.TestTypeWriteFinished}}" class="btnPanel21"></view>
80 74
 				<view wx:if="{{!SelectItem.TestTypeWriteFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.WriteReportID}}" data-type="restart">
81 75
 					重新开始
82 76
 				</view>
@@ -88,26 +82,42 @@
88 82
 				<image src="../images/universalpic_words_blue_30x30.png" class="universalpic_word_blue_30x30" />
89 83
 				<view class="SelectContainer1Text4">查看词表</view>
90 84
 			</view>
91
-			<view class="btnPanel1">念出单词的发音并说出含义</view>
92
-			<view class="btnPanel0 btnPanel FlexRow">
85
+			<view class="btnPanel0 btnPanel FlexColumn">
93 86
 				<view wx:if="{{SelectItem.TestTypeReadFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-url="./item?testtype=read&bookid={{BookID}}&unitsid={{SelectItem.ID}}&name1={{Name1}}&name2={{SelectItem.Name}}">
94
-					<view class="SelectContainer1Text3">开始检验</view>
87
+					<image src="../images/examine_willread_gray_30x30.png" class="examine_willread_gray_30x30" />
88
+					<view class="SelectContainer1Text3">念单词说含义</view>
95 89
 				</view>
96 90
 				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="continue">
97
-					<view class="SelectContainer1Text3">继续检验</view>
91
+					<image src="../images/examine_willread_green_30x30.png" class="examine_willread_gray_30x30" />
92
+					<view class="SelectContainer1Text3">念单词说含义 继续检验</view>
98 93
 				</view>
99
-			</view>
100
-
101
-			<view class="btnPanel2 FlexRow">
102
-				<view wx:if="{{SelectItem.TestTypeReadFinished}}" class="btnPanel21"></view>
94
+				<view class="btnPanel1">根据单词念出读音说出含义</view>
95
+			
103 96
 				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="restart">
104 97
 					重新开始
105 98
 				</view>
99
+
100
+
101
+				<view wx:if="{{SelectItem.TestTypeWriteFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-testtype="write" data-id="{{SelectItem.WriteReportID}}" data-url="./item?testtype=write&bookid={{BookID}}&unitsid={{SelectItem.ID}}&name1={{Name1}}&name2={{SelectItem.Name}}">
102
+					<image src="../images/examine_willwrite_gray_27x27.png" class="examine_willwrite_gray_27x27" />
103
+					<view class="SelectContainer1Text3">默写</view>
104
+				</view>
105
+				<view wx:if="{{!SelectItem.TestTypeWriteFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-testtype="write" data-id="{{SelectItem.WriteReportID}}" data-type="continue">
106
+					<image src="../images/examine_willwrite_green_27x27.png" class="examine_willwrite_gray_27x27" />
107
+					<view class="SelectContainer1Text3">默写 继续检验</view>
108
+				</view>
109
+				<view class="btnPanel1">根据发音和含义默写单词</view>
110
+			
111
+				<view wx:if="{{!SelectItem.TestTypeWriteFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-testtype="write" data-id="{{SelectItem.WriteReportID}}" data-type="restart">
112
+					重新开始
113
+				</view>
114
+
115
+
106 116
 			</view>
107 117
 		</block>
108 118
 
109 119
 
110
-		<view style="width:100%;height:50rpx;"></view>
120
+		<view style="width:100%;height:30rpx;"></view>
111 121
 		<view class="close FlexRow" bindtap="onClose">
112 122
 			<image src="../images/universalpic_close_black_24x24.png" class="universalpic_close_black_24x24" />
113 123
 		</view>

+ 13 - 12
pages/test/list.wxss

@@ -83,12 +83,13 @@
83 83
   background-color: rgba(0,0,0,0.7);
84 84
   position: fixed;
85 85
   width:100%;
86
+  justify-content: flex-start;
86 87
   top:0;
87 88
 }
88 89
 
89 90
 .SelectContainer .SelectContainer1{
91
+  margin-top:20rpx;
90 92
   width:710rpx;
91
-  /* height:613rpx; */
92 93
   border-radius: 10rpx;
93 94
   background-color: #F8F8F8;
94 95
   position: relative;
@@ -113,14 +114,12 @@
113 114
 }
114 115
 
115 116
 .SelectContainer1Text3{
116
-  font-size:36rpx;
117
-  margin-left: 10rpx;
118
-  color:#787878;
119
-  font-weight: 500;
117
+  font-size:28rpx;
118
+  margin-left: 20rpx;
120 119
 }
121 120
 
122 121
 .btnPanel{
123
-  margin-top: 60rpx;
122
+  margin-top: 30rpx;
124 123
 }
125 124
 
126 125
 .btnPanel0{
@@ -128,19 +127,21 @@
128 127
 }
129 128
 
130 129
 .btnPanel1{
131
-  margin-top: 60rpx;
132
-  font-size: 28rpx;
130
+  margin-top:-10rpx;
131
+  margin-bottom: 30rpx;
132
+  font-size: 20rpx;
133 133
   font-weight: 500;
134
+  color:#4D4D4D;
134 135
 }
135 136
 
136 137
 
137 138
 .btn{
138
-  width:315rpx;
139
-  height:110rpx;
139
+  width:500rpx;
140
+  height:90rpx;
140 141
   border-radius: 10rpx;
141 142
   background-color: #fff;
142 143
   border:1rpx solid #9B9B9B;
143
-  margin: 0 10rpx;
144
+  margin: 0 0 30rpx 0;
144 145
 }
145 146
 
146 147
 
@@ -171,7 +172,7 @@
171 172
 }
172 173
 .btnPanel21{
173 174
   width:315rpx;
174
-  margin: 0 10rpx;
175
+  margin:0 0 30rpx 0;
175 176
   text-align: center;
176 177
   color:#0071EF;
177 178
   font-size:28rpx;

+ 20 - 3
pages/test/report.js

@@ -98,6 +98,8 @@ Page({
98 98
         name = name.substr(name.indexOf("#") + 1);
99 99
         if (TestTask.TestType == "read")
100 100
           name += " 会念";
101
+        else if (TestTask.TestType == "recite")
102
+          name += " 会背";
101 103
         else
102 104
           name += " 会写";
103 105
       }
@@ -169,10 +171,14 @@ Page({
169 171
           var obj = {};
170 172
           obj.Field1 = item.Content[1].Content;
171 173
           obj.Field2 = item.Content[2].Content;
172
-          obj.Field3 = "";
174
+          if (item.Content[3].Content)
175
+            obj.Field3 = item.Content[3].Content;
176
+          else
177
+            obj.Field3="";
173 178
           obj.Tags = item.Content[0].Content;
174 179
           if (!common.checkIsArray(obj.Tags))
175 180
             obj.Tags = obj.Tags.split(",");
181
+          
176 182
           obj.ID = 0;
177 183
           obj.LimitTime = common.formatTime(new Date());
178 184
           obj.FontSize = item.FontSize;
@@ -246,13 +252,25 @@ Page({
246 252
     }
247 253
     if (TestTask.TestRightStr)
248 254
       param1.TestRightStr = TestTask.TestRightStr.join(symbol);
255
+    if (common.checkIsArray(param1.TestWrongStr))
256
+      param1.TestRightStr=param1.TestRightStr.join(symbol);
257
+
249 258
     if (TestTask.TestWrongStr)
250 259
       param1.TestWrongStr = TestTask.TestWrongStr.join(symbol);
260
+    if (common.checkIsArray(param1.TestWrongStr))
261
+      param1.TestWrongStr=param1.TestWrongStr.join(symbol);
262
+    
251 263
     if (TestTask.TestSkipStr)
252 264
       param1.TestSkipStr = TestTask.TestSkipStr.join(symbol);
265
+    if (common.checkIsArray(param1.TestSkipStr))
266
+      param1.TestSkipStr=param1.TestSkipStr.join(symbol);
267
+    
268
+      
253 269
     if (TestTask.TestExistStr)
254 270
       param1.TestExistStr = TestTask.TestExistStr.join(symbol);
255
-
271
+    if (common.checkIsArray(param1.TestExistStr))
272
+      param1.TestExistStr=param1.TestExistStr.join(symbol);
273
+    
256 274
     if (TestReportID)
257 275
       param1.ID = TestReportID;
258 276
 
@@ -260,7 +278,6 @@ Page({
260 278
     wx.setStorageSync('TestTask', param1);
261 279
     
262 280
     delete param1.List;
263
-    delete param1.BookID;
264 281
 
265 282
     main.postData('InsertTestReport?UserID=' + userid, param1, function (data) {
266 283
       if (data){

+ 2 - 3
project.config.json

@@ -120,9 +120,8 @@
120 120
           "scene": 1047
121 121
         },
122 122
         {
123
-          "id": 9,
124
-          "name": "pages/marketing/award",
125
-          "pathName": "pages/marketing/award",
123
+          "name": "pages/other/newuser",
124
+          "pathName": "pages/other/newuser",
126 125
           "query": "",
127 126
           "scene": null
128 127
         }

+ 367 - 0
utils/constant.js

@@ -182,6 +182,7 @@ module.exports = {
182 182
       BackColor2: "#19306C",
183 183
       LineColor: "#F1AB1E",
184 184
       FieldColor: "#ACC3DC",
185
+      BackColor3: "#18306C",
185 186
     },
186 187
     {
187 188
       ID: 2,
@@ -190,6 +191,7 @@ module.exports = {
190 191
       BackColor2: "#4D3571",
191 192
       LineColor: "#FCA0BE",
192 193
       FieldColor: "#C6BFD1",
194
+      BackColor3: "#402D5E",
193 195
     },
194 196
     {
195 197
       ID: 3,
@@ -198,6 +200,7 @@ module.exports = {
198 200
       BackColor2: "#532938",
199 201
       LineColor: "#F19E84",
200 202
       FieldColor: "#D3A9B8",
203
+      BackColor3: "#492532",
201 204
     },
202 205
     {
203 206
       ID: 4,
@@ -206,8 +209,372 @@ module.exports = {
206 209
       BackColor2: "#27420B",
207 210
       LineColor: "#ADD303",
208 211
       FieldColor: "#ADC493",
212
+      BackColor3: "#253C0B",
209 213
     },
210 214
   ],
215
+  testGradeArr: [{
216
+    Name: "一年级",
217
+    Name2: "语文一年级",
218
+    Select: "Select",
219
+    List: [{
220
+      ID: 1,
221
+      Type: "Shizi",
222
+      Name: "语文识字",
223
+      Name2: "上学期",
224
+      Finish: 0,
225
+      Total: 12,
226
+      Image: "../images/examine_subject_a001.png"
227
+    }, {
228
+      ID: 13,
229
+      Type: "Shizi",
230
+      Name: "语文写字",
231
+      Name2: "上学期",
232
+      Finish: 0,
233
+      Total: 26,
234
+      Image: "../images/examine_subject_a001.png"
235
+    }, {
236
+      ID: 25,
237
+      Type: "Shici",
238
+      Name: "语文古诗词",
239
+      Name2: "上学期",
240
+      Finish: 0,
241
+      Total: 1,
242
+      Image: "../images/examine_subject_a001.png"
243
+    }, {
244
+      ID: 2,
245
+      Type: "Shizi",
246
+      Name: "语文识字",
247
+      Name2: "下学期",
248
+      Finish: 0,
249
+      Total: 14,
250
+      Image: "../images/examine_subject_a002.png"
251
+    }, {
252
+      ID: 14,
253
+      Type: "Shizi",
254
+      Name: "语文写字",
255
+      Name2: "下学期",
256
+      Finish: 0,
257
+      Total: 28,
258
+      Image: "../images/examine_subject_a002.png"
259
+    }, {
260
+      ID: 26,
261
+      Type: "Shici",
262
+      Name: "语文古诗文",
263
+      Name2: "下学期",
264
+      Finish: 0,
265
+      Total: 1,
266
+      Image: "../images/examine_subject_a002.png"
267
+    }]
268
+  },
269
+  {
270
+    Name: "二年级",
271
+    Name2: "语文二年级",
272
+    Select: "",
273
+    List: [{
274
+      ID: 3,
275
+      Type: "Shizi",
276
+      Name: "语文识字",
277
+      Name2: "上学期",
278
+      Finish: 0,
279
+      Total: 16,
280
+      Image: "../images/examine_subject_a003.png"
281
+    }, {
282
+      ID: 15,
283
+      Type: "Shizi",
284
+      Name: "语文写字",
285
+      Name2: "上学期",
286
+      Finish: 0,
287
+      Total: 28,
288
+      Image: "../images/examine_subject_a003.png"
289
+    },{
290
+      ID: 27,
291
+      Type: "Shici",
292
+      Name: "语文古诗文",
293
+      Name2: "上学期",
294
+      Finish: 0,
295
+      Total: 1,
296
+      Image: "../images/examine_subject_a003.png"
297
+    }, {
298
+      ID: 4,
299
+      Type: "Shizi",
300
+      Name: "语文识字",
301
+      Name2: "下学期",
302
+      Finish: 0,
303
+      Total: 16,
304
+      Image: "../images/examine_subject_a004.png"
305
+    }, {
306
+      ID: 16,
307
+      Type: "Shizi",
308
+      Name: "语文写字",
309
+      Name2: "下学期",
310
+      Finish: 0,
311
+      Total: 29,
312
+      Image: "../images/examine_subject_a004.png"
313
+    }, {
314
+      ID: 28,
315
+      Type: "Shici",
316
+      Name: "语文古诗文",
317
+      Name2: "下学期",
318
+      Finish: 0,
319
+      Total: 1,
320
+      Image: "../images/examine_subject_a004.png"
321
+    }]
322
+  },
323
+  {
324
+    Name: "三年级",
325
+    Name2: "语文三年级",
326
+    Select: "",
327
+    List: [{
328
+      ID: 5,
329
+      Type: "Shizi",
330
+      Name: "语文识字",
331
+      Name2: "上学期",
332
+      Finish: 0,
333
+      Total: 16,
334
+      Image: "../images/examine_subject_a005.png"
335
+    }, {
336
+      ID: 17,
337
+      Type: "Shizi",
338
+      Name: "语文写字",
339
+      Name2: "上学期",
340
+      Finish: 0,
341
+      Total: 28,
342
+      Image: "../images/examine_subject_a005.png"
343
+    }, {
344
+      ID: 29,
345
+      Type: "Shizi",
346
+      Name: "语文古诗文",
347
+      Name2: "上学期",
348
+      Finish: 0,
349
+      Total: 1,
350
+      Image: "../images/examine_subject_a005.png"
351
+    }, {
352
+      ID: 6,
353
+      Type: "Shizi",
354
+      Name: "语文识字",
355
+      Name2: "下学期",
356
+      Finish: 0,
357
+      Total: 16,
358
+      Image: "../images/examine_subject_a006.png"
359
+    }, {
360
+      ID: 18,
361
+      Type: "Shizi",
362
+      Name: "语文写字",
363
+      Name2: "下学期",
364
+      Finish: 0,
365
+      Total: 21,
366
+      Image: "../images/examine_subject_a006.png"
367
+    }, {
368
+      ID: 30,
369
+      Type: "Shici",
370
+      Name: "语文古诗文",
371
+      Name2: "下学期",
372
+      Finish: 0,
373
+      Total: 1,
374
+      Image: "../images/examine_subject_a006.png"
375
+    }]
376
+  },
377
+  {
378
+    Name: "四年级",
379
+    Name2: "语文四年级",
380
+    Select: "",
381
+    List: [{
382
+      ID: 7,
383
+      Type: "Shizi",
384
+      Name: "语文识字",
385
+      Name2: "上学期",
386
+      Finish: 0,
387
+      Total: 16,
388
+      Image: "../images/examine_subject_a007.png"
389
+    },  {
390
+      ID: 19,
391
+      Type: "Shizi",
392
+      Name: "语文写字",
393
+      Name2: "上学期",
394
+      Finish: 0,
395
+      Total: 20,
396
+      Image: "../images/examine_subject_a007.png"
397
+    },  {
398
+      ID: 31,
399
+      Type: "Shici",
400
+      Name: "语文古诗文",
401
+      Name2: "上学期",
402
+      Finish: 0,
403
+      Total: 1,
404
+      Image: "../images/examine_subject_a007.png"
405
+    }, {
406
+      ID: 8,
407
+      Type: "Shizi",
408
+      Name: "语文识字",
409
+      Name2: "下学期",
410
+      Finish: 0,
411
+      Total: 16,
412
+      Image: "../images/examine_subject_a008.png"
413
+    }, {
414
+      ID: 20,
415
+      Type: "Shizi",
416
+      Name: "语文写字",
417
+      Name2: "下学期",
418
+      Finish: 0,
419
+      Total: 20,
420
+      Image: "../images/examine_subject_a008.png"
421
+    }, {
422
+      ID: 32,
423
+      Type: "Shici",
424
+      Name: "语文古诗文",
425
+      Name2: "下学期",
426
+      Finish: 0,
427
+      Total: 1,
428
+      Image: "../images/examine_subject_a008.png"
429
+    }]
430
+  },
431
+  {
432
+    Name: "五年级",
433
+    Name2: "语文五年级",
434
+    Select: "",
435
+    List: [{
436
+      ID: 9,
437
+      Type: "Shizi",
438
+      Name: "语文识字",
439
+      Name2: "上学期",
440
+      Finish: 0,
441
+      Total: 16,
442
+      Image: "../images/examine_subject_a009.png"
443
+    }, {
444
+      ID: 21,
445
+      Type: "Shizi",
446
+      Name: "语文写字",
447
+      Name2: "上学期",
448
+      Finish: 0,
449
+      Total: 21,
450
+      Image: "../images/examine_subject_a009.png"
451
+    }, {
452
+      ID: 33,
453
+      Type: "Shici",
454
+      Name: "语文古诗文",
455
+      Name2: "上学期",
456
+      Finish: 0,
457
+      Total: 1,
458
+      Image: "../images/examine_subject_a009.png"
459
+    }, {
460
+      ID: 10,
461
+      Type: "Shizi",
462
+      Name: "语文识字",
463
+      Name2: "下学期",
464
+      Finish: 0,
465
+      Total: 16,
466
+      Image: "../images/examine_subject_a010.png"
467
+    }, {
468
+      ID: 22,
469
+      Type: "Shizi",
470
+      Name: "语文写字",
471
+      Name2: "下学期",
472
+      Finish: 0,
473
+      Total: 16,
474
+      Image: "../images/examine_subject_a010.png"
475
+    }, {
476
+      ID: 34,
477
+      Type: "Shici",
478
+      Name: "语文古诗文",
479
+      Name2: "下学期",
480
+      Finish: 0,
481
+      Total: 1,
482
+      Image: "../images/examine_subject_a010.png"
483
+    }
484
+  ]
485
+  },
486
+  {
487
+    Name: "六年级",
488
+    Name2: "语文六年级",
489
+    Select: "",
490
+    List: [
491
+      {
492
+        ID: 23,
493
+        Type: "Shizi",
494
+        Name: "语文写字",
495
+        Name2: "上学期",
496
+        Finish: 0,
497
+        Total: 18,
498
+        Image: "../images/examine_subject_a011.png"
499
+      }, {
500
+        ID: 35,
501
+        Type: "Shici",
502
+        Name: "语文古诗文",
503
+        Name2: "上学期",
504
+        Finish: 0,
505
+        Total: 1,
506
+        Image: "../images/examine_subject_a011.png"
507
+      }, {
508
+        ID: 24,
509
+        Type: "Shizi",
510
+        Name: "语文写字",
511
+        Name2: "下学期",
512
+        Finish: 0,
513
+        Total: 12,
514
+        Image: "../images/examine_subject_a012.png"
515
+      }, {
516
+        ID: 36,
517
+        Type: "Shici",
518
+        Name: "语文古诗文",
519
+        Name2: "下学期",
520
+        Finish: 0,
521
+        Total: 1,
522
+        Image: "../images/examine_subject_a012.png"
523
+      }, 
524
+    ]
525
+  },
526
+  {
527
+    Name: "英语常用单词",
528
+    Name2: "英语常用单词",
529
+    Select: "",
530
+    List: [
531
+      {
532
+        ID: 101,
533
+        Type: "Word",
534
+        Name: "常用单词1",
535
+        Name2: "词汇1~220",
536
+        Finish: 0,
537
+        Total: 22,
538
+        Image: "../images/examine_subject_b001.png"
539
+      },
540
+      {
541
+        ID: 102,
542
+        Type: "Word",
543
+        Name: "常用单词2",
544
+        Name2: "词汇221~500",
545
+        Finish: 0,
546
+        Total: 28,
547
+        Image: "../images/examine_subject_b002.png"
548
+      },
549
+      {
550
+        ID: 103,
551
+        Type: "Word",
552
+        Name: "常用单词3",
553
+        Name2: "词汇500~1000",
554
+        Finish: 0,
555
+        Total: 50,
556
+        Image: "../images/examine_subject_b003.png"
557
+      },
558
+      {
559
+        ID: 104,
560
+        Type: "Word",
561
+        Name: "常用单词4",
562
+        Name2: "词汇1001~1500",
563
+        Finish: 0,
564
+        Total: 50,
565
+        Image: "../images/examine_subject_b004.png"
566
+      },
567
+      {
568
+        ID: 105,
569
+        Type: "Word",
570
+        Name: "常用单词5",
571
+        Name2: "词汇1501~2000",
572
+        Finish: 0,
573
+        Total: 50,
574
+        Image: "../images/examine_subject_b005.png"
575
+      },
576
+    ]
577
+  }],
211 578
   arrPinyin: [
212 579
     ['a1', 'ā', ['阿']],
213 580
     ['a2', 'á', ['啊']],

+ 81 - 6
utils/main.js

@@ -872,7 +872,6 @@ function GetTestReportInfo(reportid, callback) {
872 872
       var name2 = UserTestReport[n].Name[1];
873 873
 
874 874
       if (name1[0].indexOf("英语") >= 0) {
875
-        //todo
876 875
         //console.log("英语");
877 876
         var arrEnglist = wx.getStorageSync("EnglishAll");
878 877
         if (arrEnglist)
@@ -897,7 +896,7 @@ function GetTestReportInfo(reportid, callback) {
897 896
         var tempWrong = "," + userTestReportInfo.TestWrongStr + ",";
898 897
         var tempSkip = "," + userTestReportInfo.TestSkipStr + ",";
899 898
         var tempExist = "," + userTestReportInfo.TestExistStr + ",";
900
-        getData('GetTestEnglishWords?UserID=' + app.globalData.userInfo.UserID + '&Words=' + wordStr, function (data) {
899
+        getData('GetTestEnglishWords?UserID=' + app.globalData.userInfo.UserID + '&Words=' + wordStr+"&TestType="+userTestReportInfo.TestType, function (data) {
901 900
           if (data) {
902 901
             var result = {};
903 902
             result.ID = userTestReportInfo.ID;
@@ -911,7 +910,14 @@ function GetTestReportInfo(reportid, callback) {
911 910
             for (var k = 0; k < words.length; k++) {
912 911
               var taskInfo = words[k];
913 912
 
914
-              taskInfo.TagWidth = 364;
913
+              if (userTestReportInfo.TestType=="read"){
914
+                taskInfo.TagWidth=212;
915
+                taskInfo.FontSize=108;
916
+              }
917
+              else{
918
+                taskInfo.TagWidth=186;
919
+                taskInfo.FontSize=36;
920
+              }
915 921
               taskInfo.ContentNew = changeStringToView(taskInfo.Content);
916 922
               if (tempRight.indexOf("," + taskInfo.Word + ",") >= 0)
917 923
                 taskInfo.Result = 1;
@@ -944,8 +950,70 @@ function GetTestReportInfo(reportid, callback) {
944 950
             callback({});
945 951
           }
946 952
         });
953
+      } 
954
+      else if (name2=="古诗文") {
955
+        //todo
956
+        //console.log("古诗文");
957
+        var userTestReportInfo = UserTestReport[n];
958
+        var tempRight = "," + userTestReportInfo.TestRightStr + ",";
959
+        var tempWrong = "," + userTestReportInfo.TestWrongStr + ",";
960
+        var tempSkip = "," + userTestReportInfo.TestSkipStr + ",";
961
+        var tempExist = "," + userTestReportInfo.TestExistStr + ",";
962
+        
963
+        getData('GetTestAncientPoetryList?UserID=' + app.globalData.userInfo.UserID + '&BookID=' + userTestReportInfo.BookID, function (data) {
964
+          
965
+          if (data) {
966
+            var result = {};
967
+            result.ID = userTestReportInfo.ID;
968
+            result.IsFinished = userTestReportInfo.IsFinished;
969
+            result.Name = userTestReportInfo.Name.join("#");
970
+            result.TestType = userTestReportInfo.TestType;
971
+            result.BookID = userTestReportInfo.BookID;
947 972
 
948
-      } else {
973
+            var TaskList = [];
974
+            for (var k = 0; k < data.length; k++) {
975
+              var taskInfo = data[k];              
976
+              taskInfo.TagWidth=336;
977
+              if (taskInfo.Word.length>9)
978
+                taskInfo.FontSize=48;
979
+              else
980
+                taskInfo.FontSize=64;
981
+
982
+              taskInfo.ContentNew = changeStringToView(taskInfo.Content);
983
+              if (tempRight.indexOf("," + taskInfo.Word + ",") >= 0)
984
+                taskInfo.Result = 1;
985
+              if (tempWrong.indexOf("," + taskInfo.Word + ",") >= 0)
986
+                taskInfo.Result = -1;
987
+              if (tempSkip.indexOf("," + taskInfo.Word + ",") >= 0)
988
+                taskInfo.Result = 0;
989
+
990
+              if (tempExist.indexOf("," + taskInfo.Word + ",") >= 0)
991
+                taskInfo.Css = "Select2";
992
+
993
+              TaskList.push(taskInfo);
994
+            }
995
+            result.TestRightStr = "";
996
+            result.TestWrongStr = "";
997
+            result.TestSkipStr = "";
998
+            result.TestExistStr = "";
999
+            if (userTestReportInfo.TestRightStr)
1000
+              result.TestRightStr = userTestReportInfo.TestRightStr;
1001
+            if (userTestReportInfo.TestWrongStr)
1002
+              result.TestWrongStr = userTestReportInfo.TestWrongStr;
1003
+            if (userTestReportInfo.TestSkipStr)
1004
+              result.TestSkipStr = userTestReportInfo.TestSkipStr;
1005
+            if (userTestReportInfo.TestExistStr)
1006
+              result.TestExistStr = userTestReportInfo.TestExistStr;
1007
+
1008
+            result.List = TaskList;
1009
+            callback(result);
1010
+          } else {
1011
+            callback({});
1012
+          }
1013
+        });
1014
+        
1015
+      } 
1016
+      else {
949 1017
         name1 = name1[0] + name1[1].substr(2, 2) + "能力" + name1[2].substr(0, 1);
950 1018
         var HanziAll = wx.getStorageSync('HanziAll');
951 1019
         HanziAll = JSON.parse(HanziAll);
@@ -1172,14 +1240,15 @@ function searchInfomation(search,searchtype,author,shiciurl,callback){
1172 1240
   }, 5000);
1173 1241
 
1174 1242
   var url = 'GetMiaoguoAISearch2?UserID=' + app.globalData.userInfo.UserID;
1175
-  url += "&Word=" + search;
1243
+  url += "&Word=" + encodeURI(search);
1176 1244
   if (searchtype)
1177 1245
     url += "&SearchType=" + searchtype;
1178 1246
   if (author)
1179
-    url += "&Author=" + author;
1247
+    url += "&Author=" + encodeURI(author);
1180 1248
   if (shiciurl)
1181 1249
     url += "&ShiciUrl=" + shiciurl;
1182 1250
 
1251
+  
1183 1252
   getData(url, function (data) {
1184 1253
     wx.hideLoading();
1185 1254
     clearTimeout(timeout);
@@ -1223,6 +1292,7 @@ function searchInfomation(search,searchtype,author,shiciurl,callback){
1223 1292
           obj.TypeName = "诗词";
1224 1293
           obj.Content = data.CHN.PeomContent.join("").substr(0, WORD_LENGTH);
1225 1294
           obj.ShiciUrl = shiciurl;
1295
+          obj.TypeName="S";
1226 1296
         } else if (data.CHN) {
1227 1297
           obj.Type = "zici";
1228 1298
           if (data.CHN.PinYin && data.CHN.PinYin[0] && data.CHN.PinYin[0].pinyin)
@@ -1234,6 +1304,11 @@ function searchInfomation(search,searchtype,author,shiciurl,callback){
1234 1304
             if (obj.Content.length >= WORD_LENGTH)
1235 1305
               obj.Content += "..."
1236 1306
           }
1307
+
1308
+          if (obj.Key.length == 1)
1309
+              obj.TypeName = "Z";
1310
+            else
1311
+              obj.TypeName = "C";
1237 1312
         }
1238 1313
         if (data.ENG && !data.CHN) {
1239 1314
           obj.Type = "eng";