chengjie 4 anos atrás
pai
commit
c1997dde82

+ 2 - 1
app.js

@@ -1,6 +1,6 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "2.1.37",
3
+    Version: "2.1.42",
4 4
     IsProduction: true,
5 5
     ShareTitle: "高效学习从秒过开始",
6 6
     SharePath: "pages/index/index",
@@ -12,6 +12,7 @@ App({
12 12
     serverUrlServer: "https://www.kylx365.com/apiData/",
13 13
     serverUrlLocalhost: "http://localhost:3020/apiData/",
14 14
     audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=3&pit=5",
15
+    audioUrlYoudao: "https://dict.youdao.com/dictvoice?rate=10&le=auto&audio=[word]",
15 16
     uploadImageUrl: "https://miaguo-1253256735.file.myqcloud.com/",
16 17
     officialAccounts:"https://mp.weixin.qq.com/s/gO9S4PrPl1Uu1iksyRuBgw",
17 18
     BaiduToken: "",//百度开发平台token

+ 38 - 4
pages/main/default.js

@@ -334,6 +334,11 @@ Page({
334 334
         VersoinID: id,
335 335
       });
336 336
     }
337
+    else if (usertype=="groupuserid"){
338
+      that.setData({
339
+        ChangeGroupUserID: id,
340
+      });
341
+    }
337 342
   },
