chengjie 9 місяців тому
батько
коміт
3889194cc7
39 змінених файлів з 2442 додано та 87 видалено
  1. 5 4
      app.js
  2. 3 0
      app.json
  3. BIN
      pages/images/program_screenshot_main.png
  4. BIN
      pages/images/program_share-a01.png
  5. 1 1
      pages/main/cardmain.js
  6. 1 1
      pages/main/cardmain.wxml
  7. 1 1
      pages/main/cardmain.wxss
  8. 2 1
      pages/main/default.wxml
  9. 1 1
      pages/other/annualreport.wxml
  10. 1 1
      pages/other/annualreport.wxss
  11. BIN
      pages_test/images/sysIcon_e03.png
  12. 29 0
      pages_test/knowledge/build.js
  13. 9 0
      pages_test/knowledge/build.json
  14. 31 0
      pages_test/knowledge/build.wxml
  15. 77 0
      pages_test/knowledge/build.wxss
  16. 366 0
      pages_test/knowledge/examine.js
  17. 9 0
      pages_test/knowledge/examine.json
  18. 83 0
      pages_test/knowledge/examine.wxml
  19. 469 0
      pages_test/knowledge/examine.wxss
  20. 9 0
      pages_test/knowledge/index.js
  21. 2 2
      pages_test/knowledge/index.wxml
  22. 1 0
      pages_test/knowledge/index.wxss
  23. 45 3
      pages_test/knowledge/library.js
  24. 9 6
      pages_test/knowledge/library.wxml
  25. 20 1
      pages_test/knowledge/library.wxss
  26. 21 1
      pages_test/knowledge/package.js
  27. 17 15
      pages_test/knowledge/package.wxml
  28. 20 0
      pages_test/knowledge/package.wxss
  29. 155 0
      pages_test/knowledge/report.js
  30. 6 0
      pages_test/knowledge/report.json
  31. 87 0
      pages_test/knowledge/report.wxml
  32. 341 0
      pages_test/knowledge/report.wxss
  33. 96 6
      pages_test/knowledge/unit.js
  34. 1 0
      pages_test/knowledge/unit.json
  35. 194 38
      pages_test/knowledge/unit.wxml
  36. 324 2
      pages_test/knowledge/unit.wxss
  37. 1 0
      pages_test/test/item.js
  38. 2 2
      project.private.config.json
  39. 3 1
      utils/util.js

+ 5 - 4
app.js

@@ -1,10 +1,10 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "2.4.0",
4
-    //IsProduction: true,
3
+    Version: "2.4.2",
4
+    IsProduction: true,
5 5
     ShareTitle: "高效学习从秒过开始",
6 6
     SharePath: "pages/index/index",
7
-    ShareImage: '../images/program_screenshot_main.png',
7
+    ShareImage: '../images/program_share-a01.png',
8 8
     ProgramID: 166,
9 9
     ProgramName: "秒过学习",
10 10
     AppID: "wx84b3feac6069eec3",
@@ -44,7 +44,8 @@ App({
44 44
     TempStr:"",//临时字符串。用于不能传递的一些参数
45 45
     TempStr2:"",//临时字符串。用于不能传递的一些参数
46 46
     FolderList:[],//卡单列表
47
-
47
+    TestGradeList:[],//知识检验列表
48
+    TestTask:[],//知识检验结果
48 49
     MemoryLevel: 0,//记忆水平
49 50
     ColorIndex: 0,//色彩方案
50 51
     ClickType: 0,//点击方案

+ 3 - 0
app.json

@@ -105,6 +105,9 @@
105 105
         "knowledge/library",
106 106
         "knowledge/package",
107 107
         "knowledge/unit",
108
+        "knowledge/report",
109
+        "knowledge/build",
110
+        "knowledge/examine",
108 111
         "knowledge/index"
109 112
       ]
110 113
     }

BIN
pages/images/program_screenshot_main.png


BIN
pages/images/program_share-a01.png


+ 1 - 1
pages/main/cardmain.js

