chengjie 5 gadi atpakaļ
vecāks
revīzija
58e091a33d
5 mainītis faili ar 31 papildinājumiem un 35 dzēšanām
  1. 1 1
      app.js
  2. 15 14
      pages/test/index.js
  3. 5 4
      pages/test/report.js
  4. 2 8
      pages/test/report.wxml
  5. 8 8
      utils/main.js

+ 1 - 1
app.js

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

+ 15 - 14
pages/test/index.js

@@ -216,27 +216,28 @@ Page({
216
           }
216
           }
217
           dataTemp.push(data[i]);
217
           dataTemp.push(data[i]);
218
 
218
 
219
-          if (data[i].TestRightStr && data[i].TestRightStr.indexOf("_")>=0){
220
-            data[i].TestRightStr=data[i].TestRightStr.split(",");
219
+          if (data[i].Name[0].indexOf("英语")>=0){
220
+            if (data[i].TestRightStr){
221
+              data[i].TestRightStr=data[i].TestRightStr.split(",");
222
+            }
223
+            if (data[i].TestWrongStr){
224
+              data[i].TestWrongStr=data[i].TestWrongStr.split(",");
225
+            }          
226
+            if (data[i].TestSkipStr){
227
+              data[i].TestSkipStr=data[i].TestSkipStr.split(",");
228
+            }
229
+            if (data[i].TestExistStr){
230
+              data[i].TestExistStr=data[i].TestExistStr.split(",");
231
+            }
221
           }
232
           }
233
+          
234
+          
222
           if (!data[i].TestRightStr)
235
           if (!data[i].TestRightStr)
223
             data[i].TestRightStr="";
236
             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)
237
           if (!data[i].TestWrongStr)
229
             data[i].TestWrongStr="";
238
             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)
239
           if (!data[i].TestSkipStr)
235
             data[i].TestSkipStr="";
240
             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
           if (!data[i].TestExistStr)
241
             data[i].TestExistStr="";
242
             data[i].TestExistStr="";
242
                 
243
                 

+ 5 - 4
pages/test/report.js

@@ -34,10 +34,10 @@ Page({
34
 
34
 
35
     if (list) {
35
     if (list) {
36
       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
-        }
37
+        // if (TestTask.BookID > 12) {
38
+        //   list[i].Field1 = list[i].ContentNew.Field[1][0].Content;
39
+        //   list[i].Word = list[i].ID;
40
+        // }
41
         if (list[i].Result == 1) {
41
         if (list[i].Result == 1) {
42
           listRight.push(list[i]);
42
           listRight.push(list[i]);
43
           TestTask.TestRightStr.push(list[i].Word);
43
           TestTask.TestRightStr.push(list[i].Word);
@@ -179,6 +179,7 @@ Page({
179
           obj.FontSize = item.FontSize;
179
           obj.FontSize = item.FontSize;
180
           arr.push(obj);
180
           arr.push(obj);
181
           TestExistStr.push(item.Word);
181
           TestExistStr.push(item.Word);
182
+          
182
         } else if (that.data.List[i].List[j].Css === "Select2") {
183
         } else if (that.data.List[i].List[j].Css === "Select2") {
183
           var item = that.data.List[i].List[j];
184
           var item = that.data.List[i].List[j];
184
           TestExistStr.push(item.Word);
185
           TestExistStr.push(item.Word);

+ 2 - 8
pages/test/report.wxml

@@ -15,15 +15,9 @@
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
+      
19
+        <text class="text4">{{itemChild.Word}}</text>
18
         
20
         
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>
27
       </view>
21
       </view>
28
     </block>
22
     </block>
29
   </view>
23
   </view>

+ 8 - 8
utils/main.js

@@ -932,14 +932,14 @@ function GetTestReportInfo(reportid, callback) {
932
 
932
 
933
               taskInfo.TagWidth = 364;
933
               taskInfo.TagWidth = 364;
934
               taskInfo.ContentNew = changeStringToView(taskInfo.Content);
934
               taskInfo.ContentNew = changeStringToView(taskInfo.Content);
935
-              if (tempRight.indexOf("," + taskInfo.ID + ",") >= 0)
935
+              if (tempRight.indexOf("," + taskInfo.Word + ",") >= 0)
936
                 taskInfo.Result = 1;
936
                 taskInfo.Result = 1;
937
-              if (tempWrong.indexOf("," + taskInfo.ID + ",") >= 0)
937
+              if (tempWrong.indexOf("," + taskInfo.Word + ",") >= 0)
938
                 taskInfo.Result = -1;
938
                 taskInfo.Result = -1;
939
-              if (tempSkip.indexOf("," + taskInfo.ID + ",") >= 0)
939
+              if (tempSkip.indexOf("," + taskInfo.Word + ",") >= 0)
940
                 taskInfo.Result = 0;
940
                 taskInfo.Result = 0;
941
 
941
 
942
-              if (tempExist.indexOf("," + taskInfo.ID + ",") >= 0)
942
+              if (tempExist.indexOf("," + taskInfo.Word + ",") >= 0)
943
                 taskInfo.Css = "Select2";
943
                 taskInfo.Css = "Select2";
944
 
944
 
945
               TaskList.push(taskInfo);
945
               TaskList.push(taskInfo);
@@ -949,13 +949,13 @@ function GetTestReportInfo(reportid, callback) {
949
             result.TestSkipStr = "";
949
             result.TestSkipStr = "";
950
             result.TestExistStr = "";
950
             result.TestExistStr = "";
951
             if (userTestReportInfo.TestRightStr)
951
             if (userTestReportInfo.TestRightStr)
952
-              result.TestRightStr = userTestReportInfo.TestRightStr.join(",");
952
+              result.TestRightStr = userTestReportInfo.TestRightStr;
953
             if (userTestReportInfo.TestWrongStr)
953
             if (userTestReportInfo.TestWrongStr)
954
-              result.TestWrongStr = userTestReportInfo.TestWrongStr.join(",");
954
+              result.TestWrongStr = userTestReportInfo.TestWrongStr;
955
             if (userTestReportInfo.TestSkipStr)
955
             if (userTestReportInfo.TestSkipStr)
956
-              result.TestSkipStr = userTestReportInfo.TestSkipStr.join(",");
956
+              result.TestSkipStr = userTestReportInfo.TestSkipStr;
957
             if (userTestReportInfo.TestExistStr)
957
             if (userTestReportInfo.TestExistStr)
958
-              result.TestExistStr = userTestReportInfo.TestExistStr.join(",");
958
+              result.TestExistStr = userTestReportInfo.TestExistStr;
959
 
959
 
960
             result.List = TaskList;
960
             result.List = TaskList;
961
             callback(result);
961
             callback(result);