chengjie лет назад: 6
Родитель
Сommit
dbc894a8f3

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
app.js


+ 0 - 3
pages/main/add.wxss

@@ -187,9 +187,6 @@
187
   height:20rpx;
187
   height:20rpx;
188
 }
188
 }
189
 
189
 
190
-.panelItem .textLine {
191
-  text-decoration: underline;
192
-}
193
 .panelItem .textHighlighter {
190
 .panelItem .textHighlighter {
194
   color:#fff;
191
   color:#fff;
195
   background-color: #1E1E1E;
192
   background-color: #1E1E1E;

+ 3 - 1
pages/main/searchCard.js

@@ -17,7 +17,9 @@ Page({
17
       IsShow: app.globalData.userInfo.IsShow,
17
       IsShow: app.globalData.userInfo.IsShow,
18
     });
18
     });
19
 
19
 
20
-    if (new Date().getFullYear()>=2020){
20
+    var year=new Date(app.globalData.userInfo.CreateTime).getFullYear();
21
+    //console.log(year);
22
+    if (new Date().getFullYear()>=2020 && year<2020){
21
       that.setData({
23
       that.setData({
22
         IsYearReport: true,
24
         IsYearReport: true,
23
       });
25
       });

+ 64 - 44
pages/test/index.js

@@ -11,6 +11,11 @@ Page({
11
 
11
 
12
   },
12
   },
13
   onLoad: function (options) {
13
   onLoad: function (options) {
14
+    if (options.UserID){
15
+      app.globalData.userInfo={};
16
+      app.globalData.userInfo.UserID=options.UserID;
17
+    }
18
+
14
     var that = this;
19
     var that = this;
15
     that.setData({
20
     that.setData({
16
       Containnerheight: main.getWindowHeight(),
21
       Containnerheight: main.getWindowHeight(),
@@ -158,40 +163,40 @@ Page({
158
             },
163
             },
159
           ]
164
           ]
160
         },
165
         },
161
-        // {
162
-        //   Name: "英语常用词",
163
-        //   Name2: "英语常用词",
164
-        //   Select: "",
165
-        //   List: [
166
-        //     {
167
-        //       ID: 13,
168
-        //       Type: "Word",
169
-        //       Name: "常用词1",
170
-        //       Name2: "词汇1~220",
171
-        //       Finish: 0,
172
-        //       Total: 22,
173
-        //       Image: "../images/examine_subject_b001.png"
174
-        //     },
175
-        //     {
176
-        //       ID: 14,
177
-        //       Type: "Word",
178
-        //       Name: "常用词2",
179
-        //       Name2: "词汇221~500",
180
-        //       Finish: 0,
181
-        //       Total: 28,
182
-        //       Image: "../images/examine_subject_b002.png"
183
-        //     },
184
-        //     {
185
-        //       ID: 15,
186
-        //       Type: "Word",
187
-        //       Name: "常用词3",
188
-        //       Name2: "词汇500~1000",
189
-        //       Finish: 0,
190
-        //       Total: 25,
191
-        //       Image: "../images/examine_subject_b003.png"
192
-        //     },
193
-        //   ]
194
-        // },
166
+        {
167
+          Name: "英语常用词",
168
+          Name2: "英语常用词",
169
+          Select: "",
170
+          List: [
171
+            {
172
+              ID: 13,
173
+              Type: "Word",
174
+              Name: "常用词1",
175
+              Name2: "词汇1~220",
176
+              Finish: 0,
177
+              Total: 22,
178
+              Image: "../images/examine_subject_b001.png"
179
+            },
180
+            {
181
+              ID: 14,
182
+              Type: "Word",
183
+              Name: "常用词2",
184
+              Name2: "词汇221~500",
185
+              Finish: 0,
186
+              Total: 28,
187
+              Image: "../images/examine_subject_b002.png"
188
+            },
189
+            {
190
+              ID: 15,
191
+              Type: "Word",
192
+              Name: "常用词3",
193
+              Name2: "词汇500~1000",
194
+              Finish: 0,
195
+              Total: 50,
196
+              Image: "../images/examine_subject_b003.png"
197
+            },
198
+          ]
199
+        },
195
       ],
200
       ],
196
     })
201
     })
197
     var userid = app.globalData.userInfo.UserID;
202
     var userid = app.globalData.userInfo.UserID;
@@ -210,6 +215,31 @@ Page({
210
             }
215
             }
211
           }
216
           }
212
           dataTemp.push(data[i]);
217
           dataTemp.push(data[i]);
218
+
219
+          if (data[i].TestRightStr && data[i].TestRightStr.indexOf("_")>=0){
220
+            data[i].TestRightStr=data[i].TestRightStr.split(",");
221
+          }
222
+          if (!data[i].TestRightStr)
223
+            data[i].TestRightStr="";
224
+
225
+          if (data[i].TestWrongStr && data[i].TestWrongStr.indexOf("_")>=0){
226
+            data[i].TestWrongStr=data[i].TestWrongStr.split(",");
227
+          }
228
+          if (!data[i].TestWrongStr)
229
+            data[i].TestWrongStr="";
230
+
231
+          if (data[i].TestSkipStr && data[i].TestSkipStr.indexOf("_")>=0){
232
+            data[i].TestSkipStr=data[i].TestSkipStr.split(",");
233
+          }
234
+          if (!data[i].TestSkipStr)
235
+            data[i].TestSkipStr="";
236
+
237
+          if (data[i].TestExistStr && data[i].TestExistStr.indexOf("_")>=0){
238
+            data[i].TestExistStr=data[i].TestExistStr.split(",");
239
+          }
240
+          if (!data[i].TestExistStr)
241
+            data[i].TestExistStr="";
242
+                
213
         }
243
         }
214
 
244
 