@@ -27,7 +27,7 @@ Page({
27 27
     var year = new Date(app.globalData.userInfo.CreateTime).getFullYear();
28 28
     var month = new Date().getMonth();
29 29
     //console.log(year);
30
-    if (new Date().getFullYear()>=2024 && year<2024 && month<3){
30
+    if (new Date().getFullYear()>=2025 && year<2025 && month<3){
31 31
       that.setData({
32 32
         IsYearReport: true,
33 33
       });

+ 1 - 1
pages/main/cardmain.wxml

@@ -52,7 +52,7 @@
52 52
   </view>
53 53
   <!-- 年度报告 -->
54 54
   <block wx:if="{{IsYearReport}}">
55
-    <image class="report_2024-banner" src='{{ImagePath}}web/report_2023-banner.png' bindtap="goto" data-url="../other/annualreport" />
55
+    <image class="report_2024-banner" src='{{ImagePath}}web/report_2024-banner.png' bindtap="goto" data-url="../other/annualreport" />
56 56
   </block>
57 57
 
58 58
   <view class="panelItem3 FlexRow">

+ 1 - 1
pages/main/cardmain.wxss

@@ -168,7 +168,7 @@
168 168
 
169 169
 .report_2024-banner {
170 170
   width: 710rpx;
171
-  height: 280rpx;
171
+  height: 180rpx;
172 172
   margin: 30rpx 0 0 0;
173 173
 }
174 174
 

+ 2 - 1
pages/main/default.wxml

@@ -34,7 +34,8 @@
34 34
     <image class="study_index_footer" src='../images/practise_index_footer.png' />
35 35
 
36 36
     <view class='panelBottom1 FlexRow'>
37
-      <view class='panelBottom11 FlexColumn' catchtap="gotoReLaunch" data-url="../../pages_test/test/index">
37
+      <!-- <view class='panelBottom11 FlexColumn' catchtap="gotoReLaunch" data-url="../../pages_test/test/index"> -->
38
+      <view class='panelBottom11 FlexColumn' catchtap="gotoReLaunch" data-url="../../pages_test/knowledge/index">
38 39
         <view>检验</view>
39 40
       </view>
40 41
       <view class='panelBottom11 FlexColumn'>

+ 1 - 1
pages/other/annualreport.wxml

@@ -1,5 +1,5 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-	<image src="{{ImagePath}}web/report_2023-header.png" class="panelTop" />
2
+	<image src="{{ImagePath}}web/report_2024-header.png" class="panelTop" />
3 3
 	<view class="panelMain FlexColumn">
4 4
 		<view class="text1">自{{Data.StartDate}}以来</view>
5 5
 		<view class="text2">年度报告的数据统计截止于{{Data.EndDate}}</view>

+ 1 - 1
pages/other/annualreport.wxss

@@ -8,7 +8,7 @@ page{
8 8
 
9 9
 .panelTop{
10 10
   width:670rpx;
11
-  height:322rpx;
11
+  height:320rpx;
12 12
   margin-top: 40rpx;
13 13
 }
14 14
 

BIN
pages_test/images/sysIcon_e03.png


+ 29 - 0
pages_test/knowledge/build.js

@@ -0,0 +1,29 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    BuildFinished:1,
9
+  },
10
+  onLoad: function (options) {
11
+    var that = this;
12
+    that.setData({
13
+      Containnerheight: main.getWindowHeight(),
14
+    });
15
+  },
16
+  goto: function (e) {
17
+    var url = e.currentTarget.dataset.url;
18
+    wx.navigateTo({
19
+      url: url,
20
+    });
21
+  },
22
+  onShareAppMessage: function () {
23
+    return {
24
+      title: app.globalData.ShareTitle,
25
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
26
+      imageUrl: app.globalData.ShareImage,
27
+    }
28
+  },
29
+})

+ 9 - 0
pages_test/knowledge/build.json

@@ -0,0 +1,9 @@
1
+{
2
+  "navigationBarBackgroundColor": "#fff",
3
+  "navigationBarTitleText": "",
4
+  "usingComponents": {
5
+    "navigation-bar": "/components/navigation-bar/navigation-bar"
6
+  },
7
+  "navigationStyle": "custom",
8
+  "backgroundColor": "#fff"
9
+}

+ 31 - 0
pages_test/knowledge/build.wxml

@@ -0,0 +1,31 @@
1
+<!--卡单生成中 -->
2
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
3
+  <view class="panel1 FlexColumn">
4
+    <block wx:if="{{!BuildFinished}}">
5
+      <view class="panel11">生成中</view>
6
+      <view class="panel12">请稍等</view>
7
+    </block>
8
+    <block wx:if="{{BuildFinished}}">
9
+      <view class="panel11">已完成</view>
10
+      <view class="panel12">生成7张题卡</view>
11
+    </block>
12
+  </view>
13
+  <view class="panel2 FlexRow">
14
+    <view wx:if="{{!BuildFinished}}" class="panel21">69%</view>
15
+    <block wx:if="{{BuildFinished}}">
16
+      <view class="panel22 FlexColumn">
17
+        <image src="../images/sysIcon_b06.png" class="sysIcon_b06"></image>
18
+        <view class="panel221">关闭</view>
19
+      </view>
20
+      <view class="panel22 panel23 FlexColumn">
21
+        <image src="../images/sysIcon_a04.png" class="sysIcon_b06"></image>
22
+        <view class="panel221">题卡管理</view>
23
+      </view>
24
+    </block>
25
+  </view>
26
+  <view class="panel3">
27
+  </view>
28
+  <view class="panel4 FlexColumn">
29
+    <image src="" class="panel41"></image>
30
+  </view>
31
+</view>

+ 77 - 0
pages_test/knowledge/build.wxss

@@ -0,0 +1,77 @@
1
+.container {
2
+  background-color: #AAA8A5;
3
+}
4
+
5
+.panel1 {
6
+  width: 100%;
7
+  background-color: #fff;
8
+}
9
+
10
+.panel11 {
11
+  font-weight: 400;
12
+  font-size: 36rpx;
13
+  color: #2E2E2E;
14
+  margin-top: 248rpx;
15
+}
16
+
17
+.panel12 {
18
+  font-size: 48rpx;
19
+  color: #2E2E2E;
20
+  margin-bottom: 86rpx;
21
+}
22
+
23
+.panel2 {
24
+  width: 100%;
25
+  height: 283rpx;
26
+  background-color: #D0CFCD;
27
+}
28
+
29
+.panel21 {
30
+  font-family: Teko-Bold;
31
+  font-size: 96rpx;
32
+  color: #4D4D4D;
33
+}
34
+
35
+.panel22 {
36
+  width: 380rpx;
37
+  height: 140rpx;
38
+  background: #FFFFFF;
39
+  box-shadow: 0 6rpx 0 0 rgba(0, 0, 0, 0.10);
40
+  border-radius: 20rpx;
41
+  font-family: PingFangSC-Semibold;
42
+  font-size: 24rpx;
43
+  color: #2E2E2E;
44
+  align-items: flex-start;
45
+}
46
+
47
+.panel23 {
48
+  width:220rpx;
49
+  margin-left: 30rpx;
50
+}
51
+
52
+.sysIcon_b06 {
53
+  width: 20rpx;
54
+  height: 20rpx;
55
+  margin: 0 0 26rpx 34rpx;
56
+}
57
+.panel221{
58
+  margin: 0 0 0 30rpx;
59
+}
60
+
61
+.panel3 {
62
+  width: 100%;
63
+  height: 90rpx;
64
+  background-image: linear-gradient(180deg, #63615F 0%, #989692 100%);
65
+}
66
+
67
+.panel4 {
68
+  width: 100%;
69
+}
70
+
71
+.panel41 {
72
+  width: 260rpx;
73
+  height: 260rpx;
74
+  margin-top: 120rpx;
75
+  background-color: #fff;
76
+  border-radius: 50%;
77
+}

+ 366 - 0
pages_test/knowledge/examine.js

@@ -0,0 +1,366 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+var TaskList = [];
6
+
7
+var isPlaying = false;
8
+
9
+var innerAudioContext1;
10
+var timeoutPlayAudio;
11
+var tempPlayUrl = "";
12
+var tempPlayUrlLocal = "";
13
+var timeoutEveryCard = 0;
14
+var isFinished=0;
15
+
16
+Page({
17
+  data: {
18
+    IsSelect: true,
19
+    Color: { ID: 1 },
20
+  },
21
+  onReady: function () {
22
+    var that = this;
23
+    innerAudioContext1 = wx.createInnerAudioContext();
24
+    innerAudioContext1.onPlay(() => {
25
+      console.log('开始播放')
26
+    });
27
+    innerAudioContext1.onError((res) => {
28
+      console.log("innerAudioContext1.errMsg:" + res.errMsg);
29
+      console.log("innerAudioContext1.errCode:" + res.errCode);
30
+      that.audioCtx.setSrc(tempPlayUrl);
31
+      that.audioCtx.play();
32
+    });
33
+  },
34
+  onLoad: function (options) {
35
+    var that = this;
36
+    that.setData({
37
+      Category:options.category1,
38
+      BookID:options.bookid,
39
+      LibraryID:options.libraryid,
40
+      UnitID:options.unitsid,
41
+      LibraryName:options.LibraryName,
42
+      BookName:options.BookName,
43
+      UnitName:options.UnitName,
44
+      TestTypeName:options.TestTypeName,
45
+      IsShowAnswer: [0, 0],
46
+      Color: main.getDetailColor(app.globalData.ColorIndex),
47
+      Containnerheight: main.getWindowHeight(),
48
+    });
49
+
50
+    that.init(options);
51
+    that.getColor();
52
+    
53
+    this.audioCtx = wx.createAudioContext('myAudio');
54
+
55
+    isFinished = 0;
56
+
57
+    if (app.globalData.BaiduToken === "")
58
+      main.getBaiduToken();
59
+  },
60
+  init:function(options){
61
+    var that = this;
62
+    that.setData({
63
+      TaskInfo: {},
64
+      TestType: options.testtype,
65
+    });
66
+    main.getData('GetMiaoguoTestExamine?UserID='+app.globalData.userInfo.UserID+'&Category1='+options.category1+'&BookID='+options.bookid+'&Name='+options.UnitName+'&UnitID='+options.unitsid+'&TestType='+options.testtype, function (data) {
67
+      if (data) {
68
+        TaskList=data;
69
+        TaskList = common.randomArray(TaskList);
70
+        that.setData({
71
+          TaskInfo: TaskList[0],
72
+          TaskLength: TaskList.length,
73
+          CurrentIndex: 0,
74
+        });
75
+        //debugger;
76
+        common.getStorageValue(that, "TestAutioPlay", 1, function () { 
77
+          if (that.data.TestAutioPlay == 1 && that.data.TestType == "write") {
78
+            that.playSound({ currentTarget: { dataset: { content: TaskList[that.data.CurrentIndex].ReadString } } })
79
+          }
80
+        });
81
+      }
82
+    });
83
+  },
84
+  //进入下一张题卡
85
+  gotoNext: function (e) {
86
+    var that = this;
87
+    that.setData({
88
+      IsShowAnswer: [0, 0],
89
+    });
90
+
91
+    var btnnumber = e.currentTarget.dataset.btnnumber;
92
+    
93
+    if (btnnumber>="0"){
94
+      that.setSoundFile(0);
95
+      if (TaskList[that.data.CurrentIndex]){
96
+        if (btnnumber==="4")
97
+          TaskList[that.data.CurrentIndex].Result = 1;
98
+        else if (btnnumber === "0")
99
+          TaskList[that.data.CurrentIndex].Result = -1;
100
+        else if (btnnumber === "1")
101
+          TaskList[that.data.CurrentIndex].Result = 0;
102
+      }
103
+      
104
+      that.data.CurrentIndex++;
105
+    }
106
+    else{
107
+      that.setSoundFile(2);
108
+      if (TaskList[that.data.CurrentIndex] && TaskList[that.data.CurrentIndex].Result)
109
+        TaskList[that.data.CurrentIndex].Result=null;
110
+      that.data.CurrentIndex--;
111
+    }
112
+    //结束
113
+    if (that.data.CurrentIndex>=TaskList.length){
114
+      isFinished = 1;
115
+      that.onFinished();
116
+    }
117
+    else if (that.data.CurrentIndex <0) {
118
+      wx.showToast({
119
+        title: '到开始了',
120
+      });
121
+      that.setSoundFile(-1);
122
+    }
123
+    else{
124
+      
125
+      that.setData({
126
+        TaskInfo: TaskList[that.data.CurrentIndex],
127
+        CurrentIndex: that.data.CurrentIndex,
128
+      });
129
+      if (that.data.TestAutioPlay == 1 && that.data.TestType == "write") {
130
+        that.playSound({ currentTarget: { dataset: { content: TaskList[that.data.CurrentIndex].ReadString } } })
131
+      }
132
+    }
133
+
134
+    //console.log(that.data.TestType);
135
+    //console.log(JSON.stringify(that.data.TaskInfo));
136
+  },
137
+  onPullDownRefresh: function () {
138
+    var that = this;
139
+    that.setData({
140
+      IsShowAnswer: [0, 0],
141
+    });
142
+    wx.stopPullDownRefresh();
143
+  },
144
+  onShowAnswer: function (e) {
145
+    var that = this;
146
+    var clicktype = e.currentTarget.dataset.type;
147
+    if (!(clicktype && clicktype == "all" && app.globalData.ClickType == 0)) {
148
+      that.setData({
149
+        IsShowAnswer: [1, 1],
150
+      });
151
+
152
+      if (that.data.TestAutioPlay == 1 && that.data.TestType == "read") {
153
+        if (TaskList[that.data.CurrentIndex] && TaskList[that.data.CurrentIndex].ReadString)
154
+          that.playSound({ currentTarget: { dataset: { content: TaskList[that.data.CurrentIndex].ReadString } } })
155
+      }
156
+    }
157
+  },
158
+  getColor: function () {
159
+    var that = this;
160
+    if (wx.setBackgroundColor) {
161
+      wx.setBackgroundColor({
162
+        backgroundColor: that.data.Color.BackColor,
163
+        backgroundColorTop: that.data.Color.BackColor,
164
+        backgroundColorBottom: that.data.Color.BackColor,
165
+      })
166
+    }
167
+    if (wx.setNavigationBarColor) {
168
+      wx.setNavigationBarColor({
169
+        frontColor: "#ffffff",
170
+        backgroundColor: that.data.Color.BackColor,
171
+      })
172
+    }
173
+  },
174
+  playSound: function (e) {
175
+    clearTimeout(timeoutPlayAudio);
176
+
177
+    var that = this;
178
+    var str = e.currentTarget.dataset.content;
179
+    if (str){
180
+      var url;
181
+      if (str == "recorder") {
182
+        url = e.currentTarget.dataset.soundmark;
183
+      }
184
+      else if (str.indexOf("英 [") >= 0 || str.indexOf("美 [") >= 0 || str.indexOf("baidu.com")>0 || str.indexOf("iciba.com")>0 || str.indexOf("myqcloud.com")>0) {
185
+        str = str.replace("英 [", "[");
186
+        str = str.replace("美 [", "[");
187
+        url = e.currentTarget.dataset.soundmark;
188
+        if (!url)
189
+          url=str;
190
+      }
191
+      else if (str.indexOf("pinyin")>0){
192
+          url=str;
193
+      }
194
+      else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark != "undefined") {
195
+        var soundmark = e.currentTarget.dataset.soundmark;
196
+        if (soundmark && soundmark.indexOf("http") < 0) {
197
+          url = app.globalData.audioUrlBaidu;
198
+          url = url.replace("[token]", app.globalData.BaiduToken);
199
+          url = url.replace("[word]", soundmark);
200
+        }
201
+        else {
202
+          url = soundmark;
203
+        }
204
+      }
205
+      else {
206
+        url = app.globalData.audioUrlBaidu;
207
+        url = url.replace("[token]", app.globalData.BaiduToken);
208
+        url = url.replace("[word]", str);
209
+      }
210
+  
211
+  
212
+      if (url.indexOf("http") > 0)
213
+        url = url.substr(url.indexOf("http"));
214
+      if (url.indexOf("'") > 0)
215
+        url = common.ReplaceAllString(url, "'", "");
216
+      url = url.replace("http://", "https://");
217
+  
218
+      url = encodeURI(url);
219
+      if (!isPlaying || tempPlayUrl == "" || url != tempPlayUrl) {
220
+        isPlaying = true;
221
+        timeoutPlayAudio = setTimeout(function () {
222
+          isPlaying = false;
223
+        }, 60000);
224
+  
225
+        wx.showLoading({
226
+          title: '音频下载中',
227
+          mask: true,
228
+        });
229
+        setTimeout(function () {
230
+          wx.hideLoading();
231
+        }, 30000);
232
+  
233
+        wx.downloadFile({
234
+          url: url,
235
+          success(res) {
236
+            wx.hideLoading();
237
+            tempPlayUrlLocal = res.tempFilePath;
238
+            innerAudioContext1.src = res.tempFilePath;
239
+            innerAudioContext1.play();
240
+            
241
+            tempPlayUrl = url;
242
+            
243
+          },
244
+          fail(err) {
245
+            wx.hideLoading();
246
+            if (url.indexOf("sp0.baidu.com")>0){
247
+              var soundmark=url.substring(url.indexOf("text=")+5,url.indexOf("&spd"));
248
+              url = app.globalData.audioUrlYoudao;
249
+              url = url.replace("[word]", soundmark);
250
+              tempPlayUrlLocal = url;
251
+              that.audioCtx.setSrc(url);
252
+              that.audioCtx.play();
253
+              tempPlayUrl = url;
254
+            }
255
+          }
256
+        });
257
+      }
258
+      else {
259
+        if (this.audioCtx)
260
+          this.audioCtx.pause();
261
+        if (innerAudioContext1)
262
+          innerAudioContext1.stop();
263
+        isPlaying = false;
264
+      }
265
+    }
266
+  },
267
+  audioBindEnded: function () {
268
+    isPlaying = false;
269
+  },
270
+  audioBindError: function (err) {
271
+    console.log(err);
272
+    innerAudioContext1.src = tempPlayUrlLocal;
273
+    innerAudioContext1.play();
274
+
275
+    main.getBaiduToken();
276
+  },
277
+  setSoundFile: function (isFinish) { //isFinish=3搁置 =2撤退 =1结束 =0正常 =-1开始
278
+    var that = this;
279
+    var url = "/pages/sounds/";
280
+    if (isFinish == 1) {
281
+      url += "end.mp3";
282
+    } else if (isFinish == 2) {
283
+      url += "short3.mp3";
284
+    } else if (isFinish == 3) {
285
+      url += "short1.mp3";
286
+    } else {
287
+      url += "short2.mp3";
288
+    }
289
+    if (isFinish >= 0) {
290
+      innerAudioContext1.src = url;
291
+      innerAudioContext1.play();
292
+    }
293
+
294
+    wx.pageScrollTo({
295
+      scrollTop: 0,
296
+    });
297
+  },
298
+  onAutoPlay:function(e){
299
+    var id=e.currentTarget.dataset.id;
300
+    this.setData({
301
+      TestAutioPlay:id,
302
+    });
303
+    wx.setStorageSync("TestAutioPlay",id);
304
+  },
305
+  onExport:function(){
306
+    var that=this;
307
+    that.setSoundFile(0);
308
+    while (that.data.CurrentIndex<TaskList.length) {
309
+      TaskList[that.data.CurrentIndex].Result = 0;
310
+      that.data.CurrentIndex++;
311
+    }    
312
+    isFinished = 1;
313
+    that.onFinished();
314
+  },
315
+  onFinished:function(){
316
+    if (TaskList.length > 0 && this.data.CurrentIndex > 0) {
317
+      var TestTask = {};
318
+      TestTask.Category = this.data.Category;
319
+      TestTask.TestType = this.data.TestType;
320
+      TestTask.IsFinished = isFinished;
321
+      TestTask.LibraryName = this.data.LibraryName;
322
+      TestTask.BookName = this.data.BookName;
323
+      TestTask.UnitName = this.data.UnitName;
324
+      TestTask.TestTypeName = this.data.TestTypeName;
325
+      TestTask.LibraryID=this.data.LibraryID;
326
+      TestTask.BookID=this.data.BookID;
327
+      TestTask.UnitID+=this.data.UnitID;
328
+      TestTask.List = TaskList;
329
+      app.globalData.TestTask=TestTask;
330
+      wx.redirectTo({
331
+        url: './report?type=new',
332
+      });
333
+    }
334
+    else{
335
+      wx.navigateBack({
336
+        delta: 1,
337
+      });
338
+    }
339
+  },
340
+  onUnload:function(){
341
+    wx.removeStorageSync("TestTask2");
342
+    if (innerAudioContext1) {
343
+      innerAudioContext1.stop();
344
+    }
345
+  },
346
+  showBishunOrKaiti:function(e){
347
+    var that=this;
348
+    main.downloadBishunKaitiImage(
349
+      e.currentTarget.dataset.url,
350
+      e.currentTarget.dataset.serverurl,
351
+      e.currentTarget.dataset.type,
352
+      that.data.TaskInfo.ContentNew.Field,function(fields){
353
+        that.data.TaskInfo.ContentNew.Field=fields;
354
+        that.setData({
355
+          TaskInfo: that.data.TaskInfo,
356
+        });
357
+      });
358
+  },
359
+  onShareAppMessage: function () {
360
+    return {
361
+      title: app.globalData.ShareTitle,
362
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
363
+      imageUrl: app.globalData.ShareImage,
364
+    }
365
+  },
366
+})

+ 9 - 0
pages_test/knowledge/examine.json

@@ -0,0 +1,9 @@
1
+{
2
+  "navigationBarTitleText": "检验中",
3
+  "navigationBarTextStyle": "white",
4
+  "enablePullDownRefresh": true,
5
+  "usingComponents": {
6
+    "navigation-bar": "/components/navigation-bar/navigation-bar"
7
+  },
8
+  "navigationStyle": "custom"
9
+}

+ 83 - 0
pages_test/knowledge/examine.wxml

@@ -0,0 +1,83 @@
1
+<import src="../../pages/template/cardShow.wxml" />
2
+<navigation-bar title="检验中" show="true" left="true" background="{{Color.BackColor}}" color="#fff">
3
+    <view slot="left" bindtap="onFinished">
4
+      <view class="square">提前退出</view>
5
+    </view>
6
+</navigation-bar>
7
+
8
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}};' bindtap='onShowAnswer' data-type="all">
9
+  <view class="panelTop FlexColumn" style="background-color:{{Color.BackColor}};">
10
+    <view class="panelTop2 FlexRow">
11
+    <view class="left FlexRow">
12
+      <view class="Number2 Number1 FlexColumn">
13
+        <view>{{CurrentIndex+1}}</view>
14
+        <view class="line2 line1"></view>
15
+      </view>
16
+      <view class="Number1 FlexColumn">
17
+        <view>{{TaskLength}}</view>
18
+        <view class="line1"></view>
19
+      </view>
20
+    </view>
21
+    <view class="right FlexRow">
22
+      <view class="btnTop FlexRow" catchtap='onExport'>
23
+        <image src="../images/universalpic_import_gray.png" class="universalpic_import_gray" />
24
+      </view>
25
+      <view class="panelTopText2 panelTopText" catchtap='onExport'>导入</view>
26
+      
27
+      <view class="btnTop FlexRow" catchtap='onAutoPlay' data-id="1" wx:if="{{TestAutioPlay==0}}">
28
+        <image src="../../pages/images/universalpic_broadcast_default_gray_34x25.png" class="universalpic_broadcast_default_gray_34x25" />
29
+      </view>
30
+      
31
+      <block wx:if="{{!(BookID>=25 && BookID<=36)}}">
32
+        <view class="btnTop FlexRow" catchtap='onAutoPlay' data-id="0"  wx:if="{{TestAutioPlay==1}}">
33
+          <image src="../../pages/images/universalpic_broadcast_enable_tc0{{Color.ID}}_34x25.png" class="universalpic_broadcast_default_gray_34x25" />
34
+        </view>
35
+        <view class="panelTopText">自动播报</view>
36
+      </block>
37
+      
38
+      <!-- <view class="btnTop FlexRow" catchtap='gotoNext' data-btnnumber="1">
39
+        <image src="../../pages/images/universalpic_shelve_gray_26x26.png" class="universalpic_shelve_gray_26x26" />
40
+      </view> -->
41
+      <view class="btnTop2 btnTop FlexRow" catchtap='gotoNext' data-btnnumber="-1" >
42
+        <image src="../../pages/images/universalpic_undo_gray_26x20.png" class="universalpic_undo_gray_26x20" />
43
+      </view>
44
+    </view>
45
+    </view>
46
+  </view>
47
+  <view style='width:100%;height:140rpx;'></view>
48
+  <template is="CardShow" data="{{Color:Color,Field:TaskInfo.ContentNew.Field,Tags:TaskInfo.ContentNew.Tags,IsShowAnswer:IsShowAnswer,TagWidth:TaskInfo.TagWidth,FontSize:TaskInfo.FontSize}}" />
49
+  <view style='width:100%;height:180rpx;'></view>
50
+
51
+  <!-- 下方按钮 -->
52
+  <image class="footerShade" src="../../pages/images/study_learning_bgimage_tc0{{Color.ID}}.png" />
53
+  <view class='footer FlexColumn'>
54
+    <image class="footerImage" src="../../pages/images/study_learning_maskimage_tc0{{Color.ID}}.png" />
55
+    <view class="panelFooter FlexColumn" hover-class='AnswerHover' wx:if="{{!IsShowAnswer[0] && !IsShowAnswer[1] && ClickType!=1}}" catchtap="onShowAnswer">
56
+      看答案
57
+    </view>
58
+    <view class="panelFooter0 panelFooter FlexColumn" wx:if="{{IsShowAnswer[1]}}">
59
+      <view class='panelBottomAnswer panelBottom FlexRow'>
60
+        <view class="AnswerLeft Answer FlexColumn" hover-class='AnswerHover' catchtap='gotoNext' data-btnnumber="0">
61
+          <view class="btnTime">
62
+            答错
63
+          </view>
64
+          <view class="Answer0 btnColor"></view>
65
+        </view>
66
+        <view class="Answer FlexColumn" hover-class='AnswerHover' catchtap='gotoNext' data-btnnumber="1">
67
+          <view class="btnTime">
68
+            没学过
69
+          </view>
70
+          <view class="Answer4 btnColor"></view>
71
+        </view>
72
+        <view class="AnswerRight Answer FlexColumn" hover-class='AnswerHover' catchtap='gotoNext' data-btnnumber="4">
73
+          <view class="btnTime">
74
+            答对
75
+          </view>
76
+          <view class="Answer2 btnColor"></view>
77
+        </view>
78
+      </view>
79
+    </view>
80
+  </view>
81
+</view>
82
+
83
+<audio hidden='true' src="{{AudioSrc}}" id="myAudio" bindended="audioBindEnded" binderror="audioBindError"></audio>

