chengjie 5 年之前
父节点
当前提交
58e091a33d
共有 5 个文件被更改,包括 31 次插入35 次删除
  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 1
 App({
2 2
   globalData: {
3 3
     Version: "1.5.16",
4
-    IsProduction: false,
4
+    IsProduction: true,
5 5
     ShareTitle: "高效学习从秒过开始",
6 6
     SharePath: "pages/index/index",
7 7
     ShareImage: '../images/program_screenshot_main.png',

+ 15 - 14
pages/test/index.js

@@ -216,27 +216,28 @@ Page({
216 216
           }
217 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 235
           if (!data[i].TestRightStr)
223 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 237
           if (!data[i].TestWrongStr)
229 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 239
           if (!data[i].TestSkipStr)
235 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 241
           if (!data[i].TestExistStr)
241 242
             data[i].TestExistStr="";
242 243
                 

+ 5 - 4
pages/test/report.js

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

+ 2 - 8
pages/test/report.wxml

@@ -15,15 +15,9 @@
15 15
         <image wx:if="{{itemChild.Css=='Select'}}" src="../images/universalpic_checked_white_22x17.png" class="universalpic_checked_white_22x17" />
16 16
         <image wx:if="{{itemChild.Css=='Select2'}}" src="../images/universalpic_bookmark_blue_40x40.png" class="universalpic_bookmark_blue_40x40" />
17 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 21
       </view>
28 22
     </block>
29 23
   </view>

+ 8 - 8
utils/main.js

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