chengjie 4 lat temu
rodzic
commit
f10fcbca5a

+ 1 - 1
app.js

@@ -1,6 +1,6 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "2.1.11",
3
+    Version: "2.1.15",
4 4
     IsProduction: true,
5 5
     ShareTitle: "高效学习从秒过开始",
6 6
     SharePath: "pages/index/index",

BIN
pages/images/universalpic_4blocks_gray_28x28.png


BIN
pages/images/universalpic_cardlist_gray_30x28.png


+ 2 - 1
pages/index/index.js

@@ -147,9 +147,10 @@ Page({
147 147
         var pid=options.PrintID;
148 148
         if (!pid)
149 149
           pid=options.P;
150
+        var puid=options.U;
150 151
         this.setData({
151 152
           gotoType: "other",
152
-          gotoUrl: "../main/mainlist?PrintID="+pid,
153
+          gotoUrl: "../main/mainlist?PrintID="+pid+"&PrintUserID="+puid,
153 154
         });
154 155
       }
155 156
       else if (options.type == "paycontinue") { 

+ 15 - 5
pages/main/add.js

@@ -159,16 +159,26 @@ Page({
159 159
             card.CardType=0;
160 160
           
161 161
           card.IsCollect=list[i].IsCollect;
162
-          if (!card.IsCollect)
162
+          if (that.data.IsCollect) 
163
+            card.IsCollect=that.data.IsCollect;
164
+          else if (!card.IsCollect)
163 165
             card.IsCollect=0;
166
+
164 167
           card.FontSize=list[i].FontSize;
165
-          if (!card.FontSize)
168
+          if (that.data.FontSize) 
169
+            card.FontSize=that.data.FontSize;
170
+          else if (!card.FontSize)
166 171
             card.FontSize=48;
172
+
167 173
           card.FolderID=list[i].FolderID;
168
-          if (!card.FolderID)
174
+          if (that.data.FolderID) {
175
+            card.FolderID=that.data.FolderID;
176
+            card.FolderName=that.data.FolderName;
177
+          }
178
+          else if (!card.FolderID){
169 179
             card.FolderID=0;
170
-          card.FolderName=list[i].FolderName;
171
-
180
+          }
181
+          
172 182
           if (list[i].LimitTime)
173 183
             card.LimitTime=list[i].LimitTime;
174 184
           else if (that.data.LimitTime)

+ 6 - 3
pages/main/cardmain.js

@@ -61,14 +61,17 @@ Page({
61 61
   getFolderList:function(e){
62 62
     var that=this;
63 63
     var list=app.globalData.FolderList;
64
-    common.getStorageValue(that, "FolderOrder", ["","","PanelBtnSelect","","",""], function () {
64
+    common.getStorageValue(that, "FolderOrder", ["","","","","","","",""], function () {
65 65
       if (list.length==0 || e){
66 66
         var order=that.data.FolderOrder;
67 67
         var url="GetUserFolderList?UserID="+app.globalData.userInfo.UserID;
68 68
         if (e){
69
-          url+="&OrderType="+e.currentTarget.dataset.order;
70
-          order=["","","","","",""];
69
+          //url+="&OrderType="+e.currentTarget.dataset.order;
70
+          order=["","","","","","","",""];
71 71
           order[e.currentTarget.dataset.index]="PanelBtnSelect";
72
+
73
+          wx.setStorageSync('FolderOrderStr', e.currentTarget.dataset.order);
74
+          main.UploadUserConfig();
72 75
         }
73 76
         
74 77
         main.getData(url, function (data) {

+ 5 - 2
pages/main/cardmain.wxml

@@ -166,11 +166,14 @@
166 166
       </view>
167 167
       <view class="PanelOrder1 FlexRow">
168 168
         <view class="PanelOrder31">按题卡数量</view>
169
+        <view class="PanelOrder32 PanelOrder31">按卡单标题</view>
169 170
       </view>
170 171
       <view class="PanelOrder2 FlexRow">
171 172
         <view class="{{FolderOrder[4]}} PanelOrderBtn3 PanelOrderBtn" catchtap="getFolderList" data-order="Total asc" data-index='4'>较少</view>
172
-        <view class="{{FolderOrder[5]}} PanelOrderBtn"  catchtap="getFolderList" data-order="Total desc" data-index='5'>较多</view>
173
-        <view class="PanelOrderBtn0"></view>
173
+        <view class="{{FolderOrder[5]}} PanelOrderBtn" catchtap="getFolderList" data-order="Total desc" data-index='5'>较多</view>
174
+        <view class="{{FolderOrder[6]}} PanelOrderBtn" catchtap="getFolderList" data-order="Name asc" data-index='6'>a-z</view>
175
+        <view class="{{FolderOrder[7]}} PanelOrderBtn3 PanelOrderBtn"  catchtap="getFolderList" data-order="Name desc" data-index='7'>z-a</view>
176
+        
174 177
       </view>
175 178
       <view class="PanelOrderLine60"></view>
176 179
     </view>

+ 395 - 240
pages/main/detail.js

@@ -4,14 +4,15 @@ import constant from '../../utils/constant';
4 4
 
5 5
 const app = getApp();
6 6
 
7
-const arrStudyPlan = ["日常","紧急"];
7
+const arrStudyPlan = ["日常", "紧急"];
8 8
 
9 9
 var innerAudioContext1;
10 10
 
11 11
 var listTaskFinished = []; //完成的任务
12 12
 var timeStart; //计算时长
13 13
 var timeHistory = 0; //已经过去的时间
14
-var TaskList = [];
14
+var TaskList = []; //任务列表
15
+var FolderList = []; //卡单列表
15 16
 var arrImage = [],
16 17
   arrImage2 = [];
17 18
 var intervalSound = 0,
@@ -21,13 +22,16 @@ var isExit = true;
21 22
 
22 23
 var isPlaying = false;
23 24
 
25
+var currentFolderID = -1; //当前练习卡单ID,没有时为-1
26
+var currentFolderStart = false;
27
+
24 28
 var timeoutPlayAudio;
25 29
 var tempPlayUrl = "";
26 30
 var tempPlayUrlLocal = "";
27 31
 var timeoutEveryCard = 0;
28 32
 var timeoutHide = 0;
29 33
 
30
-var arrAutoAudio=[];
34
+var arrAutoAudio = [];
31 35
 
32 36
 Page({
33 37
   data: {
@@ -37,19 +41,23 @@ Page({
37 41
     NumberHistory: 30,
38 42
     IsShowNumberInfo: false,
39 43
     IsMore: false,
44
+    IsShowOrder: false,
45
+    IsShowFolder: false,
40 46
     FontSizeArray: constant.arrFontSize,
41 47
     StudyPlanArray: arrStudyPlan,
42 48
     TaskInfo: {},
43
-    Color: {ID: 1},
44
-    IsAutoSound:false,//是否设置了自动播放
45
-    IsAutoSoundStart:false,//是否开始自动播放
46
-    Title:"",
49
+    Color: {
50
+      ID: 1
51
+    },
52
+    IsAutoSound: false, //是否设置了自动播放
53
+    IsAutoSoundStart: false, //是否开始自动播放
54
+    Title: "",
47 55
   },
48 56
   onReady: function () {
49 57
     var that = this;
50 58
     innerAudioContext1 = wx.createInnerAudioContext();
51 59
     innerAudioContext1.onPlay(() => {
52
-      console.log('开始播放')
60
+      //console.log('开始播放')
53 61
     });
54 62
     innerAudioContext1.onError((res) => {
55 63
       console.log("innerAudioContext1.errMsg:" + res.errMsg);
@@ -95,13 +103,13 @@ Page({
95 103
     this.getColor();
96 104
 
97 105
     this.getMemoryLevel();
98
-    
106
+
99 107
     if (app.globalData.BaiduToken === "")
100 108
       main.getBaiduToken();
101 109
 
102
-    if (app.globalData.IsOppo){
110
+    if (app.globalData.IsOppo) {
103 111
       that.setData({
104
-        TextSpace:"nbsp",
112
+        TextSpace: "nbsp",
105 113
       });
106 114
     }
107 115
 
@@ -137,19 +145,22 @@ Page({
137 145
       }
138 146
     }
139 147
 
140
-    
141
-    if (that.data.IsMore){
148
+    if (that.data.IsMore) {
142 149
       //关于更改学习计划后处理
143
-      if (app.globalData.IsUpdateStudyPlan == 1){
144
-        that.gotoNext({ currentTarget: { dataset: { btnnumber:-2}}});
150
+      if (app.globalData.IsUpdateStudyPlan == 1) {
151
+        that.gotoNext({
152
+          currentTarget: {
153
+            dataset: {
154
+              btnnumber: -2
155
+            }
156
+          }
157
+        });
145 158
         app.globalData.IsUpdateStudyPlan = 0;
146 159
       }
147 160
       that.setData({
148 161
         IsMore: false,
149 162
       });
150 163
     }
151
-    
152
-    
153 164
     clearTimeout(timeoutHide);
154 165
     //console.log("显示");
155 166
   },
@@ -184,10 +195,10 @@ Page({
184 195
     });
185 196
     wx.stopPullDownRefresh();
186 197
   },
187
-  setSoundFile: function (isFinish) { 
198
+  setSoundFile: function (isFinish) {
188 199
     //isFinish=3搁置 =2撤退 =1结束 =0正常 =-1开始
189 200
     var that = this;
190
-    if (that.data.HasSound){
201
+    if (that.data.HasSound) {
191 202
       var url = "/pages/sounds/";
192 203
       if (isFinish == 1) {
193 204
         url += "end.mp3";
@@ -228,6 +239,7 @@ Page({
228 239
   },
229 240
   getList: function () {
230 241
     var task = app.globalData.TaskToday;
242
+    FolderList = task.FolderName;
231 243
     var that = this;
232 244
     var arrNew = task.ListNew;
233 245
     var arrHistory = task.ListHistory;
@@ -280,15 +292,20 @@ Page({
280 292
 
281 293
     //处理列表
282 294
     TaskList = formatList(TaskList);
283
-
295
+    var taskInfo = {};
284 296
     if (TaskList.length > 0) {
285 297
       arrImage = TaskList[0].ContentNew.Images;
286 298
       arrImage2 = TaskList[0].ContentNew.Images2;
287
-    }
288 299
 
289
-    var taskInfo = TaskList[0];
290
-    if (!taskInfo)
291
-      taskInfo = {};
300
+      that.autoAudioPlayInit();
301
+      taskInfo = TaskList[0];
302
+
303
+      
304
+      common.getStorageValue(that, "IsFolderPractice", 0, function () {
305
+        if (that.data.IsFolderPractice==1)
306
+          that.onShowFolder();
307
+      });
308
+    }
292 309
 
293 310
     that.setData({
294 311
       NumberNew: arrNew.length,
@@ -298,7 +315,6 @@ Page({
298 315
       CanUndo: 0,
299 316
     });
300 317
 
301
-    that.autoAudioPlayInit();
302 318
 
303 319
     listTaskFinished = [];
304 320
     that.timeCompute(); //起始时间
@@ -344,23 +360,23 @@ Page({
344 360
       var start = e.currentTarget.dataset.start;
345 361
       var that = this;
346 362
       if (!(that.data.NumberNew == 0 &&
347
-        that.data.NumberReview == 0 &&
348
-        that.data.NumberHistory == 0) && !that.data.IsShowNumberInfo) {
363
+          that.data.NumberReview == 0 &&
364
+          that.data.NumberHistory == 0) && !that.data.IsShowNumberInfo) {
349 365
 
350 366
         var recommend = 0;
351 367
         if (start) {
352 368
           that.data.IsShowAnswer[0] = 0;
353 369
           that.data.IsShowAnswer[1] = 0;
354 370
         } else {
355
-          if (!that.data.IsShowAnswer){
356
-            that.data.IsShowAnswer=[0,0];
371
+          if (!that.data.IsShowAnswer) {
372
+            that.data.IsShowAnswer = [0, 0];
357 373
           }
358
-          if (that.data.IsShowAnswer[0]==0 && that.data.IsShowAnswer[1]==0) {
374
+          if (that.data.IsShowAnswer[0] == 0 && that.data.IsShowAnswer[1] == 0) {
359 375
             that.data.IsShowAnswer[0] = 1;
360
-            
376
+
361 377
             if (TaskList[0].ContentNew.Field[3].length == 0) {
362 378
               that.data.IsShowAnswer[1] = 1;
363
-              
379
+
364 380
               if (!that.data.TaskInfo.IsNew)
365 381
                 recommend = getRecommendTime();
366 382
               that.setData({
@@ -369,7 +385,7 @@ Page({
369 385
             }
370 386
           } else if (that.data.IsShowAnswer[0] && !that.data.IsShowAnswer[1]) {
371 387
             that.data.IsShowAnswer[1] = 1;
372
-            
388
+
373 389
             if (!that.data.TaskInfo.IsNew)
374 390
               recommend = getRecommendTime();
375 391
             that.setData({
@@ -382,13 +398,53 @@ Page({
382 398
         });
383 399
         that.autoAudioPlayInit();
384 400
 
385
-        if (that.data.IsShowAnswer[1]){
386
-          var query = wx.createSelectorQuery().in(that)
387
-          query.select('#ViewField3').boundingClientRect(function(res){
388
-            if (res && res.top && res.top>130)
389
-              scroll(res.top-130);
390
-          }).exec();
401
+        if (that.data.IsShowAnswer[0]==1 && that.data.IsShowAnswer[1]==0) {
402
+          startScroll(2);
391 403
         }
404
+        else if (that.data.IsShowAnswer[0]==1 && that.data.IsShowAnswer[1]==1) {
405
+          if (that.data.TaskInfo.Content[3].Content){
406
+            startScroll(3);
407
+          }
408
+          else{
409
+            startScroll(2);
410
+          }
411
+        }
412
+      }
413
+
414
+      function startScroll(t){
415
+        var num=0;
416
+        setHeight("#ViewField1",function(h1){
417
+          num+=h1;
418
+          setHeight("#ViewFieldTag",function(hTag){
419
+            if (hTag>0)
420
+              num+=hTag+60;
421
+            console.log("hTag:"+(hTag));
422
+            
423
+            setHeight("#ViewField2",function(h2){
424
+              if (t==2){
425
+                if (h2>(app.globalData.systemInfo.screenHeight/3))
426
+                  scroll(num);
427
+              }
428
+              else{
429
+                num+=h2+20;
430
+                scroll(num);
431
+              }
432
+            });
433
+          });
434
+        });
435
+      }
436
+
437
+      function setHeight(obj,callback) {
438
+        var query = wx.createSelectorQuery().in(that);
439
+        query.select(obj).boundingClientRect(function (res) {
440
+          if (res && res.height){
441
+            console.log(obj+".height:"+res.height);
442
+            callback(res.height);
443
+          }
444
+          else{
445
+            callback(0);
446
+          }
447
+        }).exec();
392 448
       }
393 449
 
394 450
       function scroll(top) {
@@ -492,151 +548,152 @@ Page({
492 548
   //进入下一张题卡
493 549
   gotoNext: function (e) {
494 550
     var that = this;
495
-    //btnnumber可以有 5:秒过 4正常 3困难 2挪到最后 1搁置 0不过 -1今天要练 -2更改计划
551
+    //btnnumber可以有 5:秒过 4正常 3困难 2挪到最后 1搁置 0不过 -1今天要练 -2更改计划 -3卡单练习
496 552
     var btnnumber = e.currentTarget.dataset.btnnumber;
497 553
     //若是“挪到最后”
498 554
     if (btnnumber == 2) {
499 555
       var card = TaskList.splice(0, 1);
500
-      card[0].IsFinally=true;
501
-      card[0].LimitTime=common.formatTime(new Date(),"/",true)+" 23:59:59";
556
+      card[0].IsFinally = true;
557
+      card[0].LimitTime = common.formatTime(new Date(), "/", true) + " 23:59:59";
502 558
       TaskList.push(card[0]);
503 559
       that.setData({
504 560
         IsShowAnswer: [0, 0],
505 561
         TaskInfo: TaskList[0],
506 562
         CanUndo: 1,
507 563
         Recommend: 0,
508
-        IsMore: false,
564
+        IsShowOrder: false,
509 565
       });
510
-    }
511
-    else{
512
-      var time = e.currentTarget.dataset.time;
513
-      //处理当前卡片进入历史数组
514
-      var finishCard = {};
515
-      finishCard.Card = TaskList[0];
516
-
517
-      finishCard.NumberNew = this.data.NumberNew;
518
-      finishCard.NumberReview = this.data.NumberReview;
519
-      finishCard.NumberHistory = this.data.NumberHistory;
520
-
521
-      finishCard.Number0Old = TaskList[0].Number0;
522
-      finishCard.Number0StrOld = TaskList[0].Number0Str;
523
-      finishCard.Number1Old = TaskList[0].Number1;
524
-      finishCard.Number1StrOld = TaskList[0].Number1Str;
525
-      finishCard.Number2Old = TaskList[0].Number2;
526
-      finishCard.Number2StrOld = TaskList[0].Number2Str;
527
-      finishCard.Number3Old = TaskList[0].Number3;
528
-      finishCard.Number3StrOld = TaskList[0].Number3Str;
529
-
530
-      
531
-      //若是当前题卡更改学习计划
532
-      if (btnnumber==-2) {
533
-        for (var i = 0,flag=true; i < listTaskFinished.length;flag?i++:i){
534
-          if (listTaskFinished[i].Card.MiaoguoCardID==finishCard.Card.MiaoguoCardID){
535
-            listTaskFinished.splice(i,1);
536
-            flag=false;
566
+    } else {
567
+      //若是没有选择了卡单,或者刚刚选择卡单
568
+      if (currentFolderID == -1 || !currentFolderStart) {
569
+        
570
+        var time = e.currentTarget.dataset.time;
571
+        //处理当前卡片进入历史数组
572
+        var finishCard = {};
573
+        finishCard.Card = TaskList[0];
574
+
575
+        finishCard.NumberNew = this.data.NumberNew;
576
+        finishCard.NumberReview = this.data.NumberReview;
577
+        finishCard.NumberHistory = this.data.NumberHistory;
578
+
579
+        finishCard.Number0Old = TaskList[0].Number0;
580
+        finishCard.Number0StrOld = TaskList[0].Number0Str;
581
+        finishCard.Number1Old = TaskList[0].Number1;
582
+        finishCard.Number1StrOld = TaskList[0].Number1Str;
583
+        finishCard.Number2Old = TaskList[0].Number2;
584
+        finishCard.Number2StrOld = TaskList[0].Number2Str;
585
+        finishCard.Number3Old = TaskList[0].Number3;
586
+        finishCard.Number3StrOld = TaskList[0].Number3Str;
587
+
588
+
589
+        //若是当前题卡更改学习计划
590
+        if (btnnumber == -2) {
591
+          for (var i = 0, flag = true; i < listTaskFinished.length; flag ? i++ : i) {
592
+            if (listTaskFinished[i].Card.MiaoguoCardID == finishCard.Card.MiaoguoCardID) {
593
+              listTaskFinished.splice(i, 1);
594
+              flag = false;
595
+            } else
596
+              flag = true;
537 597
           }
538
-          else
539
-            flag=true;
540
-        }
541
-      }
542
-      else{
543
-        //若不是搁置
544
-        //算出下一次的时间
545
-        if (btnnumber != "1") {
546
-
547
-          //若是分钟,则进入复习列表
548
-          if (time.lastIndexOf("m") == time.length - 1) {
549
-            var minute = Number(time.substr(0, time.indexOf("m")));
550
-            TaskList[0].LimitTime = common.formatTime(common.addDate("n", minute, new Date()));
551
-            //若是新建,则10m 1d 4d
552
-            if (TaskList[0].IsNew) {
553
-              if (minute == 1) {
554
-                TaskList[0].Number0 = "1m";
555
-                TaskList[0].Number2 = "10m";
598
+        } else {
599
+          //若不是搁置
600
+          //算出下一次的时间
601
+          if (btnnumber != "1") {
602
+
603
+            //若是分钟,则进入复习列表
604
+            if (time.lastIndexOf("m") == time.length - 1) {
605
+              var minute = Number(time.substr(0, time.indexOf("m")));
606
+              TaskList[0].LimitTime = common.formatTime(common.addDate("n", minute, new Date()));
607
+              //若是新建,则10m 1d 4d
608
+              if (TaskList[0].IsNew) {
609
+                if (minute == 1) {
610
+                  TaskList[0].Number0 = "1m";
611
+                  TaskList[0].Number2 = "10m";
612
+                } else {
613
+                  TaskList[0].Number0 = "10m";
614
+                  TaskList[0].Number2 = "1d";
615
+                }
616
+
617
+                TaskList[0].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, TaskList[0].Number0);
618
+                TaskList[0].Number2Str = main.getMemoryLevel(app.globalData.MemoryLevel, 2, TaskList[0].Number2);
619
+
620
+                delete TaskList[0].Number1;
621
+                delete TaskList[0].Number1Str;
622
+
623
+                delete TaskList[0].Number3;
624
+                delete TaskList[0].Number3Str;
625
+
626
+                TaskList[0].FirstTime = null;
627
+                TaskList[0].LastTime = null;
556 628
               }
557
-              else {
629
+              //若是历史的,则10m 1d
630
+              else if (TaskList[0].IsHistory) {
558 631
                 TaskList[0].Number0 = "10m";
559
-                TaskList[0].Number2 = "1d";
560
-              }
561
-
562
-              TaskList[0].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, TaskList[0].Number0);
563
-              TaskList[0].Number2Str = main.getMemoryLevel(app.globalData.MemoryLevel, 2, TaskList[0].Number2);
564
-
565
-              delete TaskList[0].Number1;
566
-              delete TaskList[0].Number1Str;
632
+                TaskList[0].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, TaskList[0].Number0);
567 633
 
568
-              delete TaskList[0].Number3;
569
-              delete TaskList[0].Number3Str;
634
+                delete TaskList[0].Number1;
635
+                delete TaskList[0].Number1Str;
570 636
 
571
-              TaskList[0].FirstTime = null;
572
-              TaskList[0].LastTime = null;
573
-            }
574
-            //若是历史的,则10m 1d
575
-            else if (TaskList[0].IsHistory) {
576
-              TaskList[0].Number0 = "10m";
577
-              TaskList[0].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, TaskList[0].Number0);
637
+                TaskList[0].Number2 = "1d";
638
+                TaskList[0].Number2Str = main.getMemoryLevel(app.globalData.MemoryLevel, 2, TaskList[0].Number2);
578 639
 
579
-              delete TaskList[0].Number1;
580
-              delete TaskList[0].Number1Str;
640
+                delete TaskList[0].Number3;
641
+                delete TaskList[0].Number3Str;
642
+              }
581 643
 
582
-              TaskList[0].Number2 = "1d";
583
-              TaskList[0].Number2Str = main.getMemoryLevel(app.globalData.MemoryLevel, 2, TaskList[0].Number2);
644
+              finishCard.IsReviewOld = TaskList[0].IsReview;
584 645
 
585
-              delete TaskList[0].Number3;
586
-              delete TaskList[0].Number3Str;
646
+              TaskList[0].IsReview = true;
647
+              TaskList.push(TaskList[0]);
648
+            }
649
+            //若是天月年
650
+            else {
651
+              var dayNum = Number(time.substr(0, time.indexOf("d")));
652
+              var date = common.addDate("d", dayNum, new Date());
653
+              TaskList[0].LimitTime = common.formatTime(date);
587 654
             }
588 655
 
589
-            finishCard.IsReviewOld = TaskList[0].IsReview;
656
+          }
590 657
 
591
-            TaskList[0].IsReview = true;
592
-            TaskList.push(TaskList[0]);
658
+          //修改学习任务个数
659
+          var learningType = 0;
660
+          if (TaskList[0].IsReview) {
661
+            learningType = 2;
593 662
           }
594
-          //若是天月年
595
-          else {
596
-            var dayNum = Number(time.substr(0, time.indexOf("d")));
597
-            var date = common.addDate("d", dayNum, new Date());
598
-            TaskList[0].LimitTime = common.formatTime(date);
663
+          if (TaskList[0].IsNew) {
664
+            learningType = 0;
665
+          } else if (TaskList[0].IsHistory) {
666
+            learningType = 1;
599 667
           }
600 668
 
601
-        }
602
-
603
-        //修改学习任务个数
604
-        var learningType = 0;
605
-        if (TaskList[0].IsReview) {
606
-          learningType = 2;
607
-        }
608
-        if (TaskList[0].IsNew) {
609
-          learningType = 0;
610
-        } else if (TaskList[0].IsHistory) {
611
-          learningType = 1;
612
-        }
669
+          if (btnnumber == "1") {
670
+            learningType = 3;
671
+          }
613 672
 
614
-        if (btnnumber == "1") {
615
-          learningType = 3;
616
-        }
673
+          finishCard.IntervalTime = time;
674
+          finishCard.BtnNumber = btnnumber;
675
+          finishCard.LearningType = learningType;
617 676
 
618
-        finishCard.IntervalTime = time;
619
-        finishCard.BtnNumber = btnnumber;
620
-        finishCard.LearningType = learningType;
677
+          var duration = common.diffDate("s", timeStart, new Date());
678
+          if (finishCard.btnnumber == 1)
679
+            duration = 0;
680
+          finishCard.Duration = timeHistory + duration;
621 681
 
622
-        var duration = common.diffDate("s", timeStart, new Date());
623
-        if (finishCard.btnnumber == 1)
624
-          duration = 0;
625
-        finishCard.Duration = timeHistory + duration;
682
+          //console.log("CardTime:" + finishCard.Duration);
626 683
 
627
-        console.log("CardTime:" + finishCard.Duration);
684
+          timeHistory = 0;
685
+          that.timeCompute();
628 686
 
629
-        timeHistory = 0;
630
-        that.timeCompute();
687
+          finishCard.LastTime = common.formatTime(new Date());
688
+          //添加完成列表,去掉任务列表数据
689
+          listTaskFinished.push(finishCard);
690
+        }
631 691
 
632
-        finishCard.LastTime=common.formatTime(new Date());
633
-        //添加完成列表,去掉任务列表数据
634
-        listTaskFinished.push(finishCard);
692
+        wx.setStorageSync("ListTaskFinished", listTaskFinished);
693
+        TaskList.shift();
694
+        
635 695
       }
636 696
 
637
-      wx.setStorageSync("ListTaskFinished", listTaskFinished);
638
-      TaskList.shift();
639
-
640 697
       that.data.NumberNew = 0;
641 698
       that.data.NumberHistory = 0;
642 699
       that.data.NumberReview = 0;
@@ -652,12 +709,27 @@ Page({
652 709
         } else if (TaskList[i].IsHistory) {
653 710
           that.data.NumberHistory++;
654 711
         }
655
-        if (TaskList[i].IsFinally){
712
+        if (TaskList[i].IsFinally) {
656 713
           var card = TaskList.splice(i, 1);
657 714
           TaskList.push(card[0]);
658 715
         }
659 716
       }
660 717
 
718
+      currentFolderStart = false;
719
+      //若选择了卡单
720
+      var bFolder=false;
721
+      if (currentFolderID>=0){
722
+
723
+        for(var i=0;i<TaskList.length;i++){
724
+          if (TaskList[i].FolderID==currentFolderID){
725
+            var card = TaskList.splice(i, 1);
726
+            TaskList.unshift(card[0]);
727
+            bFolder=true;
728
+            break;
729
+          }
730
+        }
731
+      }
732
+
661 733
       //console.log(JSON.stringify(TaskList[0]));
662 734
       //如果所有任务完成
663 735
       if (that.data.NumberNew == 0 &&
@@ -682,6 +754,13 @@ Page({
682 754
       }
683 755
       //没有完成任务
684 756
       else {
757
+
758
+        //如果卡单内题卡已经练习完毕,则重新选择卡单
759
+        if (currentFolderID>=0 && !bFolder){
760
+          currentFolderID=-1;
761
+          that.onShowFolder();
762
+        }
763
+
685 764
         arrImage = TaskList[0].ContentNew.Images;
686 765
         arrImage2 = TaskList[0].ContentNew.Images2;
687 766
 
@@ -697,6 +776,9 @@ Page({
697 776
           IsMore: false,
698 777
         });
699 778
 
779
+        console.log("MiaoguoCardID:"+TaskList[0].MiaoguoCardID);
780
+        console.log("FolderID:"+TaskList[0].FolderID);
781
+
700 782
         that.autoAudioPlayInit();
701 783
 
702 784
         if (btnnumber == "1") {
@@ -729,22 +811,22 @@ Page({
729 811
       console.log("timeHistory:" + timeHistory);
730 812
 
731 813
       if (!(that.data.NumberNew == 0 &&
732
-        that.data.NumberReview == 0 &&
733
-        that.data.NumberHistory == 0)){
734
-          wx.showModal({
735
-            title: '提醒',
736
-            content: '您已等待了' + app.globalData.CardWaitTimeMax + '分钟',
737
-            showCancel: false,
738
-            confirmText: "知道了",
739
-            success(res) {
740
-              clearTimeout(timeoutEveryCard);
741
-              if (res.confirm) {
742
-                that.timeCompute();
743
-              }
744
-            },
745
-          });
746
-        }
747
-      
814
+          that.data.NumberReview == 0 &&
815
+          that.data.NumberHistory == 0)) {
816
+        wx.showModal({
817
+          title: '提醒',
818
+          content: '您已等待了' + app.globalData.CardWaitTimeMax + '分钟',
819
+          showCancel: false,
820
+          confirmText: "知道了",
821
+          success(res) {
822
+            clearTimeout(timeoutEveryCard);
823
+            if (res.confirm) {
824
+              that.timeCompute();
825
+            }
826
+          },
827
+        });
828
+      }
829
+
748 830
     }, app.globalData.CardWaitTimeMax * 60 * 1000);
749 831
   },
750 832
   gotoCollect: function () {
@@ -791,28 +873,37 @@ Page({
791 873
           TodayTime: duration,
792 874
           Speed1: speed1 + "张题卡",
793 875
           Speed2: speed2,
794
-          Title:"报告",
876
+          Title: "报告",
795 877
         });
796 878
 
797 879
       }
798 880
     });
799 881
   },
800 882
   showNumberContainner: function () {
801
-    this.setData({
802
-      IsShowNumberInfo: true,
803
-    });
804
-    this.setData({
805
-      Title:"进度",
806
-    });
883
+    if (!this.data.Title) {
884
+      this.setData({
885
+        IsShowNumberInfo: true,
886
+        IsMore: false,
887
+        IsShowOrder: false,
888
+        IsShowFolder: false,
889
+      });
890
+      this.setData({
891
+        Title: "进度",
892
+      });
893
+      clearTimeout(timeoutEveryCard);
894
+    }
807 895
   },
808 896
   closeNumberContainner: function () {
809 897
     this.setData({
810 898
       IsShowNumberInfo: false,
811 899
       IsMore: false,
900
+      IsShowOrder: false,
901
+      IsShowFolder: false,
812 902
     });
813 903
     this.setData({
814 904
       Title: "",
815 905
     });
906
+    this.timeCompute();
816 907
   },
817 908
   showImage: function (e) {
818 909
     var name = e.currentTarget.dataset.name;
@@ -874,8 +965,54 @@ Page({
874 965
     this.setData({
875 966
       IsMore: true,
876 967
       FontSizeArray: this.data.FontSizeArray,
968
+      Title: "更多功能",
969
+    });
970
+    clearTimeout(timeoutEveryCard);
971
+  },
972
+
973
+  onShowOrder: function () {
974
+    this.setData({
975
+      IsShowOrder: true,
976
+      Title: "出题顺序",
977
+    });
978
+    clearTimeout(timeoutEveryCard);
979
+  },
980
+  onShowFolder: function () {
981
+    for (var j = 0; j < FolderList.length; j++) {
982
+      FolderList[j].Total = 0;
983
+      for (var i = 0; i < TaskList.length; i++) {
984
+        if (TaskList[i].FolderID == FolderList[j].FolderID) {
985
+          FolderList[j].Total++;
986
+        }
987
+      }
988
+    }
989
+    for (var j = 0; j < FolderList.length; j++) {
990
+      if (FolderList[j].Total == 0){
991
+        FolderList.splice(j--,1);
992
+      }
993
+    }
994
+
995
+    this.setData({
996
+      IsShowFolder: true,
997
+      IsShowNumberInfo: false,
998
+      IsMore: false,
999
+      IsShowOrder: false,
1000
+      FolderList: FolderList,
1001
+      Title: " ",
877 1002
     });
878 1003
   },
1004
+  setCurrentFolder: function (e) {
1005
+    currentFolderID = e.currentTarget.dataset.folderid;
1006
+    currentFolderStart = true;
1007
+    this.gotoNext({
1008
+      currentTarget: {
1009
+        dataset: {
1010
+          btnnumber: -3
1011
+        }
1012
+      }
1013
+    });
1014
+    this.closeNumberContainner();
1015
+  },
879 1016
   onClose: function () {
880 1017
     wx.navigateBack({
881 1018
       delta: 1,
@@ -886,11 +1023,11 @@ Page({
886 1023
     if (!index) {
887 1024
       index = 0;
888 1025
     }
889
-    if (index>1)
890
-      index=1;
1026
+    if (index > 1)
1027
+      index = 1;
891 1028
     app.globalData.MemoryLevel = index;
892 1029
     this.setData({
893
-      MemoryLevel:index,
1030
+      MemoryLevel: index,
894 1031
     });
895 1032
   },
896 1033
 
@@ -936,8 +1073,8 @@ Page({
936 1073
 
937 1074
           canvas.setFontSize(68);
938 1075
           if (!that.data.TodayTime)
939
-            that.data.TodayTime=0;
940
-            
1076
+            that.data.TodayTime = 0;
1077
+
941 1078
           canvas.fillText(that.data.TodayTime, 390, 148);
942 1079
 
943 1080
           canvas.font = "normal 500 68px caption";
@@ -974,7 +1111,7 @@ Page({
974 1111
                   urls: [res2.tempFilePath] // 需要预览的图片http链接列表
975 1112
                 });
976 1113
 
977
-                main.getData("ShareMiaoguoTask?UserID=" + app.globalData.userInfo.UserID, function (data) { });
1114
+                main.getData("ShareMiaoguoTask?UserID=" + app.globalData.userInfo.UserID, function (data) {});
978 1115
               },
979 1116
               fail: function (e) {
980 1117
                 wx.hideLoading();
@@ -986,13 +1123,13 @@ Page({
986 1123
           wx.hideLoading();
987 1124
         }
988 1125
       },
989
-      fail: function () {
1126
+      fail: function (e) {
990 1127
         wx.hideLoading();
991 1128
       }
992 1129
     });
993 1130
   },
994
-  saveCardType:function(){
995
-    var that=this;
1131
+  saveCardType: function () {
1132
+    var that = this;
996 1133
     var url = 'UpdateMiaoguoCardType?UserID=' + app.globalData.userInfo.UserID;
997 1134
     url += "&CardType=-1";
998 1135
     url += "&ID=" + TaskList[0].MiaoguoCardID;
@@ -1000,18 +1137,27 @@ Page({
1000 1137
       TaskList.splice(0, 1);
1001 1138
       that.setData({
1002 1139
         TaskInfo: TaskList[0],
1003
-        IsShowAnswer:[0,0],
1140
+        IsShowAnswer: [0, 0],
1004 1141
       });
1005 1142
       that.closeNumberContainner();
1006 1143
     });
1007 1144
   },
1008
-  switchSound:function(e){
1009
-    var that=this;
1010
-    var autoAudio=!that.data.IsAutoSound;
1145
+  saveIsFolderPractice:function(e){
1146
+    var that = this;
1147
+    var IsFolderPractice = that.data.IsFolderPractice==0 ? 1 : 0;
1011 1148
     that.setData({
1012
-      IsAutoSound:autoAudio,
1149
+      IsFolderPractice: IsFolderPractice,
1013 1150
     });
1014
-    if (autoAudio){
1151
+    wx.setStorageSync('IsFolderPractice', IsFolderPractice);
1152
+    main.UploadUserConfig();
1153
+  },
1154
+  switchSound: function (e) {
1155
+    var that = this;
1156
+    var autoAudio = !that.data.IsAutoSound;
1157
+    that.setData({
1158
+      IsAutoSound: autoAudio,
1159
+    });
1160
+    if (autoAudio) {
1015 1161
       wx.setStorageSync('IsAutoSound', 1);
1016 1162
       wx.showModal({
1017 1163
         title: '提醒',
@@ -1019,80 +1165,83 @@ Page({
1019 1165
         showCancel: false,
1020 1166
         confirmText: "知道了",
1021 1167
         success(res) {
1022
-          
1168
+
1023 1169
         },
1024 1170
       });
1025
-    }
1026
-    else{
1171
+    } else {
1027 1172
       wx.setStorageSync('IsAutoSound', 0);
1028 1173
     }
1174
+    main.UploadUserConfig();
1029 1175
   },
1030
-  autoAudioPlayInit:function(){
1031
-    var that=this;
1032
-    common.getStorageValue(that, "IsAutoSound", 0, function () {
1033
-      if (that.data.IsAutoSound==1){
1034
-        var taskInfo=that.data.TaskInfo;
1035
-        var field={};
1036
-        var fieldNumber=1;
1037
-        if (that.data.IsShowAnswer[0]==1)
1038
-          fieldNumber=2;
1039
-        if (that.data.IsShowAnswer[1]==1 && taskInfo.ContentNew.Field[3].length>0)
1040
-          fieldNumber=3;
1041
-        field=taskInfo.ContentNew.Field[fieldNumber];
1042
-        arrAutoAudio=[];
1043
-        for(var i=0;i<field.length;i++){
1044
-          if (field[i].Type=="sound" || field[i].Type=="recorder"){
1045
-            field[i].FieldNumber=fieldNumber;
1176
+  autoAudioPlayInit: function () {
1177
+    var that = this;
1178
+    common.getStorageValue(that, "IsAutoSound", 1, function () {
1179
+      if (that.data.IsAutoSound == 1) {
1180
+        var taskInfo = that.data.TaskInfo;
1181
+        var field = {};
1182
+        var fieldNumber = 1;
1183
+        if (that.data.IsShowAnswer[0] == 1)
1184
+          fieldNumber = 2;
1185
+        if (that.data.IsShowAnswer[1] == 1 && taskInfo.ContentNew.Field[3].length > 0)
1186
+          fieldNumber = 3;
1187
+        field = taskInfo.ContentNew.Field[fieldNumber];
1188
+        arrAutoAudio = [];
1189
+        for (var i = 0; i < field.length; i++) {
1190
+          if (field[i].Type == "sound" || field[i].Type == "recorder") {
1191
+            field[i].FieldNumber = fieldNumber;
1046 1192
             arrAutoAudio.push(field[i]);
1047 1193
           }
1048 1194
         }
1049
-        
1050
-        if (arrAutoAudio.length>0){
1195
+
1196
+        if (arrAutoAudio.length > 0) {
1051 1197
           that.setData({
1052
-            IsAutoSoundStart:true,
1198
+            IsAutoSoundStart: true,
1053 1199
           });
1054
-          that.autoAudioPlayStart();  
1200
+          that.autoAudioPlayStart();
1055 1201
         }
1056 1202
       }
1057 1203
     });
1058 1204
   },
1059
-  autoAudioPlayStart:function(){
1060
-    var that=this;
1061
-    if (arrAutoAudio.length>0){
1062
-      var item=arrAutoAudio[0];
1063
-      if (item.Type=="recorder")
1064
-        item.Content=item.Type;
1065
-      that.playSound({currentTarget:{dataset:{
1066
-        content:item.Content,
1067
-        soundmark:item.SoundMark,
1068
-        fieldid:item.FieldNumber,
1069
-      }}});
1070
-      arrAutoAudio.splice(0,1);
1071
-      
1205
+  autoAudioPlayStart: function () {
1206
+    var that = this;
1207
+    if (arrAutoAudio.length > 0) {
1208
+      var item = arrAutoAudio[0];
1209
+      if (item.Type == "recorder")
1210
+        item.Content = item.Type;
1211
+      that.playSound({
1212
+        currentTarget: {
1213
+          dataset: {
1214
+            content: item.Content,
1215
+            soundmark: item.SoundMark,
1216
+            fieldid: item.FieldNumber,
1217
+          }
1218
+        }
1219
+      });
1220
+      arrAutoAudio.splice(0, 1);
1221
+
1072 1222
     }
1073 1223
   },
1074
-  autoAudioPlayEnd:function(){
1075
-    var that=this;
1076
-    arrAutoAudio=[];
1224
+  autoAudioPlayEnd: function () {
1225
+    var that = this;
1226
+    arrAutoAudio = [];
1077 1227
     if (innerAudioContext1) {
1078 1228
       innerAudioContext1.stop();
1079 1229
     }
1080 1230
     that.audioCtx.pause();
1081
-  
1231
+
1082 1232
     that.setData({
1083
-      IsAutoSoundStart:false,
1233
+      IsAutoSoundStart: false,
1084 1234
     });
1085 1235
   },
1086 1236
   //音频播放结束
1087 1237
   audioBindEnded: function () {
1088
-    var that=this;
1238
+    var that = this;
1089 1239
     isPlaying = false;
1090
-    if (arrAutoAudio.length>0){
1240
+    if (arrAutoAudio.length > 0) {
1091 1241
       that.autoAudioPlayStart();
1092
-    }
1093
-    else{
1242
+    } else {
1094 1243
       that.setData({
1095
-        IsAutoSoundStart:false,
1244
+        IsAutoSoundStart: false,
1096 1245
       });
1097 1246
     }
1098 1247
   },
@@ -1178,13 +1327,19 @@ Page({
1178 1327
     wx.navigateTo({
1179 1328
       url: url,
1180 1329
     });
1330
+  },
1331
+  getNull: function () {
1332
+
1181 1333
   },
1182 1334
   //获取导航栏高度
1183 1335
   getBarInfo(e) {
1184
-    var h=e.detail.topBarHeight;
1185
-    h=h*2;
1186
-    this.setData({ 
1187
-       topBarHeight: h,
1336
+    var h = e.detail.topBarHeight;
1337
+    h = h * 2;
1338
+    if (app.globalData.IsIPad){
1339
+      h+=25;
1340
+    }
1341
+    this.setData({
1342
+      topBarHeight: h,
1188 1343
     })
1189 1344
   },
1190 1345
   onShareAppMessage: function () {

+ 81 - 16
pages/main/detail.wxml

@@ -1,6 +1,6 @@
1 1
 <import src="../template/cardShow.wxml" />
2
-<navigation-bar show="true" center="true" left="true" background="{{Color.BackColor}}" color="#fff">
3
-    <view slot="left" bindtap="onClose">
2
+<navigation-bar show="true" center="true" bindgetBarInfo="getBarInfo" left="true" background="{{Color.BackColor}}" color="#fff">
3
+    <view slot="left" bindtap="onClose" wx:if="{{NumberNew+NumberReview+NumberHistory>0}}">
4 4
       <view class="square">退出练习</view>
5 5
     </view>
6 6
     <view slot="center" bindtap="showNumberContainner" class='panelNumber FlexRow'>
@@ -31,6 +31,11 @@
31 31
 
32 32
     <!-- 工具栏 -->
33 33
     <view class='panelTop FlexRow' style='background-color:{{Color.BackColor}};'>
34
+      <view class='panelCancel FlexRow' catchtap='onShowOrder'>
35
+        <view class='panelCancel0 FlexRow'>
36
+          <image src="../images/universalpic_4blocks_gray_28x28.png" class='universalpic_4blocks_gray_28x28' />
37
+        </view>
38
+      </view>
34 39
       <view class='panelCancel FlexRow' catchtap='gotoCollect'>
35 40
         <view class='panelCancel0 FlexRow'>
36 41
           <image hidden='{{TaskInfo.IsCollect}}' src="../images/universalpic_star_gray_34x34.png" class='universalpic_star_gray_34x34' />
@@ -203,15 +208,17 @@
203 208
   </view>
204 209
 
205 210
   <!-- 更多功能 -->
206
-  <view wx:if="{{IsMore}}" class="numberContainer FlexColumn" style='min-height:{{Containnerheight+100}}rpx;background-color:{{Color.BackColor}};top:{{topBarHeight}}rpx;'>
211
+  <view wx:if="{{IsMore}}" class="numberContainer FlexColumn" catchtap="getNull" style='min-height:{{Containnerheight+100}}rpx;background-color:{{Color.BackColor}};top:{{topBarHeight}}rpx;'>
207 212
     <view class="numberContainerFooter1 FlexColumn">
213
+           
208 214
       <view class='lineFooter'></view>
209
-      <view class='numberContainerFooter102 FlexRow' catchtap='gotoNext' data-btnnumber="2">
210
-        <image src="../images/universalpic_sendtoback_gray_30x26.png" class='universalpic_sendtoback_gray_30x26' />
211
-        <view class='numberContainerFooter111'>挪到最后</view>
212
-      </view>      
215
+
216
+      <view class='numberContainerFooter102 FlexRow' catchtap='saveCardType'>
217
+        <image src="../images/universalpic_practisemodel_gray_30x28.png" class='universalpic_practisemodel_gray_30x28' />
218
+        <view class='numberContainerFooter111'>归档题卡</view>
219
+      </view>
213 220
       <view class='lineFooter'></view>
214
-      
221
+
215 222
       <view class='numberContainerFooter101 FlexRow'>
216 223
         <image src="../images/universalpic_typesize_gray_30x18.png" class='universalpic_typesize_gray_30x18' />
217 224
         <view class='numberContainerFooter11 FlexColumn'>
@@ -222,26 +229,84 @@
222 229
         </view>
223 230
       </view>
224 231
       <view class='lineFooter'></view>
225
-
226
-      <view class='numberContainerFooter102 FlexRow' catchtap='saveCardType'>
227
-        <image src="../images/universalpic_practisemodel_gray_30x28.png" class='universalpic_practisemodel_gray_30x28' />
228
-        <view class='numberContainerFooter111'>把这张题卡归档</view>
229
-      </view>
230
-            
231
-      <view class='lineFooter'></view>
232 232
       
233 233
       <view class='numberContainerFooter102 FlexRow'>
234 234
         <image src="../images/universalpic_autoread_gray_30x23.png" class='universalpic_autoread_gray_30x23' />
235 235
         <view class='numberContainerFooter111'>自动播放题卡里的声音</view>
236 236
         <switch class="switch" color="#4CD964" checked="{{IsAutoSound}}" bindchange="switchSound"/>
237 237
       </view>
238
-            
239 238
       <view class='lineFooter'></view>
240 239
     </view>
241 240
     <view class="numberContaineFooter FlexRow" catchtap='closeNumberContainner'>
242 241
       <view>关闭</view>
243 242
     </view>
244 243
   </view>
244
+
245
+  <!-- 出题顺序 -->
246
+  <view wx:if="{{IsShowOrder}}" class="numberContainer FlexColumn" catchtap="getNull" style='min-height:{{Containnerheight+100}}rpx;background-color:{{Color.BackColor}};top:{{topBarHeight}}rpx;'>
247
+    <view class="numberContainerFooter1 FlexColumn">
248
+      <view class='lineFooter'></view>
249
+      <view class='numberContainerFooter102 FlexRow' catchtap='gotoNext' data-btnnumber="2">
250
+        <image src="../images/universalpic_sendtoback_gray_30x26.png" class='universalpic_sendtoback_gray_30x26' />
251
+        <view class='numberContainerFooter111'>挪到最后</view>
252
+      </view>      
253
+      <view class='lineFooter'></view>
254
+      
255
+      
256
+      <view class='numberContainerFooter107 FlexRow' catchtap='onShowFolder'>
257
+        <view class="MenuLeft FlexRow">
258
+        <image src="../images/universalpic_cardlist_gray_30x28.png" class='universalpic_cardlist_gray_30x28' />
259
+        <view class='numberContainerFooter111'>卡单优先</view>
260
+        </view>
261
+        <view class="MenuRight">
262
+        <image src='../images/universalpic_indicator_right_white.png' class="Arrow" />
263
+        </view>
264
+			</view>
265
+      <view class='lineFooter'></view>
266
+    </view>
267
+    <view class="numberContaineFooter FlexRow" catchtap='closeNumberContainner'>
268
+      <view>关闭</view>
269
+    </view>
270
+  </view>
271
+
272
+  <!-- 卡单 -->
273
+  <view wx:if="{{IsShowFolder}}" class="numberContainer FlexColumn" catchtap="getNull"
274
+  style='min-height:{{Containnerheight+100}}rpx;background-color:{{Color.BackColor}};top:{{topBarHeight}}rpx;'>
275
+    <view class='numberContainerFooter106 FlexColumn'>
276
+      <view class="numberContainerFooter1061">按卡单优先出题</view>
277
+      <view class="numberContainerFooter1062">如果想改变任务量的出题顺序(如,早上练诗词,晚上练识字,睡前练单词,计算题集中在作业后等),首先利用卡单给题卡做分类,然后在这里选择优先出题的卡单。</view>
278
+    </view>
279
+    <scroll-view scroll-y="true" class="FolderList FlexColumn" style="height:{{Containnerheight-450}}rpx;">
280
+      <view class="FolderItem FlexRow" catchtap="setCurrentFolder" data-folderid='0' wx:if="{{FolderList[0].FolderID==0 && FolderList[0].Total>0}}">
281
+        <view class="FolderItem1">没有卡单的题卡</view>
282
+        <view class="MenuRight FlexRow">
283
+          <view class="FolderItem2 FolderItem1">{{FolderList[0].Total}}张</view>  
284
+          <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
285
+			  </view>
286
+      </view>
287
+      <view class="FolderTitle" wx:if="{{FolderList.length>1 || FolderList[0].FolderID>0}}">可优先出题的卡单</view>
288
+      <view class="FolderTitle" wx:if="{{FolderList.length==1 && FolderList[0].FolderID==0}}">任务量里没有卡单</view>
289
+      <view class="FolderItem0 FolderItem FlexRow" wx:for="{{FolderList}}" catchtap="setCurrentFolder" data-folderid='{{item.FolderID}}'
290
+       wx:key="*this" wx:if="{{item.FolderID!=0}}">
291
+        <view class="FolderItem1">{{item.FolderName}}</view>
292
+        <view class="MenuRight FlexRow">
293
+          <view class="FolderItem2 FolderItem1">{{item.Total}}张</view>  
294
+          <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
295
+			  </view>
296
+      </view>
297
+      <view style="height:60rpx"></view>
298
+    </scroll-view>
299
+    <view class='numberContainerFooter105 FlexRow' style="background-color:{{Color.BackColor}};">
300
+      <view class="numberContainerFooter1051 FlexColumn">
301
+        <view class="numberContainerFooter10511">每次练习都要选</view>
302
+        <view class="numberContainerFooter10512">开始练习时,只要任务量里有卡单就自动开启本功能</view>
303
+      </view>
304
+      <switch class="switch" checked="{{IsFolderPractice}}" bindchange="saveIsFolderPractice"/>
305
+    </view>
306
+    <view class="numberContaineFooter FlexRow" catchtap='closeNumberContainner'  style="background-color:{{Color.BackColor}};z-index:50;">
307
+      <view>取消</view>
308
+    </view>
309
+  </view>
245 310
 </view>
246 311
 
247 312
 <canvas class='Canvas' canvas-id="shareCanvas"></canvas>

+ 104 - 1
pages/main/detail.wxss

@@ -25,7 +25,7 @@ page{
25 25
 .panelCancel {
26 26
   width: 100rpx;
27 27
   height: 110rpx;
28
-  margin: 0 40rpx;
28
+  margin: 0 10rpx;
29 29
 }
30 30
 
31 31
 .panelCancel0 {
@@ -35,6 +35,10 @@ page{
35 35
   border-radius: 50%;
36 36
 }
37 37
 
38
+.universalpic_4blocks_gray_28x28{
39
+  width: 28rpx;
40
+  height: 28rpx;
41
+}
38 42
 .universalpic_undo_white_30p_26x20 {
39 43
   width: 26rpx;
40 44
   height: 19rpx;
@@ -738,4 +742,103 @@ page{
738 742
   font-size:20rpx;
739 743
   color:#D2D2D2;
740 744
   line-height: 70rpx;
745
+}
746
+
747
+.universalpic_cardlist_gray_30x28{
748
+  width:30rpx;
749
+  height:28rpx;
750
+  margin: 0 30rpx;
751
+}
752
+
753
+.numberContainerFooter107{
754
+  width:100%;
755
+  justify-content: space-between;
756
+  height:132rpx;
757
+}
758
+
759
+.Arrow{
760
+  width:16rpx;
761
+  height:26rpx;
762
+  margin-right: 30rpx;
763
+}
764
+
765
+.numberContainerFooter106{
766
+  width:100%;
767
+  justify-content: flex-start;
768
+  align-items: flex-start;
769
+  position: absolute;
770
+  top:30rpx;
771
+  z-index: 10;
772
+}
773
+.numberContainerFooter1061{
774
+  font-size:32rpx;
775
+  margin:0 0 0 30rpx;
776
+}
777
+.numberContainerFooter1062{
778
+  font-size:20rpx;
779
+  color:rgba(255, 255, 255, 0.6);
780
+  margin:4rpx 0 0 30rpx;
781
+  width:690rpx;
782
+}
783
+
784
+.FolderList{
785
+  width:100%;
786
+  height:780rpx;
787
+  background-color: rgba(0, 0, 0, 0.2);
788
+  position: absolute;
789
+  top:200rpx;
790
+  z-index: 10;
791
+  justify-content: flex-start;
792
+}
793
+
794
+.FolderItem{
795
+  width:710rpx;
796
+  height:100rpx;
797
+  border-radius: 10rpx;
798
+  border:2rpx solid rgba(255,255,255,0.2);
799
+  margin:30rpx 0 0 20rpx;
800
+  justify-content: space-between;
801
+}
802
+
803
+.FolderItem0{
804
+  margin:20rpx 0 0 20rpx;
805
+}
806
+.FolderItem1{
807
+  margin:0 30rpx;
808
+  font-size:28rpx;
809
+  font-weight: 400;
810
+}
811
+.FolderItem2{
812
+  color:rgba(255, 255, 255, 0.4);
813
+  font-weight: 500;
814
+}
815
+
816
+.FolderTitle{
817
+  margin:50rpx 50rpx 0 50rpx;
818
+  width:650rpx;
819
+  font-size:28rpx;
820
+}
821
+
822
+.numberContainerFooter105{
823
+  width:100%;
824
+  height: 125rpx;
825
+  position: fixed;
826
+  bottom:131rpx;
827
+  justify-content: space-between;
828
+  z-index: 50;
829
+}
830
+
831
+
832
+.numberContainerFooter1051{
833
+  align-items: flex-start;
834
+  margin: 0 0 0 30rpx;
835
+}
836
+
837
+.numberContainerFooter10511{
838
+  font-size:24rpx;
839
+  font-weight: 400;
840
+}
841
+.numberContainerFooter10512{
842
+  font-size:20rpx;
843
+  color:rgba(255, 255, 255, 0.6);
741 844
 }

+ 19 - 1
pages/main/mainlist.js

@@ -112,7 +112,25 @@ Page({
112 112
       that.setData({
113 113
         PrintID: options.PrintID,
114 114
       });
115
-      that.getPrintList();
115
+
116
+      if (options.PrintUserID!=app.globalData.userInfo.UserID){
117
+        wx.showModal({
118
+          title: '提醒',
119
+          showCancel: false,
120
+          content: '此打印卷非您微信号生成,请扫描您生成的打印卷查看答案!',
121
+          confirmText: '知道了',
122
+          success(res) {
123
+            if (res.confirm) {
124
+              wx.navigateBack({
125
+                delta: 1,
126
+              });
127
+            }
128
+          }
129
+        });
130
+      }
131
+      else{
132
+        that.getPrintList();
133
+      }      
116 134
     } else if (options.FolderID) { //卡单题卡情况
117 135
       wx.setNavigationBarTitle({
118 136
         title: "卡单"

+ 2 - 2
pages/template/cardShow.wxml

@@ -1,6 +1,6 @@
1 1
 <template name="CardShow">
2 2
   <!-- 第一段 -->
3
-  <view class="panelField1 FlexColumn">
3
+  <view id="ViewField1" class="panelField1 FlexColumn">
4 4
     <view class="editFieldNull"></view>
5 5
     <view class="panelField11 panelItem FlexRow" style="font-size:{{FontSize}}rpx;">
6 6
       <text class="textProblem" style='background-color:{{Color.LineColor}};'>题目</text>
@@ -38,7 +38,7 @@
38 38
   </view>
39 39
 
40 40
   <!-- 标签 -->
41
-  <view class="panelTag FlexColumn" wx:if="{{Tags.length>0}}">
41
+  <view id="ViewFieldTag" class="panelTag FlexColumn" wx:if="{{Tags.length>0}}">
42 42
     <view class="panelTag1 FlexRow">
43 43
       <view class="tag" wx:for="{{Tags}}" wx:key="index" style='color:{{Color.LineColor}};'>{{item}}</view>
44 44
     </view>

+ 2 - 2
pages/test/list.wxml

@@ -17,8 +17,8 @@
17 17
 					<view class="right1 FlexRow">
18 18
 						<image wx:if="{{item.TestTypeRead==1}}" class="examine_willread_gray_22x22" src="../images/examine_willread_green_22x22.png"></image>
19 19
 						<image wx:if="{{!item.TestTypeRead}}" class="examine_willread_gray_22x22" src="../images/examine_willread_gray_22x22.png"></image>
20
-						<image wx:if="{{ListType!='english' && item.TestTypeWrite==1}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_green_22x22.png"></image>
21
-						<image wx:if="{{ListType!='english' && !item.TestTypeWrite}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_gray_22x22.png"></image>
20
+						<image wx:if="{{item.TestTypeWrite==1}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_green_22x22.png"></image>
21
+						<image wx:if="{{!item.TestTypeWrite}}" class="examine_willwrite_gray_22x22" src="../images/examine_willwrite_gray_22x22.png"></image>
22 22
 					</view>
23 23
 					<view class="right2">{{item.Words.length}}个<block wx:if="{{ListType=='english'}}">单词</block><block wx:if="{{ListType=='hanzi'}}">字</block></view>
24 24
 				</view>

+ 1 - 1
project.config.json

@@ -116,7 +116,7 @@
116 116
         {
117 117
           "name": "pages/index/index",
118 118
           "pathName": "pages/index/index",
119
-          "query": "type=print&P=184&U=1",
119
+          "query": "type=print&P=184&U=2",
120 120
           "scene": 1047
121 121
         },
122 122
         {

+ 12 - 2
utils/main.js

@@ -1145,7 +1145,9 @@ function UploadUserConfig(callback) {
1145 1145
   param1.ClickType = wx.getStorageSync("ClickType");
1146 1146
   param1.SecondConfigArray = wx.getStorageSync("SecondConfigArray").join(",");
1147 1147
   param1.ColorIndexArr = wx.getStorageSync("ColorIndexArr").join(",");
1148
-
1148
+  param1.IsFolderPractice = wx.getStorageSync("IsFolderPractice");
1149
+  param1.IsAutoSound = wx.getStorageSync("IsAutoSound");
1150
+  
1149 1151
   var symboMain = wx.getStorageSync("SymbolMain");
1150 1152
   var symbol1 = [];
1151 1153
   for (var i = 0; i < symboMain.length; i++) {
@@ -1154,6 +1156,11 @@ function UploadUserConfig(callback) {
1154 1156
   symbol1 = JSON.stringify(symbol1);
1155 1157
   param1.SymbolList = symbol1;
1156 1158
 
1159
+  var folderOrder=wx.getStorageSync("FolderOrderStr");
1160
+  if (folderOrder)
1161
+    param1.FolderOrder = folderOrder;
1162
+  
1163
+
1157 1164
   that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {
1158 1165
     if (callback) {
1159 1166
       callback();
@@ -1188,7 +1195,10 @@ function getUserConfig() {
1188 1195
     wx.setStorageSync("ClickType", data.ClickType);
1189 1196
     wx.setStorageSync("SecondConfigArray", data.SecondConfigArray.split(","));
1190 1197
     wx.setStorageSync("ColorIndexArr", data.ColorIndexArr.split(","));
1191
-
1198
+    wx.setStorageSync("FolderOrderStr", data.FolderOrder);
1199
+    wx.setStorageSync("IsFolderPractice", data.IsFolderPractice);
1200
+    wx.setStorageSync("IsAutoSound", data.IsAutoSound);
1201
+    
1192 1202
     var symbol1 = [];
1193 1203
     if (data.SymbolList) {
1194 1204
       for (var i = 0; i < data.SymbolList.length; i++) {