+ 469 - 0
pages_test/knowledge/examine.wxss

@@ -0,0 +1,469 @@
1
+page{
2
+  background-color: #D2D2D2;
3
+}
4
+
5
+.square{
6
+  background-color: #181A21;
7
+  width:136rpx;
8
+  line-height:53rpx;
9
+  text-align: center;
10
+  color: #fff;
11
+  border-radius:10rpx;
12
+  font-size:24rpx;
13
+  font-weight: 700;
14
+}
15
+
16
+.panelTop{
17
+  width:100%;
18
+  height:140rpx;
19
+  justify-content: flex-end;
20
+  position: fixed;
21
+  z-index: 100;
22
+}
23
+
24
+.panelTop2{
25
+  width:100%;
26
+  height:120rpx;
27
+  justify-content: space-between;
28
+  color:#fff;
29
+}
30
+
31
+.left{
32
+  margin-left: 50rpx;
33
+}
34
+
35
+.Number1{
36
+  width:50rpx;
37
+  height:50rpx;
38
+  justify-content: flex-end;
39
+  font-size:20rpx;
40
+  font-weight: 400;
41
+  font-family: 'Roboto-Black';
42
+  margin-bottom: 10rpx;
43
+}
44
+.Number2{
45
+  color:rgba(255,255,255,0.5);
46
+}
47
+.line1{
48
+  width:26rpx;
49
+  height:6rpx;
50
+  margin-top: 5rpx;
51
+}
52
+.line2{
53
+  background-color: #F1AB1E;
54
+}
55
+
56
+.right{
57
+  margin-right: 40rpx;
58
+}
59
+.btnTop{
60
+  width:70rpx;
61
+  height:70rpx;
62
+  border-radius: 50%;
63
+  background-color: rgba(0,0,0,0.1);
64
+  margin-left: 30rpx;
65
+}
66
+.btnTop2{
67
+  margin-left: 60rpx;
68
+}
69
+.universalpic_broadcast_default_gray_34x25{
70
+  width:34rpx;
71
+  height:25rpx;
72
+}
73
+.panelTopText{
74
+  font-size: 20rpx;
75
+  color:#D2D2D2;
76
+  margin-left: 14rpx;
77
+}
78
+.panelTopText2{
79
+  margin-right: 30rpx;
80
+}
81
+.universalpic_shelve_gray_26x26{
82
+  width:26rpx;
83
+  height:26rpx;
84
+}
85
+.universalpic_undo_gray_26x20{
86
+  width:26rpx;
87
+  height:20rpx;
88
+}
89
+
90
+/* 段落显示************************ */
91
+
92
+.editFieldNull{
93
+  height:50rpx;
94
+}
95
+.editFieldNull1{
96
+  height:40rpx;
97
+}
98
+.editFieldNull2{
99
+  height:60rpx;
100
+}
101
+.editFieldNull3{
102
+  height:30rpx;
103
+}
104
+
105
+.panelItem {
106
+  width: 650rpx;
107
+  font-weight: 400;
108
+  flex-wrap: wrap;
109
+  justify-content: flex-start;
110
+  z-index: 5; 
111
+  position: relative;
112
+}
113
+
114
+.panelField1 {
115
+  width: 100%;
116
+  justify-content: flex-start;
117
+  z-index: 5; 
118
+  position: relative;
119
+}
120
+
121
+.panelField11 {
122
+  font-size: 48rpx;
123
+  justify-content: flex-start;
124
+  color: #fff;
125
+}
126
+
127
+.panelTag {
128
+  width: 100%;
129
+  min-height: 95rpx;
130
+  align-items: flex-start;
131
+  justify-content: flex-start;
132
+  margin-top: 60rpx;
133
+  z-index: 5;
134
+}
135
+
136
+.panelTag .panelTagLine {
137
+  margin: 0 0 0 50rpx;
138
+  max-width: 650rpx;
139
+  height: 10rpx;
140
+}
141
+
142
+.panelTag .panelTag1 {
143
+  margin: 0 0 0 50rpx;
144
+  width: 650rpx;
145
+  flex-wrap: wrap;
146
+  align-items: flex-start;
147
+  justify-content: flex-start;
148
+}
149
+
150
+.panelTag .tag {
151
+  font-size: 46rpx;
152
+  margin: 0 30rpx 20rpx 0;
153
+  font-weight: 400;
154
+  color: #F1AB1E;
155
+}
156
+
157
+.right2 {
158
+  position: absolute;
159
+  top: 0;
160
+  right: 0;
161
+  width: 134rpx;
162
+  height: 150rpx;
163
+  align-items: flex-start;
164
+}
165
+
166
+.universalpic_show_white_30x30 {
167
+  width: 36rpx;
168
+  height: 36rpx;
169
+  margin: 68rpx 50rpx 0 50rpx;
170
+}
171
+
172
+.universalpic_hide_white_34x34 {
173
+  width: 36rpx;
174
+  height: 20rpx;
175
+  margin: 68rpx 50rpx 0 50rpx;
176
+}
177
+
178
+.panelField20 {
179
+  width: 100%;
180
+  justify-content: flex-start;
181
+  z-index: 5; 
182
+  position: relative;
183
+  min-height:240rpx;
184
+}
185
+
186
+.panelField2 {
187
+  width: 710rpx;
188
+  margin-bottom: 20rpx;
189
+  border-radius: 20rpx;
190
+  min-height:240rpx;
191
+}
192
+
193
+.panelField21 {
194
+  width: 650rpx;
195
+  font-size: 36rpx;
196
+  margin: 40rpx;
197
+  line-height: 66rpx;
198
+}
199
+
200
+.panelItem .panelSound {
201
+  width: 40rpx;
202
+  height: 40rpx;
203
+  margin: 0 10rpx 0 0;
204
+  background-color: #fff;
205
+  border-radius: 50%;
206
+}
207
+
208
+.panelItem .panelSoundHover {
209
+  background-color: #d2d2d2;
210
+}
211
+.panelItem .panelSoundHover1 {
212
+  color: #d2d2d2;
213
+}
214
+
215
+.panelItem .universalpic_starting_tc01_26x26{
216
+  width: 26rpx;
217
+  height: 26rpx;
218
+  margin: 10rpx 20rpx 10rpx 0;
219
+}
220
+
221
+.panelItem .universalpic_read_mark_black_20x20 {
222
+  width: 21rpx;
223
+  height: 20rpx;
224
+}
225
+
226
+.panelItem .panelRecorder {
227
+  width:100%;
228
+  justify-content: flex-start;
229
+}
230
+.panelItem .panelRecorder0 {
231
+  width: 168rpx;
232
+  height: 70rpx;
233
+  background-color: #fff;
234
+  border-radius: 10rpx;
235
+}
236
+
237
+.panelItem .textProblem{
238
+  padding: 3rpx 20rpx;
239
+  background-color: #F1AB1E;
240
+  border-radius: 22rpx;
241
+  text-align: center;
242
+  font-size:28rpx;
243
+  line-height: 45rpx;
244
+  font-weight: 700;
245
+  color:#1e1e1e;
246
+  margin: 0 0 10rpx 0;
247
+}
248
+
249
+.panelItem .textDot{
250
+  color: #F1AB1E;
251
+  font-size:36rpx;
252
+  margin-right: 20rpx;
253
+}
254
+
255
+.panelItem .textLine {
256
+  text-decoration: underline;
257
+}
258
+
259
+
260
+.panelItem .textHighlighter {
261
+  color:#1E1E1E;
262
+}
263
+
264
+.panelItem .textNormal {
265
+  min-height: 50rpx;
266
+}
267
+
268
+.panelItem .textBigword{
269
+  font-size:108rpx;
270
+  line-height: 108rpx;
271
+}
272
+
273
+.panelItem .textNormal2 {
274
+  font-size: 36rpx;
275
+}
276
+
277
+.panelItem .textPinyin {
278
+  text-decoration: underline;
279
+  margin-right: 10rpx;
280
+}
281
+
282
+
283
+.panelItem .imageContainer {
284
+  width: 650rpx;
285
+  margin: 6rpx 0;
286
+  border-radius: 20rpx;
287
+  background-color: rgba(0,0,0,0.1);
288
+  position: relative;
289
+}
290
+
291
+.panelItem .imageFree {
292
+  width: 650rpx;
293
+  border-radius: 6rpx;
294
+}
295
+
296
+
297
+.panelItem .imageContainer2 {
298
+  width: 650rpx;
299
+  border-radius: 10rpx;
300
+  background-color: rgba(0,0,0,0.1);
301
+  position: relative;
302
+}
303
+.panelItem .imageFree2 {
304
+  width: 650rpx;
305
+  border-radius: 10rpx;
306
+}
307
+.panelItem .BishunPlay{
308
+  width:80rpx;
309
+  height:80rpx;
310
+  background-color: #9B9B9B;
311
+  color:#fff;
312
+  position: absolute;
313
+  bottom:0;
314
+  right:0;
315
+  z-index: 10;
316
+  font-size:28rpx;
317
+  text-align: center;
318
+  line-height: 80rpx;
319
+}
320
+.panelItem .textBr {
321
+  width: 100%;
322
+  height: 24rpx;
323
+}
324
+
325
+.panelItem .textReturn {
326
+  width: 100%;
327
+}
328
+
329
+.panelItem .textReturn2 {
330
+  width: 100%;
331
+  height: 30rpx;
332
+}
333
+
334
+/* ******************************** */
335
+
336
+
337
+.footerShade{
338
+  width: 100%;
339
+  position: fixed;
340
+  height:480rpx;
341
+  bottom: 0;
342
+  z-index: 1;
343
+}
344
+/* 底部记忆选择 */
345
+
346
+.footer{
347
+  width: 710rpx;
348
+  position: fixed;
349
+  bottom: 0;
350
+  z-index: 10;
351
+  border-top-left-radius: 20rpx;
352
+  border-top-right-radius: 20rpx;
353
+}
354
+
355
+.footerImage{
356
+  width:710rpx;
357
+  position: absolute;
358
+  bottom:0;
359
+  height:80rpx;
360
+  z-index: 10;
361
+}
362
+
363
+.panelFooter {
364
+  width: 710rpx;
365
+  margin-bottom: 20rpx;
366
+  background-color: #181a21;
367
+  border-radius: 20rpx;
368
+  color: #d2d2d2;
369
+  font-size: 48rpx;
370
+  text-align: center;
371
+  line-height: 140rpx;
372
+  z-index: 15;
373
+}
374
+
375
+.panelFooter0 {
376
+  line-height: 40rpx;
377
+}
378
+
379
+.panelBottomAnswer0 {
380
+  width: 100%;
381
+  height: 20rpx;
382
+  z-index: 10;
383
+}
384
+
385
+.panelBottomAnswer {
386
+  width: 100%;
387
+  font-size: 28rpx;
388
+  justify-content: space-between;
389
+  z-index: 10;
390
+  height: 140rpx;
391
+}
392
+
393
+.iphoneX {
394
+  width: 100%;
395
+  height: 60rpx;
396
+  z-index: 10;
397
+}
398
+
399
+.Answer {
400
+  font-size: 28rpx;
401
+  justify-content: flex-start;
402
+  height: 140rpx;
403
+  width:180rpx;
404
+}
405
+
406
+.AnswerLeft{
407
+  border-top-left-radius: 20rpx;
408
+  border-bottom-left-radius: 20rpx;
409
+  width:265rpx;
410
+}
411
+
412
+.AnswerRight{
413
+  border-top-right-radius: 20rpx;
414
+  border-bottom-right-radius: 20rpx;
415
+  width:265rpx;
416
+}
417
+
418
+.AnswerHover{
419
+  background-color: #262935;
420
+}
421
+
422
+.Answer .btnColor {
423
+  height: 14rpx;
424
+  width: 75%;
425
+  border-radius: 4rpx;
426
+  margin-top: 16rpx;
427
+}
428
+
429
+.Answer .btnTime {
430
+  margin-top: 34rpx;
431
+}
432
+
433
+.Answer .Answer0 {
434
+  background-color: #fe6659;
435
+}
436
+
437
+.Answer .Answer1 {
438
+  background-color: #ffbc00;
439
+}
440
+
441
+.Answer .Answer4 {
442
+  background-color: #787878;
443
+}
444
+
445
+.Answer .Answer1Recommend {
446
+  height: 50rpx;
447
+  border-bottom-left-radius: 0;
448
+  border-bottom-right-radius: 0;
449
+  margin-top: 16rpx;
450
+}
451
+
452
+.Answer .Answer2 {
453
+  background-color: #329468;
454
+}
455
+
456
+.Answer .Answer3 {
457
+  background-color: #0a60be;
458
+}
459
+
460
+.footer0 {
461
+  height: 180rpx;
462
+  width: 100%;
463
+  z-index: 1;
464
+}
465
+
466
+.universalpic_import_gray{
467
+  width:24rpx;
468
+  height:24rpx;
469
+}