338 343
   setSelectUser: function (e) {
339 344
     var that = this;
@@ -372,16 +377,22 @@ Page({
372 377
     var fieldStr="&FieldStr=NickName,AvatarUrl";
373 378
     if (userid){
374 379
       that.getUserInfo(userid,fieldStr,function(data){
375
-        if (type1==1){
380
+        if (type1==0){
381
+          that.setData({
382
+            NewUserAvatar: data.AvatarUrl,
383
+            NewUserNickName: data.NickName,
384
+          });
385
+        }
386
+        else if (type1==1){
376 387
           that.setData({
377 388
             IntroducerAvatar: data.AvatarUrl,
378 389
             IntroducerNickName: data.NickName,
379 390
           });
380 391
         }
381
-        else{
392
+        else if (type1==2){
382 393
           that.setData({
383
-            NewUserAvatar: data.AvatarUrl,
384
-            NewUserNickName: data.NickName,
394
+            GroupUserAvatar: data.AvatarUrl,
395
+            GroupUserNickName: data.NickName,
385 396
           });
386 397
         }
387 398
       });
@@ -395,6 +406,27 @@ Page({
395 406
       }
396 407
     });
397 408
   },
409
+  setUserGroup: function (e) {
410
+    var that = this;
411
+    if (that.data.ChangeGroupUserID){
412
+      if (app.globalData.userInfo.UserID == 1
413
+        || app.globalData.userInfo.UserID == 2 
414
+        || app.globalData.userInfo.UserID == 3 
415
+        || app.globalData.userInfo.UserID == 4) {
416
+          var id=e.currentTarget.dataset.id;
417
+          var url = "UpdateUserMemberInfo?UserID=" + that.data.ChangeGroupUserID + "&GroupID="+id;
418
+          main.getData(url, function (data) {
419
+            that.setData({
420
+              ChangeGroupUserID: null,
421
+              GroupUserAvatar:null,
422
+            });
423
+            wx.showToast({
424
+              title: '群更改成功',
425
+            })
426
+          });
427
+      }
428
+    }
429
+  },
398 430
   setUserIntroducer: function (e) {
399 431
     var that = this;
400 432
     if (that.data.ChangeNewUserID && that.data.ChangeIntroducerUserID){
@@ -407,6 +439,8 @@ Page({
407 439
             that.setData({
408 440
               ChangeNewUserID: null,
409 441
               ChangeIntroducerUserID: null,
442
+              NewUserAvatar:null,
443
+              IntroducerAvatar:null,
410 444
             });
411 445
             wx.showToast({
412 446
               title: '介绍人更改成功',

+ 28 - 15
pages/main/default.wxml

@@ -57,34 +57,47 @@
57 57
     <input class='input2 input' type="number"  always-embed="true"  value="{{ChangeUserID}}" bindinput="onKeyInput" data-type="userid" />
58 58
     <button class="btn2" bindtap="setSelectUser">查看用户</button>
59 59
     </view>
60
-    <view style="height:50rpx;"></view>
60
+    <view class="hiddenline"></view>
61 61
     <view class="panel2 FlexRow">
62 62
     <button class="btnShowUserID" bindtap="goto" data-url="../other/webview?PageID=9999">钥匙</button>
63 63
     <button class="btnShowUserID" bindtap="goto" data-url="../other/webviewInterior">访问统计网页</button>
64 64
     </view>
65
-    <view style="height:50rpx;"></view>
66
-    <button class="btnShowUserID" bindtap="goto" data-url="../other/newuser">新手页面</button>
67
-    <view style="height:50rpx;"></view>
65
+    <view class="hiddenline"></view>
66
+    <view class="panel2 FlexRow">
67
+      <button class="btnShowUserID" bindtap="goto" data-url="../other/newuser">新手页面</button>
68
+      <button class="btnShowUserID" bindtap="goto" data-url="../other/homework">作业清单</button>
69
+    </view>
70
+    <view class="hiddenline"></view>
68 71
     <button class="btnShowUserID" bindtap="goto" data-url="../other/paycustom">自定义开据</button>
69
-    <view style="height:50rpx;"></view>
72
+    <view class="hiddenline"></view>
70 73
     <view class="panel2 FlexRow">
71 74
       <input class='input2 input' type="number"  always-embed="true"  placeholder="新用户ID" value="{{ChangeNewUserID}}" bindinput="onKeyInput" data-type="newuserid"/>
72 75
       <button class="btn2" bindtap="getUserInfoFunction" data-id="{{ChangeNewUserID}}" data-type="0">查看</button>
76
+      <image class="Avatar2" src='{{NewUserAvatar}}' wx:if="{{NewUserAvatar}}"/>
77
+      <view class="NickName2" wx:if="{{NewUserAvatar}}">{{NewUserNickName}}</view>
73 78
     </view>
74
-    <view class="panel2 FlexRow" wx:if="{{NewUserAvatar}}">
75
-      <image class="Avatar2" src='{{NewUserAvatar}}' />
76
-      <view class="NickName2">{{NewUserNickName}}</view>
77
-    </view>
78
-    <view class="panel2 FlexRow">
79
+    <view class="panel20 panel2 FlexRow">
79 80
       <input class='input2 input' type="number"  always-embed="true"  placeholder="介绍人ID" value="{{ChangeIntroducerUserID}}" bindinput="onKeyInput" data-type="introduceruserid"/>
80 81
       <button class="btn2" bindtap="getUserInfoFunction" data-id="{{ChangeIntroducerUserID}}" data-type="1">查看</button>
81
-    </view>
82
-    <view class="panel2 FlexRow" wx:if="{{IntroducerAvatar}}">
83
-      <image class="Avatar2" src='{{IntroducerAvatar}}' />
84
-      <view  class="NickName2">{{IntroducerNickName}}</view>
82
+      <image class="Avatar2" src='{{IntroducerAvatar}}' wx:if="{{IntroducerAvatar}}"/>
83
+      <view  class="NickName2" wx:if="{{IntroducerAvatar}}">{{IntroducerNickName}}</view>
85 84
     </view>
86 85
     <button class="btnShowUserID" bindtap="setUserIntroducer">更改用户介绍人</button>
87
-    <view style="height:50rpx;"></view>
86
+    
87
+    <view class="hiddenline"></view>
88
+    <view class="panel2 FlexRow">
89
+      <input class='input2 input' type="number"  always-embed="true"  placeholder="用户ID" value="{{ChangeGroupUserID}}" bindinput="onKeyInput" data-type="groupuserid"/>
90
+      <button class="btn2" bindtap="getUserInfoFunction" data-id="{{ChangeGroupUserID}}" data-type="2">查看</button>
91
+      <image class="Avatar2" src='{{GroupUserAvatar}}'  wx:if="{{GroupUserAvatar}}"/>
92
+      <view  class="NickName2"  wx:if="{{GroupUserAvatar}}">{{GroupUserNickName}}</view>
93
+    </view>
94
+    <view class="panel21 panel2 FlexRow">
95
+      <button class="btnShowUserID" bindtap="setUserGroup" data-id="1">群改彩虹</button>
96
+      <button class="btnShowUserID" bindtap="setUserGroup" data-id="2">群改润雨</button>
97
+      <button class="btnShowUserID" bindtap="setUserGroup" data-id="3">群改扬帆</button>
98
+    </view>
99
+    
100
+    <view class="hiddenline"></view>
88 101
     <view class="panel2 FlexRow">
89 102
       <input class='input2 input' type="number"  always-embed="true"  placeholder="版本号" value="{{VersionID}}" bindinput="onKeyInput" data-type="versionid"/>
90 103
       <button class="btn2" bindtap="setVersionStart" data-versionid="{{VersionID}}" data-flag="1">开通</button>

+ 19 - 7
pages/main/default.wxss

@@ -298,15 +298,23 @@
298 298
   margin-top: 30rpx;
299 299
 }
300 300
 .panel2{
301
+  
302
+  margin: 10rpx 0 10rpx 0;  
303
+}
304
+
305
+.panel20{
301 306
   width:500rpx;
302
-  margin-top: 10rpx;  
307
+  margin: -20rpx 0 0 0;  
308
+}
309
+.panel21{
310
+  margin: -20rpx 0 0 0;  
303 311
 }
304 312
 .Avatar2{
305 313
   width: 50rpx;
306 314
   height:50rpx;
307 315
   background-color: #E3E3E3;
308 316
   border-radius: 5rpx;
309
-  margin-right: 10rpx;
317
+  margin:0 10rpx;
310 318
 }
311 319
 .NickName2{
312 320
   max-width:200rpx;
@@ -315,19 +323,18 @@
315 323
   color:#fff;
316 324
 }
317 325
 .input2{
318
-  width: 200rpx;
326
+  width: 140rpx;
319 327
   height:65rpx;
320
-  margin-top: 0rpx;
321
-  margin-left: 10rpx;
328
+  margin: 0rpx 10rpx 0 10rpx;
322 329
   font-size:28rpx;
323 330
 }
324 331
 .btnShowUserID{
325
-  margin:30rpx 5rpx;
332
+  margin:20rpx 5rpx;
326 333
   font-size: 26rpx;
327 334
 }
328 335
 .btn2{
329 336
   font-size: 26rpx;
330
-  margin:0 0 0 10rpx;
337
+  margin:20rpx 5rpx;
331 338
 }
332 339
 
333 340
 
@@ -413,4 +420,9 @@
413 420
   right:30rpx;
414 421
   width:70rpx;
415 422
   height:70rpx;
423
+}
424
+.hiddenline{
425
+  width:70%;
426
+  height:1rpx;
427
+  background-color: #ddd;
416 428
 }

+ 99 - 7
pages/main/detail.js

@@ -182,7 +182,7 @@ Page({
182 182
     if (isExit) {
183 183
       timeoutHide = setTimeout(function () {
184 184
         that.onClose();
185
-      }, 60000);
185
+      }, 200000);
186 186
     }
187 187
     isExit = true;
188 188
   },
@@ -852,6 +852,7 @@ Page({
852 852
           confirmText: "知道了",
853 853
           success(res) {
854 854
             clearTimeout(timeoutEveryCard);
855
+            clearTimeout(timeoutHide);
855 856
             if (res.confirm) {
856 857
               that.timeCompute();
857 858
             }
@@ -1143,6 +1144,89 @@ Page({
1143 1144
       success(res) {
1144 1145
         // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
1145 1146
         if (res.statusCode === 200) {
1147
+
1148
+          // const query = wx.createSelectorQuery();
1149
+          // query.select('#shareCanvas')
1150
+          //   .fields({ node: true, size: true })
1151
+          //   .exec((res) => {
1152
+          //     const canvas0 = res[0].node;
1153
+          //     const canvas = canvas0.getContext('2d');
1154
+
1155
+          //     const dpr = wx.getSystemInfoSync().pixelRatio;
1156
+          //     canvas0.width = res[0].width * dpr;
1157
+          //     canvas0.height = res[0].height * dpr;
1158
+          //     canvas.scale(dpr, dpr);
1159
+
1160
+          //     canvas.fillRect(360, 0, 600, 360);
1161
+
1162
+          //     //canvas.drawImage(res.tempFilePath, 0, 0, 360, 360);
1163
+          //     //canvas.drawImage("../images/universalpic_screenshot_jl_bgimage_360x360.png", 0, 0, 360, 360);
1164
+          //     canvas.fillStyle = "#ffffff";
1165
+          //     //canvas.setTextBaseline('top');
1166
+          //     canvas.setFontSize(24);
1167
+          //     canvas.fillText(app.globalData.userInfo.NickName, 30, 282);
1168
+
1169
+          //     var today = common.formatTime(new Date(), ".", true);
1170
+          //     canvas.setFontSize(18);
1171
+          //     canvas.fillText(today, 30, 315);
1172
+
1173
+          //     canvas.setFontSize(20);
1174
+          //     canvas.fillText("秒过学习", 390, 30);
1175
+          //     canvas.setFontSize(44);
1176
+          //     canvas.fillText("勤勉接力", 390, 58);
1177
+          //     canvas.setFontSize(20);
1178
+          //     canvas.fillText("见证成长", 390, 120);
1179
+
1180
+          //     canvas.setFontSize(68);
1181
+          //     if (!that.data.TodayTime)
1182
+          //       that.data.TodayTime = 0;
1183
+
1184
+          //     canvas.fillText(that.data.TodayTime, 390, 148);
1185
+
1186
+          //     canvas.font = "normal 500 68px caption";
1187
+          //     var metrics = canvas.measureText(that.data.TodayTime.toString());
1188
+          //     //console.log(JSON.stringify(metrics));
1189
+
1190
+          //     var h = 179;
1191
+          //     if (app.globalData.IsIOS)
1192
+          //       h = 176;
1193
+          //     canvas.font = "normal 500 32px caption";
1194
+          //     canvas.fillText("分钟", 393 + Math.round(metrics.width), h);
1195
+
1196
+
1197
+          //     canvas.setFontSize(20);
1198
+          //     canvas.fillText("迄今已接力", 390, 267);
1199
+          //     canvas.setFontSize(32);
1200
+          //     canvas.fillText(app.globalData.TaskToday.DayNumber + "次", 390, 295);
1201
+          //     //console.log("生成前");
1202
+          //     canvas.draw(1, function (n) {
1203
+          //       //console.log("生成后1");
1204
+          //       wx.canvasToTempFilePath({
1205
+          //         x: 0,
1206
+          //         y: 0,
1207
+          //         width: 600,
1208
+          //         height: 360,
1209
+          //         destWidth: 600,
1210
+          //         destHeight: 360,
1211
+          //         canvasId: 'shareCanvas',
1212
+          //         success: function (res2) {
1213
+          //           wx.hideLoading();
1214
+          //           //console.log("生成后2");
1215
+          //           wx.previewImage({
1216
+          //             current: res2.tempFilePath, // 当前显示图片的http链接
1217
+          //             urls: [res2.tempFilePath] // 需要预览的图片http链接列表
1218
+          //           });
1219
+
1220
+          //           main.getData("ShareMiaoguoTask?UserID=" + app.globalData.userInfo.UserID, function (data) {});
1221
+          //         },
1222
+          //         fail: function (e) {
1223
+          //           wx.hideLoading();
1224
+          //           //console.log("生成错误:"+e);
1225
+          //         }
1226
+          //       })
1227
+          //     });
1228
+          //   });
1229
+
1146 1230
           var canvas = wx.createCanvasContext("shareCanvas", that);
1147 1231
           canvas.setFillStyle(main.getShareImageBackColor());
1148 1232
           canvas.fillRect(360, 0, 600, 360);
@@ -1425,15 +1509,23 @@ Page({
1425 1509
         url: url,
1426 1510
         success(res) {
1427 1511
           wx.hideLoading();
1428
-          if (res.statusCode === 200) {
1429
-            tempPlayUrlLocal = res.tempFilePath;
1430
-            that.audioCtx.setSrc(res.tempFilePath);
1431
-            that.audioCtx.play();
1432
-            tempPlayUrl = url;
1433
-          }
1512
+          tempPlayUrlLocal = res.tempFilePath;
1513
+          that.audioCtx.setSrc(res.tempFilePath);
1514
+          that.audioCtx.play();
1515
+          tempPlayUrl = url;
1434 1516
         },
1435 1517
         fail(err) {
1436 1518
           wx.hideLoading();
1519
+
1520
+          if (url.indexOf("sp0.baidu.com")>0){
1521
+            var soundmark=url.substring(url.indexOf("text=")+5,url.indexOf("&spd"));
1522
+            url = app.globalData.audioUrlYoudao;
1523
+            url = url.replace("[word]", soundmark);
1524
+            tempPlayUrlLocal = url;
1525
+            that.audioCtx.setSrc(url);
1526
+            that.audioCtx.play();
1527
+            tempPlayUrl = url;
1528
+          }
1437 1529
         }
1438 1530
       });
1439 1531
     } else {

+ 1 - 0
pages/main/detail.wxml

@@ -336,5 +336,6 @@
336 336
 </view>
337 337
 
338 338
 <canvas class='Canvas' canvas-id="shareCanvas"></canvas>
339
+<!-- <canvas class='Canvas' type="2d" id="shareCanvas"></canvas> -->
339 340
 
340 341
 <audio hidden='true' src="{{AudioSrc}}" id="myAudio" bindended="audioBindEnded" binderror="audioBindError"></audio>

+ 15 - 7
pages/main/preview.js

@@ -391,18 +391,26 @@ Page({
391 391
         success(res) {
392 392
           clearTimeout(timeout);
393 393
           wx.hideLoading();
394
-          if (res.statusCode === 200) {
395
-            tempPlayUrlLocal = res.tempFilePath;
396
-            that.audioCtx.setSrc(res.tempFilePath);
397
-            that.audioCtx.play();
398
-            tempPlayUrl = url;
399
-          }
400
-          //console.log("res.statusCode:" + res.statusCode);
394
+          
395
+          tempPlayUrlLocal = res.tempFilePath;
396
+          that.audioCtx.setSrc(res.tempFilePath);
397
+          that.audioCtx.play();
398
+          tempPlayUrl = url;
401 399
         },
402 400
         fail(err) {
403 401
           wx.hideLoading();
404 402
           console.log("downling err:"+err);
405 403
           clearTimeout(timeout);
404
+
405
+          if (url.indexOf("sp0.baidu.com")>0){
406
+            var soundmark=url.substring(url.indexOf("text=")+5,url.indexOf("&spd"));
407
+            url = app.globalData.audioUrlYoudao;
408
+            url = url.replace("[word]", soundmark);
409
+            tempPlayUrlLocal = url;
410
+            that.audioCtx.setSrc(url);
411
+            that.audioCtx.play();
412
+            tempPlayUrl = url;
413
+          }
406 414
         }
407 415
       });
408 416
     }

+ 2 - 8
pages/other/newuser.js

@@ -35,12 +35,6 @@ Page({
35 35
       wx.setNavigationBarTitle({
36 36
         title: data[index].Name
37 37
       });
38
-      wx.setNavigationBarColor({
39
-        frontColor: "#000000",
40
-        backgroundColor: data[index].BarColor,
41
-        backgroundColorTop: data[index].BarColor,
42
-      });
43
-
44 38
       if (app.globalData.IsIPhoneX) {
45 39
        that.setData({
46 40
           IsIPad: "_IPhoneX",
@@ -109,12 +103,12 @@ Page({
109 103
     var that=this;
110 104
     var isPlay=!that.data.IsPlay;
111 105
     if (isPlay){
112
-      that.data.List[11].Image="bm_sy_12b";
106
+      that.data.List[8].Image="bm_sy_banner-zc_pause.png";
113 107
       backgroundAudioManager.title = "暖暖爸致辞";
114 108
       backgroundAudioManager.src = app.globalData.uploadImageUrl+"web/_lesson/nuannuanbazhici.m4a";
115 109
     }
116 110
     else{
117
-      that.data.List[11].Image="bm_sy_12a";
111
+      that.data.List[8].Image="bm_sy_banner-zc_play.png";
118 112
       backgroundAudioManager.pause();
119 113
     }
120 114
     that.setData({

+ 2 - 2
pages/other/newuser.json

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

+ 4 - 2
pages/other/newuser.wxml

@@ -2,14 +2,15 @@
2 2
 
3 3
     <image id="Image{{index}}" wx:for="{{List}}" wx:key="*this" class="img" lazy-load="true" mode="widthFix" 
4 4
     src='{{ImagePath}}web/{{item.Image}}' bindtap="{{item.BindTap}}" data-url="{{item.Url}}"  
5
-    bindtouchmove="scroll" wx:if="{{index<=13}}"/>
5
+    bindtouchmove="scroll"/>
6 6
     <scroll-view wx:if="{{PageIndex==0}}" scroll-x="true" class="scrollPanel">
7 7
       <view class="showWidth"></view>
8 8
       <image wx:for="{{List2}}" wx:key="*this" class="img2" lazy-load="true" mode="widthFix" src='{{ImagePath}}web/{{item.Image}}'  bindtap="{{item.BindTap}}" data-url="{{item.Url}}" />
9 9
     </scroll-view>
10 10
     <image wx:if="{{PageIndex==0}}" id="Image21" class="img" lazy-load="true" mode="widthFix" src='{{ImagePath}}web/bm_sy_21.png' bindtap="goto" data-url="newuser?index=2" />
11 11
     
12
-    <view class="footer"></view>
12
+    <view wx:if="{{PageIndex==0}}" class="footer"></view>
13
+
13 14
     <view wx:if="{{IsShowPay}}" class="panelBottom FlexColumn" style='height:{{Containnerheight}}rpx;' catchtap="hidePay">
14 15
       <view class="panelBottom0 FlexColumn">
15 16
         <text class="text1">欢迎您\n报名新手培训班</text>
@@ -22,6 +23,7 @@
22 23
           <view class='text3'>7天手把手</view>
23 24
           <view class='text4'>教您上手新方法</view>
24 25
         </view>
26
+
25 27
         <view class="panelBottom1 FlexColumn" wx:if="{{StartDate}}">
26 28
           <view class='text3'>预计开班时间</view>
27 29
           <view class='text4'>{{StartDate}}</view>

+ 1 - 1
pages/other/pay.wxml

@@ -13,8 +13,8 @@
13 13
     </block>
14 14
   </view>
15 15
   <view class='lineFooter'></view>
16
-  <view class='text2'>{{Info.Text2}}</view>
17 16
   <view class="btn" bindtap='payMoney'>{{Info.Text8}}</view>
17
+  <text class='text2'>{{Info.Text2}}</text>
18 18
 </view>
19 19
 
20 20
 <view class="container FlexColumn" wx:if="{{PayPanel==1}}">

+ 4 - 2
pages/other/pay.wxss

@@ -52,10 +52,11 @@
52 52
 }
53 53
 
54 54
 .text2{
55
-  font-size:18rpx;
55
+  font-size:24rpx;
56 56
   font-weight: 400;
57 57
   margin-bottom: 30rpx;
58
-  margin-top: 240rpx;
58
+  margin-top: 80rpx;
59
+  text-align: center;
59 60
 }
60 61
 
61 62
 .btn{
@@ -67,6 +68,7 @@
67 68
   line-height: 90rpx;
68 69
   color:#fff;
69 70
   background-color: #169DED;
71
+  margin-top: 60rpx;
70 72
 }
71 73
 
72 74
 .code{

+ 61 - 12
pages/test/item.js

@@ -31,8 +31,7 @@ Page({
31 31
       that.audioCtx.play();
32 32
     });
33 33
 
34
-    this.audioCtx = wx.createAudioContext('myAudio');
35
-
34
+    
36 35
   },
37 36
   onLoad: function (options) {
38 37
     var that = this;
@@ -49,7 +48,9 @@ Page({
49 48
       if (options.bookid<100){
50 49
         if (options.bookid>=25 && options.bookid<=42)
51 50
           that.initAncientPoetry(options);
52
-        else if (options.bookid>=43 && options.bookid<=60)
51
+        else if (options.bookid>=43 && options.bookid<=44)
52
+          that.initPinyin(options);
53
+        else if (options.bookid>=45 && options.bookid<=60)
53 54
           that.initCi(options);
54 55
         else
55 56
           that.init(options);
@@ -59,6 +60,7 @@ Page({
59 60
     }
60 61
     that.getColor();
61 62
     
63
+    this.audioCtx = wx.createAudioContext('myAudio');
62 64
 
63 65
     isFinished = 0;
64 66
 
@@ -90,6 +92,44 @@ Page({
90 92
       }
91 93
     });
92 94
   },
95
+  initPinyin: function (options) {
96
+    var that = this;
97
+    that.setData({
98
+      TaskInfo: {},
99
+      TestType: options.testtype,
100
+      TestName1: options.name1,
101
+      TestName2: options.name2,
102
+    });
103
+    main.getData('GetPinyinUnitWords?UserID='+app.globalData.userInfo.UserID+'&BookID='+options.bookid+'&UnitID='+options.unitsid+'&Word='+options.name2, function (data) {
104
+      if (data) {
105
+        TaskList = [];
106
+        var list = data;
107
+        for (var k = 0; k < list.length; k++) {
108
+          var taskInfo = list[k];
109
+          
110
+          taskInfo.TagWidth=230;
111
+          taskInfo.FontSize=108;
112
+
113
+          taskInfo.ContentNew = main.changeStringToView(taskInfo.Content);
114
+          TaskList.push(taskInfo);
115
+        }
116
+
117
+        TaskList = common.randomArray(TaskList);
118
+
119
+        that.setData({
120
+          TaskInfo: TaskList[0],
121
+          TaskLength: TaskList.length,
122
+          CurrentIndex: 0,
123
+        });
124
+
125
+        common.getStorageValue(that, "TestAutioPlay", 1, function () { 
126
+          if (that.data.TestAutioPlay == 1 && that.data.TestType == "write") {
127
+            that.playSound({ currentTarget: { dataset: { content: TaskList[that.data.CurrentIndex].ReadString } } })
128
+          }
129
+        });
130
+      }
131
+    });
132
+  },
93 133
   initCi: function (options) {
94 134
     var that = this;
95 135
     that.setData({
@@ -395,6 +435,9 @@ Page({
395 435
         if (!url)
396 436
           url=str;
397 437
       }
438
+      else if (str.indexOf("pinyin")>0){
439
+          url=str;
440
+      }
398 441
       else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark != "undefined") {
399 442
         var soundmark = e.currentTarget.dataset.soundmark;
400 443
         if (soundmark && soundmark.indexOf("http") < 0) {
@@ -438,17 +481,24 @@ Page({
438 481
           url: url,
439 482
           success(res) {
440 483
             wx.hideLoading();
441
-            if (res.statusCode === 200) {
442
-              tempPlayUrlLocal = res.tempFilePath;
443
-              if (that.audioCtx){
444
-                that.audioCtx.setSrc(res.tempFilePath);
445
-                that.audioCtx.play();
446
-              }
447
-              tempPlayUrl = url;
448
-            }
484
+            tempPlayUrlLocal = res.tempFilePath;
485
+            innerAudioContext1.src = res.tempFilePath;
486
+            innerAudioContext1.play();
487
+            
488
+            tempPlayUrl = url;
489
+            
449 490
           },
450 491
           fail(err) {
451 492
             wx.hideLoading();
493
+            if (url.indexOf("sp0.baidu.com")>0){
494
+              var soundmark=url.substring(url.indexOf("text=")+5,url.indexOf("&spd"));
495
+              url = app.globalData.audioUrlYoudao;
496
+              url = url.replace("[word]", soundmark);
497
+              tempPlayUrlLocal = url;
498
+              that.audioCtx.setSrc(url);
499
+              that.audioCtx.play();
500
+              tempPlayUrl = url;
501
+            }
452 502
           }
453 503
         });
454 504
       }
@@ -460,7 +510,6 @@ Page({
460 510
         isPlaying = false;
461 511
       }
462 512
     }
463
-    
464 513
   },
465 514
   audioBindEnded: function () {
466 515
     isPlaying = false;

+ 1 - 1
pages/test/item.wxml

@@ -23,7 +23,7 @@
23 23
         <image src="../images/universalpic_broadcast_default_gray_34x25.png" class="universalpic_broadcast_default_gray_34x25" />
24 24
       </view>
25 25
 
26
-      <block wx:if="{{BookID<25 || BookID>36}}">
26
+      <block wx:if="{{!(BookID>=25 && BookID<=36)}}">
27 27
         <view class="btnTop FlexRow" catchtap='onAutoPlay' data-id="0"  wx:if="{{TestAutioPlay==1}}">
28 28
           <image src="../images/universalpic_broadcast_enable_tc0{{Color.ID}}_34x25.png" class="universalpic_broadcast_default_gray_34x25" />
29 29
         </view>

+ 10 - 1
pages/test/list.js

@@ -1,5 +1,6 @@
1 1
 import common from '../../utils/util';
2 2
 import main from '../../utils/main';
3
+import constant from '../../utils/constant';
3 4
 
4 5
 const app = getApp();
5 6
 var isClick = true;
@@ -60,6 +61,12 @@ Page({
60 61
       fieldName2="";
61 62
       listType="english";
62 63
     }
64
+    else if (that.data.BookID >= 43 && that.data.BookID <= 44){
65
+      arr = constant.arrPinyinList;
66
+      fieldName="拼音";
67
+      fieldName2="";
68
+      listType="音";
69
+    }
63 70
     else{
64 71
       arr = wx.getStorageSync("HanziAll");
65 72
       fieldName="字";
@@ -74,7 +81,9 @@ Page({
74 81
       FieldName2:fieldName2,
75 82
     });
76 83
       
77
-    arr = JSON.parse(arr);
84
+    if (that.data.BookID < 43 ||that.data.BookID > 44){
85
+      arr = JSON.parse(arr);
86
+    }
78 87
     var id = Number(options.id);
79 88
     
80 89
     var testReportList = wx.getStorageSync("UserTestReport");

+ 17 - 8
pages/test/list.wxml

@@ -1,5 +1,5 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-	<view class="text1" wx:if="{{ListType!='english'}}">请对照课本选择字组或词组</view>
2
+	<view class="text1" wx:if="{{ListType!='english' && BookID!=43 && BookID!=44}}">请对照课本选择字组或词组</view>
3 3
 	<view class="text1" wx:if="{{ListType=='english' && BookID>110 && BookID<120}}">将词汇等分成若干单元以便分批检验,分割方法并无特殊含义</view>
4 4
 	<view class="text1" wx:if="{{ListType=='english' && BookID>120 && BookID<130}}">词汇根据Lesson分组</view>
5 5
 	<view class="textNull" wx:if="{{ListType=='english' && ((BookID>130 && BookID<140) || (BookID>100 && BookID<110))}}"></view>
@@ -11,24 +11,28 @@
11 11
 					<view class="Word FlexRow" wx:if="{{ListType!='english' && (BookID<=24)}}">
12 12
 						<image class="img" src="{{ImagePath}}web/test/{{item.Words[0]}}.png" />
13 13
 					</view>
14
-					<view class="Title FlexRow">
14
+					<view class="Title FlexRow" wx:if="{{BookID!=44}}">
15 15
 						{{item.Name}}
16 16
 					</view>
17
+					<view class="TitlePinyin FlexRow" wx:if="{{BookID==44}}">
18
+						{{item.Name}}
19
+					</view>
20
+					
17 21
 				</view>
18 22
 				<view class="right FlexColumn">
19 23
 					<view class="right1 FlexRow">
20 24
 						<image wx:if="{{item.TestTypeRead==1}}" class="examine_willread_gray_22x22" src="../images/examine_willread_green_22x22.png"></image>
21 25
 						<image wx:if="{{!item.TestTypeRead}}" class="examine_willread_gray_22x22" src="../images/examine_willread_gray_22x22.png"></image>
22
-						<image wx:if="{{item.TestTypeWrite==1 && (BookID<=100 || BookID>110)}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_green_22x22.png"></image>
23
-						<image wx:if="{{!item.TestTypeWrite && (BookID<=100 || BookID>110)}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_gray_22x22.png"></image>
26
+						<image wx:if="{{item.TestTypeWrite==1 && (BookID<=100 || BookID>110) && BookID!=43 && BookID!=44}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_green_22x22.png"></image>
27
+						<image wx:if="{{!item.TestTypeWrite && (BookID<=100 || BookID>110) && BookID!=43 && BookID!=44}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_gray_22x22.png"></image>
24 28
 					</view>
25
-					<view class="right2">{{item.Words.length}}个{{FieldName}}</view>
29
+					<view class="right2"><block wx:if="{{BookID==44}}">{{item.Length}}</block><block wx:if="{{BookID!=44}}">{{item.Words.length}}</block>个{{FieldName}}</view>
26 30
 				</view>
27 31
 			</view>
28
-			<view class="lineWidthAll FlexRow" wx:if="{{ListType!='english'}}">
32
+			<view class="lineWidthAll FlexRow" wx:if="{{ListType!='english' && BookID!=44}}">
29 33
 				<view class="lineWidth720"></view>
30 34
 			</view>
31
-			<text class="PanelItem2" wx:if="{{ListType!='english'}}">
35
+			<text class="PanelItem2" wx:if="{{ListType!='english' && BookID!=44}}">
32 36
 			{{item.WordList}}
33 37
 			</text>
34 38
 		</view>
@@ -45,7 +49,7 @@
45 49
 		<view class="SelectContainer1Text2">选择检验方式</view>
46 50
 
47 51
 		<block wx:if="{{ListType!='english'}}">
48
-			<view class="btnPanel0 FlexRow" bindtap="goto" data-url="./wordlist?type=CHN&unitsid={{UnitsID}}&id={{SelectItem.ID}}">
52
+			<view class="btnPanel0 FlexRow" bindtap="goto" data-url="./wordlist?type=CHN&unitsid={{UnitsID}}&id={{SelectItem.ID}}&name={{SelectItem.Name}}">
49 53
 				<image src="../images/universalpic_word_blue_30x30.png" class="universalpic_word_blue_30x30" />
50 54
 				<view class="SelectContainer1Text4">查看字表</view>
51 55
 			</view>
@@ -63,6 +67,9 @@
63 67
 				<view wx:if="{{!SelectItem.TestTypeReadFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.ReadReportID}}" data-type="restart">
64 68
 					重新开始
65 69
 				</view>
70
+
71
+				<block wx:if="{{BookID!=43 && BookID!=44}}">
72
+				
66 73
 				<view wx:if="{{SelectItem.TestTypeWriteFinished}}" class="btn FlexRow" bindtap="gotoTestReportInfo" data-id="{{SelectItem.WriteReportID}}" data-type="write" data-url="./item?testtype=write&bookid={{BookID}}&unitsid={{SelectItem.ID}}&name1={{Name1}}&name2={{SelectItem.Name}}">
67 74
 					<image src="../images/examine_willwrite_gray_27x27.png" class="examine_willwrite_gray_27x27" />
68 75
 					<view class="SelectContainer1Text3">会写</view>
@@ -76,6 +83,8 @@
76 83
 				<view wx:if="{{!SelectItem.TestTypeWriteFinished}}" class="btnPanel21" bindtap="gotoTestReportInfo" data-id="{{SelectItem.WriteReportID}}" data-type="restart">
77 84
 					重新开始
78 85
 				</view>
86
+
87
+				</block>
79 88
 			</view>
80 89
 		</block>
81 90
 

+ 9 - 0
pages/test/list.wxss

@@ -45,6 +45,15 @@
45 45
   font-size:30rpx;
46 46
   color:#1e1e1e;
47 47
 }
48
+.TitlePinyin{
49
+  padding: 0 10rpx;
50
+  min-width: 100rpx;
51
+  height:70rpx;
52
+  background-color: #F0F0F0;
53
+  font-size: 38rpx;
54
+  text-align: center;
55
+  line-height: 70rpx;
56
+}
48 57
 .right{
49 58
   margin-right: 30rpx;
50 59
   align-items: flex-end;

+ 54 - 37
pages/test/wordlist.js

@@ -13,56 +13,73 @@ Page({
13 13
       Containnerheight: main.getWindowHeight(),
14 14
       ShowType:options.type,
15 15
     });
16
-
17
-    
18 16
        
19 17
     var words=[];
20 18
     var unitsName="";
21 19
     var fieldName="";
22 20
     var arr =[];
23
-    if (options.type=="CHN"){
24
-      arr= wx.getStorageSync("HanziAll");
25
-      fieldName="字";
26
-      var bookid=Number(options.unitsid);
21
+    var bookid=Number(options.unitsid);
27 22
       
28
-      if (bookid>24 && bookid<100)
29
-        fieldName="词";
23
+    if (bookid==43 || bookid==44){
24
+      main.getData('GetPinyinUnitWords?UserID='+app.globalData.userInfo.UserID+'&BookID='+bookid+'&UnitID='+options.id+'&Word='+options.name, function (data) {
25
+        if (data) {
26
+          var arr=data;
27
+          for (var i = 0; i < arr.length; i++) {
28
+              words.push(arr[i].Word);
29
+          }
30
+          that.setData({
31
+            UnitsName: options.name,
32
+            Words: words,
33
+            FieldName:"拼音",
34
+          });
35
+        }
36
+      });
30 37
     }
31 38
     else{
32
-      var bookid=Number(options.bookid);
33
-
34
-      fieldName="单词";
35
-      if (bookid>100 && bookid<110){
36
-        arr= wx.getStorageSync("PhoneticEngList");
37
-        fieldName="音标";
39
+      if (options.type=="CHN"){
40
+        arr= wx.getStorageSync("HanziAll");
41
+        fieldName="字";
42
+        
43
+        if (bookid>24 && bookid<100)
44
+          fieldName="词";
38 45
       }
39
-      else if (bookid>110 && bookid<120)
40
-        arr= wx.getStorageSync("EnglishAll");
41
-      else if (bookid>120 && bookid<130)
42
-        arr= wx.getStorageSync("NewConceptEngList");
43
-      else if (bookid>=130 && bookid<140)
44
-        arr= wx.getStorageSync("CambridgeEngList");
45
-      
46
-    }
47
-    arr = JSON.parse(arr);
48
-    var unitsid = Number(options.unitsid);
49
-    var id = options.id;
50
-    for (var i = 0; i < arr.length; i++) {
51
-      if (arr[i].ID == unitsid) {
52
-        var list = arr[i].Units;
53
-        for (var j = 0; j < list.length; j++) {
54
-          if (list[j].ID.toString()==id.toString()){
55
-            unitsName = list[j].Name;
56
-            words = list[j].Words;
46
+      else{
47
+        var bookid=Number(options.bookid);
48
+  
49
+        fieldName="单词";
50
+        if (bookid>100 && bookid<110){
51
+          arr= wx.getStorageSync("PhoneticEngList");
52
+          fieldName="音标";
53
+        }
54
+        else if (bookid>110 && bookid<120)
55
+          arr= wx.getStorageSync("EnglishAll");
56
+        else if (bookid>120 && bookid<130)
57
+          arr= wx.getStorageSync("NewConceptEngList");
58
+        else if (bookid>=130 && bookid<140)
59
+          arr= wx.getStorageSync("CambridgeEngList");
60
+        
61
+      }
62
+      arr = JSON.parse(arr);
63
+      var unitsid = Number(options.unitsid);
64
+      var id = options.id;
65
+      for (var i = 0; i < arr.length; i++) {
66
+        if (arr[i].ID == unitsid) {
67
+          var list = arr[i].Units;
68
+          for (var j = 0; j < list.length; j++) {
69
+            if (list[j].ID.toString()==id.toString()){
70
+              unitsName = list[j].Name;
71
+              words = list[j].Words;
72
+            }
57 73
           }
74
+          that.setData({
75
+            UnitsName: unitsName,
76
+            Words: words,
77
+            FieldName:fieldName,
78
+          });
58 79
         }
59
-        that.setData({
60
-          UnitsName: unitsName,
61
-          Words: words,
62
-          FieldName:fieldName,
63
-        });
64 80
       }
65 81
     }
82
+    
66 83
   },
67 84
   onShareAppMessage: function () {
68 85
     return {

+ 6 - 3
project.config.json

@@ -20,7 +20,7 @@
20 20
     "compileHotReLoad": true,
21 21
     "useMultiFrameRuntime": true,
22 22
     "useApiHook": true,
23
-    "useApiHostProcess": false,
23
+    "useApiHostProcess": true,
24 24
     "babelSetting": {
25 25
       "ignore": [],
26 26
       "disablePlugins": [],
@@ -31,12 +31,15 @@
31 31
     "packNpmManually": false,
32 32
     "packNpmRelationList": [],
33 33
     "minifyWXSS": true,
34
-    "showES6CompileOption": false
34
+    "disableUseStrict": false,
35
+    "showES6CompileOption": false,
36
+    "useCompilerPlugins": false,
37
+    "minifyWXML": true
35 38
   },
36 39
   "compileType": "miniprogram",
37 40
   "libVersion": "2.15.0",
38 41
   "appid": "wx84b3feac6069eec3",
39
-  "projectname": "miaoguo_master",
42
+  "projectname": "秒过",
40 43
   "debugOptions": {
41 44
     "hidedInDevtools": []
42 45
   },

+ 345 - 1
utils/constant.js

@@ -151,6 +151,334 @@ module.exports = {
151 151
     },
152 152
   ],
153 153
   arrSortType: ["智能规划", "最早优先", "今天优先"],
154
+  arrPinyinList: [
155
+    {
156
+      ID:43,
157
+      Units:[{
158
+        ID:431,
159
+        Name:"声母1",
160
+        Words:["b","p","m","f","d","t","n","l"]
161
+      },{
162
+        ID:432,
163
+        Name:"声母2",
164
+        Words:["g","k","h","j","q","x"]
165
+      },{
166
+        ID:433,
167
+        Name:"声母3",
168
+        Words:["zh","ch","sh","r","z","c","s","y","w"]
169
+      },{
170
+        ID:434,
171
+        Name:"韵母1",
172
+        Words:["a","o","e","i","u","ü"]
173
+      },{
174
+        ID:435,
175
+        Name:"韵母2",
176
+        Words:["ai","ei","ui","ao","ou","iu","ie","üe","er"]
177
+      },{
178
+        ID:436,
179
+        Name:"韵母3",
180
+        Words:["an","en","in","un","ün","ang","eng","ing","ong"]
181
+      },{
182
+        ID:437,
183
+        Name:"整体认读1",
184
+        Words:["zhi","chi","shi","ri","zi","ci","si","yi","wu"]
185
+      },{
186
+        ID:438,
187
+        Name:"整体认读2",
188
+        Words:["yu","ye","yue","yin","yun","yuan","ying"]
189
+      },]
190
+    },
191
+    {
192
+      ID:44,
193
+      Units:[{
194
+        ID:439,
195
+        Name:"b",
196
+        Words:[],
197
+        Length:55,
198
+      },{
199
+        ID:440,
200
+        Name:"p",
201
+        Words:[],
202
+        Length:60,
203
+      },{
204
+        ID:441,
205
+        Name:"m",
206
+        Words:[],
207
+        Length:58,
208
+      },{
209
+        ID:442,
210
+        Name:"f",
211
+        Words:[],
212
+        Length:30,
213
+      },{
214
+        ID:443,
215
+        Name:"d",
216
+        Words:[],
217
+        Length:62,
218
+      },{
219
+        ID:444,
220
+        Name:"t",
221
+        Words:[],
222
+        Length:67,
223
+      },{
224
+        ID:445,
225
+        Name:"n",
226
+        Words:[],
227
+        Length:37,
228
+      },{
229
+        ID:446,
230
+        Name:"l",
231
+        Words:[],
232
+        Length:81,
233
+      },{
234
+        ID:447,
235
+        Name:"g",
236
+        Words:[],
237
+        Length:47,
238
+      },{
239
+        ID:448,
240
+        Name:"k",
241
+        Words:[],
242
+        Length:50,
243
+      },{
244
+        ID:449,
245
+        Name:"h",
246
+        Words:[],
247
+        Length:64,
248
+      },{
249
+        ID:450,
250
+        Name:"j",
251
+        Words:[],
252
+        Length:45,
253
+      },{
254
+        ID:451,
255
+        Name:"q",
256
+        Words:[],
257
+        Length:48,
258
+      },{
259
+        ID:452,
260
+        Name:"x",
261
+        Words:[],
262
+        Length:53,
263
+      },{
264
+        ID:453,
265
+        Name:"zh",
266
+        Words:[],
267
+        Length:61,
268
+      },{
269
+        ID:454,
270
+        Name:"ch",
271
+        Words:[],
272
+        Length:65,
273
+      },{
274
+        ID:455,
275
+        Name:"sh",
276
+        Words:[],
277
+        Length:59,
278
+      },{
279
+        ID:456,
280
+        Name:"r",
281
+        Words:[],
282
+        Length:30,
283
+      },{
284
+        ID:457,
285
+        Name:"z",
286
+        Words:[],
287
+        Length:48,
288
+      },{
289
+        ID:458,
290
+        Name:"c",
291
+        Words:[],
292
+        Length:45,
293
+      },{
294
+        ID:459,
295
+        Name:"s",
296
+        Words:[],
297
+        Length:39,
298
+      },{
299
+        ID:460,
300
+        Name:"y",
301
+        Words:[],
302
+        Length:54,
303
+      },{
304
+        ID:461,
305
+        Name:"w",
306
+        Words:[],
307
+        Length:34,
308
+      },{
309
+        ID:462,
310
+        Name:"a",
311
+        Words:[],
312
+        Length:71,
313
+      },{
314
+        ID:463,
315
+        Name:"o",
316
+        Words:[],
317
+        Length:21,
318
+      },{
319
+        ID:464,
320
+        Name:"e",
321
+        Words:[],
322
+        Length:46,
323
+      },{
324
+        ID:465,
325
+        Name:"i",
326
+        Words:[],
327
+        Length:44,
328
+      },{
329
+        ID:466,
330
+        Name:"u",
331
+        Words:[],
332
+        Length:70,
333
+      },{
334
+        ID:467,
335
+        Name:"ü",
336
+        Words:[],
337
+        Length:21,
338
+      },{
339
+        ID:468,
340
+        Name:"ai",
341
+        Words:[],
342
+        Length:58,
343
+      },{
344
+        ID:469,
345
+        Name:"ei",
346
+        Words:[],
347
+        Length:30,
348
+      },{
349
+        ID:470,
350
+        Name:"ui",
351
+        Words:[],
352
+        Length:37,
353
+      },{
354
+        ID:471,
355
+        Name:"ao",
356
+        Words:[],
357
+        Length:69,
358
+      },{
359
+        ID:472,
360
+        Name:"ou",
361
+        Words:[],
362
+        Length:57,
363
+      },{
364
+        ID:473,
365
+        Name:"iu",
366
+        Words:[],
367
+        Length:20,
368
+      },{
369
+        ID:474,
370
+        Name:"ie",
371
+        Words:[],
372
+        Length:27,
373
+      },{
374
+        ID:475,
375
+        Name:"üe",
376
+        Words:[],
377
+        Length:14,
378
+      },{
379
+        ID:476,
380
+        Name:"er",
381
+        Words:[],
382
+        Length:3,
383
+      },{
384
+        ID:477,
385
+        Name:"an",
386
+        Words:[],
387
+        Length:73,
388
+      },{
389
+        ID:478,
390
+        Name:"en",
391
+        Words:[],
392
+        Length:49,
393
+      },{
394
+        ID:479,
395
+        Name:"in",
396
+        Words:[],
397
+        Length:28,
398
+      },{
399
+        ID:480,
400
+        Name:"un",
401
+        Words:[],
402
+        Length:36,
403
+      },{
404
+        ID:481,
405
+        Name:"ün",
406
+        Words:[],
407
+        Length:11,
408
+      },{
409
+        ID:482,
410
+        Name:"ang",
411
+        Words:[],
412
+        Length:69,
413
+      },{
414
+        ID:483,
415
+        Name:"eng",
416
+        Words:[],
417
+        Length:53,
418
+      },{
419
+        ID:484,
420
+        Name:"ing",
421
+        Words:[],
422
+        Length:36,
423
+      },{
424
+        ID:485,
425
+        Name:"ong",
426
+        Words:[],
427
+        Length:43,
428
+      },{
429
+        ID:486,
430
+        Name:"ia",
431
+        Words:[],
432
+        Length:12,
433
+      },{
434
+        ID:487,
435
+        Name:"iao",
436
+        Words:[],
437
+        Length:36,
438
+      },{
439
+        ID:488,
440
+        Name:"ian",
441
+        Words:[],
442
+        Length:35,
443
+      },{
444
+        ID:489,
445
+        Name:"iang",
446
+        Words:[],
447
+        Length:16,
448
+      },{
449
+        ID:490,
450
+        Name:"iong",
451
+        Words:[],
452
+        Length:7,
453
+      },{
454
+        ID:491,
455
+        Name:"ua",
456
+        Words:[],
457
+        Length:15,
458
+      },{
459
+        ID:492,
460
+        Name:"uo",
461
+        Words:[],
462
+        Length:41,
463
+      },{
464
+        ID:493,
465
+        Name:"uai",
466
+        Words:[],
467
+        Length:17,
468
+      },{
469
+        ID:494,
470
+        Name:"uan",
471
+        Words:[],
472
+        Length:54,
473
+      },{
474
+        ID:495,
475
+        Name:"uang",
476
+        Words:[],
477
+        Length:20,
478
+      },]
479
+    }
480
+
481
+  ],
154 482
   arrFontSize: [{
155 483
       Name: "紧凑",
156 484
       Value: 36
@@ -236,6 +564,22 @@ module.exports = {
236 564
     Type:"CHN",
237 565
     Select: "Select",
238 566
     List: [{
567
+      ID: 43,
568
+      Type: "Shizi",
569
+      Name: "语文拼音",
570
+      Name2: "基础发音",
571
+      Finish: 0,
572
+      Total: 8,
573
+      Image: "../images/examine_subject_a001.png"
574
+    },{
575
+      ID: 44,
576
+      Type: "Shizi",
577
+      Name: "语文拼音",
578
+      Name2: "发音组合",
579
+      Finish: 0,
580
+      Total: 65,
581
+      Image: "../images/examine_subject_a001.png"
582
+    },{
239 583
       ID: 1,
240 584
       Type: "Shizi",
241 585
       Name: "语文识字",
@@ -2122,7 +2466,7 @@ module.exports = {
2122 2466
     ['xing5', 'xing', ['']],
2123 2467
     ['xiong1', 'xiōng', ['兄']],
2124 2468
     ['xiong2', 'xióng', ['熊']],
2125
-    ['xiong3', 'xiǒng', ['焸']],
2469
+    //['xiong3', 'xiǒng', ['焸']],
2126 2470
     ['xiong4', 'xiòng', ['诇']],
2127 2471
     ['xiu1', 'xiū', ['休']],
2128 2472
     ['xiu3', 'xiǔ', ['朽']],

+ 90 - 0
utils/main.js

@@ -994,6 +994,96 @@ function GetTestReportInfo(reportid, callback) {
994 994
           }
995 995
         });
996 996
       } 
997
+      else if (name1[1].indexOf("拼音") >= 0) {
998
+        //console.log("拼音");
999
+        var userTestReportInfo = UserTestReport[n];
1000
+        var bookid = userTestReportInfo.BookID;
1001
+
1002
+        var tempRight = "," + userTestReportInfo.TestRightStr + ",";
1003
+        var tempWrong = "," + userTestReportInfo.TestWrongStr + ",";
1004
+        var tempSkip = "," + userTestReportInfo.TestSkipStr + ",";
1005
+        var tempExist = "," + userTestReportInfo.TestExistStr + ",";
1006
+
1007
+        var unitsid="";
1008
+        var name2=userTestReportInfo.Name[1];
1009
+        if (bookid==43){
1010
+          switch(name2){
1011
+            case "声母1":
1012
+              unitsid=431;
1013
+              break;
1014
+            case "声母2":
1015
+              unitsid=432;
1016
+              break;
1017
+            case "声母3":
1018
+              unitsid=433;
1019
+              break;
1020
+            case "韵母1":
1021
+              unitsid=434;
1022
+              break;
1023
+            case "韵母2":
1024
+              unitsid=435;
1025
+              break;
1026
+            case "韵母3":
1027
+              unitsid=436;
1028
+              break;
1029
+            case "整体认读1":
1030
+              unitsid=437;
1031
+              break;
1032
+            case "整体认读2":
1033
+              unitsid=438;
1034
+              break;
1035
+          }
1036
+        }        
1037
+        getData('GetPinyinUnitWords?UserID='+app.globalData.userInfo.UserID+'&BookID='+bookid+'&UnitID='+unitsid+'&Word='+name2, function (data) {
1038
+          if (data) {
1039
+            var result = {};
1040
+            result.ID = userTestReportInfo.ID;
1041
+            result.IsFinished = userTestReportInfo.IsFinished;
1042
+            result.Name = userTestReportInfo.Name.join("#");
1043
+            result.TestType = userTestReportInfo.TestType;
1044
+            result.BookID = bookid;
1045
+
1046
+            var TaskList = [];
1047
+            var words = data;
1048
+            for (var k = 0; k < words.length; k++) {
1049
+              var taskInfo = words[k];
1050
+
1051
+              taskInfo.TagWidth=230;
1052
+              taskInfo.FontSize=108;
1053
+              
1054
+              taskInfo.ContentNew = changeStringToView(taskInfo.Content);
1055
+              if (tempRight.indexOf("," + taskInfo.Word + ",") >= 0)
1056
+                taskInfo.Result = 1;
1057
+              if (tempWrong.indexOf("," + taskInfo.Word + ",") >= 0)
1058
+                taskInfo.Result = -1;
1059
+              if (tempSkip.indexOf("," + taskInfo.Word + ",") >= 0)
1060
+                taskInfo.Result = 0;
1061
+
1062
+              if (tempExist.indexOf("," + taskInfo.Word + ",") >= 0)
1063
+                taskInfo.Css = "Select2";
1064
+
1065
+              TaskList.push(taskInfo);
1066
+            }
1067
+            result.TestRightStr = "";
1068
+            result.TestWrongStr = "";
1069
+            result.TestSkipStr = "";
1070
+            result.TestExistStr = "";
1071
+            if (userTestReportInfo.TestRightStr)
1072
+              result.TestRightStr = userTestReportInfo.TestRightStr;
1073
+            if (userTestReportInfo.TestWrongStr)
1074
+              result.TestWrongStr = userTestReportInfo.TestWrongStr;
1075
+            if (userTestReportInfo.TestSkipStr)
1076
+              result.TestSkipStr = userTestReportInfo.TestSkipStr;
1077
+            if (userTestReportInfo.TestExistStr)
1078
+              result.TestExistStr = userTestReportInfo.TestExistStr;
1079
+
1080
+            result.List = TaskList;
1081
+            callback(result);
1082
+          } else {
1083
+            callback({});
1084
+          }
1085
+        });
1086
+      } 
997 1087
       else if (name2=="古诗文") {
998 1088
         //todo
999 1089
         //console.log("古诗文");