215
         for (var i = 0; i < dataTemp.length; i++) {
245
         for (var i = 0; i < dataTemp.length; i++) {
@@ -267,16 +297,6 @@ Page({
267
   gotoTestReportInfo: function (e) {
297
   gotoTestReportInfo: function (e) {
268
     var id = e.currentTarget.dataset.id;
298
     var id = e.currentTarget.dataset.id;
269
     var userid = app.globalData.userInfo.UserID;
299
     var userid = app.globalData.userInfo.UserID;
270
-    //todo
271
-    // main.getData('GetTestReportInfo?UserID=' + userid+'&ID='+id, function (data) {
272
-    //   if (data) {
273
-    //     wx.setStorageSync("TestTask", data);
274
-    //     wx.navigateTo({
275
-    //       url: "./report?type=edit",
276
-    //     });
277
-    //   }
278
-    // });
279
-
280
     main.GetTestReportInfo(id,function(data){
300
     main.GetTestReportInfo(id,function(data){
281
         wx.setStorageSync("TestTask", data);
301
         wx.setStorageSync("TestTask", data);
282
         wx.navigateTo({
302
         wx.navigateTo({

+ 3 - 1
pages/test/index.wxml

@@ -3,7 +3,7 @@
3
     <view class="panelTop1">{{GradeArr[TestSelectGrade].Name2}}</view>
3
     <view class="panelTop1">{{GradeArr[TestSelectGrade].Name2}}</view>
4
     <view class="panelTop2 FlexRow">
4
     <view class="panelTop2 FlexRow">
5
       <image class="universalpic_menu_blue_26x26" src="../images/universalpic_menu_blue_26x26.png"></image>
5
       <image class="universalpic_menu_blue_26x26" src="../images/universalpic_menu_blue_26x26.png"></image>
6
-      <view>首选年级</view>
6
+      <view>更改科目</view>
7
     </view>
7
     </view>
8
   </view>
8
   </view>
9
   <view class="panelLine"></view>
9
   <view class="panelLine"></view>
@@ -79,9 +79,11 @@
79
         <view class='numberContainerFooter112 FlexRow'>
79
         <view class='numberContainerFooter112 FlexRow'>
80
           <view class='numberContainerFooter1121{{item.Select}}' wx:for="{{GradeArr}}" wx:key="index" catchtap='onSelectGrade' data-value='{{index}}'>{{item.Name2}}</view>
80
           <view class='numberContainerFooter1121{{item.Select}}' wx:for="{{GradeArr}}" wx:key="index" catchtap='onSelectGrade' data-value='{{index}}'>{{item.Name2}}</view>
81
         </view>
81
         </view>
82
+        <view style="width:100%;height:40rpx;"></view>
82
       </view>
83
       </view>
83
     </view>
84
     </view>
84
   </view>
85
   </view>
86
+  
85
   <view class='lineFooter'></view>
87
   <view class='lineFooter'></view>
86
   <view class="numberContaineFooter FlexRow" catchtap='closeSelectGrade'>
88
   <view class="numberContaineFooter FlexRow" catchtap='closeSelectGrade'>
87
     <view>关闭</view>
89
     <view>关闭</view>

+ 0 - 1
pages/test/index.wxss

@@ -265,7 +265,6 @@
265
 }
265
 }
266
 .numberContainerFooter101{
266
 .numberContainerFooter101{
267
   width:100%;
267
   width:100%;
268
-  height: 376rpx;
269
   justify-content: flex-start;
268
   justify-content: flex-start;
270
   align-items: flex-start;
269
   align-items: flex-start;
271
 }
270
 }

+ 11 - 4
pages/test/item.js

@@ -37,6 +37,7 @@ Page({
37
   onLoad: function (options) {
37
   onLoad: function (options) {
38
     var that = this;
38
     var that = this;
39
     that.setData({
39
     that.setData({
40
+      BookID:options.bookid,
40
       IsShowAnswer: [0, 0],
41
       IsShowAnswer: [0, 0],
41
       Color: main.getDetailColor(app.globalData.ColorIndex),
42
       Color: main.getDetailColor(app.globalData.ColorIndex),
42
       Containnerheight: main.getWindowHeight(),
43
       Containnerheight: main.getWindowHeight(),
@@ -51,6 +52,7 @@ Page({
51
       that.initEng(options);
52
       that.initEng(options);
52
     }
53
     }
53
     that.getColor();
54
     that.getColor();
55
+    
54
 
56
 
55
     isFinished = 0;
57
     isFinished = 0;
56
 
58
 
@@ -92,9 +94,11 @@ Page({
92
       TestType: TestTask2.TestType,
94
       TestType: TestTask2.TestType,
93
       TestName1: name[0],
95
       TestName1: name[0],
94
       TestName2: name[1],
96
       TestName2: name[1],
97
+      BookID:TestTask2.BookID,
95
     });
98
     });
96
 
99
 
97
-    TestTask2.List = common.randomArray(TestTask2.List);
100
+    if (that.data.BookID<=12)
101
+      TestTask2.List = common.randomArray(TestTask2.List);
98
 
102
 
99
     var list = [];
103
     var list = [];
100
     var i = 0;
104
     var i = 0;
@@ -162,12 +166,12 @@ Page({
162
         for (var k = 0; k < words.length; k++) {
166
         for (var k = 0; k < words.length; k++) {
163
           var taskInfo = words[k];
167
           var taskInfo = words[k];
164
 
168
 
165
-          taskInfo.TagWidth=216;
169
+          taskInfo.TagWidth=364;
166
           taskInfo.ContentNew = main.changeStringToView(taskInfo.Content);
170
           taskInfo.ContentNew = main.changeStringToView(taskInfo.Content);
167
           TaskList.push(taskInfo);
171
           TaskList.push(taskInfo);
168
         }
172
         }
169
 
173
 
170
-        TaskList = common.randomArray(TaskList);
174
+        //TaskList = common.randomArray(TaskList);
171
 
175
 
172
         that.setData({
176
         that.setData({
173
           TaskInfo: TaskList[0],
177
           TaskInfo: TaskList[0],
@@ -279,10 +283,12 @@ Page({
279
     if (str == "recorder") {
283
     if (str == "recorder") {
280
       url = e.currentTarget.dataset.soundmark;
284
       url = e.currentTarget.dataset.soundmark;
281
     }
285
     }
282
-    else if (str.indexOf("英 [") >= 0 || str.indexOf("美 [") >= 0) {
286
+    else if (str.indexOf("英 [") >= 0 || str.indexOf("美 [") >= 0 || str.indexOf("baidu.com")>0 || str.indexOf("iciba.com")>0) {
283
       str = str.replace("英 [", "[");
287
       str = str.replace("英 [", "[");
284
       str = str.replace("美 [", "[");
288
       str = str.replace("美 [", "[");
285
       url = e.currentTarget.dataset.soundmark;
289
       url = e.currentTarget.dataset.soundmark;
290
+      if (!url)
291
+        url=str;
286
     }
292
     }
287
     else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark != "undefined") {
293
     else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark != "undefined") {
288
       var soundmark = e.currentTarget.dataset.soundmark;
294
       var soundmark = e.currentTarget.dataset.soundmark;
@@ -397,6 +403,7 @@ Page({
397
       TestTask.IsFinished = isFinished;
403
       TestTask.IsFinished = isFinished;
398
       TestTask.Name = this.data.TestName1 + "#" + this.data.TestName2;
404
       TestTask.Name = this.data.TestName1 + "#" + this.data.TestName2;
399
       TestTask.List = TaskList;
405
       TestTask.List = TaskList;
406
+      TestTask.BookID=this.data.BookID;
400
       wx.setStorageSync("TestTask", TestTask);
407
       wx.setStorageSync("TestTask", TestTask);
401
       wx.redirectTo({
408
       wx.redirectTo({
402
         url: './report?type=new',
409
         url: './report?type=new',

+ 37 - 35
pages/test/list.js

@@ -9,19 +9,19 @@ Page({
9
     IsSelect: false,
9
     IsSelect: false,
10
     ImagePath: app.globalData.uploadImageUrl,
10
     ImagePath: app.globalData.uploadImageUrl,
11
   },
11
   },
12
-  onLoad: function(options) {
12
+  onLoad: function (options) {
13
     var that = this;
13
     var that = this;
14
     that.setData({
14
     that.setData({
15
-      BookID:options.id,
15
+      BookID: options.id,
16
       Containnerheight: main.getWindowHeight(),
16
       Containnerheight: main.getWindowHeight(),
17
       Name1: options.name1,
17
       Name1: options.name1,
18
     });
18
     });
19
     isClick = true;
19
     isClick = true;
20
-    main.getHanzi(function(arr) {
20
+    main.getHanzi(function (arr) {
21
       if (!arr) {
21
       if (!arr) {
22
         wx.removeStorageSync("HanziUpdateTime");
22
         wx.removeStorageSync("HanziUpdateTime");
23
         wx.removeStorageSync("HanziAll");
23
         wx.removeStorageSync("HanziAll");
24
-        main.getHanzi(function(arr) {
24
+        main.getHanzi(function (arr) {
25
           that.init(options);
25
           that.init(options);
26
         });
26
         });
27
       } else {
27
       } else {
@@ -29,7 +29,7 @@ Page({
29
       }
29
       }
30
     });
30
     });
31
   },
31
   },
32
-  init: function(options) {
32
+  init: function (options) {
33
     var that = this;
33
     var that = this;
34
     var name = options.name1;
34
     var name = options.name1;
35
     if (name.indexOf(" ") > 0)
35
     if (name.indexOf(" ") > 0)
@@ -38,9 +38,9 @@ Page({
38
       title: name
38
       title: name
39
     });
39
     });
40
     var arr = [];
40
     var arr = [];
41
-    if (that.data.BookID==13 || that.data.BookID==14 || that.data.BookID==15)
41
+    if (that.data.BookID == 13 || that.data.BookID == 14 || that.data.BookID == 15)
42
       arr = wx.getStorageSync("EnglishAll");
42
       arr = wx.getStorageSync("EnglishAll");
43
-    else if (that.data.BookID<=12)
43
+    else if (that.data.BookID <= 12)
44
       arr = wx.getStorageSync("HanziAll");
44
       arr = wx.getStorageSync("HanziAll");
45
     var testReportList = wx.getStorageSync("UserTestReport");
45
     var testReportList = wx.getStorageSync("UserTestReport");
46
     arr = JSON.parse(arr);
46
     arr = JSON.parse(arr);
@@ -69,12 +69,22 @@ Page({
69
             if (testReportList[k].Name[0] == options.name1 &&
69
             if (testReportList[k].Name[0] == options.name1 &&
70
               testReportList[k].Name[1] == list[j].Name) {
70
               testReportList[k].Name[1] == list[j].Name) {
71
 
71
 
72
+              var testRightCount = 0;
73
+              if (testReportList[k].TestRightStr)
74
+                testRightCount = testReportList[k].TestRightStr.length;
75
+              var testWrongCount = 0;
76
+              if (testReportList[k].testWrongStr)
77
+                testWrongCount = testReportList[k].testWrongStr.length;
78
+              var testSkipCount = 0;
79
+              if (testReportList[k].TestSkipStr)
80
+                testSkipCount = testReportList[k].TestSkipStr.length;
81
+
72
 
82
 
73
               if (testReportList[k].TestType == "read") {
83
               if (testReportList[k].TestType == "read") {
74
                 if (testReportList[k].IsFinished == 1)
84
                 if (testReportList[k].IsFinished == 1)
75
                   list[j].TestTypeRead = 1;
85
                   list[j].TestTypeRead = 1;
76
 
86
 
77
-                if ((testReportList[k].TestRight + testReportList[k].TestWrong + testReportList[k].TestSkip) < testReportList[k].TestTotal) {
87
+                if ((testRightCount + testWrongCount + testSkipCount) < testReportList[k].TestTotal) {
78
                   list[j].TestTypeReadFinished = false;
88
                   list[j].TestTypeReadFinished = false;
79
                 }
89
                 }
80
 
90
 
@@ -84,7 +94,7 @@ Page({
84
                 if (testReportList[k].IsFinished == 1)
94
                 if (testReportList[k].IsFinished == 1)
85
                   list[j].TestTypeWrite = 1;
95
                   list[j].TestTypeWrite = 1;
86
 
96
 
87
-                if ((testReportList[k].TestRight + testReportList[k].TestWrong + testReportList[k].TestSkip) < testReportList[k].TestTotal) {
97
+                if ((testRightCount + testWrongCount + testSkipCount) < testReportList[k].TestTotal) {
88
                   list[j].TestTypeWriteFinished = false;
98
                   list[j].TestTypeWriteFinished = false;
89
                 }
99
                 }
90
 
100
 
@@ -100,7 +110,7 @@ Page({
100
       }
110
       }
101
     }
111
     }
102
   },
112
   },
103
-  onShowFrame: function(e) {
113
+  onShowFrame: function (e) {
104
     var selectItem;
114
     var selectItem;
105
     var id = e.currentTarget.dataset.id;
115
     var id = e.currentTarget.dataset.id;
106
     for (var i = 0; i < this.data.List.length; i++) {
116
     for (var i = 0; i < this.data.List.length; i++) {
@@ -113,57 +123,49 @@ Page({
113
       SelectItem: selectItem,
123
       SelectItem: selectItem,
114
     });
124
     });
115
   },
125
   },
116
-  onClose: function() {
126
+  onClose: function () {
117
     this.setData({
127
     this.setData({
118
       IsSelect: false,
128
       IsSelect: false,
119
     });
129
     });
120
   },
130
   },
121
-  goto: function(e) {
131
+  goto: function (e) {
122
     var url = e.currentTarget.dataset.url;
132
     var url = e.currentTarget.dataset.url;
123
     wx.navigateTo({
133
     wx.navigateTo({
124
       url: url,
134
       url: url,
125
     });
135
     });
126
     this.onClose();
136
     this.onClose();
127
   },
137
   },
128
-  gotoTestReportInfo: function(e) {
129
-    var that=this;
138
+  gotoTestReportInfo: function (e) {
139
+    var that = this;
130
     if (isClick) {
140
     if (isClick) {
131
-      isClick=false;
132
-      setTimeout(function(){
133
-        isClick=true;
134
-      },2000);
141
+      isClick = false;
142
+      setTimeout(function () {
143
+        isClick = true;
144
+      }, 2000);
135
 
145
 
136
       var id = e.currentTarget.dataset.id;
146
       var id = e.currentTarget.dataset.id;
137
       var userid = app.globalData.userInfo.UserID;
147
       var userid = app.globalData.userInfo.UserID;
138
 
148
 
139
       if (id) {
149
       if (id) {
140
         var reporttype = e.currentTarget.dataset.type;
150
         var reporttype = e.currentTarget.dataset.type;
141
-        // main.getData('GetTestReportInfo?UserID=' + userid + '&ID=' + id, function(data) {
142
-        //   if (data) {
143
-        //     wx.setStorageSync("TestTask2", data);
144
-        //     that.onClose();
145
-        //     wx.navigateTo({
146
-        //       url: "./item?type=" + reporttype,
147
-        //     });
148
-        //   }
149
-        // });
150
-        main.GetTestReportInfo(id,function(data){
151
-          wx.setStorageSync("TestTask2", data);
152
-            that.onClose();
153
-            wx.navigateTo({
154
-              url: "./item?type=" + reporttype,
155
-            });
151
+        main.GetTestReportInfo(id, function (data) {
152
+          data.BookID=that.data.BookID;
153
+          wx.setStorageSync("TestTask2", data); 
154
+          that.onClose();
155
+          wx.navigateTo({
156
+            url: "./item?type=" + reporttype+"&bookid="+that.data.BookID,
157
+          });
156
         });
158
         });
157
       } else {
159
       } else {
158
         that.onClose();
160
         that.onClose();
159
-        var url = e.currentTarget.dataset.url;
161
+        var url = e.currentTarget.dataset.url+"&bookid="+that.data.BookID;
160
         wx.navigateTo({
162
         wx.navigateTo({
161
           url: url,
163
           url: url,
162
         });
164
         });
163
       }
165
       }
164
     }
166
     }
165
   },
167
   },
166
-  onShareAppMessage: function() {
168
+  onShareAppMessage: function () {
167
     return {
169
     return {
168
       title: app.globalData.ShareTitle,
170
       title: app.globalData.ShareTitle,
169
       path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
171
       path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,

+ 44 - 29
pages/test/list.wxml

@@ -40,33 +40,25 @@
40
 	<view class="SelectContainer1 FlexColumn">
40
 	<view class="SelectContainer1 FlexColumn">
41
 		<image src="../images/examine_subjecticon_01.png" class="examine_subjecticon_01" />
41
 		<image src="../images/examine_subjecticon_01.png" class="examine_subjecticon_01" />
42
 		<view class="SelectContainer1Text1">{{SelectItem.Name}}</view>
42
 		<view class="SelectContainer1Text1">{{SelectItem.Name}}</view>
43
-		<view class="SelectContainer1Text2">检验哪个方面</view>
43
+		<view class="SelectContainer1Text2">选择检验方式</view>
44
 
44
 
45
 		<block wx:if="{{BookID<=12}}">
45
 		<block wx:if="{{BookID<=12}}">
46
 			<view class="btnPanel0 FlexRow" bindtap="goto" data-url="./wordlist?type=CHN&unitsid={{UnitsID}}&id={{SelectItem.ID}}">
46
 			<view class="btnPanel0 FlexRow" bindtap="goto" data-url="./wordlist?type=CHN&unitsid={{UnitsID}}&id={{SelectItem.ID}}">
47
 				<image src="../images/universalpic_word_blue_30x30.png" class="universalpic_word_blue_30x30" />
47
 				<image src="../images/universalpic_word_blue_30x30.png" class="universalpic_word_blue_30x30" />
48
 				<view class="SelectContainer1Text4">查看字表</view>
48
 				<view class="SelectContainer1Text4">查看字表</view>
49
 			</view>
49
 			</view>
50
-		</block>
51
-		<block wx:if="{{BookID>12}}">
52
-			<view class="btnPanel0 FlexRow" bindtap="goto" data-url="./wordlist?type=ENG&unitsid={{UnitsID}}&id={{SelectItem.ID}}">
53
-				<image src="../images/universalpic_words_blue_30x30.png" class="universalpic_word_blue_30x30" />
54
-				<view class="SelectContainer1Text4">查看词表</view>
55
-			</view>
56
-		</block>
57
-		<view class="btnPanel FlexRow">
58
-			
59
-			<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}}">
60
-				<image src="../images/examine_willread_gray_30x30.png" class="examine_willread_gray_30x30" />
61
-				<view class="SelectContainer1Text3">会念</view>
62
-			</view>
50
+			<view class="btnPanel FlexRow">
51
+				<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
+					<image src="../images/examine_willread_gray_30x30.png" class="examine_willread_gray_30x30" />
53
+					<view class="SelectContainer1Text3">会念</view>
54
+				</view>
55
+
56
+				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="continue">
57
+					<image src="../images/examine_willread_green_30x30.png" class="examine_willread_gray_30x30" />
58
+					<view class="SelectContainer1Text3">会念 继续检验</view>
59
+				</view>
63
 
60
 
64
-			<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="continue">
65
-				<image src="../images/examine_willread_green_30x30.png" class="examine_willread_gray_30x30" />
66
-				<view class="SelectContainer1Text3">会念 继续检验</view>
67
-			</view>
68
 
61
 
69
-			<block wx:if="{{BookID<=12}}">
70
 				<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}}">
62
 				<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}}">
71
 					<image src="../images/examine_willwrite_gray_27x27.png" class="examine_willwrite_gray_27x27" />
63
 					<image src="../images/examine_willwrite_gray_27x27.png" class="examine_willwrite_gray_27x27" />
72
 					<view class="SelectContainer1Text3">会写</view>
64
 					<view class="SelectContainer1Text3">会写</view>
@@ -76,23 +68,46 @@
76
 					<image src="../images/examine_willwrite_green_27x27.png" class="examine_willwrite_gray_27x27" />
68
 					<image src="../images/examine_willwrite_green_27x27.png" class="examine_willwrite_gray_27x27" />
77
 					<view class="SelectContainer1Text3">会写 继续检验</view>
69
 					<view class="SelectContainer1Text3">会写 继续检验</view>
78
 				</view>
70
 				</view>
79
-			</block>
71
+			</view>
80
 
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>
81
 
78
 
82
-		</view>
79
+				<view wx:if="{{SelectItem.TestTypeWriteFinished}}" class="btnPanel21"></view>
80
+				<view wx:if="{{!SelectItem.TestTypeWriteFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.WriteReportID}}" data-type="restart">
81
+					重新开始
82
+				</view>
83
+			</view>
84
+		</block>
83
 
85
 
84
-		<view class="btnPanel2 FlexRow">
85
-			<view wx:if="{{SelectItem.TestTypeReadFinished}}" class="btnPanel21"></view>
86
-			<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="restart">
87
-				重新开始
86
+		<block wx:if="{{BookID>12}}">
87
+			<view class="btnPanel0 FlexRow" bindtap="goto" data-url="./wordlist?type=ENG&unitsid={{UnitsID}}&id={{SelectItem.ID}}">
88
+				<image src="../images/universalpic_words_blue_30x30.png" class="universalpic_word_blue_30x30" />
89
+				<view class="SelectContainer1Text4">查看词表</view>
90
+			</view>
91
+			<view class="btnPanel1">说出单词在句子中的含义</view>
92
+			<view class="btnPanel0 btnPanel FlexRow">
93
+				<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>
95
+				</view>
96
+				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="continue">
97
+					<view class="SelectContainer1Text3">继续检验</view>
98
+				</view>
88
 			</view>
99
 			</view>
89
 
100
 
90
-			<view wx:if="{{SelectItem.TestTypeWriteFinished}}" class="btnPanel21"></view>
91
-			<view wx:if="{{!SelectItem.TestTypeWriteFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.WriteReportID}}" data-type="restart">
92
-				重新开始
101
+			<view class="btnPanel2 FlexRow">
102
+				<view wx:if="{{SelectItem.TestTypeReadFinished}}" class="btnPanel21"></view>
103
+				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="restart">
104
+					重新开始
105
+				</view>
93
 			</view>
106
 			</view>
94
-		</view>
107
+		</block>
108
+
95
 
109
 
110
+		<view style="width:100%;height:50rpx;"></view>
96
 		<view class="close FlexRow" bindtap="onClose">
111
 		<view class="close FlexRow" bindtap="onClose">
97
 			<image src="../images/universalpic_close_black_24x24.png" class="universalpic_close_black_24x24" />
112
 			<image src="../images/universalpic_close_black_24x24.png" class="universalpic_close_black_24x24" />
98
 		</view>
113
 		</view>

+ 7 - 1
pages/test/list.wxss

@@ -88,7 +88,7 @@
88
 
88
 
89
 .SelectContainer .SelectContainer1{
89
 .SelectContainer .SelectContainer1{
90
   width:710rpx;
90
   width:710rpx;
91
-  height:613rpx;
91
+  /* height:613rpx; */
92
   border-radius: 10rpx;
92
   border-radius: 10rpx;
93
   background-color: #F8F8F8;
93
   background-color: #F8F8F8;
94
   position: relative;
94
   position: relative;
@@ -127,6 +127,12 @@
127
   margin-top: 20rpx;
127
   margin-top: 20rpx;
128
 }
128
 }
129
 
129
 
130
+.btnPanel1{
131
+  margin-top: 60rpx;
132
+  font-size: 28rpx;
133
+  font-weight: 500;
134
+}
135
+
130
 
136
 
131
 .btn{
137
 .btn{
132
   width:315rpx;
138
   width:315rpx;

+ 93 - 52
pages/test/report.js

@@ -14,7 +14,7 @@ Page({
14
   onLoad: function (options) {
14
   onLoad: function (options) {
15
     var that = this;
15
     var that = this;
16
     that.setData({
16
     that.setData({
17
-      ReportType:options.type,
17
+      ReportType: options.type,
18
       Containnerheight: main.getWindowHeight(),
18
       Containnerheight: main.getWindowHeight(),
19
     });
19
     });
20
 
20
 
@@ -22,26 +22,29 @@ Page({
22
   },
22
   },
23
   init: function () {
23
   init: function () {
24
     var that = this;
24
     var that = this;
25
+    TestReportID = 0;
25
     var TestTask = wx.getStorageSync("TestTask");
26
     var TestTask = wx.getStorageSync("TestTask");
26
     var list = TestTask.List;
27
     var list = TestTask.List;
27
     var listRight = [];
28
     var listRight = [];
28
     var listSkip = [];
29
     var listSkip = [];
29
     var listWrong = [];
30
     var listWrong = [];
30
-    TestTask.TestRightStr=[];
31
-    TestTask.TestWrongStr=[];
32
-    TestTask.TestSkipStr=[];
31
+    TestTask.TestRightStr = [];
32
+    TestTask.TestWrongStr = [];
33
+    TestTask.TestSkipStr = [];
33
 
34
 
34
     if (list) {
35
     if (list) {
35
       for (var i = 0; i < list.length; i++) {
36
       for (var i = 0; i < list.length; i++) {
37
+        if (TestTask.BookID > 12) {
38
+          list[i].Field1 = list[i].ContentNew.Field[1][0].Content;
39
+          list[i].Word = list[i].ID;
40
+        }
36
         if (list[i].Result == 1) {
41
         if (list[i].Result == 1) {
37
           listRight.push(list[i]);
42
           listRight.push(list[i]);
38
           TestTask.TestRightStr.push(list[i].Word);
43
           TestTask.TestRightStr.push(list[i].Word);
39
-        }
40
-        else if (list[i].Result == -1) {
44
+        } else if (list[i].Result == -1) {
41
           listWrong.push(list[i]);
45
           listWrong.push(list[i]);
42
           TestTask.TestWrongStr.push(list[i].Word);
46
           TestTask.TestWrongStr.push(list[i].Word);
43
-        }
44
-        else if (list[i].Result == 0) {
47
+        } else if (list[i].Result == 0) {
45
           listSkip.push(list[i]);
48
           listSkip.push(list[i]);
46
           TestTask.TestSkipStr.push(list[i].Word);
49
           TestTask.TestSkipStr.push(list[i].Word);
47
         }
50
         }
@@ -49,44 +52,67 @@ Page({
49
 
52
 
50
       var result = [];
53
       var result = [];
51
       if (listWrong.length > 0) {
54
       if (listWrong.length > 0) {
52
-        result.push({ Name: "答错的题目", Expand: 1, List: listWrong });
55
+        result.push({
56
+          Name: "答错的题目",
57
+          Expand: 1,
58
+          List: listWrong
59
+        });
53
         if (listSkip.length > 0)
60
         if (listSkip.length > 0)
54
-          result.push({ Name: "跳过的题目", Expand: 1, List: listSkip });
61
+          result.push({
62
+            Name: "跳过的题目",
63
+            Expand: 1,
64
+            List: listSkip
65
+          });
55
         if (listRight.length > 0)
66
         if (listRight.length > 0)
56
-          result.push({ Name: "答对的题目", Expand: 1, List: listRight });
57
-      }
58
-      else {
67
+          result.push({
68
+            Name: "答对的题目",
69
+            Expand: 1,
70
+            List: listRight
71
+          });
72
+      } else {
59
         if (listSkip.length > 0) {
73
         if (listSkip.length > 0) {
60
-          result.push({ Name: "跳过的题目", Expand: 1, List: listSkip });
74
+          result.push({
75
+            Name: "跳过的题目",
76
+            Expand: 1,
77
+            List: listSkip
78
+          });
61
           if (listRight.length > 0)
79
           if (listRight.length > 0)
62
-            result.push({ Name: "答对的题目", Expand: 1, List: listRight });
63
-        }
64
-        else {
80
+            result.push({
81
+              Name: "答对的题目",
82
+              Expand: 1,
83
+              List: listRight
84
+            });
85
+        } else {
65
           if (listRight.length > 0)
86
           if (listRight.length > 0)
66
-            result.push({ Name: "答对的题目", Expand: 1, List: listRight });
87
+            result.push({
88
+              Name: "答对的题目",
89
+              Expand: 1,
90
+              List: listRight
91
+            });
67
         }
92
         }
68
       }
93
       }
69
 
94
 
70
       var name = "";
95
       var name = "";
71
-      if (TestTask.Name && TestTask.Name.indexOf("#")>0){
72
-        name=TestTask.Name;
73
-        name=name.substr(name.indexOf("#")+1);
74
-        if (TestTask.TestType=="read")
75
-          name+=" 会念";
96
+      if (TestTask.Name && TestTask.Name.indexOf("#") > 0) {
97
+        name = TestTask.Name;
98
+        name = name.substr(name.indexOf("#") + 1);
99
+        if (TestTask.TestType == "read")
100
+          name += " 会念";
76
         else
101
         else
77
-          name+=" 会写";
102
+          name += " 会写";
78
       }
103
       }
79
 
104
 
80
       that.setData({
105
       that.setData({
81
         NumberWrong: listWrong.length,
106
         NumberWrong: listWrong.length,
82
         NumberSkip: listSkip.length,
107
         NumberSkip: listSkip.length,
83
         NumberRight: listRight.length,
108
         NumberRight: listRight.length,
109
+        BookID: Number(TestTask.BookID),
84
         Name: name,
110
         Name: name,
85
         List: result,
111
         List: result,
86
         NumberTotal: list.length,
112
         NumberTotal: list.length,
87
       });
113
       });
88
-      
89
-      if (that.data.ReportType=="new")
114
+
115
+      if (that.data.ReportType == "new")
90
         that.saveInfo(TestTask);
116
         that.saveInfo(TestTask);
91
 
117
 
92
       wx.setNavigationBarTitle({
118
       wx.setNavigationBarTitle({
@@ -117,14 +143,12 @@ Page({
117
           that.setData({
143
           that.setData({
118
             List: that.data.List,
144
             List: that.data.List,
119
           });
145
           });
120
-        }
121
-        else if (that.data.List[index].List[i].Css == "Select2") {
146
+        } else if (that.data.List[index].List[i].Css == "Select2") {
122
           wx.showToast({
147
           wx.showToast({
123
             title: '已经生成过了',
148
             title: '已经生成过了',
124
             image: "../images/universalpic_ribbon_white_96x120.png",
149
             image: "../images/universalpic_ribbon_white_96x120.png",
125
           });
150
           });
126
-        }
127
-        else {
151
+        } else {
128
           that.data.List[index].List[i].Css = "Select";
152
           that.data.List[index].List[i].Css = "Select";
129
           that.setData({
153
           that.setData({
130
             List: that.data.List,
154
             List: that.data.List,
@@ -133,11 +157,11 @@ Page({
133
         break;
157
         break;
134
       }
158
       }
135
     }
159
     }
136
-
137
   },
160
   },
138
   buildCard: function () {
161
   buildCard: function () {
139
     var that = this;
162
     var that = this;
140
-    var arr = [],TestExistStr=[];
163
+    var arr = [],
164
+      TestExistStr = [];
141
     for (var i = 0; i < that.data.List.length; i++) {
165
     for (var i = 0; i < that.data.List.length; i++) {
142
       for (var j = 0; j < that.data.List[i].List.length; j++) {
166
       for (var j = 0; j < that.data.List[i].List.length; j++) {
143
         if (that.data.List[i].List[j].Css === "Select") {
167
         if (that.data.List[i].List[j].Css === "Select") {
@@ -147,14 +171,15 @@ Page({
147
           obj.Field2 = item.Content[2].Content;
171
           obj.Field2 = item.Content[2].Content;
148
           obj.Field3 = "";
172
           obj.Field3 = "";
149
           obj.Tags = item.Content[0].Content;
173
           obj.Tags = item.Content[0].Content;
174
+          if (!common.checkIsArray(obj.Tags))
175
+            obj.Tags = obj.Tags.split(",");
150
           obj.IsTodayStudy = 0;
176
           obj.IsTodayStudy = 0;
151
           obj.ID = 0;
177
           obj.ID = 0;
152
           obj.LimitTime = common.formatTime(new Date());
178
           obj.LimitTime = common.formatTime(new Date());
153
           obj.FontSize = item.FontSize;
179
           obj.FontSize = item.FontSize;
154
           arr.push(obj);
180
           arr.push(obj);
155
           TestExistStr.push(item.Word);
181
           TestExistStr.push(item.Word);
156
-        }
157
-        else if (that.data.List[i].List[j].Css === "Select2") {
182
+        } else if (that.data.List[i].List[j].Css === "Select2") {
158
           var item = that.data.List[i].List[j];
183
           var item = that.data.List[i].List[j];
159
           TestExistStr.push(item.Word);
184
           TestExistStr.push(item.Word);
160
         }
185
         }
@@ -175,16 +200,16 @@ Page({
175
         });
200
         });
176
         if (buildCardNumber >= arr.length) {
201
         if (buildCardNumber >= arr.length) {
177
           clearInterval(intervalBuild);
202
           clearInterval(intervalBuild);
178
-          var TestTask={};
179
-          TestTask.TestExistStr=TestExistStr;
203
+          var TestTask = {};
204
+          TestTask.TestExistStr = TestExistStr;
205
+          
180
           that.saveInfo(TestTask);
206
           that.saveInfo(TestTask);
181
           that.setData({
207
           that.setData({
182
             IsBuild: 2,
208
             IsBuild: 2,
183
           });
209
           });
184
         }
210
         }
185
       }, 500);
211
       }, 500);
186
-    }
187
-    else {
212
+    } else {
188
       wx.showToast({
213
       wx.showToast({
189
         title: '先选题目',
214
         title: '先选题目',
190
         image: "../images/universalpic_wrong_white_120x120.png",
215
         image: "../images/universalpic_wrong_white_120x120.png",
@@ -200,9 +225,9 @@ Page({
200
   },
225
   },
201
   close: function (e) {
226
   close: function (e) {
202
     wx.removeStorageSync("TestTask");
227
     wx.removeStorageSync("TestTask");
203
-    var delta=2;
204
-    if (this.data.ReportType=="edit")
205
-      delta=1;
228
+    var delta = 2;
229
+    if (this.data.ReportType == "edit")
230
+      delta = 1;
206
     wx.navigateBack({
231
     wx.navigateBack({
207
       delta: delta,
232
       delta: delta,
208
     });
233
     });
@@ -212,20 +237,37 @@ Page({
212
     clearInterval(intervalBuild);
237
     clearInterval(intervalBuild);
213
     var userid = app.globalData.userInfo.UserID;
238
     var userid = app.globalData.userInfo.UserID;
214
     var param1 = wx.getStorageSync("TestTask");
239
     var param1 = wx.getStorageSync("TestTask");
215
-    param1.TestTotal = param1.List.length;
240
+    if (param1.List)
241
+      param1.TestTotal = param1.List.length;
242
+
243
+    var symbol="";
244
+    if (that.data.BookID > 12) {
245
+      symbol=","
246
+    }
216
     if (TestTask.TestRightStr)
247
     if (TestTask.TestRightStr)
217
-      param1.TestRightStr=TestTask.TestRightStr.join("");
248
+      param1.TestRightStr = TestTask.TestRightStr.join(symbol);
218
     if (TestTask.TestWrongStr)
249
     if (TestTask.TestWrongStr)
219
-      param1.TestWrongStr=TestTask.TestWrongStr.join("");
250
+      param1.TestWrongStr = TestTask.TestWrongStr.join(symbol);
220
     if (TestTask.TestSkipStr)
251
     if (TestTask.TestSkipStr)
221
-      param1.TestSkipStr=TestTask.TestSkipStr.join("");
252
+      param1.TestSkipStr = TestTask.TestSkipStr.join(symbol);
222
     if (TestTask.TestExistStr)
253
     if (TestTask.TestExistStr)
223
-      param1.TestExistStr=TestTask.TestExistStr.join("");
224
-    //param1.List = JSON.stringify(param1.List);
254
+      param1.TestExistStr = TestTask.TestExistStr.join(symbol);
255
+
256
+    
257
+
258
+    if (TestReportID)
259
+      param1.ID = TestReportID;
260
+
261
+    param1.BookID=that.data.BookID;
262
+    wx.setStorageSync('TestTask', param1);
263
+    
225
     delete param1.List;
264
     delete param1.List;
265
+    delete param1.BookID;
266
+
226
     main.postData('InsertTestReport?UserID=' + userid, param1, function (data) {
267
     main.postData('InsertTestReport?UserID=' + userid, param1, function (data) {
227
-      if (data)
268
+      if (data){
228
         TestReportID = data;
269
         TestReportID = data;
270
+      }
229
     });
271
     });
230
   },
272
   },
231
   gotoReport: function (e) {
273
   gotoReport: function (e) {
@@ -234,11 +276,10 @@ Page({
234
         title: '已经完成!',
276
         title: '已经完成!',
235
         image: "../images/universalpic_wrong_white_120x120.png",
277
         image: "../images/universalpic_wrong_white_120x120.png",
236
       });
278
       });
237
-    }
238
-    else {
279
+    } else {
239
       var testTask = wx.getStorageSync("TestTask");
280
       var testTask = wx.getStorageSync("TestTask");
240
       if (TestReportID)
281
       if (TestReportID)
241
-        testTask.ID = TestReportID;
282
+        testTask.ID=TestReportID;
242
       wx.setStorageSync("TestTask2", testTask);
283
       wx.setStorageSync("TestTask2", testTask);
243
       var url = "./item?type=edit";
284
       var url = "./item?type=edit";
244
       wx.redirectTo({
285
       wx.redirectTo({
@@ -256,4 +297,4 @@ Page({
256
       imageUrl: app.globalData.ShareImage,
297
       imageUrl: app.globalData.ShareImage,
257
     }
298
     }
258
   },
299
   },
259
-})
300
+})

+ 9 - 1
pages/test/report.wxml

@@ -15,7 +15,15 @@
15
         <image wx:if="{{itemChild.Css=='Select'}}" src="../images/universalpic_checked_white_22x17.png" class="universalpic_checked_white_22x17" />
15
         <image wx:if="{{itemChild.Css=='Select'}}" src="../images/universalpic_checked_white_22x17.png" class="universalpic_checked_white_22x17" />
16
         <image wx:if="{{itemChild.Css=='Select2'}}" src="../images/universalpic_bookmark_blue_40x40.png" class="universalpic_bookmark_blue_40x40" />
16
         <image wx:if="{{itemChild.Css=='Select2'}}" src="../images/universalpic_bookmark_blue_40x40.png" class="universalpic_bookmark_blue_40x40" />
17
         <view wx:if="{{!itemChild.Css}}" class="circle"></view>
17
         <view wx:if="{{!itemChild.Css}}" class="circle"></view>
18
-        <view class="text4">{{itemChild.Word}}</view>
18
+        
19
+        <text class="text4" wx:if="{{BookID<=12}}">{{itemChild.Word}}</text>
20
+
21
+        <text class="text4 FlexRow" wx:if="{{BookID>12}}">
22
+          <block wx:for="{{itemChild.Field1}}" wx:key="contentIndex" wx:for-item="contentItem">
23
+            <text wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
24
+            <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
25
+          </block>
26
+        </text>
19
       </view>
27
       </view>
20
     </block>
28
     </block>
21
   </view>
29
   </view>

+ 10 - 7
pages/test/report.wxss

@@ -63,19 +63,17 @@
63
 .btn{
63
 .btn{
64
   min-width: 88rpx;
64
   min-width: 88rpx;
65
   border:1rpx solid #9B9B9B;
65
   border:1rpx solid #9B9B9B;
66
-  height:100rpx;
67
   border-radius: 10rpx;
66
   border-radius: 10rpx;
68
   margin: 30rpx 0 0 30rpx;
67
   margin: 30rpx 0 0 30rpx;
69
-  padding: 0 30rpx;
68
+  padding: 30rpx;
70
   color:#1e1e1e;
69
   color:#1e1e1e;
71
 }
70
 }
72
 
71
 
73
 .btnSelect{
72
 .btnSelect{
74
   min-width: 88rpx;
73
   min-width: 88rpx;
75
-  height:100rpx;
76
   border-radius: 10rpx;
74
   border-radius: 10rpx;
77
   margin: 30rpx 0 0 30rpx;
75
   margin: 30rpx 0 0 30rpx;
78
-  padding: 0 30rpx;
76
+  padding: 30rpx;
79
 
77
 
80
   border:1rpx solid #0071EF;
78
   border:1rpx solid #0071EF;
81
   background-color: #0071EF;
79
   background-color: #0071EF;
@@ -85,10 +83,9 @@
85
 .btnSelect2{
83
 .btnSelect2{
86
   min-width: 88rpx;
84
   min-width: 88rpx;
87
   border:1rpx solid #9B9B9B;
85
   border:1rpx solid #9B9B9B;
88
-  height:100rpx;
89
   border-radius: 10rpx;
86
   border-radius: 10rpx;
90
   margin: 30rpx 0 0 30rpx;
87
   margin: 30rpx 0 0 30rpx;
91
-  padding: 0 30rpx;
88
+  padding: 30rpx;
92
   color:#1e1e1e;
89
   color:#1e1e1e;
93
 }
90
 }
94
 
91
 
@@ -111,9 +108,15 @@
111
 }
108
 }
112
 
109
 
113
 .text4{
110
 .text4{
114
-  margin-left: 20rpx;
115
   font-size:28rpx;
111
   font-size:28rpx;
116
   font-weight: 400;
112
   font-weight: 400;
113
+  max-width: 570rpx;
114
+  margin: 0 0 0 20rpx;
115
+}
116
+
117
+
118
+.panelItem .textLine {
119
+  text-decoration: underline;
117
 }
120
 }
118
 
121
 
119
 .panelFooter{
122
 .panelFooter{

+ 1 - 1
project.config.json

@@ -110,7 +110,7 @@
110
 					"id": 7,
110
 					"id": 7,
111
 					"name": "pages/test/index",
111
 					"name": "pages/test/index",
112
 					"pathName": "pages/test/index",
112
 					"pathName": "pages/test/index",
113
-					"query": "",
113
+					"query": "UserID=1",
114
 					"scene": null
114
 					"scene": null
115
 				},
115
 				},
116
 				{
116
 				{

+ 203 - 144
utils/main.js

@@ -62,8 +62,7 @@ function getLocalHost(callback) {
62
         callback();
62
         callback();
63
       },
63
       },
64
     });
64
     });
65
-  }
66
-  else {
65
+  } else {
67
     app.globalData.serverUrl = app.globalData.serverUrlServer;
66
     app.globalData.serverUrl = app.globalData.serverUrlServer;
68
     callback();
67
     callback();
69
   }
68
   }
@@ -88,7 +87,7 @@ function payMoney(payType, remark, money, detail, callback) {
88
       if (res.code) {
87
       if (res.code) {
89
         console.log('获取用户登录态成功!' + res.code);
88
         console.log('获取用户登录态成功!' + res.code);
90
         //预支付
89
         //预支付
91
-        getData('ProductPayLogin500?code=' + res.code + '&payType=7&money=' + money + '&detail=' + detail + '&productID=' + app.globalData.ProgramID+'&Remark='+remark, function (data) {
90
+        getData('ProductPayLogin500?code=' + res.code + '&payType=7&money=' + money + '&detail=' + detail + '&productID=' + app.globalData.ProgramID + '&Remark=' + remark, function (data) {
92
           if (data && data.timeStamp) {
91
           if (data && data.timeStamp) {
93
             //微信支付
92
             //微信支付
94
             wx.requestPayment({
93
             wx.requestPayment({
@@ -104,8 +103,7 @@ function payMoney(payType, remark, money, detail, callback) {
104
               'fail': function (err) {
103
               'fail': function (err) {
105
                 if (err && err.errMsg && err.errMsg.indexOf("fail cancel")) {
104
                 if (err && err.errMsg && err.errMsg.indexOf("fail cancel")) {
106
 
105
 
107
-                }
108
-                else {
106
+                } else {
109
                   wx.showToast({
107
                   wx.showToast({
110
                     title: '服务器忙,请稍候再试!',
108
                     title: '服务器忙,请稍候再试!',
111
                     duration: 3000
109
                     duration: 3000
@@ -135,8 +133,7 @@ function getTimeFormat(duration) {
135
   if (duration.indexOf(".") > 0) {
133
   if (duration.indexOf(".") > 0) {
136
     arr[1] = duration.substring(duration.indexOf("'") + 1, duration.indexOf(".") + 1);
134
     arr[1] = duration.substring(duration.indexOf("'") + 1, duration.indexOf(".") + 1);
137
     arr[2] = duration.substring(duration.indexOf(".") + 1, duration.indexOf('"'));
135
     arr[2] = duration.substring(duration.indexOf(".") + 1, duration.indexOf('"'));
138
-  }
139
-  else {
136
+  } else {
140
     arr[1] = duration.substring(duration.indexOf("'") + 1, duration.indexOf('"'));
137
     arr[1] = duration.substring(duration.indexOf("'") + 1, duration.indexOf('"'));
141
   }
138
   }
142
   return arr;
139
   return arr;
@@ -148,15 +145,14 @@ function getWindowHeight() {
148
   //console.log("app.globalData.systemInfo.windowHeight:" + app.globalData.systemInfo.windowHeight * 2);
145
   //console.log("app.globalData.systemInfo.windowHeight:" + app.globalData.systemInfo.windowHeight * 2);
149
   if (app.globalData.systemInfo.model) {
146
   if (app.globalData.systemInfo.model) {
150
     if (height == 504 && (
147
     if (height == 504 && (
151
-      app.globalData.systemInfo.model.indexOf("iPhone 6<") >= 0
152
-      || app.globalData.systemInfo.model.indexOf("iPhone 7<") >= 0
153
-      || app.globalData.systemInfo.model.indexOf("iPhone 6s<") >= 0
154
-      || app.globalData.systemInfo.model.indexOf("iPhone 5") >= 0
155
-      || app.globalData.systemInfo.model.indexOf("iPhone SE") >= 0
156
-    )) {
148
+        app.globalData.systemInfo.model.indexOf("iPhone 6<") >= 0 ||
149
+        app.globalData.systemInfo.model.indexOf("iPhone 7<") >= 0 ||
150
+        app.globalData.systemInfo.model.indexOf("iPhone 6s<") >= 0 ||
151
+        app.globalData.systemInfo.model.indexOf("iPhone 5") >= 0 ||
152
+        app.globalData.systemInfo.model.indexOf("iPhone SE") >= 0
153
+      )) {
157
       height = 596;
154
       height = 596;
158
-    }
159
-    else if (app.globalData.systemInfo.model.indexOf("iPad") >= 0) {
155
+    } else if (app.globalData.systemInfo.model.indexOf("iPad") >= 0) {
160
       height = 470;
156
       height = 470;
161
     }
157
     }
162
   }
158
   }
@@ -164,8 +160,7 @@ function getWindowHeight() {
164
   height = height * 2;
160
   height = height * 2;
165
   if (app.globalData.systemInfo.system && app.globalData.systemInfo.system.indexOf("Android") >= 0) {
161
   if (app.globalData.systemInfo.system && app.globalData.systemInfo.system.indexOf("Android") >= 0) {
166
     height = height + 168;
162
     height = height + 168;
167
-  }
168
-  else {
163
+  } else {
169
     height = height + 50;
164
     height = height + 50;
170
   }
165
   }
171
   //console.log("height:" + height);
166
   //console.log("height:" + height);
@@ -192,8 +187,7 @@ function getStorageValue(obj, name, defaultStatus, callback) {
192
 }
187
 }
193
 
188
 
194
 function getProgramList() {
189
 function getProgramList() {
195
-  return [
196
-    {
190
+  return [{
197
       id: 89,
191
       id: 89,
198
       appId: 'wx46a7b4c420e6d38f',
192
       appId: 'wx46a7b4c420e6d38f',
199
       path: 'pages/index/start?SourceID=' + app.globalData.ProgramID,
193
       path: 'pages/index/start?SourceID=' + app.globalData.ProgramID,
@@ -222,13 +216,13 @@ function gotoFeedback() {
222
   wx.navigateToMiniProgram({
216
   wx.navigateToMiniProgram({
223
     appId: "wx80059777521b897c",
217
     appId: "wx80059777521b897c",
224
     path: "pages/index/feedback",
218
     path: "pages/index/feedback",
225
-    extraData: {
226
-    },
219
+    extraData: {},
227
     success(res) {
220
     success(res) {
228
       // 打开成功
221
       // 打开成功
229
     }
222
     }
230
   });
223
   });
231
 }
224
 }
225
+
232
 function changeViewToString(content) {
226
 function changeViewToString(content) {
233
   var str = content;
227
   var str = content;
234
   if (str.constructor == Array) {
228
   if (str.constructor == Array) {
@@ -289,22 +283,23 @@ function DecryptUrl(str) {
289
 
283
 
290
 function changeStringToView(field) {
284
 function changeStringToView(field) {
291
   var result = {};
285
   var result = {};
292
-  result.Field = [[]];
286
+  result.Field = [
287
+    []
288
+  ];
293
   result.Images = [];
289
   result.Images = [];
294
 
290
 
295
   for (var j = 0; j < field.length; j++) {
291
   for (var j = 0; j < field.length; j++) {
296
     if (j == 0) {
292
     if (j == 0) {
297
       if (field[j].ContentType == 0 && field[j].Content && field[j].Content.length > 0) {
293
       if (field[j].ContentType == 0 && field[j].Content && field[j].Content.length > 0) {
298
         result.Tags = field[j].Content.toString().split(",");
294
         result.Tags = field[j].Content.toString().split(",");
299
-      }
300
-      else {
295
+      } else {
301
         result.Tags = [];
296
         result.Tags = [];
302
       }
297
       }
303
-    }
304
-    else {
298
+    } else {
305
       if (field[j].ContentType == j && field[j].Content && field[j].Content.length > 0) {
299
       if (field[j].ContentType == j && field[j].Content && field[j].Content.length > 0) {
306
 
300
 
307
-        var arrResult = [], arrSoundMark = [];
301
+        var arrResult = [],
302
+          arrSoundMark = [];
308
         var str = field[j].Content.toString();
303
         var str = field[j].Content.toString();
309
 
304
 
310
         str = DecryptUrl(str);
305
         str = DecryptUrl(str);
@@ -333,8 +328,7 @@ function changeStringToView(field) {
333
                 obj.Height = Math.round((w * Number(obj.Height)) / Number(obj.Width));
328
                 obj.Height = Math.round((w * Number(obj.Height)) / Number(obj.Width));
334
                 obj.Width = w;
329
                 obj.Width = w;
335
 
330
 
336
-              }
337
-              else {
331
+              } else {
338
                 obj.Width = "";
332
                 obj.Width = "";
339
                 obj.Height = "";
333
                 obj.Height = "";
340
               }
334
               }
@@ -345,10 +339,10 @@ function changeStringToView(field) {
345
             }
339
             }
346
             arrResult.push(obj);
340
             arrResult.push(obj);
347
 
341
 
348
-          }
349
-          else if ((arr[k].indexOf("[线]") >= 0 && arr[k].indexOf("[/线]") > 0) || (arr[k].indexOf("[光]") >= 0 && arr[k].indexOf("[/光]") > 0)) {
342
+          } else if ((arr[k].indexOf("[线]") >= 0 && arr[k].indexOf("[/线]") > 0) || (arr[k].indexOf("[光]") >= 0 && arr[k].indexOf("[/光]") > 0)) {
350
             var obj;
343
             var obj;
351
-            var content = [], temp = arr[k];
344
+            var content = [],
345
+              temp = arr[k];
352
             do {
346
             do {
353
               var num1 = temp.indexOf("[线]");
347
               var num1 = temp.indexOf("[线]");
354
               var num2 = temp.indexOf("[光]");
348
               var num2 = temp.indexOf("[光]");
@@ -360,16 +354,14 @@ function changeStringToView(field) {
360
                       key: "normal",
354
                       key: "normal",
361
                       value: temp1,
355
                       value: temp1,
362
                     });
356
                     });
363
-                  }
364
-                  else {
357
+                  } else {
365
                     if (arr[k].indexOf("[线]") > 0) {
358
                     if (arr[k].indexOf("[线]") > 0) {
366
                       content.push({
359
                       content.push({
367
                         key: "normal",
360
                         key: "normal",
368
                         value: temp,
361
                         value: temp,
369
                       });
362
                       });
370
                       temp = "";
363
                       temp = "";
371
-                    }
372
-                    else {
364
+                    } else {
373
                       if (temp && temp.indexOf("[线]") < 0) {
365
                       if (temp && temp.indexOf("[线]") < 0) {
374
                         content.push({
366
                         content.push({
375
                           key: "normal",
367
                           key: "normal",
@@ -379,24 +371,21 @@ function changeStringToView(field) {
379
                       }
371
                       }
380
                     }
372
                     }
381
                   }
373
                   }
382
-                }
383
-                else if ((num1 > num2 && num1 >= 0 && num2 >= 0) || (num1 < 0 && num2 >= 0)) {
374
+                } else if ((num1 > num2 && num1 >= 0 && num2 >= 0) || (num1 < 0 && num2 >= 0)) {
384
                   var temp1 = temp.substring(0, temp.indexOf("[光]"));
375
                   var temp1 = temp.substring(0, temp.indexOf("[光]"));
385
                   if (temp1) {
376
                   if (temp1) {
386
                     content.push({
377
                     content.push({
387
                       key: "normal",
378
                       key: "normal",
388
                       value: temp1,
379
                       value: temp1,
389
                     });
380
                     });
390
-                  }
391
-                  else {
381
+                  } else {
392
                     if (arr[k].indexOf("[光]") > 0) {
382
                     if (arr[k].indexOf("[光]") > 0) {
393
                       content.push({
383
                       content.push({
394
                         key: "normal",
384
                         key: "normal",
395
                         value: temp,
385
                         value: temp,
396
                       });
386
                       });
397
                       temp = "";
387
                       temp = "";
398
-                    }
399
-                    else {
388
+                    } else {
400
                       if (temp && temp.indexOf("[光]") < 0) {
389
                       if (temp && temp.indexOf("[光]") < 0) {
401
                         content.push({
390
                         content.push({
402
                           key: "normal",
391
                           key: "normal",
@@ -406,16 +395,14 @@ function changeStringToView(field) {
406
                       }
395
                       }
407
                     }
396
                     }
408
                   }
397
                   }
409
-                }
410
-                else {
398
+                } else {
411
                   content.push({
399
                   content.push({
412
                     key: "normal",
400
                     key: "normal",
413
                     value: temp,
401
                     value: temp,
414
                   });
402
                   });
415
                   temp = "";
403
                   temp = "";
416
                 }
404
                 }
417
-              }
418
-              else {
405
+              } else {
419
                 content.push({
406
                 content.push({
420
                   key: "normal",
407
                   key: "normal",
421
                   value: temp,
408
                   value: temp,
@@ -436,8 +423,7 @@ function changeStringToView(field) {
436
                   }
423
                   }
437
 
424
 
438
                   temp = temp.substr(temp.indexOf("[/线]") + 4);
425
                   temp = temp.substr(temp.indexOf("[/线]") + 4);
439
-                }
440
-                else if ((num1 > num2 && num1 >= 0 && num2 >= 0) || (num1 < 0 && num2 >= 0)) {
426
+                } else if ((num1 > num2 && num1 >= 0 && num2 >= 0) || (num1 < 0 && num2 >= 0)) {
441
                   temp = temp.substr(temp.indexOf("[光]") + 3);
427
                   temp = temp.substr(temp.indexOf("[光]") + 3);
442
 
428
 
443
                   temp1 = temp.substring(0, temp.indexOf("[/光]"));
429
                   temp1 = temp.substring(0, temp.indexOf("[/光]"));
@@ -449,11 +435,9 @@ function changeStringToView(field) {
449
                   }
435
                   }
450
 
436
 
451
                   temp = temp.substr(temp.indexOf("[/光]") + 4);
437
                   temp = temp.substr(temp.indexOf("[/光]") + 4);
452
-                }
453
-                else
438
+                } else
454
                   temp = "";
439
                   temp = "";
455
-              }
456
-              else
440
+              } else
457
                 temp = "";
441
                 temp = "";
458
 
442
 
459
             }
443
             }
@@ -464,21 +448,18 @@ function changeStringToView(field) {
464
             obj.Type = "line";
448
             obj.Type = "line";
465
             obj.Content = content;
449
             obj.Content = content;
466
             arrResult.push(obj);
450
             arrResult.push(obj);
467
-          }
468
-          else if (arr[k].indexOf("[读") >= 0 && arr[k].indexOf("[/读]") > 0) {
451
+          } else if (arr[k].indexOf("[读") >= 0 && arr[k].indexOf("[/读]") > 0) {
469
             var obj = {};
452
             var obj = {};
470
             obj.Type = "sound";
453
             obj.Type = "sound";
471
             if (arr[k].indexOf("[读]") >= 0) {
454
             if (arr[k].indexOf("[读]") >= 0) {
472
               obj.Content = arr[k].substring(arr[k].indexOf("[读]") + 3, arr[k].indexOf("[/读]"));
455
               obj.Content = arr[k].substring(arr[k].indexOf("[读]") + 3, arr[k].indexOf("[/读]"));
473
-            }
474
-            else {
456
+            } else {
475
               var tempIndex = arr[k].indexOf("\']") + 2;
457
               var tempIndex = arr[k].indexOf("\']") + 2;
476
               obj.Content = arr[k].substring(tempIndex, arr[k].indexOf("[/读]"));
458
               obj.Content = arr[k].substring(tempIndex, arr[k].indexOf("[/读]"));
477
               obj.SoundMark = arr[k].substring(arr[k].indexOf("src='") + 5, arr[k].indexOf("']"));;
459
               obj.SoundMark = arr[k].substring(arr[k].indexOf("src='") + 5, arr[k].indexOf("']"));;
478
             }
460
             }
479
             arrResult.push(obj);
461
             arrResult.push(obj);
480
-          }
481
-          else if (arr[k].indexOf("[音") >= 0 && arr[k].indexOf("[/音]") > 0) {
462
+          } else if (arr[k].indexOf("[音") >= 0 && arr[k].indexOf("[/音]") > 0) {
482
             var obj = {};
463
             var obj = {};
483
             obj.Type = "recorder";
464
             obj.Type = "recorder";
484
 
465
 
@@ -487,14 +468,12 @@ function changeStringToView(field) {
487
             obj.SoundMark = arr[k].substring(arr[k].indexOf("url='") + 5, arr[k].indexOf("']"));;
468
             obj.SoundMark = arr[k].substring(arr[k].indexOf("url='") + 5, arr[k].indexOf("']"));;
488
 
469
 
489
             arrResult.push(obj);
470
             arrResult.push(obj);
490
-          }
491
-          else if (arr[k] != "") {
471
+          } else if (arr[k] != "") {
492
             var obj = {};
472
             var obj = {};
493
             obj.Type = "normal";
473
             obj.Type = "normal";
494
             obj.Content = arr[k];
474
             obj.Content = arr[k];
495
             arrResult.push(obj);
475
             arrResult.push(obj);
496
-          }
497
-          else if (k > 0 && arr[k] == "") {
476
+          } else if (k > 0 && arr[k] == "") {
498
             var obj = {};
477
             var obj = {};
499
             obj.Type = "br";
478
             obj.Type = "br";
500
             obj.Content = "";
479
             obj.Content = "";
@@ -506,16 +485,16 @@ function changeStringToView(field) {
506
         }
485
         }
507
 
486
 
508
         //去掉前回车换行
487
         //去掉前回车换行
509
-        while (arrResult[0].Type == "return"
510
-          || arrResult[0].Type == "br") {
488
+        while (arrResult[0].Type == "return" ||
489
+          arrResult[0].Type == "br") {
511
           arrResult.shift();
490
           arrResult.shift();
512
           if (arrResult.length == 0)
491
           if (arrResult.length == 0)
513
             break;
492
             break;
514
         }
493
         }
515
         //去掉后回车换行
494
         //去掉后回车换行
516
         for (var i = arrResult.length - 1; i >= 0; i--) {
495
         for (var i = arrResult.length - 1; i >= 0; i--) {
517
-          if (arrResult[i].Type == "return"
518
-            || arrResult[i].Type == "br")
496
+          if (arrResult[i].Type == "return" ||
497
+            arrResult[i].Type == "br")
519
             arrResult.pop();
498
             arrResult.pop();
520
           else {
499
           else {
521
             break;
500
             break;
@@ -523,8 +502,7 @@ function changeStringToView(field) {
523
         }
502
         }
524
         result.Field.push(arrResult);
503
         result.Field.push(arrResult);
525
 
504
 
526
-      }
527
-      else {
505
+      } else {
528
         result.Field.push([]);
506
         result.Field.push([]);
529
       }
507
       }
530
     }
508
     }
@@ -625,7 +603,10 @@ function saveTempImage(serverUrl, tempUrl) {
625
       }
603
       }
626
     }
604
     }
627
     if (!b) {
605
     if (!b) {
628
-      list.push({ "ServerUrl": serverUrl, "TempUrl": tempUrl });
606
+      list.push({
607
+        "ServerUrl": serverUrl,
608
+        "TempUrl": tempUrl
609
+      });
629
     }
610
     }
630
 
611
 
631
     if (list.length > 200) {
612
     if (list.length > 200) {
@@ -647,8 +628,7 @@ function UploadUserConfig() {
647
   param1.SecondConfigArray = wx.getStorageSync("SecondConfigArray");
628
   param1.SecondConfigArray = wx.getStorageSync("SecondConfigArray");
648
   param1.ColorIndexArr = wx.getStorageSync("ColorIndexArr");
629
   param1.ColorIndexArr = wx.getStorageSync("ColorIndexArr");
649
 
630
 
650
-  that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {
651
-  });
631
+  that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {});
652
 }
632
 }
653
 
633
 
654
 function UpdateMiaoguoCardTodayAll(isShowLoading, callback) {
634
 function UpdateMiaoguoCardTodayAll(isShowLoading, callback) {
@@ -694,8 +674,7 @@ function UpdateMiaoguoCardTodayAll(isShowLoading, callback) {
694
         callback();
674
         callback();
695
       }
675
       }
696
     });
676
     });
697
-  }
698
-  else {
677
+  } else {
699
     wx.hideLoading();
678
     wx.hideLoading();
700
     clearTimeout(dataSendTimeout);
679
     clearTimeout(dataSendTimeout);
701
     if (callback) {
680
     if (callback) {
@@ -714,9 +693,9 @@ function updateSearchList(obj) {
714
       obj.Key = obj.Key.substring(1, obj.Key.length - 1);
693
       obj.Key = obj.Key.substring(1, obj.Key.length - 1);
715
   }
694
   }
716
   for (var i = 0; i < arr.length; i++) {
695
   for (var i = 0; i < arr.length; i++) {
717
-    if (arr[i].Key == obj.Key
718
-      && arr[i].Type == obj.Type
719
-      && arr[i].Author == obj.Author
696
+    if (arr[i].Key == obj.Key &&
697
+      arr[i].Type == obj.Type &&
698
+      arr[i].Author == obj.Author
720
     ) {
699
     ) {
721
       if (obj.Type == "shici") {
700
       if (obj.Type == "shici") {
722
         if (arr[i].ShiciUrl == obj.ShiciUrl) {
701
         if (arr[i].ShiciUrl == obj.ShiciUrl) {
@@ -724,8 +703,7 @@ function updateSearchList(obj) {
724
           arr.splice(i, 1);
703
           arr.splice(i, 1);
725
           break;
704
           break;
726
         }
705
         }
727
-      }
728
-      else {
706
+      } else {
729
         obj.Value = arr[i].Value;
707
         obj.Value = arr[i].Value;
730
         arr.splice(i, 1);
708
         arr.splice(i, 1);
731
         break;
709
         break;
@@ -746,8 +724,8 @@ function updateSearchList(obj) {
746
 
724
 
747
 function checkIsIPhoneX() {
725
 function checkIsIPhoneX() {
748
   var isIphoneX = false;
726
   var isIphoneX = false;
749
-  if (app.globalData.systemInfo.model.indexOf("iPhone X") >= 0
750
-    || app.globalData.systemInfo.model.indexOf("iPhone X") >= 0) {
727
+  if (app.globalData.systemInfo.model.indexOf("iPhone X") >= 0 ||
728
+    app.globalData.systemInfo.model.indexOf("iPhone X") >= 0) {
751
     isIphoneX = true;
729
     isIphoneX = true;
752
   }
730
   }
753
   return isIphoneX;
731
   return isIphoneX;
@@ -762,8 +740,7 @@ function setCollect(id, collect, callback) {
762
       duration: 2000,
740
       duration: 2000,
763
       image: "../images/universalpic_fav_white_120x110.png",
741
       image: "../images/universalpic_fav_white_120x110.png",
764
     });
742
     });
765
-  }
766
-  else {
743
+  } else {
767
     wx.showToast({
744
     wx.showToast({
768
       title: '取消收藏',
745
       title: '取消收藏',
769
       duration: 2000,
746
       duration: 2000,
@@ -828,7 +805,7 @@ function getMemoryLevel(index, number, time) {
828
   }
805
   }
829
 }
806
 }
830
 //得到要检验的汉字列表
807
 //得到要检验的汉字列表
831
-function GetHanziUnitWords(unitsID,testType,callback){
808
+function GetHanziUnitWords(unitsID, testType, callback) {
832
   getData('GetHanziUnitWords?UnitID=' + unitsID, function (data) {
809
   getData('GetHanziUnitWords?UnitID=' + unitsID, function (data) {
833
     if (data) {
810
     if (data) {
834
       var TaskList = [];
811
       var TaskList = [];
@@ -836,15 +813,23 @@ function GetHanziUnitWords(unitsID,testType,callback){
836
       for (var k = 0; k < words.length; k++) {
813
       for (var k = 0; k < words.length; k++) {
837
         var taskInfo = {
814
         var taskInfo = {
838
           FontSize: 144,
815
           FontSize: 144,
839
-          TagWidth:136,
840
-          Content: [
841
-            { ContentType: 0, Content: [] },
842
-            { ContentType: 1, Content: [] },
843
-            { ContentType: 2, Content: [] },
816
+          TagWidth: 136,
817
+          Content: [{
818
+              ContentType: 0,
819
+              Content: []
820
+            },
821
+            {
822
+              ContentType: 1,
823
+              Content: []
824
+            },
825
+            {
826
+              ContentType: 2,
827
+              Content: []
828
+            },
844
           ]
829
           ]
845
         };
830
         };
846
-        taskInfo.Word=words[k].Name;
847
-        
831
+        taskInfo.Word = words[k].Name;
832
+
848
         var pinyinNormal = "(" + getPinyinNormal(words[k].Pinyin) + ")";
833
         var pinyinNormal = "(" + getPinyinNormal(words[k].Pinyin) + ")";
849
         taskInfo.ReadString = words[k].Name + pinyinNormal + "," + words[k].CombineWords + "的" + words[k].Name + pinyinNormal;
834
         taskInfo.ReadString = words[k].Name + pinyinNormal + "," + words[k].CombineWords + "的" + words[k].Name + pinyinNormal;
850
 
835
 
@@ -853,8 +838,8 @@ function GetHanziUnitWords(unitsID,testType,callback){
853
           var question = words[k].CombineWords;
838
           var question = words[k].CombineWords;
854
           question = common.ReplaceAllString(question, words[k].Name, "(" + words[k].Name + ")");
839
           question = common.ReplaceAllString(question, words[k].Name, "(" + words[k].Name + ")");
855
           taskInfo.Content[1].Content = question;
840
           taskInfo.Content[1].Content = question;
856
-          
857
-          
841
+
842
+
858
           var answer = "[读 src='" + taskInfo.ReadString + "']" + words[k].Pinyin + "[/读]";
843
           var answer = "[读 src='" + taskInfo.ReadString + "']" + words[k].Pinyin + "[/读]";
859
           taskInfo.Content[2].Content = answer;
844
           taskInfo.Content[2].Content = answer;
860
 
845
 
@@ -864,13 +849,12 @@ function GetHanziUnitWords(unitsID,testType,callback){
864
               taskInfo.FontSize = 68;
849
               taskInfo.FontSize = 68;
865
             }
850
             }
866
           }
851
           }
867
-        }
868
-        else if (testType == "write") {
852
+        } else if (testType == "write") {
869
           taskInfo.Content[0].Content = ["怎么写"];
853
           taskInfo.Content[0].Content = ["怎么写"];
870
 
854
 
871
           var question = words[k].CombineWords;
855
           var question = words[k].CombineWords;
872
           var question2 = common.ReplaceAllString(question, words[k].Name, words[k].Pinyin);
856
           var question2 = common.ReplaceAllString(question, words[k].Name, words[k].Pinyin);
873
-          
857
+
874
           question = "[读 src='" + taskInfo.ReadString + "']" + question2 + "[/读]"
858
           question = "[读 src='" + taskInfo.ReadString + "']" + question2 + "[/读]"
875
           taskInfo.Content[1].Content = question;
859
           taskInfo.Content[1].Content = question;
876
           var answer = words[k].Name;
860
           var answer = words[k].Name;
@@ -892,56 +876,132 @@ function GetHanziUnitWords(unitsID,testType,callback){
892
       }
876
       }
893
 
877
 
894
       callback(TaskList);
878
       callback(TaskList);
895
-    }
896
-    else{
879
+    } else {
897
       callback([]);
880
       callback([]);
898
     }
881
     }
899
   });
882
   });
900
 }
883
 }
901
 
884
 
902
-function GetTestReportInfo(reportid,callback){
903
-  var UserTestReport=wx.getStorageSync('UserTestReport');
904
-  var HanziAll=wx.getStorageSync('HanziAll');
905
-  HanziAll = JSON.parse(HanziAll);
906
-  for(var n=0;n<UserTestReport.length;n++){
907
-    if (UserTestReport[n].ID==reportid){
908
-      var name1=UserTestReport[n].Name[0].split(" ");
909
-      name1=name1[0]+"识字能力"+name1[2].substr(0,1);
910
-      var name2=UserTestReport[n].Name[1];
911
-      for(var i=0;i<HanziAll.length;i++){
912
-        if (name1==HanziAll[i].Name){
913
-          for(var j=0;j<HanziAll[i].Units.length;j++){
914
-            if (name2==HanziAll[i].Units[j].Name){
915
-              var obj=UserTestReport[n];
916
-              GetHanziUnitWords(HanziAll[i].Units[j].ID,obj.TestType,function(list){
917
-                if (list){
918
-                  for(var k=0;k<list.length;k++){
919
-                    if (obj.TestRightStr && obj.TestRightStr.indexOf(list[k].Word)>=0)
920
-                      list[k].Result=1;
921
-                    else if (obj.TestWrongStr && obj.TestWrongStr.indexOf(list[k].Word)>=0)
922
-                      list[k].Result=-1;  
923
-                    else if (obj.TestSkipStr && obj.TestSkipStr.indexOf(list[k].Word)>=0)
924
-                      list[k].Result=0;  
925
-
926
-                    if (obj.TestExistStr && obj.TestExistStr.indexOf(list[k].Word)>=0)
927
-                      list[k].Css="Select2";
928
-                    
929
-                  }
930
-                  var result={};
931
-                  result.ID=reportid;
932
-                  result.TestType=obj.TestType;
933
-                  result.Name=obj.Name.join("#");
934
-                  result.IsFinished=obj.IsFinished;
935
-                  result.TestRightStr=obj.TestRightStr;
936
-                  result.TestWrongStr=obj.TestWrongStr;
937
-                  result.TestSkipStr=obj.TestSkipStr;
938
-                  result.TestExistStr=obj.TestExistStr;
939
-                  result.List=list;
940
-                  callback(result);
941
-                }
942
-                else
943
-                  callback({});
944
-              });
885
+function GetTestReportInfo(reportid, callback) {
886
+  var UserTestReport = wx.getStorageSync('UserTestReport');
887
+
888
+  for (var n = 0; n < UserTestReport.length; n++) {
889
+    if (UserTestReport[n].ID == reportid) {
890
+      var name1 = UserTestReport[n].Name[0].split(" ");
891
+      var name2 = UserTestReport[n].Name[1];
892
+
893
+      if (name1[0].indexOf("英语") >= 0) {
894
+        //todo
895
+        //console.log("英语");
896
+        var arrEnglist = wx.getStorageSync("EnglishAll");
897
+        if (arrEnglist)
898
+          arrEnglist = JSON.parse(arrEnglist);
899
+        else
900
+          arrEnglist = [];
901
+        var wordStr = "";
902
+        for (var i = 0; i < arrEnglist.length; i++) {
903
+          if (arrEnglist[i].Name == name1[1]) {
904
+            for (var j = 0; j < arrEnglist[i].Units.length; j++) {
905
+              if (arrEnglist[i].Units[j].Name == name2) {
906
+                wordStr = arrEnglist[i].Units[j].Words.join(",");
907
+                break;
908
+              }
909
+            }
910
+          }
911
+        }
912
+        var userTestReportInfo = UserTestReport[n];
913
+        var bookid = Number(name1[1].substr(4)) + 12;
914
+
915
+        var tempRight = "," + userTestReportInfo.TestRightStr + ",";
916
+        var tempWrong = "," + userTestReportInfo.TestWrongStr + ",";
917
+        var tempSkip = "," + userTestReportInfo.TestSkipStr + ",";
918
+        var tempExist = "," + userTestReportInfo.TestExistStr + ",";
919
+        getData('GetTestEnglishWords?UserID=' + app.globalData.userInfo.UserID + '&Words=' + wordStr, function (data) {
920
+          if (data) {
921
+            var result = {};
922
+            result.ID = userTestReportInfo.ID;
923
+            result.IsFinished = userTestReportInfo.IsFinished;
924
+            result.Name = userTestReportInfo.Name.join("#");
925
+            result.TestType = userTestReportInfo.TestType;
926
+            result.BookID = bookid;
927
+
928
+            var TaskList = [];
929
+            var words = data;
930
+            for (var k = 0; k < words.length; k++) {
931
+              var taskInfo = words[k];
932
+
933
+              taskInfo.TagWidth = 364;
934
+              taskInfo.ContentNew = changeStringToView(taskInfo.Content);
935
+              if (tempRight.indexOf("," + taskInfo.ID + ",") >= 0)
936
+                taskInfo.Result = 1;
937
+              if (tempWrong.indexOf("," + taskInfo.ID + ",") >= 0)
938
+                taskInfo.Result = -1;
939
+              if (tempSkip.indexOf("," + taskInfo.ID + ",") >= 0)
940
+                taskInfo.Result = 0;
941
+
942
+              if (tempExist.indexOf("," + taskInfo.ID + ",") >= 0)
943
+                taskInfo.Css = "Select2";
944
+
945
+              TaskList.push(taskInfo);
946
+            }
947
+            result.TestRightStr = "";
948
+            result.TestWrongStr = "";
949
+            result.TestSkipStr = "";
950
+            result.TestExistStr = "";
951
+            if (userTestReportInfo.TestRightStr)
952
+              result.TestRightStr = userTestReportInfo.TestRightStr.join(",");
953
+            if (userTestReportInfo.TestWrongStr)
954
+              result.TestWrongStr = userTestReportInfo.TestWrongStr.join(",");
955
+            if (userTestReportInfo.TestSkipStr)
956
+              result.TestSkipStr = userTestReportInfo.TestSkipStr.join(",");
957
+            if (userTestReportInfo.TestExistStr)
958
+              result.TestExistStr = userTestReportInfo.TestExistStr.join(",");
959
+
960
+            result.List = TaskList;
961
+            callback(result);
962
+          } else {
963
+            callback({});
964
+          }
965
+        });
966
+
967
+      } else {
968
+        name1 = name1[0] + "识字能力" + name1[2].substr(0, 1);
969
+        var HanziAll = wx.getStorageSync('HanziAll');
970
+        HanziAll = JSON.parse(HanziAll);
971
+        for (var i = 0; i < HanziAll.length; i++) {
972
+          if (name1 == HanziAll[i].Name) {
973
+            for (var j = 0; j < HanziAll[i].Units.length; j++) {
974
+              if (name2 == HanziAll[i].Units[j].Name) {
975
+                var obj = UserTestReport[n];
976
+                GetHanziUnitWords(HanziAll[i].Units[j].ID, obj.TestType, function (list) {
977
+                  if (list) {
978
+                    for (var k = 0; k < list.length; k++) {
979
+                      if (obj.TestRightStr && obj.TestRightStr.indexOf(list[k].Word) >= 0)
980
+                        list[k].Result = 1;
981
+                      else if (obj.TestWrongStr && obj.TestWrongStr.indexOf(list[k].Word) >= 0)
982
+                        list[k].Result = -1;
983
+                      else if (obj.TestSkipStr && obj.TestSkipStr.indexOf(list[k].Word) >= 0)
984
+                        list[k].Result = 0;
985
+
986
+                      if (obj.TestExistStr && obj.TestExistStr.indexOf(list[k].Word) >= 0)
987
+                        list[k].Css = "Select2";
988
+
989
+                    }
990
+                    var result = {};
991
+                    result.ID = reportid;
992
+                    result.TestType = obj.TestType;
993
+                    result.Name = obj.Name.join("#");
994
+                    result.IsFinished = obj.IsFinished;
995
+                    result.TestRightStr = obj.TestRightStr;
996
+                    result.TestWrongStr = obj.TestWrongStr;
997
+                    result.TestSkipStr = obj.TestSkipStr;
998
+                    result.TestExistStr = obj.TestExistStr;
999
+                    result.List = list;
1000
+                    callback(result);
1001
+                  } else
1002
+                    callback({});
1003
+                });
1004
+              }
945
             }
1005
             }
946
           }
1006
           }
947
         }
1007
         }
@@ -1012,8 +1072,7 @@ function getHanzi(callback) {
1012
         var arrEng = common.Decrypt(data.EngList);
1072
         var arrEng = common.Decrypt(data.EngList);
1013
         wx.setStorageSync("EnglishAll", arrEng);
1073
         wx.setStorageSync("EnglishAll", arrEng);
1014
         wx.setStorageSync("HanziUpdateTime", data.UpdateTime);
1074
         wx.setStorageSync("HanziUpdateTime", data.UpdateTime);
1015
-      }
1016
-      else {
1075
+      } else {
1017
         arr = wx.getStorageSync("HanziAll");
1076
         arr = wx.getStorageSync("HanziAll");
1018
         if (arr)
1077
         if (arr)
1019
           arr = JSON.parse(arr);
1078
           arr = JSON.parse(arr);
@@ -1056,6 +1115,6 @@ module.exports = {
1056
   buildInitData: buildInitData,
1115
   buildInitData: buildInitData,
1057
   getPinyinNormal: getPinyinNormal,
1116
   getPinyinNormal: getPinyinNormal,
1058
   getHanzi: getHanzi,
1117
   getHanzi: getHanzi,
1059
-  GetHanziUnitWords:GetHanziUnitWords,
1060
-  GetTestReportInfo:GetTestReportInfo
1118
+  GetHanziUnitWords: GetHanziUnitWords,
1119
+  GetTestReportInfo: GetTestReportInfo
1061
 }
1120
 }