+ 9 - 0
pages_test/knowledge/index.js

@@ -19,10 +19,19 @@ Page({
19 19
     that.setData({
20 20
       Containnerheight: main.getWindowHeight(),
21 21
     });
22
+    that.init();
22 23
   },
23 24
   onShow:function(){
24 25
     var that = this;
25 26
   },
27
+  init:function(){
28
+    var that = this;
29
+    main.getData('GetMiaoguoTestLibrary', function (data) {
30
+      if (data) {
31
+        app.globalData.TestGradeList=data;
32
+      }
33
+    });
34
+  },
26 35
   setMenu:function(e){
27 36
     var that=this;
28 37
     var index=e.currentTarget.dataset.index;

+ 2 - 2
pages_test/knowledge/index.wxml

@@ -7,8 +7,8 @@
7 7
     <text class="panel14">Practice makes perfect. </text>
8 8
     <text class="panel15">知识库</text>
9 9
     <view class="panel16 FlexRow">
10
-      <image src='../images/pic_01.png' class="pic_01" />
11
-      <image src='../images/pic_02.png' class="pic_02" />
10
+      <image src='../images/pic_01.png' class="pic_01" bind:tap="goto" data-url="./library?Category=CHN" />
11
+      <image src='../images/pic_02.png' class="pic_02" bind:tap="goto" data-url="./library?Category=ENG" />
12 12
     </view>
13 13
     <view class="panel17"></view>
14 14
     <view class="panel18"></view>

+ 1 - 0
pages_test/knowledge/index.wxss

@@ -414,4 +414,5 @@
414 414
   margin-top: 10rpx;
415 415
   color:#FFCF7E;
416 416
   font-size:24rpx;
417
+  font-weight: 400;
417 418
 }

+ 45 - 3
pages_test/knowledge/library.js

@@ -7,7 +7,7 @@ Page({
7 7
   data: {
8 8
     Menu1:0,
9 9
     Menu2:0,
10
-    Menu2Array:[{ID:0,Name:"全部",CSS:"Selected"},{ID:1,Name:"小学",CSS:""},{ID:2,Name:"初中",CSS:""},{ID:3,Name:"课外拓展",CSS:""}],
10
+    Menu2Array:[],
11 11
   },
12 12
   onPullDownRefresh: function () {
13 13
     wx.stopPullDownRefresh();
@@ -16,26 +16,68 @@ Page({
16 16
     var that = this;
17 17
     that.setData({
18 18
       Containnerheight: main.getWindowHeight(),
19
+      ImagePath: app.globalData.uploadImageUrl,
19 20
     });
21
+    that.init(options);
20 22
   },
21
-  onShow:function(){
22
-    var that = this;
23
+  init:function(options){
24
+    var that=this;
25
+    that.changeTab(options.Category);
26
+    that.setData({
27
+      List:app.globalData.TestGradeList[options.Category],
28
+      Menu2Array:that.data.Menu2Array,
29
+    });
30
+  },
31
+  changeTab:function(category){
32
+    var that=this;
33
+    var menu1=0;
34
+    if (category=="CHN")
35
+      that.data.Menu2Array=[{ID:0,Name:"全部",CSS:"Selected"},{ID:1,Name:"小学",CSS:""},{ID:2,Name:"初中",CSS:""},{ID:3,Name:"课外拓展",CSS:""}];
36
+    else{
37
+      that.data.Menu2Array=[{ID:0,Name:"全部",CSS:"Selected"},{ID:1,Name:"小学",CSS:""},{ID:2,Name:"初中",CSS:""},{ID:3,Name:"高中",CSS:""},{ID:4,Name:"大学",CSS:""}];
38
+      menu1=1;
39
+    }
40
+    that.setData({
41
+      List:app.globalData.TestGradeList[category],
42
+      Menu2Array:that.data.Menu2Array,
43
+      Menu1:menu1,
44
+    });
23 45
   },
24 46
   setMenu1:function(e){
25 47
     var that=this;
26 48
     var index=e.currentTarget.dataset.index;
49
+    if (index==0)
50
+      that.changeTab("CHN");
51
+    else
52
+      that.changeTab("ENG");
27 53
     that.setData({
28 54
       Menu1:index,
29 55
     });
30 56
   },
31 57
   setMenu2:function(e){
32 58
     var that=this;
59
+    that.setMenu1({currentTarget:{dataset:{index:that.data.Menu1}}});
60
+    
33 61
     var index=e.currentTarget.dataset.index;
34 62
     var list=that.data.Menu2Array;
35 63
     for(var i=0;i<list.length;i++){
36 64
       list[i].CSS="";
37 65
       if (index==list[i].ID){
38 66
         list[i].CSS="Selected";
67
+        if (index>0){
68
+          var menu=that.data.Menu2Array[index].Name;
69
+          console.log(menu);
70
+          var arr=[];
71
+          for(var j=0;j<that.data.List.length;j++){
72
+            if (that.data.List[j].Grade.indexOf(menu)>=0){
73
+              arr.push(that.data.List[j]);
74
+            }
75
+          }
76
+          that.setData({
77
+            List:arr,
78
+          });
79
+        }
80
+        break;
39 81
       }
40 82
     }
41 83
     that.setData({

+ 9 - 6
pages_test/knowledge/library.wxml

@@ -11,20 +11,23 @@
11 11
   </view>
12 12
 
13 13
   <view class="panel2 FlexColumn">
14
-    <view class="panel21 FlexRow">
14
+    <scroll-view scroll-x class="panel21 FlexRow">
15
+      <view class="Tab0"></view>
15 16
       <view class="panel211 panel211{{item.ID}} panel211{{item.CSS}}" wx:for="{{Menu2Array}}" wx:key="*this" bind:tap="setMenu2" data-index="{{item.ID}}">{{item.Name}}</view>
16
-    </view>
17
+    </scroll-view>
17 18
     <view class="panel22 FlexRow">
18
-      <view class="panel221 FlexColumn" wx:for="{{[0,1,2,3,4,5,6]}}">
19
+      <view class="panel221 FlexColumn" wx:for="{{List}}" wx:key="*this" bind:tap="goto" data-url="./package?Category1={{Menu1}}&Category2={{item.Category2}}&Category3={{item.Category3}}&LibraryID={{item.ID}}&BookImageName={{item.BookImageName}}&LibraryName={{item.Category2}}{{item.Category3}}">
19 20
         <view class="panel2211">
21
+          <image class="panel2211Logo" src='{{ImagePath}}web/_knowledge/{{item.BookImageName}}_b.png' />
20 22
         </view>
21
-        <view class="panel2212">一年级</view>
22
-        <view class="panel2213">上学期</view>
23
+        <view class="panel2212">{{item.Category2}}</view>
24
+        <view class="panel2213">{{item.Category3}}</view>
23 25
         <view class="panel2214 FlexRow">
24 26
           <view>知识包</view>
25
-          <view class="panel22141">7</view>
27
+          <view class="panel22141">{{item.Num}}</view>
26 28
         </view>
27 29
       </view>
28 30
     </view>
29 31
   </view>
32
+  <view style="height:150rpx;"></view>
30 33
 </view>

+ 20 - 1
pages_test/knowledge/library.wxss

@@ -42,7 +42,14 @@
42 42
 
43 43
 .panel21{
44 44
   margin: 40rpx 0 60rpx 0;
45
-  justify-content: center;
45
+  display: flex;
46
+  white-space: nowrap;
47
+}
48
+
49
+.Tab0 {
50
+  width: 30rpx;
51
+  height: 10rpx;
52
+  display: inline-block;
46 53
 }
47 54
 
48 55
 .panel211{
@@ -54,6 +61,7 @@
54 61
   margin: 0 10rpx;
55 62
   line-height: 60rpx;
56 63
   text-align: center;
64
+  display: inline-block;
57 65
 }
58 66
 
59 67
 .panel2110{
@@ -71,6 +79,7 @@
71 79
   width:700rpx;
72 80
 }
73 81
 .panel221{
82
+  position: relative;
74 83
   width: 320rpx;
75 84
   height:353rpx;
76 85
   margin: 0 15rpx 60rpx 15rpx;
@@ -87,6 +96,15 @@
87 96
   background-color: #f2f2f2;
88 97
   margin-top: 10rpx;
89 98
 }
99
+
100
+.panel2211Logo{
101
+  width: 320rpx;
102
+  height:120rpx;
103
+  position: absolute;
104
+  top:0rpx;
105
+  left:0;
106
+}
107
+
90 108
 .panel2212{
91 109
   font-size: 36rpx;
92 110
   color: #2E2E2E;
@@ -95,6 +113,7 @@
95 113
 }
96 114
 .panel2213{
97 115
   font-size: 36rpx;
116
+  height:50rpx;
98 117
   font-weight: 400;
99 118
   color: #2E2E2E;
100 119
   align-self: start;

+ 21 - 1
pages_test/knowledge/package.js

@@ -5,18 +5,38 @@ const app = getApp();
5 5
 
6 6
 Page({
7 7
   data: {
8
+    List:[],
8 9
   },
9 10
   onPullDownRefresh: function () {
10 11
     wx.stopPullDownRefresh();
11 12
   },
12 13
   onLoad: function (options) {
13 14
     var that = this;
15
+    var Category1="语文";
16
+    if (options.Category1==1)
17
+      Category1="English";
14 18
     that.setData({
15 19
       Containnerheight: main.getWindowHeight(),
20
+      Category1:Category1,
21
+      Category2:options.Category2,
22
+      Category3:options.Category3,
23
+      LibraryID:options.LibraryID,
24
+      LibraryName:options.LibraryName,
25
+      BookImageName:options.BookImageName,
26
+      ImagePath: app.globalData.uploadImageUrl,
16 27
     });
28
+
29
+    that.init(options);
17 30
   },
18
-  onShow:function(){
31
+  init:function(options){
19 32
     var that = this;
33
+    main.getData('GetMiaoguoTestPackage?Category1='+that.data.Category1+'&Category2='+options.Category2+'&Category3='+options.Category3+'&UserID='+app.globalData.userInfo.UserID, function (data) {
34
+      if (data) {
35
+        that.setData({
36
+          List:data,
37
+        });
38
+      }
39
+    });
20 40
   },
21 41
   goto: function (e) {
22 42
     var url = e.currentTarget.dataset.url;

+ 17 - 15
pages_test/knowledge/package.wxml

@@ -1,34 +1,36 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2 2
   <view class="panel1 FlexColumn">
3
-    <view class="panel11">语文</view>
4
-    <view class="panel12">一年级</view>
5
-    <view class="panel12">上学期</view>
3
+    <view class="panel11">{{Category1}}</view>
4
+    <view class="panel12">{{Category2}}</view>
5
+    <view class="panel12">{{Category3}}</view>
6 6
     <view class="panel13"></view>
7 7
     <view class="panel14"></view>
8
+    <image class="panel1Logo" src='{{ImagePath}}web/_knowledge/{{BookImageName}}_a.png' />
8 9
   </view>
9 10
 
10 11
   <view class="panel2 FlexColumn">
11
-    <view class="panel21 FlexColumn" wx:for="{{[1,2,3,4]}}">
12
+    <view class="panel21 FlexColumn" wx:for="{{List}}" wx:key="*this" bind:tap="goto" data-url="./unit?Category1={{Category1}}&Category2={{Category2}}&Category3={{Category3}}&Name1={{item.Name1}}&WordType={{item.WordType}}&LibraryID={{LibraryID}}&BookID={{item.ID}}&WordNum={{item.WordNum}}&LibraryName={{LibraryName}}&BookName={{item.Name1}}&KnowledegImageName={{item.KnowledegImageName}}">
13
+      <image class="panel211Logo" src='{{ImagePath}}web/_knowledge/{{item.KnowledegImageName}}_a.png' />
12 14
       <view class="panel211 FlexColumn">
13
-        <text class="panel2111">Personal Feelings, Opinions and Experiences (adjectives) </text>
15
+        <text class="panel2111">{{item.Name1}}</text>
14 16
         <view class="panel2112 FlexRow">
15
-          <view>汉字</view>
16
-          <view class="panel21121">225</view>
17
+          <view>{{item.WordType}}</view>
18
+          <view class="panel21121">{{item.WordNum}}</view>
17 19
         </view>
18 20
       </view>      
19
-      <view class="panel212 FlexColumn">
20
-        <view class="panel2121">与识字表的课号对应,主要帮助学生认识汉字,包括了解每个汉字的基本信息,如读音、笔画顺序、部首等,确保学生能够逐步积累汉字量,为后续提高阅读水平打下基础。</view>
21
+      <view class="panel212 FlexColumn" wx:if="{{item.Remark}}">
22
+        <view class="panel2121">{{item.Remark}}</view>
21 23
       </view>
22
-      <view class="panel213 FlexRow">
24
+      <view class="panel213 FlexRow" wx:for="{{item.ShowRate}}" wx:key="*this" wx:for-item="itemChild">
23 25
         <view class="panel2131 FlexRow">
24
-          <view class="panel21311" style="width:30%;"></view>
26
+          <view class="panel21311" style="width:{{itemChild.C}}%;"></view>
25 27
         </view>
26 28
         <view class="panel2132 FlexRow">
27
-          <image src="../images/sysIcon_d01.png" class="sysIcon_d01"></image>
28
-          <view class="panel21321">45%</view>
29
+          <image src="../images/sysIcon_d0{{itemChild.ID}}.png" class="sysIcon_d01"></image>
30
+          <view class="panel21321">{{itemChild.C}}%</view>
29 31
         </view>
30 32
       </view>
31
-      <view class="panel213 FlexRow">
33
+      <!-- <view class="panel213 FlexRow">
32 34
         <view class="panel2131 FlexRow">
33 35
           <view class="panel21311" style="width:100%;"></view>
34 36
         </view>
@@ -36,7 +38,7 @@
36 38
           <image src="../images/sysIcon_d02.png" class="sysIcon_d01"></image>
37 39
           <view class="panel21321">100%</view>
38 40
         </view>
39
-      </view>
41
+      </view> -->
40 42
       <view style="height:40rpx;"></view>
41 43
     </view>
42 44
   </view>

+ 20 - 0
pages_test/knowledge/package.wxss

@@ -8,6 +8,7 @@
8 8
   background-color: #fff;
9 9
   color: #2E2E2E;
10 10
   align-items: flex-start;
11
+  position: relative;
11 12
 }
12 13
 
13 14
 .panel11 {
@@ -15,11 +16,14 @@
15 16
   font-size: 28rpx;
16 17
   color: #2E2E2E;
17 18
   font-weight: 400;
19
+  z-index: 10;
18 20
 }
19 21
 .panel12 {
20 22
   margin: 0 0 0 50rpx;
21 23
   font-size: 36rpx;
22 24
   color: #1F2C3B;
25
+  z-index: 10;
26
+  height:50rpx;
23 27
 }
24 28
 
25 29
 .panel13 {
@@ -33,6 +37,13 @@
33 37
   height:90rpx;
34 38
   background-image: linear-gradient(180deg, #63615F 0%, #989692 100%);
35 39
 }
40
+.panel1Logo{
41
+  width:750rpx;
42
+  height:460rpx;
43
+  position: absolute;
44
+  bottom:0;
45
+  z-index: 5;
46
+}
36 47
 
37 48
 .panel2{
38 49
   width:100%;
@@ -45,6 +56,7 @@
45 56
   width: 670rpx;
46 57
   margin-top: 60rpx;
47 58
   justify-content: flex-start;
59
+  position: relative;
48 60
 }
49 61
 
50 62
 .panel211{
@@ -71,6 +83,14 @@
71 83
   margin: 8rpx 0 0 10rpx;
72 84
 }
73 85
 
86
+.panel211Logo{
87
+  width:200rpx;
88
+  height:190rpx;
89
+  position: absolute;
90
+  right:0;
91
+  top:0;
92
+}
93
+
74 94
 .panel212{
75 95
   width:550rpx;
76 96
   font-size: 24rpx;

+ 155 - 0
pages_test/knowledge/report.js

@@ -0,0 +1,155 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    Count:0,
9
+    TestTypeNumber:1,
10
+    MenuList:[{Name:"不分配(默认)",IsSelected:0},{Name:"分配到新卡单",IsSelected:1},{Name:"选择卡单",IsSelected:0,HasArrow:1}],
11
+    List:[
12
+      {Name:"答错的",List:[],BColor:"#F26D5F"},
13
+      {Name:"不会的",List:[],BColor:"#787878"},
14
+      {Name:"答对的",List:[],BColor:"#51BE3D"}
15
+    ]
16
+  },
17
+  onLoad: function (options) {
18
+    var that = this;
19
+    var testtask=app.globalData.TestTask;
20
+    that.setData({
21
+      ReportType: options.type,
22
+      LibraryName:testtask.LibraryName,
23
+      BookName:testtask.BookName,
24
+      UnitName:testtask.UnitName,
25
+      TestTypeName:testtask.TestTypeName,
26
+      TestTime:common.formatDateCHS(common.formatTime(new Date()),1),
27
+      Containnerheight: main.getWindowHeight(),
28
+      ImagePath: app.globalData.uploadImageUrl,
29
+    });
30
+    that.init();
31
+  },
32
+  init: function () {
33
+    var that = this;
34
+    var TestTask = app.globalData.TestTask;
35
+    if (!TestTask)
36
+      TestTask={};
37
+
38
+    var TestTypeNumber=1;
39
+    if (TestTask.TestType=="read")
40
+      TestTypeNumber=2;
41
+      
42
+    var list = TestTask.List;
43
+    //debugger;
44
+    if (list) {
45
+      for (var i = 0; i < list.length; i++) {
46
+        var item={};
47
+        item.IsSelected=0;
48
+        item.Word=list[i].Word; 
49
+        if (list[i].Result == -1) {
50
+          that.data.List[0].List.push(item);
51
+        } else if (list[i].Result == 0) {
52
+          that.data.List[1].List.push(item);
53
+        } else if (list[i].Result == 1) {
54
+          that.data.List[2].List.push(item);
55
+        }
56
+      }
57
+      that.setData({
58
+        List:that.data.List,
59
+        TestTypeNumber:TestTypeNumber,
60
+      });
61
+
62
+      if (that.data.ReportType == "new")
63
+        that.saveInfo(TestTask);
64
+    }
65
+
66
+  },
67
+  saveInfo:function(e){
68
+    var that=this;
69
+    var userid=app.globalData.userInfo.UserID;
70
+    var param1={};
71
+    param1.Category=e.Category;
72
+    param1.LibraryName=that.data.LibraryName;
73
+    param1.BookName=that.data.BookName;
74
+    param1.UnitName=that.data.UnitName;
75
+    param1.TestTypeName=that.data.TestTypeName;
76
+    if (e.TestType=="read")
77
+      param1.IsTestRead=1;
78
+    else
79
+      param1.IsTestWrite=1;
80
+    //debugger;
81
+    param1.JSONData=JSON.stringify(that.data.List);
82
+    main.postData('InsertTestReport2?UserID=' + userid, param1, function (data) {
83
+      if (data){
84
+        
85
+      }
86
+    });
87
+  },
88
+  selectItem:function(e){
89
+    var that=this;
90
+    var index=e.currentTarget.dataset.index;
91
+    var index2=e.currentTarget.dataset.index2;
92
+    var list=that.data.List,count=0;
93
+    for(var i=0;i<list.length;i++){
94
+      if (index==i){
95
+        for(var j=0;j<list[i].List.length;j++){
96
+          if (index2==j){
97
+            list[i].List[j].IsSelected=!list[i].List[j].IsSelected?1:0;
98
+          }
99
+          else if (index2=="all"){
100
+            list[i].List[j].IsSelected=1;
101
+          }
102
+          else if (index2=="none"){
103
+            list[i].List[j].IsSelected=0;
104
+          }
105
+        }
106
+      }
107
+      for(var j=0;j<list[i].List.length;j++){
108
+        if (list[i].List[j].IsSelected==1)
109
+          count++;
110
+      }
111
+    }
112
+    that.setData({
113
+      List:that.data.List,
114
+      Count:count,
115
+    });
116
+  },
117
+  setMenu:function(e){
118
+    var that=this;
119
+    var index=e.currentTarget.dataset.index;
120
+    that.setData({
121
+      Menu:index,
122
+    });
123
+  },
124
+  setMenu2:function(e){
125
+    var that=this;
126
+    var index=e.currentTarget.dataset.index;
127
+    var list=that.data.MenuList,count=0;
128
+    for(var i=0;i<list.length;i++){
129
+      list[i].IsSelected=0;
130
+      if (index==i)
131
+        list[i].IsSelected=1;
132
+    }
133
+    that.setData({
134
+      MenuList:that.data.MenuList,
135
+    });
136
+  },
137
+  buildCard:function(e){
138
+    var url = e.currentTarget.dataset.url;
139
+    wx.navigateTo({
140
+      url: url,
141
+    });
142
+  },
143
+  closePanel:function(){
144
+    wx.navigateBack({
145
+      delta: 1,
146
+    });
147
+  },
148
+  onShareAppMessage: function () {
149
+    return {
150
+      title: app.globalData.ShareTitle,
151
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
152
+      imageUrl: app.globalData.ShareImage,
153
+    }
154
+  },
155
+})

+ 6 - 0
pages_test/knowledge/report.json

@@ -0,0 +1,6 @@
1
+{
2
+  "navigationBarBackgroundColor": "#E3E3E3",
3
+  "navigationBarTitleText": "检验报告",
4
+  "backgroundColorBottom": "#E3E3E3",
5
+  "backgroundColor": "#E3E3E3"
6
+}

+ 87 - 0
pages_test/knowledge/report.wxml

@@ -0,0 +1,87 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panel1 FlexColumn">
3
+    <view class="panel11">{{LibraryName}}</view>
4
+    <view class="panel12">{{BookName}}</view>
5
+    <view class="panel13">{{UnitName}}</view>
6
+    <view class="panel14">{{TestTypeName}}</view>
7
+    <view class="panel15">{{TestTime}}</view>
8
+    <view class="panelLine1"></view>
9
+    <view class="panel16">从以下检验结果中选择需要练习的知识点生成题卡,生成后即可前往首页开展日常练习。</view>
10
+    <image src="../images/sysIcon_e0{{TestTypeNumber}}.png" class="sysIcon_e01"></image>
11
+  </view>
12
+
13
+  <view class="panel2 FlexColumn" wx:for="{{List}}" wx:key="*this">
14
+    <view class="panel21" style="background-color:{{item.BColor}};"></view>
15
+    <view class="panel22 FlexColumn">
16
+      <view class="panel221 FlexRow">
17
+        <view class="panel2211 FlexRow">
18
+          <view>{{item.Name}}</view>
19
+          <view class="panel22111">{{item.List.length}}</view>
20
+        </view>
21
+        <view class="panel2212 FlexRow">
22
+          <view class="panel22121" bind:tap="selectItem" data-index="{{index}}" data-index2="all">全选本组</view>
23
+          <view class="panel22121" bind:tap="selectItem" data-index="{{index}}" data-index2="none">取消组选</view>
24
+        </view>
25
+      </view>
26
+      <view class="panel222 FlexColumn" wx:for="{{item.List}}" wx:key="*this" wx:for-item="itemChild" wx:for-index="indexChild" bind:tap="selectItem" data-index="{{index}}" data-index2="{{indexChild}}">
27
+        <view class="panel2221 FlexRow">
28
+          <view wx:if="{{!itemChild.IsSelected}}" class="panel22211"></view>
29
+          <view wx:if="{{itemChild.IsSelected}}" class="panel22211 panel22210 FlexRow">
30
+            <image src="../images/sysIcon_b07.png" class="sysIcon_b07"></image>
31
+          </view>
32
+          <text class="panel22212 panel22212{{itemChild.IsSelected}}">{{itemChild.Word}}</text>
33
+        </view>
34
+        <view class="panelLine2"></view>
35
+      </view>
36
+    </view>
37
+  </view>
38
+  <text class="panel3">
39
+    <text class="panel31">提醒:</text><text>已生成题卡的知识点不会重复生成题卡,遇您要求再次生成时会将生成过的老题卡变更为新题卡从新开始练习。</text>
40
+  </text>
41
+  <view style="height:260rpx;"></view>
42
+
43
+  <view class="panelFooter FlexRow">
44
+    <view class="panelFooter1 FlexColumn" bind:tap="setMenu" data-index="1">
45
+      <view class="panelFooter10 FlexColumn">
46
+        <view class="panelFooter11">{{Count}}</view>
47
+        <view class="panelFooter12">生成题卡</view>
48
+      </view>
49
+    </view>
50
+    <view class="panelFooter2 FlexColumn" bind:tap="closePanel">
51
+      <view class="panelFooter20 FlexColumn">
52
+        <image src="../images/sysIcon_b05.png" class="sysIcon_b05"></image>
53
+        <view class="panelFooter12 panelFooter120">关闭</view>
54
+      </view>
55
+    </view>
56
+  </view>
57
+</view>
58
+
59
+<!--分配卡单 -->
60
+<view wx:if="{{Menu==1}}" class="menuContainer container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
61
+  <view class="panelMenu FlexColumn">
62
+    <view class="panelMenu1 FlexRow">
63
+      <view class="panelMenu11">分配到卡单吗?</view>
64
+      <view class="panelMenu12 FlexRow" bind:tap="setMenu" data-index="0">
65
+        <image src="../images/sysIcon_b03.png" class="sysIcon_b03"></image>
66
+      </view>
67
+    </view>
68
+    <view class="panelMenu2">
69
+      卡单就是文件夹,方便日后处理
70
+    </view>
71
+    <view class="panelMenu3 FlexColumn" wx:for="{{MenuList}}" wx:key="*this" bind:tap="setMenu2" data-index="{{index}}">
72
+      <view class="panelMenu31 FlexRow">
73
+        <image src="../images/sysIcon_b04.png" class="sysIcon_b04" wx:if="{{item.IsSelected}}"></image>
74
+        <view class="sysIcon_b04" wx:if="{{!item.IsSelected}}"></view>
75
+        <view class="panelMenu311 FlexRow">
76
+          <view class="panelMenu3111 panelMenu3111{{item.IsSelected}}">{{item.Name}}</view>
77
+          <image src="../images/sysIcon_a01.png" class="sysIcon_a01" wx:if="{{item.HasArrow}}"></image>
78
+        </view>
79
+      </view>
80
+      <view class="panelLine3"></view>
81
+    </view>
82
+    <view class="panelMenu4 FlexRow" bind:tap="buildCard" data-url="./build">生成题卡</view>
83
+  </view>
84
+</view>
85
+
86
+
87
+

+ 341 - 0
pages_test/knowledge/report.wxss

@@ -0,0 +1,341 @@
1
+.container {
2
+  background-color: #E3E3E3;
3
+  font-weight: 600;
4
+}
5
+
6
+.panel1 {
7
+  width: 630rpx;
8
+  margin: 40rpx 0 0 0;
9
+  align-items: flex-start;
10
+  position: relative;
11
+}
12
+
13
+.panel11 {
14
+  font-size: 24rpx;
15
+  color: #787878;
16
+}
17
+
18
+.panel12 {
19
+  font-size: 24rpx;
20
+  color: #787878;
21
+  margin-top: 7rpx;
22
+}
23
+
24
+.panel13 {
25
+  font-size: 48rpx;
26
+  color: #2E2E2E;
27
+  margin-top: 20rpx;
28
+}
29
+
30
+.panel14 {
31
+  margin-top: 30rpx;
32
+  font-size: 28rpx;
33
+  color: #2E2E2E;
34
+}
35
+
36
+.panel15 {
37
+  font-size: 28rpx;
38
+  color: #4d4d4d;
39
+  font-weight: 400;
40
+}
41
+
42
+.panel16 {
43
+  margin-top: 60rpx;
44
+  font-size: 24rpx;
45
+  color: #1E1E1E;
46
+  font-weight: 400;
47
+}
48
+
49
+.sysIcon_e01 {
50
+  width: 220rpx;
51
+  height: 220rpx;
52
+  position: absolute;
53
+  right: 0;
54
+  top: 70rpx;
55
+}
56
+
57
+.panelLine1 {
58
+  width: 100%;
59
+  height: 1rpx;
60
+  background-color: #BCBCBC;
61
+  margin-top: 30rpx;
62
+}
63
+
64
+.panel2 {
65
+  width: 690rpx;
66
+  margin-top: 60rpx;
67
+  background-color: #fff;
68
+  border-radius: 0 0 20rpx 20rpx;
69
+}
70
+
71
+.panel21 {
72
+  width: 100%;
73
+  height: 10rpx;
74
+}
75
+
76
+.panel22 {
77
+  width: 100%;
78
+}
79
+
80
+.panel221 {
81
+  width: 100%;
82
+  height: 120rpx;
83
+  justify-content: space-between;
84
+}
85
+
86
+.panel2211 {
87
+  margin-left: 30rpx;
88
+}
89
+
90
+.panel22111 {
91
+  font-family: Teko-SemiBold;
92
+  font-size: 48rpx;
93
+  color: #2E2E2E;
94
+  margin: 8rpx 0 0 10rpx;
95
+}
96
+
97
+.panel2212 {
98
+  margin-right: 30rpx;
99
+}
100
+
101
+.panel22121 {
102
+  background: #F8F8F8;
103
+  border: 3rpx solid #4D4D4D;
104
+  border-radius: 10rpx;
105
+  font-size: 24rpx;
106
+  color: #4D4D4D;
107
+  width: 136rpx;
108
+  line-height: 50rpx;
109
+  text-align: center;
110
+  margin-left: 20rpx;
111
+}
112
+
113
+.sysIcon_c06 {
114
+  width: 20rpx;
115
+  height: 20rpx;
116
+  margin: 0 30rpx;
117
+}
118
+
119
+.panel222 {
120
+  width: 100%;
121
+  justify-content: flex-end;
122
+  align-items: flex-end;
123
+  margin-bottom: 40rpx;
124
+  border-radius: 0 0 20rpx 20rpx;
125
+}
126
+
127
+.panelLine2 {
128
+  width: 580rpx;
129
+  height: 1rpx;
130
+  background-color: #e3e3e3;
131
+}
132
+
133
+.panel2221 {
134
+  justify-content: space-between;
135
+  width: 100%;
136
+}
137
+
138
+.panel22211 {
139
+  width: 40rpx;
140
+  height: 40rpx;
141
+  background-color: #f8f8f8;
142
+  border-radius: 50%;
143
+  margin: 0 30rpx 0 40rpx;
144
+  border: 3rpx solid #D2D2D2;
145
+}
146
+
147
+.panel22210 {
148
+  background-color: #FF8451;
149
+}
150
+
151
+.sysIcon_b07 {
152
+  width: 20rpx;
153
+  height: 20rpx;
154
+}
155
+
156
+.panel22212 {
157
+  margin: 30rpx 0;
158
+  font-weight: 400;
159
+  font-size: 28rpx;
160
+  color: #2E2E2E;
161
+  width: 580rpx;
162
+}
163
+
164
+.panel222121 {
165
+  font-weight: 600;
166
+}
167
+
168
+.panel3 {
169
+  width: 630rpx;
170
+  margin-top: 60rpx;
171
+  font-size: 24rpx;
172
+  color: #4D4D4D;
173
+  font-weight: 400;
174
+}
175
+
176
+.panel31 {
177
+  font-weight: 600;
178
+}
179
+
180
+.panelFooter {
181
+  background: #E3E3E3;
182
+  width: 100%;
183
+  position: fixed;
184
+  bottom: 0;
185
+  height: 260rpx;
186
+  color: #F2F2F2;
187
+  font-size: 24rpx;
188
+}
189
+
190
+.panelFooter1 {
191
+  width: 570rpx;
192
+  height: 140rpx;
193
+  background: #1E1E1E;
194
+  border-radius: 10rpx 0 0 60rpx;
195
+  box-shadow: 0 30rpx 0 0 #0C0C0C, 0 50rpx 0 0 rgba(0, 0, 0, 0.60);
196
+}
197
+
198
+.panelFooter10 {
199
+  width: 560rpx;
200
+  height: 120rpx;
201
+  background: rgba(255, 255, 255, 0.08);
202
+  border-radius: 5rpx 10rpx 10rpx 50rpx;
203
+}
204
+
205
+.panelFooter2 {
206
+  width: 160rpx;
207
+  height: 140rpx;
208
+  background: #1E1E1E;
209
+  border-radius: 0 10rpx 60rpx 0;
210
+  box-shadow: 0 30rpx 0 0 #0C0C0C, 0 50rpx 0 0 rgba(0, 0, 0, 0.60);
211
+}
212
+
213
+.panelFooter20 {
214
+  width: 140rpx;
215
+  height: 120rpx;
216
+  background: rgba(255, 255, 255, 0.08);
217
+  border-radius: 10rpx 5rpx 50rpx 10rpx;
218
+}
219
+
220
+.panelFooter11 {
221
+  font-family: Teko-SemiBold;
222
+  font-size: 36rpx;
223
+  text-align: center;
224
+}
225
+
226
+.sysIcon_b05 {
227
+  width: 20rpx;
228
+  height: 20rpx;
229
+}
230
+
231
+.panelFooter120 {
232
+  margin-top: 17rpx;
233
+}
234
+
235
+.menuContainer {
236
+  width: 100%;
237
+  position: fixed;
238
+  top: 0;
239
+  background: rgba(0, 0, 0, 0.50);
240
+  z-index: 10;
241
+  justify-content: flex-start;
242
+}
243
+
244
+.panelMenu {
245
+  position: fixed;
246
+  bottom: 70rpx;
247
+  width: 690rpx;
248
+  min-height: 726rpx;
249
+  border-radius: 60rpx;
250
+  justify-content: flex-start;
251
+  background: #FFFFFF;
252
+  box-shadow: 0 20rpx 0 0 #9B9B9B, 0 50rpx 0 0 rgba(0, 0, 0, 0.50);
253
+}
254
+
255
+.panelMenu1 {
256
+  width: 100%;
257
+  margin-top: 40rpx;
258
+  align-items: flex-start;
259
+  justify-content: space-between;
260
+}
261
+
262
+.panelMenu11 {
263
+  font-size: 36rpx;
264
+  color: #2E2E2E;
265
+  width: 580rpx;
266
+  margin-left: 60rpx;
267
+}
268
+
269
+.panelMenu12 {
270
+  width: 60rpx;
271
+  height: 60rpx;
272
+  margin-right: 40rpx;
273
+  border-radius: 50%;
274
+  background-color: #f0f0f0;
275
+}
276
+
277
+.sysIcon_b03 {
278
+  width: 20rpx;
279
+  height: 20rpx;
280
+}
281
+
282
+.panelMenu2 {
283
+  font-size: 24rpx;
284
+  color: #787878;
285
+  margin: 70rpx 0 20rpx 60rpx;
286
+  align-self: start;
287
+}
288
+
289
+.panelMenu3 {
290
+  width: 100%;
291
+  align-items: flex-start;
292
+}
293
+
294
+.panelMenu31 {
295
+  width: 100%;
296
+  height: 100rpx;
297
+  justify-content: flex-start;
298
+}
299
+
300
+.sysIcon_b04 {
301
+  width: 40rpx;
302
+  height: 34rpx;
303
+  margin: 0 30rpx 0 70rpx;
304
+}
305
+
306
+.panelMenu311 {
307
+  font-weight: 400;
308
+  font-size: 28rpx;
309
+  color: #2E2E2E;
310
+  justify-content: flex-start;
311
+}
312
+
313
+.panelMenu3111 {
314
+  width: 444rpx;
315
+}
316
+
317
+.panelMenu31111 {
318
+  font-weight: 600;
319
+}
320
+
321
+.sysIcon_a01 {
322
+  width: 16rpx;
323
+  height: 26rpx;
324
+}
325
+
326
+.panelLine3 {
327
+  width: 490rpx;
328
+  height: 1rpx;
329
+  background-color: #e3e3e3;
330
+  margin-left: 140rpx;
331
+}
332
+
333
+.panelMenu4 {
334
+  width: 590rpx;
335
+  height: 90rpx;
336
+  background-color: #f0f0f0;
337
+  border-radius: 20rpx;
338
+  margin-top: 60rpx;
339
+  font-size: 36rpx;
340
+  font-weight: 600;
341
+}

+ 96 - 6
pages_test/knowledge/unit.js

@@ -6,26 +6,116 @@ const app = getApp();
6 6
 Page({
7 7
   data: {
8 8
     Menu:0,
9
-  },
10
-  onPullDownRefresh: function () {
11
-    wx.stopPullDownRefresh();
9
+    TestArr:[],
10
+    TestItemArr:[{
11
+      ID:1,
12
+      Icon:"sysIcon_d01",
13
+      Time:"2024年9月19日 20:21",
14
+      Right:10,
15
+      Wrong:3,
16
+    }, {
17
+      ID:2,
18
+      Icon:"sysIcon_d02",
19
+      Time:"未检验",
20
+      Right:0,
21
+      Wrong:0,
22
+    }],
12 23
   },
13 24
   onLoad: function (options) {
14 25
     var that = this;
15 26
     that.setData({
16 27
       Containnerheight: main.getWindowHeight(),
28
+      ImagePath: app.globalData.uploadImageUrl,
29
+      Category1:options.Category1,
30
+      Category2:options.Category2,
31
+      Category3:options.Category3,
32
+      Name1:options.Name1,
33
+      WordType:options.WordType,
34
+      WordNum:options.WordNum,
35
+      BookID:options.BookID,
36
+      LibraryID:options.LibraryID,
37
+      LibraryName:options.LibraryName,
38
+      BookName:options.BookName,
39
+      KnowledegImageName:options.KnowledegImageName,
17 40
     });
41
+    that.init(options);
18 42
   },
19
-  onShow:function(){
43
+  init:function(options){
20 44
     var that = this;
45
+    main.getData('GetMiaoguoTestUnit?Category1='+options.Category1+'&Name1='+options.Name1+'&BookID='+options.BookID+'&UserID='+app.globalData.userInfo.UserID, function (data) {
46
+      if (data) {
47
+        var readNum=0,writeNum=0,readRate=0,writeRate=0;
48
+        var list1=data.List1;
49
+        for(var i=0;i<list1.length;i++){
50
+          if (list1[i].IsTestRead || list1[i].IsBuildRead)
51
+            readNum++;
52
+          if (list1[i].IsTestWrite || list1[i].IsBuildWrite)
53
+            writeNum++;
54
+            
55
+          if (!list1[i].List)
56
+          list1[i].List=list1[i].ListStr.split("、");
57
+        }
58
+        that.setData({
59
+          List:list1,
60
+          TestArr:data.List2,
61
+          ReadNum:readNum,
62
+          ReadRate:Math.round(100*readNum/list1.length),
63
+          WriteNum:writeNum,
64
+          WriteRate:Math.round(100*writeNum/list1.length),
65
+        });
66
+      }
67
+    });
68
+
69
+    if (options.Name1=="写字" || options.Name1=="识字" || options.Name1=="词语"){
70
+      var date=new Date();
71
+      var today=common.formatDateCHS(common.formatTime(date,"-",true));
72
+      var date0=(date.getFullYear()-1).toString()+"年09月";
73
+      var date1=date.getFullYear()+"年03月";
74
+      var date2=date.getFullYear()+"年09月";
75
+      var updateTime=date0;
76
+      if (today>=date1)
77
+        updateTime=date1;
78
+      if (today>=date2)
79
+        updateTime=date2;
80
+      that.setData({
81
+        UpdateTime:updateTime,
82
+      });
83
+    }
21 84
   },
22 85
   setMenu:function(e){
23 86
     var that=this;
24
-    var index=e.currentTarget.dataset.index;
87
+    var menu=e.currentTarget.dataset.menu;
25 88
     that.setData({
26
-      Menu:index,
89
+      Menu:menu,
27 90
     });
28 91
   },
92
+  setMenu2:function(e){
93
+    var that=this;
94
+    var menu=e.currentTarget.dataset.menu;
95
+    var index=e.currentTarget.dataset.index;
96
+    var item=that.data.List[index];
97
+
98
+    if (item && (!item.List || item.ListStr=="")){
99
+      main.getData('GetMiaoguoTestExamine?UserID='+app.globalData.userInfo.UserID+'&Category1='+that.data.Category1+'&BookID='+that.data.BookID+'&Name='+that.data.Name2+'&UnitID='+item.ID+'&TestType=read', function (data) {
100
+        if (data) {
101
+          item.List=[];
102
+          for(var i=0;i<data.length;i++){
103
+            item.List.push(data[i].Word);
104
+          }
105
+          that.setData({
106
+            Menu2:menu,
107
+            SelectedItem:item,
108
+          });
109
+        }
110
+      });
111
+    }
112
+    else{
113
+      that.setData({
114
+        Menu2:menu,
115
+        SelectedItem:item,
116
+      });
117
+    }
118
+  },
29 119
   goto: function (e) {
30 120
     var url = e.currentTarget.dataset.url;
31 121
     wx.navigateTo({

+ 1 - 0
pages_test/knowledge/unit.json

@@ -1,5 +1,6 @@
1 1
 {
2 2
   "navigationBarBackgroundColor": "#fff",
3 3
   "navigationBarTitleText": "单元",
4
+  "backgroundColorBottom": "#e3e3e3",
4 5
   "backgroundColor": "#fff"
5 6
 }

+ 194 - 38
pages_test/knowledge/unit.wxml

@@ -1,9 +1,11 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2 2
   <view class="panel1 FlexColumn">
3 3
     <view class="panel11 FlexColumn">
4
-      <view class="panel111">一年级上学期</view>
5
-      <view class="panel112">词语</view>
4
+      <view class="panel111">{{Category2}}{{Category3}}</view>
5
+      <view class="panel112">{{Name1}}</view>
6 6
       <view class="panel113"></view>
7
+      <image class="panel1Logo" src='{{ImagePath}}web/_knowledge/{{KnowledegImageName}}_b.png' />
8
+    
7 9
     </view>
8 10
     <view class="panel12 FlexColumn">
9 11
       <view class="panel121 FlexRow">
@@ -12,16 +14,16 @@
12 14
           <view class="panel12112">内容</view>
13 15
         </view>
14 16
         <view class="panel1212 FlexRow">
15
-          30个单元 | 128个汉字
17
+          {{List.length}}个单元 | {{WordNum}}个{{WordType}}
16 18
         </view>
17 19
       </view>
18
-      <view class="panel121 FlexRow">
20
+      <view class="panel121 FlexRow" wx:if="{{UpdateTime}}">
19 21
         <view class="panel1211 FlexRow">
20 22
           <view class="panel12111"></view>
21 23
           <view class="panel12112">更新</view>
22 24
         </view>
23 25
         <view class="panel1212 FlexRow">
24
-          2024年9月
26
+          {{UpdateTime}}
25 27
         </view>
26 28
       </view>
27 29
     </view>
@@ -29,78 +31,232 @@
29 31
     <view class="panel13">
30 32
       检验情况
31 33
     </view>
32
-    <view class="panel14 FlexColumn">
34
+    <view class="panel14 FlexColumn" wx:if="{{List[0].ButtonString[0]}}">
33 35
       <view class="panel141 FlexRow">
34 36
         <image src="../images/sysIcon_d01.png" class="sysIcon_d01"></image>
35
-        <view>念汉字</view>
37
+        <view>{{List[0].ButtonString[0]}}</view>
36 38
       </view>
37 39
       <view class="panel142 FlexRow">
38
-        <view class="panel1421 FlexRow">
40
+        <view class="panel1421 FlexRow" >
41
+          <view class="panel14211" style="width:{{ReadRate}}%;"></view>
39 42
         </view>
40
-        <view class="panel1422">0 / 6</view>
43
+        <view class="panel1422">{{ReadNum}} / {{List.length}}</view>
41 44
       </view>
42 45
     </view>
43
-    <view class="panel14 FlexColumn">
46
+    <view class="panel14 FlexColumn" wx:if="{{List[0].ButtonString[1]}}">
44 47
       <view class="panel141 FlexRow">
45 48
         <image src="../images/sysIcon_d01.png" class="sysIcon_d01"></image>
46
-        <view>写汉字</view>
49
+        <view>{{List[0].ButtonString[1]}}</view>
47 50
       </view>
48 51
       <view class="panel142 FlexRow">
49
-        <view class="panel1421 FlexRow">
52
+        <view class="panel1421 FlexRow" >
53
+          <view class="panel14211" style="width:{{WriteRate}}%;"></view>
50 54
         </view>
51
-        <view class="panel1422">0 / 6</view>
55
+        <view class="panel1422">{{WriteNum}} / {{List.length}}</view>
52 56
       </view>
53 57
     </view>
58
+    <view style="width: 100%;height:100rpx;"></view>
54 59
   </view>
55 60
 
56 61
   <view class="panel2 FlexColumn">
57 62
     <view class="panel21 FlexRow">
58
-      <view class="panel211 panel2110{{Menu}} FlexRow" bind:tap="setMenu" data-index="0">单元</view>
59
-      <view class="panel211 panel2111{{Menu}} FlexRow" bind:tap="setMenu" data-index="1">检验记录</view>
63
+      <view class="panel211 panel2110{{Menu}} FlexRow" bind:tap="setMenu" data-menu="0">单元</view>
64
+      <view class="panel211 panel2111{{Menu}} FlexRow" bind:tap="setMenu" data-menu="1">检验记录</view>
60 65
     </view>
61 66
 
62
-    <view wx:if="{{Menu==0}}" class="panel22 FlexColumn" wx:for="{{[1,2,3,4,5]}}" wx:key="*this">
67
+    <view wx:if="{{Menu==0}}" class="panel22 FlexColumn" wx:for="{{List}}" wx:key="*this" bind:tap="setMenu2" data-menu="1" data-index="{{index}}">
63 68
       <view class="panel221 FlexRow">
64
-        <view class="panel2211">课文3</view>
65
-        <view class="panel2212">14</view>
69
+        <view class="panel2211">{{item.LessonName}}</view>
70
+        <view class="panel2212">{{item.Length}}</view>
66 71
       </view>
67
-      <view class="panel222">
68
-        天空、人民、冬天、喜欢、夏天、江河、湖海、田地、工作
72
+      <view class="panel222" wx:if="{{item.ListStr}}">
73
+        {{item.ListStr}}
69 74
       </view>
70 75
       <view class="panel223 FlexRow">
71 76
         <view class="panel2231 FlexRow">
72 77
           <image src="../images/sysIcon_c02.png" class="sysIcon"></image>
73
-          <view class="panel22311"></view>
74
-          <view class="panel22311 panel223110"></view>
78
+          <view class="panel22311" wx:if="{{!item.IsBuildRead}}"></view>
79
+          <view class="panel22311 panel223110" wx:if="{{item.IsBuildRead}}"></view>
80
+          <view class="panel22311" wx:if="{{!item.IsBuildWrite}}"></view>
81
+          <view class="panel22311 panel223110" wx:if="{{item.IsBuildWrite}}"></view>
75 82
         </view>
76 83
         <view class="panel2232 FlexRow">
77
-          <image src="../images/sysIcon_d01.png" class="sysIcon sysIcon_50"></image>
78
-          <image src="../images/sysIcon_d02.png" class="sysIcon"></image>
84
+          <image wx:if="{{item.IsTestRead}}" src="../images/sysIcon_d01.png" class="sysIcon sysIcon_50"></image>
85
+          <image wx:if="{{!item.IsTestRead}}" src="../images/sysIcon_d03.png" class="sysIcon sysIcon_50"></image>
86
+          <image wx:if="{{item.IsTestWrite}}" src="../images/sysIcon_d02.png" class="sysIcon"></image>
87
+          <image wx:if="{{!item.IsTestWrite}}" src="../images/sysIcon_d04.png" class="sysIcon"></image>
79 88
         </view>
80 89
       </view>
81 90
     </view>
82 91
 
83
-    <view wx:if="{{Menu==1}}" class="panel22 FlexColumn" wx:for="{{[1]}}" wx:key="*this">
84
-      <view class="panel223 panel2230 FlexRow">
85
-        <view class="panel2231 FlexRow">
86
-          2024年9月19日 20:21
92
+    <block wx:if="{{Menu==1 && TestArr.length>0}}">
93
+      <view class="panel22 FlexColumn" wx:for="{{TestArr}}" wx:key="*this">
94
+        <view class="panel223 panel2230 FlexRow">
95
+          <view class="panel2231 FlexRow">
96
+            {{item.TestTime}}
97
+          </view>
98
+          <view class="panel2232 FlexRow">
99
+            <image src="../images/sysIcon_d01.png" class="sysIcon" wx:if="{{item.IsTestRead}}"></image>
100
+            <image src="../images/sysIcon_d02.png" class="sysIcon" wx:if="{{item.IsTestWrite}}"></image>
101
+            <image src="../images/sysIcon_b01.png" class="sysIcon_b01"></image>
102
+            <view class="panel22321">{{item.RightNum}}</view>
103
+            <image src="../images/sysIcon_b02.png" class="sysIcon_b01"></image>
104
+            <view class="panel22321">{{item.WrongNum}}</view>
105
+          </view>
87 106
         </view>
88
-        <view class="panel2232 FlexRow">
89
-          <image src="../images/sysIcon_d01.png" class="sysIcon"></image>
107
+        <view class="panel221 panel220 FlexRow">
108
+          <view class="panel2211">{{item.UnitName}}</view>
109
+        </view>
110
+        <view class="panel222">
111
+          {{item.Category}} \ {{item.LibraryName}} \ {{item.BookName}}
112
+        </view>
113
+      </view>
114
+    </block>
115
+
116
+    <block wx:if="{{Menu==1 && TestArr.length==0}}">
117
+      <view class="panelNull FlexColumn">
118
+        <view class="panelNull1 FlexRow">
119
+          <view class="panelNull11 FlexRow"></view>
120
+          <view class="panelNull12 FlexRow"></view>
121
+          <view class="panelNull12 FlexRow"></view>
122
+          <view class="panelNull12 FlexRow"></view>
123
+        </view>
124
+        <view class="panelNull11 panelNull2"></view>
125
+        <view class="panelNull3">暂无记录</view>
126
+        <text class="panelNull4">请在知识包中选择单元检验一次。\n检验必须做完才有记录,中途退出后下次是无法继续的。</text>
127
+      </view>
128
+    </block>
129
+    
130
+    <view style="width: 100%;height:100rpx;"></view>
131
+  </view>
132
+
133
+</view>
134
+
135
+<!-- 单元菜单 -->
136
+<view wx:if="{{Menu2==1}}" class="menuContainer container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
137
+  <view class="panelMenu FlexColumn">
138
+    <view class="panelMenu1 FlexRow">
139
+      <view class="panelMenu11">{{SelectedItem.LessonName}}</view>
140
+      <view class="panelMenu12 FlexRow" bind:tap="setMenu2" data-menu="0">
141
+        <image src="../images/sysIcon_b03.png" class="sysIcon_b03"></image>
142
+      </view>
143
+    </view>
144
+    <view class="panelMenu2">检验方式</view>
145
+    <view class="panelMenu3 FlexRow">
146
+      <block wx:if="{{!SelectedItem.ButtonString[0] || !SelectedItem.ButtonString[1]}}">
147
+        <view class="panelMenu310 FlexColumn" bind:tap="goto" data-url="./examine?testtype=read&category1={{Category1}}&libraryid={{LibraryID}}&bookid={{BookID}}&unitsid={{SelectedItem.ID}}&LibraryName={{LibraryName}}&BookName={{BookName}}&UnitName={{SelectedItem.LessonName}}&TestTypeName={{SelectedItem.ButtonString[0]}}{{SelectedItem.ButtonString[1]}}">
148
+          <view class="panelMenu311 panelMenu3110 FlexColumn">
149
+            <image wx:if="{{SelectedItem.ButtonString[0]}}" src="../images/sysIcon_d05.png" class="sysIcon_d05"></image>
150
+            <image wx:if="{{SelectedItem.ButtonString[1]}}" src="../images/sysIcon_d06.png" class="sysIcon_d05"></image>
151
+          </view>
152
+          <view class="panelMenu312">
153
+            {{SelectedItem.ButtonString[0]}}{{SelectedItem.ButtonString[1]}}
154
+          </view>
155
+        </view>
156
+      </block>
157
+      <block wx:if="{{SelectedItem.ButtonString[0] && SelectedItem.ButtonString[1]}}">
158
+        <view class="panelMenu31 FlexColumn" bind:tap="goto" data-url="./examine?testtype=read&category1={{Category1}}&libraryid={{LibraryID}}&bookid={{BookID}}&unitsid={{SelectedItem.ID}}&LibraryName={{LibraryName}}&BookName={{BookName}}&UnitName={{SelectedItem.LessonName}}&TestTypeName={{SelectedItem.ButtonString[0]}}">
159
+          <view class="panelMenu311 FlexColumn">
160
+            <image src="../images/sysIcon_d05.png" class="sysIcon_d05"></image>
161
+          </view>
162
+          <view class="panelMenu312">{{SelectedItem.ButtonString[0]}}</view>
163
+        </view>
164
+        <view class="panelMenu31 FlexColumn" bind:tap="goto" data-url="./examine?testtype=write&category1={{Category1}}&libraryid={{LibraryID}}&bookid={{BookID}}&unitsid={{SelectedItem.ID}}&LibraryName={{LibraryName}}&BookName={{BookName}}&UnitName={{SelectedItem.LessonName}}&TestTypeName={{SelectedItem.ButtonString[1]}}">
165
+          <view class="panelMenu311 FlexColumn">
166
+            <image src="../images/sysIcon_d06.png" class="sysIcon_d05"></image>
167
+          </view>
168
+          <view class="panelMenu312">{{SelectedItem.ButtonString[1]}}</view>
169
+        </view>
170
+      </block>
171
+      
172
+    </view>
173
+    <view class="panelMenu4 FlexRow">
174
+      <view class="panelMenu41 FlexColumn" catch:tap="setMenu2" data-menu="2">
175
+        <image src="../images/sysIcon_c05.png" class="sysIcon_c05"></image>
176
+        <view class="panelMenu411">查看字表</view>
177
+      </view>
178
+      <view class="panelMenu41 FlexColumn" catch:tap="setMenu2" data-menu="3">
179
+        <image src="../images/sysIcon_c04.png" class="sysIcon_c05"></image>
180
+        <view class="panelMenu411">跳过检验直接生成题卡</view>
181
+      </view>
182
+    </view>
183
+
184
+    <view class="panelMenu2">检验记录</view>
185
+    <block wx:for="{{TestItemArr}}" wx:key="*this">
186
+      <view class="panelMenu5 FlexRow" >
187
+        <view class="panelMenu51 FlexRow">
188
+          <image src="../images/{{item.Icon}}.png" class="sysIcon_d01"></image>
189
+          <view class="panelMenu511">{{item.Time}}</view>
190
+        </view>
191
+        <view class="panelMenu52 FlexRow" wx:if="{{item.Right>0 && item.Wrong>0}}">
90 192
           <image src="../images/sysIcon_b01.png" class="sysIcon_b01"></image>
91
-          <view class="panel22321">10</view>
193
+          <view class="panel22321">{{item.Right}}</view>
92 194
           <image src="../images/sysIcon_b02.png" class="sysIcon_b01"></image>
93
-          <view class="panel22321">2</view>
195
+          <view class="panel22321">{{item.Wrong}}</view>
196
+          <image src="../images/sysIcon_a01.png" class="sysIcon_a01"></image>
94 197
         </view>
95 198
       </view>
96
-      <view class="panel221 panel220 FlexRow">
97
-        <view class="panel2211">课文3</view>
199
+      <view class="panelLine2"></view>
200
+    </block>
201
+    
202
+    <view style="width:100%;height:50rpx;"></view>
203
+   </view>
204
+</view>
205
+
206
+<!-- 生成题卡格式 -->
207
+<view wx:if="{{Menu2==3}}" class="menuContainer container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
208
+  <view class="panelMenu6 FlexColumn">
209
+    <view class="panelMenu61 FlexRow">
210
+      <view class="panelMenu611">选择格式</view>
211
+      <view class="panelMenu612 panelMenu12 FlexRow" bind:tap="setMenu2" data-menu="1">
212
+        <image src="../images/sysIcon_b03.png" class="sysIcon_b03"></image>
98 213
       </view>
99
-      <view class="panel222">
100
-        英语 \ 1000词 \ 第一部分
214
+    </view>
215
+    <view class="panelMenu62"></view>
216
+    <view class="panelMenu63 FlexColumn">
217
+      <view class="panelMenu631 FlexRow">
218
+        <image src="../images/sysIcon_b04.png" class="sysIcon_b04"></image>
219
+        <view class="panelMenu6311 FlexColumn">
220
+          <view class="panelMenu63111 FlexRow">
221
+            <image src="../images/sysIcon_d01.png" class="sysIcon_d01"></image>
222
+            <view class="panelMenu631111">念单词说含义</view>
223
+          </view>
224
+          <view class="panelMenu63112">这里有一行和方式对应的说明</view>
225
+        </view>
101 226
       </view>
227
+      <view class="panelLine3"></view>
102 228
     </view>
103
-    <view style="height:100rpx"></view>
229
+    <view class="panelMenu63 panelMenu630 FlexColumn">
230
+      <view class="panelMenu631 FlexRow">
231
+        <view class="sysIcon_b04"></view>
232
+        <view class="panelMenu6311 FlexColumn">
233
+          <view class="panelMenu63111 FlexRow">
234
+            <image src="../images/sysIcon_d02.png" class="sysIcon_d01"></image>
235
+            <view class="panelMenu631111 panelMenu631110">听写单词</view>
236
+          </view>
237
+          <view class="panelMenu63112">这里有一行和方式对应的说明</view>
238
+        </view>
239
+      </view>
240
+      <view class="panelLine3"></view>
241
+    </view>
242
+    <view class="panelMenu64 FlexRow">生成题卡</view>
243
+  </view>
244
+</view>
245
+
246
+<!-- 字表 -->
247
+<view wx:if="{{Menu2==2}}" class="menuContainer container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
248
+  <view class="panelMenu6 panelMenu7 FlexColumn">
249
+    <view class="panelMenu61 FlexRow">
250
+      <view class="panelMenu611 panelMenu711">{{SelectedItem.List.length}}</view>
251
+      <view class="panelMenu612 panelMenu12 FlexRow" bind:tap="setMenu2" data-menu="1">
252
+        <image src="../images/sysIcon_b03.png" class="sysIcon_b03"></image>
253
+      </view>
254
+    </view>
255
+    <scroll-view scroll-y="true" class="panelMenu72 FlexColumn">
256
+      <view class="panelMenu721 FlexColumn" wx:for="{{SelectedItem.List}}">
257
+        <text class="panelMenu7211">{{item}}</text>
258
+        <view class="panelLine4"></view>
259
+      </view>
260
+    </scroll-view>
104 261
   </view>
105
-  
106 262
 </view>

+ 324 - 2
pages_test/knowledge/unit.wxss

@@ -1,10 +1,11 @@
1 1
 .container {
2
-  background-color: #fff;
2
+  background-color: #E3E3E3;
3 3
   font-weight: 600;
4 4
 }
5 5
 
6 6
 .panel1 {
7 7
   width: 100%;
8
+  background-color: #fff;
8 9
 }
9 10
 
10 11
 .panel11 {
@@ -12,8 +13,16 @@
12 13
   color: #2E2E2E;
13 14
   justify-content: flex-start;
14 15
   align-items: flex-start;
16
+  position: relative;
15 17
 }
16 18
 
19
+.panel1Logo{
20
+  width:250rpx;
21
+  height:190rpx;
22
+  position: absolute;
23
+  top:0;
24
+  right:0;
25
+}
17 26
 .panel111 {
18 27
   margin: 40rpx 0 0 50rpx;
19 28
   font-size: 24rpx;
@@ -110,6 +119,12 @@
110 119
   height: 16rpx;
111 120
   background-color: #F0F0F0;
112 121
   border-radius: 8rpx;
122
+  justify-content: flex-start;
123
+}
124
+.panel14211 {
125
+  height:16rpx;
126
+  background-color: #FF8451;
127
+  border-radius: 8rpx;
113 128
 }
114 129
 
115 130
 .panel1422 {
@@ -124,7 +139,7 @@
124 139
   border-radius: 40rpx 40rpx 0 0;
125 140
   background-color: #E3E3E3;
126 141
   width: 100%;
127
-  margin-top: 50rpx;
142
+  margin-top: -50rpx;
128 143
 }
129 144
 
130 145
 .panel21 {
@@ -201,6 +216,8 @@
201 216
   font-weight: 400;
202 217
   color:#787878;
203 218
   margin-top: 10rpx;
219
+  overflow-y: hidden;
220
+  height:33rpx;
204 221
 }
205 222
 
206 223
 .panel223{
@@ -260,4 +277,309 @@
260 277
   font-size: 28rpx;
261 278
   color: #4D4D4D;
262 279
   margin-top: 7rpx;
280
+}
281
+
282
+.menuContainer{
283
+  width:100%;
284
+  position: fixed;
285
+  top:0;
286
+  background: rgba(0,0,0,0.50);
287
+  z-index: 10;
288
+}
289
+
290
+.panelMenu{
291
+  position: fixed;
292
+  bottom: 0;
293
+  width: 100%;
294
+  border-radius: 60rpx 60rpx 0 0;
295
+  background-color: #fff;
296
+}
297
+
298
+.panelMenu1{
299
+  width: 100%;
300
+  margin-top: 50rpx;
301
+  align-items: flex-start;
302
+  justify-content: space-between;
303
+}
304
+.panelMenu11{
305
+  font-size: 28rpx;
306
+  color: #2E2E2E;
307
+  width:580rpx;
308
+  margin-left: 40rpx;
309
+}
310
+.panelMenu12{
311
+  width:60rpx;
312
+  height:60rpx;
313
+  margin-right: 40rpx;
314
+  border-radius: 50%;
315
+  background-color: #f0f0f0;
316
+}
317
+.sysIcon_b03{
318
+  width:20rpx;
319
+  height:20rpx;
320
+}
321
+
322
+.panelMenu2{
323
+  margin: 40rpx 0 40rpx 40rpx;
324
+  font-size: 28rpx;
325
+  color: #2E2E2E;
326
+  align-self: start;
327
+}
328
+.panelMenu3{
329
+  background-color: #f0f0f0;
330
+  border-radius: 20rpx;
331
+}
332
+
333
+.panelMenu31{
334
+  width:345rpx;
335
+}
336
+
337
+.panelMenu310{
338
+  width:690rpx;
339
+}
340
+
341
+.panelMenu311{
342
+  margin-top: 30rpx;
343
+  width: 290rpx;
344
+  background: #FF8451;
345
+  border: 6rpx solid rgba(255,90,45,0.70);
346
+  box-shadow: 0 16rpx 0 0 #B73B3E, 0 34rpx 0 0 rgba(0,0,0,0.14);
347
+  border-radius: 30rpx;
348
+}
349
+
350
+.panelMenu3110{
351
+  width: 630rpx;
352
+}
353
+
354
+.sysIcon_d05{
355
+  width:50rpx;
356
+  height:50rpx;
357
+  margin: 35rpx 0;
358
+}
359
+
360
+.panelMenu312{
361
+  margin: 50rpx 0 30rpx 0;
362
+  font-size: 28rpx;
363
+  color:#2E2E2E;
364
+}
365
+
366
+.panelMenu4{
367
+  width:100%;
368
+  margin-top: 30rpx;
369
+}
370
+.panelMenu41{
371
+  width:330rpx;
372
+  background: #F8F8F8;
373
+  border: 1rpx solid #D2D2D2;
374
+  box-shadow: 0 6rpx 0 0 rgba(0,0,0,0.10);
375
+  border-radius: 20rpx;
376
+  font-size: 24rpx;
377
+  color: #2E2E2E;
378
+  align-items: flex-start;
379
+  justify-content: flex-start;
380
+  margin: 0 15rpx;
381
+}
382
+
383
+.sysIcon_c05{
384
+  width:30rpx;
385
+  height:30rpx;
386
+  margin: 30rpx 0 0 30rpx;
387
+}
388
+
389
+.panelMenu411{
390
+  font-size: 24rpx;
391
+  color: #2E2E2E;
392
+  margin: 20rpx 0 30rpx 30rpx;
393
+}
394
+
395
+.panelMenu5{
396
+  width: 100%;
397
+  height:100rpx;
398
+  justify-content: space-between;
399
+  font-weight: 400;
400
+  font-size: 28rpx;
401
+  color: #4D4D4D;
402
+}
403
+
404
+.panelLine2 {
405
+  width: 670rpx;
406
+  height: 1rpx;
407
+  background-color: #E3E3E3;
408
+}
409
+
410
+.panelMenu51{
411
+  margin-left: 50rpx;
412
+}
413
+.panelMenu511{
414
+  font-weight: 400;
415
+  font-size: 28rpx;
416
+  color: #4D4D4D;
417
+  margin-left: 20rpx;
418
+}
419
+.panelMenu52{
420
+  margin-right: 70rpx;
421
+}
422
+.sysIcon_a01{
423
+  width:16rpx;
424
+  height:26rpx;
425
+  margin: 0 0 0 30rpx;
426
+}
427
+
428
+
429
+.panelNull{
430
+  width:650rpx;
431
+  justify-content: flex-start;
432
+}
433
+.panelNull1{
434
+  width:100%;
435
+  justify-content:space-between;
436
+}
437
+.panelNull11{
438
+  width:296rpx;
439
+  height:30rpx;
440
+  background: rgba(0,0,0,0.20);
441
+  border-radius: 15rpx;
442
+  margin-right: 204rpx;
443
+}
444
+.panelNull12{
445
+  width:30rpx;
446
+  height:30rpx;
447
+  background: rgba(0,0,0,0.20);
448
+  border-radius: 15rpx;
449
+}
450
+
451
+.panelNull2{
452
+  width:148rpx;
453
+  height:30rpx;
454
+  align-self: start;
455
+  margin-top: 12rpx;
456
+}
457
+.panelNull3{ 
458
+  align-self: start;
459
+  margin-top: 40rpx;
460
+  color:#4D4D4D;
461
+  font-size:28rpx;
462
+}
463
+.panelNull4{ 
464
+  align-self: start;
465
+  margin-top: 10rpx;
466
+  color:#4D4D4D;
467
+  font-size:24rpx;
468
+  font-weight: 400;
469
+}
470
+
471
+.panelMenu6{
472
+  background: #FFFFFF;
473
+  box-shadow: 0 20rpx 0 0 #9B9B9B, 0 50rpx 0 0 rgba(0,0,0,0.50);
474
+  border-radius: 60rpx;
475
+  position: fixed;
476
+  bottom:70rpx;
477
+  width:690rpx;
478
+  justify-content: flex-start;
479
+}
480
+.panelMenu61{
481
+  width: 100%;
482
+  height:120rpx;
483
+  justify-content: space-between;
484
+  align-items: flex-start;
485
+}
486
+.panelMenu611{
487
+  margin:40rpx 0 0 60rpx;
488
+  font-size: 36rpx;
489
+  color:#1E1E1E;
490
+}
491
+.panelMenu612{
492
+  margin:30rpx 30rpx 0 0;
493
+}
494
+
495
+.panelMenu62{
496
+  width:590rpx;
497
+  height:280rpx;
498
+  background: #F8F8F8;
499
+  border: 1rpx solid #D2D2D2;
500
+  border-radius: 20rpx;
501
+  margin-top: 30rpx;
502
+}
503
+
504
+.panelMenu63{
505
+  width:100%;
506
+  height:140rpx;
507
+  margin-top: 30rpx;
508
+}
509
+.panelMenu630{
510
+  margin-top: 0rpx;
511
+}
512
+.panelMenu631{
513
+  width:100%;
514
+  justify-content: flex-start;
515
+}
516
+.sysIcon_b04{
517
+  width:40rpx;
518
+  height:34rpx;
519
+  margin: 0 30rpx 0 70rpx ;
520
+}
521
+.panelMenu6311{
522
+  align-items: flex-start;
523
+}
524
+.panelMenu631111{
525
+  font-size: 28rpx;
526
+  color: #2E2E2E;
527
+  margin-left: 10rpx;
528
+}
529
+.panelMenu631110{
530
+  font-weight: 400;
531
+}
532
+.panelMenu63112{
533
+  font-size: 24rpx;
534
+  color: #787878;
535
+}
536
+.panelLine3{
537
+  width:500rpx;
538
+  height:1rpx;
539
+  background-color: #E3E3E3;
540
+  margin: 30rpx 50rpx 0 0;
541
+  align-self:flex-end;
542
+}
543
+
544
+.panelMenu64{
545
+  background: #F0F0F0;
546
+  border-radius: 20rpx;
547
+  width:590rpx;
548
+  height:90rpx;
549
+  margin:60rpx 0;
550
+  font-size: 36rpx;
551
+  color: #2E2E2E;
552
+  text-align: center;
553
+}
554
+
555
+
556
+.panelMenu7{
557
+  height:1100rpx;
558
+}
559
+
560
+.panelMenu711{
561
+  font-family: Teko-SemiBold;
562
+  font-size: 48rpx;
563
+  color: #2E2E2E;
564
+}
565
+.panelMenu72{
566
+  width:100%;
567
+  height:900rpx;
568
+}
569
+.panelMenu721{
570
+  width:570rpx;
571
+  margin-left: 60rpx;
572
+}
573
+.panelMenu7211{
574
+  width:100%;
575
+  margin: 30rpx 0;
576
+  font-size: 28rpx;
577
+  font-weight: 400;
578
+  columns: #2e2e2e;
579
+}
580
+
581
+.panelLine4{
582
+  width:570rpx;
583
+  height:1rpx;
584
+  background-color: #E3E3E3;
263 585
 }

+ 1 - 0
pages_test/test/item.js

@@ -76,6 +76,7 @@ Page({
76 76
       TestName2: options.name2,
77 77
     });
78 78
     main.GetHanziUnitWords(options.unitsid,that.data.TestType, function (data) {
79
+      //debugger;
79 80
       if (data) {
80 81
         TaskList=data;
81 82
         if (that.data.BookID==73){

+ 2 - 2
project.private.config.json

@@ -7,8 +7,8 @@
7 7
     "miniprogram": {
8 8
       "list": [
9 9
         {
10
-          "name": "pages_test/knowledge/unit",
11
-          "pathName": "pages_test/knowledge/unit",
10
+          "name": "pages_test/knowledge/index",
11
+          "pathName": "pages_test/knowledge/index",
12 12
           "query": "",
13 13
           "launchMode": "default",
14 14
           "scene": null

+ 3 - 1
utils/util.js

@@ -28,7 +28,7 @@ function checkIsArray(obj) {
28 28
   return Object.prototype.toString.call(obj) === '[object Array]';
29 29
 }
30 30
 
31
-function formatDateCHS(date) {
31
+function formatDateCHS(date,isLong) {
32 32
   if (date) {
33 33
     date = date.toString();
34 34
     var year = date.substr(0, 4);
@@ -37,6 +37,8 @@ function formatDateCHS(date) {
37 37
 
38 38
     if (year <= "1900")
39 39
       return "";
40
+    if (isLong)
41
+      return year + "年" + month + "月" + day + "日" +date.substr(10);
40 42
     else
41 43
       return year + "年" + month + "月" + day + "日";
42 44
   }