chengjie 5 lat temu
rodzic
commit
0859e69422

Plik diff jest za duży
+ 4 - 4
app.js


BIN
pages/images/doc_website_infor_01.png


BIN
pages/images/universalpic_plan_6dots_gray_30x32.png


+ 2 - 21
pages/index/index.js

@@ -296,7 +296,7 @@ Page({
296 296
                 });
297 297
               }, 2000);
298 298
             }
299
-            that.getUserConfig();
299
+            main.getUserConfig();
300 300
 
301 301
           }
302 302
           that.getBaiduToken();
@@ -309,26 +309,7 @@ Page({
309 309
   getBaiduToken: function () {
310 310
     main.getBaiduToken();
311 311
   },
312
-  getUserConfig: function () {
313
-    var that = this;
314
-    main.postData('UploadUserConfig?Type=getData&UserID=' + app.globalData.userInfo.UserID, {}, function (data) {
315
-
316
-      var cardType=wx.getStorageSync("CardType");
317
-      
318
-      wx.setStorageSync("CardType", data.CardType);
319
-
320
-      wx.setStorageSync("CardMaxNumberNew", data.CardMaxNumberNew);
321
-      wx.setStorageSync("CardMaxNumberHistory", data.CardMaxNumberHistory);
322
-      wx.setStorageSync("CardMaxNumberNewUrgent", data.CardMaxNumberNewUrgent);
323
-      wx.setStorageSync("CardMaxNumberHistoryUrgent", data.CardMaxNumberHistoryUrgent);
324
-      wx.setStorageSync("SortTypeIndex", data.SortTypeIndex);
325
-      wx.setStorageSync("MemoryLevel", data.MemoryLevel);
326
-      wx.setStorageSync("ClickType", data.ClickType);
327
-      wx.setStorageSync("SecondConfigArray", data.SecondConfigArray.split(","));
328
-      wx.setStorageSync("ColorIndexArr", data.ColorIndexArr.split(","));
329
-
330
-    });
331
-  },
312
+  
332 313
   updateProgram: function () {
333 314
     const updateManager = wx.getUpdateManager();
334 315
 

+ 5 - 13
pages/main/add.js

@@ -6,9 +6,6 @@ const PracticeTimeArr = [{
6 6
   Name: "还原",
7 7
   CSS: "numberContainerFooter1121Select"
8 8
 },
9
-{
10
-  Name: "今天必练",
11
-},
12 9
 {
13 10
   Name: "推迟一周",
14 11
 },
@@ -278,10 +275,7 @@ Page({
278 275
               param1 = that.formatField(that.data.Field);
279 276
               param1.Tags = tags;
280 277
 
281
-              param1.IsTodayStudy = 0;
282
-              if (that.data.PracticeTimeStr == PracticeTimeArr[1].Name)
283
-                param1.IsTodayStudy = 1;
284
-
278
+              
285 279
               param1.LimitTime = that.getLimitTimeStr();
286 280
 
287 281
               param1.ID = that.data.MiaoguoCardID;
@@ -622,7 +616,7 @@ Page({
622 616
       setTimeout(function () {
623 617
         wx.hideLoading();
624 618
       }, 5000);
625
-      var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID;
619
+      var url = 'GetMiaoguoCardList2?UserID=' + app.globalData.userInfo.UserID;
626 620
       main.getData(url, function (data) {
627 621
         wx.hideLoading();
628 622
         if (data) {
@@ -641,14 +635,12 @@ Page({
641 635
     var that = this;
642 636
     if (!that.data.LimitTime)
643 637
       that.data.LimitTime = common.formatTime(new Date());
644
-    var LimitTime = common.formatTime(new Date(that.data.LimitTime));
638
+    var LimitTime = common.formatTime(new Date(that.data.LimitTime),"-");
645 639
     if (that.data.PracticeTimeStr == PracticeTimeArr[1].Name)
646
-      LimitTime = common.formatTime(new Date());
647
-    else if (that.data.PracticeTimeStr == PracticeTimeArr[2].Name)
648 640
       LimitTime = common.formatTime(common.addDate("w", 1, new Date(that.data.LimitTime)));
649
-    else if (that.data.PracticeTimeStr == PracticeTimeArr[3].Name)
641
+    else if (that.data.PracticeTimeStr == PracticeTimeArr[2].Name)
650 642
       LimitTime = common.formatTime(common.addDate("m", 1, new Date(that.data.LimitTime)));
651
-    else if (that.data.PracticeTimeStr == PracticeTimeArr[4].Name)
643
+    else if (that.data.PracticeTimeStr == PracticeTimeArr[3].Name)
652 644
       LimitTime = common.formatTime(common.addDate("m", 3, new Date(that.data.LimitTime)));
653 645
 
654 646
     //console.log(that.data.LimitTime);

+ 3 - 3
pages/main/add.wxml

@@ -69,7 +69,7 @@
69 69
   </block>
70 70
   </block>
71 71
   <view class='lineFooter'></view>
72
-
72
+  
73 73
   <view class="panelTimePlan FlexRow" bindtap="showPracticeTime" wx:if="{{IsShowPracticeTimeStart}}">
74 74
     <view class="panelItem1 FlexRow">
75 75
       <image src='../images/universalpic_clock_gray_24x24.png' class="universalpic_clock_gray_24x24" />
@@ -79,8 +79,8 @@
79 79
       <view class="panelTimePlan1">{{PracticeTimeStr2}}</view>
80 80
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
81 81
     </view>
82
-  </view>
83
-
82
+  </view> 
83
+  
84 84
   <view class="panelTimePlan0 panelTimePlan FlexRow" bindtap="showPracticeTime" wx:if="{{!IsShowPracticeTimeStart}}">
85 85
     <view class="panelItem1 FlexRow">
86 86
       <image src='../images/universalpic_clock_white_24x24.png' class="universalpic_clock_gray_24x24" />

+ 4 - 1
pages/main/default.js

@@ -296,7 +296,9 @@ Page({
296 296
   setSelectUser: function (e) {
297 297
     var that = this;
298 298
     if (app.globalData.userInfo.UserID == 1
299
-      || app.globalData.userInfo.UserID == 2) {
299
+      || app.globalData.userInfo.UserID == 2 
300
+      || app.globalData.userInfo.UserID == 3 
301
+      || app.globalData.userInfo.UserID == 4) {
300 302
       var userid = that.data.ChangeuUserID;
301 303
       wx.setStorageSync("UserID", userid);
302 304
       
@@ -307,6 +309,7 @@ Page({
307 309
           wx.setNavigationBarTitle({
308 310
             title: data.NickName
309 311
           });
312
+          main.getUserConfig();
310 313
         }
311 314
       });
312 315
       that.setData({

+ 117 - 121
pages/main/detail.js

@@ -1,36 +1,10 @@
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
 
6
-const arrFontSize = [{
7
-  Name: "紧凑",
8
-  Value: 36
9
-},
10
-{
11
-  Name: "标准",
12
-  Value: 48
13
-},
14
-{
15
-  Name: "宽松",
16
-  Value: 68
17
-},
18
-{
19
-  Name: "超大",
20
-  Value: 108
21
-}
22
-];
23
-
24
-const arrDelayedTime = [{
25
-  DayNumber: 7,
26
-  Name: "推迟一周",
27
-}, {
28
-  DayNumber: 30,
29
-  Name: "推迟一个月",
30
-}, {
31
-  DayNumber: 90,
32
-  Name: "推迟三个月",
33
-},]
7
+const arrStudyPlan = ["日常","紧急"];
34 8
 
35 9
 var innerAudioContext1;
36 10
 
@@ -61,8 +35,8 @@ Page({
61 35
     NumberHistory: 30,
62 36
     IsShowNumberInfo: false,
63 37
     IsMore: false,
64
-    FontSizeArray: arrFontSize,
65
-    ArrDelayedTime: arrDelayedTime,
38
+    FontSizeArray: constant.arrFontSize,
39
+    StudyPlanArray: arrStudyPlan,
66 40
     TaskInfo: {},
67 41
     Color: {ID: 1},
68 42
     TopNumber:156,
@@ -87,21 +61,17 @@ Page({
87 61
     if (app.globalData.IsIPad) {
88 62
       height = 960;
89 63
       height2 = 670;
90
-    }
91
-
92
-
93
-    if (app.globalData.IsAndroid) {
94 64
       that.setData({
95
-        TopNumber: 150,
65
+        TopNumber: 59,
66
+        IsIPad: "_iPad",
96 67
       });
97 68
     }
98
-    else if (app.globalData.IsIPad) {
69
+    else if (app.globalData.IsAndroid) {
99 70
       that.setData({
100
-        TopNumber: 59,
71
+        TopNumber: 150,
101 72
       });
102 73
     }
103 74
 
104
-
105 75
     that.setData({
106 76
       Containnerheight: height,
107 77
       Containnerheight2: height - height2,
@@ -121,11 +91,7 @@ Page({
121 91
 
122 92
     this.getMemoryLevel();
123 93
 
124
-    if (app.globalData.IsIPad) {
125
-      that.setData({
126
-        IsIPad: "_iPad",
127
-      });
128
-    }
94
+    
129 95
 
130 96
     if (app.globalData.BaiduToken === "")
131 97
       main.getBaiduToken();
@@ -159,11 +125,21 @@ Page({
159 125
           }
160 126
         }
161 127
       }
128
+    }
162 129
 
130
+    
131
+    if (that.data.IsMore){
132
+      //关于更改学习计划后处理
133
+      if (app.globalData.IsUpdateStudyPlan == 1){
134
+        that.gotoNext({ currentTarget: { dataset: { btnnumber:-2}}});
135
+        app.globalData.IsUpdateStudyPlan = 0;
136
+      }
137
+      that.setData({
138
+        IsMore: false,
139
+      });
163 140
     }
164
-    that.setData({
165
-      IsMore: false,
166
-    });
141
+    
142
+    
167 143
     clearTimeout(timeoutHide);
168 144
     //console.log("显示");
169 145
   },
@@ -227,7 +203,7 @@ Page({
227 203
         backgroundColor: that.data.Color.BackColor,
228 204
         backgroundColorTop: that.data.Color.BackColor,
229 205
         backgroundColorBottom: that.data.Color.BackColor,
230
-      })
206
+      });
231 207
     }
232 208
     if (wx.setNavigationBarColor) {
233 209
       wx.setNavigationBarColor({
@@ -485,7 +461,7 @@ Page({
485 461
   //进入下一张题卡
486 462
   gotoNext: function (e) {
487 463
     var that = this;
488
-    //btnnumber可以有 5:秒过 4正常 3困难 2挪到最后 1搁置 0不过 -1今天要练
464
+    //btnnumber可以有 5:秒过 4正常 3困难 2挪到最后 1搁置 0不过 -1今天要练 -2更改计划
489 465
     var btnnumber = e.currentTarget.dataset.btnnumber;
490 466
     //若是“挪到最后”
491 467
     if (btnnumber == 2) {
@@ -520,97 +496,112 @@ Page({
520 496
       finishCard.Number3Old = TaskList[0].Number3;
521 497
       finishCard.Number3StrOld = TaskList[0].Number3Str;
522 498
 
523
-      //若不是搁置
524
-      //算出下一次的时间
525
-      if (btnnumber != "1") {
526
-
527
-        //若是分钟,则进入复习列表
528
-        if (time.lastIndexOf("m") == time.length - 1) {
529
-          var minute = Number(time.substr(0, time.indexOf("m")));
530
-          TaskList[0].LimitTime = common.formatTime(common.addDate("n", minute, new Date()));
531
-          //若是新建,则10m 1d 4d
532
-          if (TaskList[0].IsNew) {
533
-            if (minute==1){
534
-              TaskList[0].Number0 = "1m";
535
-              TaskList[0].Number2 = "10m";
536
-            }
537
-            else{
538
-              TaskList[0].Number0 = "10m";
539
-              TaskList[0].Number2 = "1d";
540
-            }
499
+      
500
+      //若是当前题卡更改学习计划
501
+      if (btnnumber==-2) {
502
+        for (var i = 0,flag=true; i < listTaskFinished.length;flag?i++:i){
503
+          if (listTaskFinished[i].Card.MiaoguoCardID==finishCard.Card.MiaoguoCardID){
504
+            listTaskFinished.splice(i,1);
505
+            flag=false;
506
+          }
507
+          else
508
+            flag=true;
509
+        }
510
+      }
511
+      else{
512
+        //若不是搁置
513
+        //算出下一次的时间
514
+        if (btnnumber != "1") {
515
+
516
+          //若是分钟,则进入复习列表
517
+          if (time.lastIndexOf("m") == time.length - 1) {
518
+            var minute = Number(time.substr(0, time.indexOf("m")));
519
+            TaskList[0].LimitTime = common.formatTime(common.addDate("n", minute, new Date()));
520
+            //若是新建,则10m 1d 4d
521
+            if (TaskList[0].IsNew) {
522
+              if (minute == 1) {
523
+                TaskList[0].Number0 = "1m";
524
+                TaskList[0].Number2 = "10m";
525
+              }
526
+              else {
527
+                TaskList[0].Number0 = "10m";
528
+                TaskList[0].Number2 = "1d";
529
+              }
541 530
 
542
-            TaskList[0].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, TaskList[0].Number0);
543
-            TaskList[0].Number2Str = main.getMemoryLevel(app.globalData.MemoryLevel, 2, TaskList[0].Number2);
531
+              TaskList[0].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, TaskList[0].Number0);
532
+              TaskList[0].Number2Str = main.getMemoryLevel(app.globalData.MemoryLevel, 2, TaskList[0].Number2);
544 533
 
545
-            delete TaskList[0].Number1;
546
-            delete TaskList[0].Number1Str;
534
+              delete TaskList[0].Number1;
535
+              delete TaskList[0].Number1Str;
547 536
 
548
-            delete TaskList[0].Number3;
549
-            delete TaskList[0].Number3Str;
537
+              delete TaskList[0].Number3;
538
+              delete TaskList[0].Number3Str;
550 539
 
551
-            TaskList[0].FirstTime = null;
552
-            TaskList[0].LastTime = null;
553
-          }
554
-          //若是历史的,则10m 1d
555
-          else if (TaskList[0].IsHistory) {
556
-            TaskList[0].Number0 = "10m";
557
-            TaskList[0].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, TaskList[0].Number0);
540
+              TaskList[0].FirstTime = null;
541
+              TaskList[0].LastTime = null;
542
+            }
543
+            //若是历史的,则10m 1d
544
+            else if (TaskList[0].IsHistory) {
545
+              TaskList[0].Number0 = "10m";
546
+              TaskList[0].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, TaskList[0].Number0);
547
+
548
+              delete TaskList[0].Number1;
549
+              delete TaskList[0].Number1Str;
558 550
 
559
-            delete TaskList[0].Number1;
560
-            delete TaskList[0].Number1Str;
551
+              TaskList[0].Number2 = "1d";
552
+              TaskList[0].Number2Str = main.getMemoryLevel(app.globalData.MemoryLevel, 2, TaskList[0].Number2);
561 553
 
562
-            TaskList[0].Number2 = "1d";
563
-            TaskList[0].Number2Str = main.getMemoryLevel(app.globalData.MemoryLevel, 2, TaskList[0].Number2);
554
+              delete TaskList[0].Number3;
555
+              delete TaskList[0].Number3Str;
556
+            }
564 557
 
565
-            delete TaskList[0].Number3;
566
-            delete TaskList[0].Number3Str;
558
+            finishCard.IsReviewOld = TaskList[0].IsReview;
559
+
560
+            TaskList[0].IsReview = true;
561
+            TaskList.push(TaskList[0]);
562
+          }
563
+          //若是天月年
564
+          else {
565
+            var dayNum = Number(time.substr(0, time.indexOf("d")));
566
+            var date = common.addDate("d", dayNum, new Date());
567
+            TaskList[0].LimitTime = common.formatTime(date);
567 568
           }
568 569
 
569
-          finishCard.IsReviewOld = TaskList[0].IsReview;
570
+        }
570 571
 
571
-          TaskList[0].IsReview = true;
572
-          TaskList.push(TaskList[0]);
572
+        //修改学习任务个数
573
+        var learningType = 0;
574
+        if (TaskList[0].IsReview) {
575
+          learningType = 2;
573 576
         }
574
-        //若是天月年
575
-        else {
576
-          var dayNum = Number(time.substr(0, time.indexOf("d")));
577
-          var date = common.addDate("d", dayNum, new Date());
578
-          TaskList[0].LimitTime = common.formatTime(date);
577
+        if (TaskList[0].IsNew) {
578
+          learningType = 0;
579
+        } else if (TaskList[0].IsHistory) {
580
+          learningType = 1;
579 581
         }
580 582
 
581
-      }
582
-
583
-      //修改学习任务个数
584
-      var learningType = 0;
585
-      if (TaskList[0].IsReview) {
586
-        learningType = 2;
587
-      }
588
-      if (TaskList[0].IsNew) {
589
-        learningType = 0;
590
-      } else if (TaskList[0].IsHistory) {
591
-        learningType = 1;
592
-      }
583
+        if (btnnumber == "1") {
584
+          learningType = 3;
585
+        }
593 586
 
594
-      if (btnnumber == "1") {
595
-        learningType = 3;
596
-      }
587
+        finishCard.IntervalTime = time;
588
+        finishCard.BtnNumber = btnnumber;
589
+        finishCard.LearningType = learningType;
597 590
 
598
-      finishCard.IntervalTime = time;
599
-      finishCard.BtnNumber = btnnumber;
600
-      finishCard.LearningType = learningType;
591
+        var duration = common.diffDate("s", timeStart, new Date());
592
+        if (finishCard.btnnumber == 1)
593
+          duration = 0;
594
+        finishCard.Duration = timeHistory + duration;
601 595
 
602
-      var duration = common.diffDate("s", timeStart, new Date());
603
-      if (finishCard.btnnumber == 1)
604
-        duration = 0;
605
-      finishCard.Duration = timeHistory + duration;
596
+        console.log("CardTime:" + finishCard.Duration);
606 597
 
607
-      console.log("CardTime:" + finishCard.Duration);
598
+        timeHistory = 0;
599
+        that.timeCompute();
608 600
 
609
-      timeHistory = 0;
610
-      that.timeCompute();
601
+        //添加完成列表,去掉任务列表数据
602
+        listTaskFinished.push(finishCard);
603
+      }
611 604
 
612
-      //添加完成列表,去掉任务列表数据
613
-      listTaskFinished.push(finishCard);
614 605
       wx.setStorageSync("ListTaskFinished", listTaskFinished);
615 606
       TaskList.shift();
616 607
 
@@ -635,7 +626,6 @@ Page({
635 626
         }
636 627
       }
637 628
 
638
-
639 629
       //console.log(JSON.stringify(TaskList[0]));
640 630
       //如果所有任务完成
641 631
       if (that.data.NumberNew == 0 &&
@@ -1043,6 +1033,12 @@ Page({
1043 1033
   getBarInfo(e) {
1044 1034
     this.setData({ topBarHeight: e.detail.topBarHeight })
1045 1035
   },
1036
+  goto: function (e) {
1037
+    var url = e.currentTarget.dataset.url;
1038
+    wx.navigateTo({
1039
+      url: url,
1040
+    });
1041
+  },
1046 1042
   onShareAppMessage: function () {
1047 1043
     return {
1048 1044
       title: app.globalData.ShareTitle,

+ 8 - 14
pages/main/detail.wxml

@@ -187,7 +187,7 @@
187 187
   </view>
188 188
 
189 189
   <!-- 更多功能 -->
190
-  <view wx:if="{{IsMore}}" class="numberContainer FlexColumn" style='height:{{Containnerheight+100}}rpx;background-color:{{Color.BackColor}};'>
190
+  <view wx:if="{{IsMore}}" class="numberContainer FlexColumn" style='min-height:{{Containnerheight+100}}rpx;background-color:{{Color.BackColor}};'>
191 191
     <view class="numberContainerFooter1 FlexColumn">
192 192
       <view class='lineFooter'></view>
193 193
       <view class='numberContainerFooter102 FlexRow' catchtap='gotoNext' data-btnnumber="2">
@@ -195,19 +195,7 @@
195 195
         <view class='numberContainerFooter111'>挪到最后</view>
196 196
       </view>      
197 197
       <view class='lineFooter'></view>
198
-      <view class='numberContainerFooter103 FlexRow' catchtap="gotoEdit">
199
-        <image src="../images/universalpic_bell_gray_30x30.png" class='universalpic_bell_gray_30x30' />
200
-        <view class='numberContainerFooter1111 numberContainerFooter111'>练习时间</view>
201
-      </view>
202
-      <block wx:for="{{ArrDelayedTime}}" wx:key="index">
203
-        <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
204
-          <view class="lineWidth670"></view>
205
-        </view>
206
-        <view class='numberContainerFooter104 FlexRow' catchtap='gotoNext' data-time="{{item.DayNumber}}d" data-btnnumber="1">
207
-          <view class='numberContainerFooter113'>{{item.Name}}</view>
208
-        </view>
209
-      </block>
210
-      <view class='lineFooter'></view>
198
+      
211 199
       <view class='numberContainerFooter101 FlexRow'>
212 200
         <image src="../images/universalpic_typesize_gray_30x18.png" class='universalpic_typesize_gray_30x18' />
213 201
         <view class='numberContainerFooter11 FlexColumn'>
@@ -218,6 +206,12 @@
218 206
         </view>
219 207
       </view>
220 208
       <view class='lineFooter'></view>
209
+
210
+      <view class='numberContainerFooter102 FlexRow' catchtap='goto' data-url="{{ './previewMenu?CardType='+TaskInfo.CardType+'&ID='+TaskInfo.MiaoguoCardID}}">
211
+        <image src="../images/universalpic_plan_6dots_gray_30x32.png" class='universalpic_plan_6dots_gray_30x32' />
212
+        <view class='numberContainerFooter111'>更改学习计划(该题卡属于{{StudyPlanArray[TaskInfo.CardType]}}练习)</view>
213
+      </view>      
214
+      <view class='lineFooter'></view>
221 215
     </view>
222 216
     <view class="numberContaineFooter FlexRow" catchtap='closeNumberContainner'>
223 217
       <view>关闭</view>

+ 8 - 2
pages/main/detail.wxss

@@ -536,7 +536,7 @@ page{
536 536
   justify-content: flex-start;
537 537
   align-items: flex-start;
538 538
   position: fixed;
539
-  top: 0;
539
+  bottom: 0;
540 540
   color: #fff;
541 541
   z-index: 20;
542 542
 }
@@ -665,7 +665,13 @@ page{
665 665
 .universalpic_sendtoback_gray_30x26{
666 666
   width: 30rpx; 
667 667
   height: 26rpx;
668
-  margin: 0 30rpx 0 30rpx;
668
+  margin: 0 30rpx;
669
+}
670
+
671
+.universalpic_plan_6dots_gray_30x32{
672
+  width: 30rpx; 
673
+  height: 32rpx;
674
+  margin: 0 30rpx;
669 675
 }
670 676
 
671 677
 .universalpic_bell_gray_30x30{

+ 10 - 5
pages/main/previewMenu.js

@@ -1,15 +1,12 @@
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
 
6 7
 Page({
7 8
   data: {
8
-    MenuArr: [
9
-      { CardType: 0, Name: "日常练习", Remark: "常规长期记忆,系统首选" },
10
-      { CardType: 1, Name: "紧急练习", Remark: "临时短期记忆,容量200张" },
11
-      { CardType: -1, Name: "留白题卡", Remark: "暂不练习,到期时间留白" },
12
-    ]
9
+    MenuArr: constant.arrStudyPlay,
13 10
   },
14 11
   onLoad: function (options) {
15 12
     var that = this;
@@ -19,6 +16,11 @@ Page({
19 16
       MiaoguoCardID:options.ID,
20 17
       CardNumberUrgent: app.globalData.TaskToday.CardNumberUrgent,
21 18
     });
19
+    if (app.globalData.IsIPhoneX) {
20
+      that.setData({
21
+        IsIPhoneX: "_IsIPhoneX",
22
+      });
23
+    }
22 24
   },
23 25
   changeCardType:function(e){
24 26
     var that = this;
@@ -57,7 +59,10 @@ Page({
57 59
         app.globalData.TaskToday.CardNumberUrgent++;
58 60
       }
59 61
 
62
+      app.globalData.IsUpdateStudyPlan = 1;
63
+      
60 64
       that.close();
65
+      
61 66
     });
62 67
     
63 68
   },

Plik diff jest za duży
+ 2 - 4
pages/main/previewMenu.wxml


+ 55 - 52
pages/main/previewMenu.wxss

@@ -1,99 +1,102 @@
1 1
 /* 菜单 */
2
-.container2{
2
+
3
+.container2 {
3 4
   background-color: #f0f0f0;
4 5
 }
5 6
 
6
-.panelStudyPlan{
7
-  width:100%;
7
+.panelStudyPlan {
8
+  width: 100%;
8 9
   background-color: #fff;
9 10
   margin-top: 30rpx;
10 11
 }
11
-.panelStudyPlan1{
12
-  width:100%;
13
-  height:133rpx;
14
-  justify-content: flex-start;
15
-}
16 12
 
17
-.imgTrue{
18
-  width:100rpx;
19
-  height:134rpx;
13
+.panelStudyPlan1 {
14
+  width: 100%;
15
+  height: 133rpx;
16
+  justify-content: flex-start;
20 17
 }
21 18
 
22
-.universalpic_checked_blue_40x40{
23
-  width:40rpx;
24
-  height:40rpx;
19
+.imgTrue {
20
+  width: 100rpx;
21
+  height: 134rpx;
25 22
 }
26 23
 
27
-.universalpic_exmark_deepyellow_70x70{
28
-  width:70rpx;
29
-  height:70rpx;
30
-  margin-right: 30rpx;
31
-  margin-top: 28rpx;
24
+.universalpic_checked_blue_40x40 {
25
+  width: 40rpx;
26
+  height: 40rpx;
32 27
 }
33 28
 
34
-.panelStudyPlan11{
29
+.panelStudyPlan11 {
35 30
   align-items: flex-start;
36 31
 }
37 32
 
38
-.text7{
39
-  font-size:28rpx;
33
+.text7 {
34
+  font-size: 28rpx;
40 35
   margin-bottom: 4rpx;
41 36
   font-weight: 400;
42 37
 }
43 38
 
44
-.text71{
45
-  color:#FE6659;
39
+.text71 {
40
+  color: #fe6659;
46 41
 }
47 42
 
48
-.text6{
49
-  font-size:20rpx;
50
-  color:#787878;
43
+.text6 {
44
+  font-size: 20rpx;
45
+  color: #787878;
51 46
 }
52 47
 
53
-.panelHelp{
54
-  width:710rpx;
55
-  height:256rpx;
48
+.panelHelp {
49
+  width: 710rpx;
56 50
   background-color: #fff;
57 51
   border-radius: 20rpx;
58 52
   margin-top: 30rpx;
59 53
   align-items: flex-start;
54
+  padding: 30rpx 0;
60 55
 }
61 56
 
62
-.universalpic_exmark_deepyellow_70x70{
63
-  width:70rpx;
64
-  height:70rpx;
57
+.universalpic_exmark_deepyellow_70x70 {
58
+  width: 70rpx;
59
+  height: 70rpx;
65 60
   margin-right: 30rpx;
66
-  margin-top: 28rpx;
67 61
 }
68 62
 
69
-.text8{
70
-  width:550rpx;
71
-  font-size:20rpx;
63
+.text8 {
64
+  width: 550rpx;
65
+  font-size: 20rpx;
72 66
 }
73 67
 
74
-.panelFooter{
75
-  width:100%;
68
+.panelFooter {
69
+  width: 100%;
76 70
   position: fixed;
77 71
   bottom: 0;
78
-  border-top: 1rpx solid #D2D2D2;
72
+  border-top: 1rpx solid #d2d2d2;
73
+  background-color: #fff;
79 74
 }
80 75
 
81
-.panelFooter .btn{
82
-  width:50%;
83
-  height:121rpx;
76
+.panelFooter_IsIPhoneX {
77
+  width: 100%;
78
+  position: fixed;
79
+  bottom: 30rpx;
80
+  border-top: 1rpx solid #d2d2d2;
81
+  background-color: #fff;
82
+}
83
+
84
+.btn {
85
+  width: 50%;
86
+  height: 121rpx;
84 87
   text-align: center;
85 88
   line-height: 121rpx;
86
-  color:#FE6659;
87
-  font-size:28rpx;
89
+  color: #fe6659;
90
+  font-size: 28rpx;
88 91
   background-color: #fff;
89 92
 }
90 93
 
91
-.panelFooter .btn2{
92
- color:#0071EF;
94
+.btn2 {
95
+  color: #0071ef;
93 96
 }
94 97
 
95
-.line1{
96
-  width:2rpx;
97
-  height:30rpx;
98
-  background-color: #D2D2D2;
99
-}
98
+.line1 {
99
+  width: 2rpx;
100
+  height: 30rpx;
101
+  background-color: #d2d2d2;
102
+}

+ 1 - 1
pages/main/searchCard.js

@@ -96,7 +96,7 @@ Page({
96 96
       });
97 97
     }
98 98
     else{
99
-      var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID;
99
+      var url = 'GetMiaoguoCardList2?UserID=' + app.globalData.userInfo.UserID;
100 100
       var isCollect = e.currentTarget.dataset.iscollect;
101 101
       if (!isCollect)
102 102
         isCollect = 0;

+ 1 - 1
pages/main/searchCard1.js

@@ -36,7 +36,7 @@ Page({
36 36
       var search = this.data.SearchInfo;
37 37
       
38 38
       var that = this;
39
-      var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID;
39
+      var url = 'GetMiaoguoCardList2?UserID=' + app.globalData.userInfo.UserID;
40 40
       if (search)
41 41
         url += "&Key=" + search;
42 42
 

+ 9 - 8
pages/main/searchCardList.js

@@ -43,7 +43,7 @@ Page({
43 43
     else if (options.type == 2) {
44 44
       IsToday = 2;
45 45
       wx.setNavigationBarTitle({
46
-        title: "实际练完的题卡"
46
+        title: "练完的题卡"
47 47
       });
48 48
     }
49 49
     else if (options.IsCollect == 1) {
@@ -186,24 +186,25 @@ Page({
186 186
     }
187 187
 
188 188
     function replaceString(str) {
189
-      //str = str.replace(/\[读]/g, "");
190
-      //str = str.replace(/\[\/读\]/g, "");
191 189
       //str = str.replace(/\[图]/g, "");
192 190
       //str = str.replace(/\[\/图\]/g, "");
193 191
 
194 192
       var str2 = "";
195
-      if (str.indexOf("[读") >= 0) {
196
-        str2 = str.substr(str.indexOf("[读"));
193
+      if (str.indexOf("[读 src=") >= 0) {
194
+        str2 = str.substr(str.indexOf("[读 src="));
197 195
         str2 = str2.substring(0, str2.indexOf("/读]") + 3);
198 196
       }
199 197
       str = str.replace(str2, "");
200 198
 
201
-      if (str.indexOf("[读") >= 0) {
202
-        str2 = str.substr(str.indexOf("[读"));
199
+      if (str.indexOf("[读 src=") >= 0) {
200
+        str2 = str.substr(str.indexOf("[读 src"));
203 201
         str2 = str2.substring(0, str2.indexOf("/读]") + 3);
204 202
       }
205 203
       str = str.replace(str2, "");
206 204
 
205
+      str = str.replace(/\[读]/g, "");
206
+      str = str.replace(/\[\/读\]/g, "");
207
+
207 208
       var str3 = "";
208 209
       if (str.indexOf("[图") >= 0) {
209 210
         str3 = str.substr(str.indexOf("[图"));
@@ -261,7 +262,7 @@ Page({
261 262
     }, 5000);
262 263
 
263 264
     var that = this;
264
-    var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID + "&IsToday=" + that.data.IsToday;
265
+    var url = 'GetMiaoguoCardList2?UserID=' + app.globalData.userInfo.UserID;
265 266
     var id = e.currentTarget.dataset.id;
266 267
     if (id && id > 0)
267 268
       url += "&PageID=" + id;

+ 8 - 8
pages/main/searchCardList.wxml

@@ -7,9 +7,9 @@
7 7
       </view>
8 8
     </view>
9 9
     <view class="panelTop0 FlexRow">
10
-      <view class='panelTop1' wx:if='{{IsCollect || IsToday}}'>
10
+      <view class='panelTop1' wx:if='{{IsCollect || IsToday || CardType==1 || CardType==-1}}'>
11 11
       </view>
12
-      <view class='panelTop1 FlexRow' bindtap='addCard' wx:if='{{!IsCollect && !IsToday}}'>
12
+      <view class='panelTop1 FlexRow' bindtap='addCard' wx:if='{{!IsCollect && !IsToday && CardType!=1 && CardType!=-1}}'>
13 13
         <image class="universalpic_add_black_30x30" src='../images/universalpic_add_black_30x30.png' />
14 14
       </view>
15 15
       <view>{{Count}}张题卡</view>
@@ -77,22 +77,22 @@
77 77
     <view style="height:110rpx;" wx:if="{{Search}}"></view>
78 78
     <view class='panelNull FlexColumn' wx:if="{{!IsCollect && !IsToday}}">
79 79
       <view class='Text3'>无匹配</view>
80
-      <view class='Text4'>从左上角按钮添加新题卡</view>
80
+      <view class='Text4' wx:if="{{CardType!=1 && CardType!=-1}}">从左上角按钮添加新题卡</view>
81 81
     </view>
82 82
 
83 83
     <view class='panelNull FlexColumn' wx:if="{{IsCollect}}">
84 84
       <view class='Text3'>没有题卡</view>
85
-      <view class='Text4'>在“查看题卡、学习中”界面里,点爱心图标把题卡收藏到这里</view>
85
+      <view class='Text4'>在“查看题卡、学习中”界面里,点爱心图标把题卡收藏到这里</view>
86 86
     </view>
87 87
 
88 88
     <view class='panelNull FlexColumn' wx:if="{{IsToday==1}}">
89
-      <view class='Text3'>今天剩余任务量</view>
90
-      <view class='Text4'>没有需要练习的题卡了。</view>
89
+      <view class='Text3'>任务完成</view>
90
+      <view class='Text4'>辛苦啦,明天见</view>
91 91
     </view>
92 92
 
93 93
     <view class='panelNull FlexColumn' wx:if="{{IsToday==2}}">
94
-      <view class='Text3'>今天没有练习过题卡</view>
95
-      <view class='Text4'>请先完成任务后再来查看。</view>
94
+      <view class='Text3'>没有已练完的题卡</view>
95
+      <view class='Text4'>有些题卡可能需要回想两次才算练完</view>
96 96
     </view>
97 97
   </block>
98 98
 </view>

+ 2 - 2
pages/main/searchWeb.js

@@ -50,7 +50,7 @@ Page({
50 50
     });
51 51
   },
52 52
   onSearch: function (e) {
53
-    app.globalData.TempSearcchBackNumber = 3;
53
+    app.globalData.TempSearchBackNumber = 3;
54 54
     wx.navigateTo({
55 55
       url: './searchWeb1',
56 56
     })
@@ -59,7 +59,7 @@ Page({
59 59
     var index = Number(e.currentTarget.dataset.index);
60 60
     var obj=this.data.SelectList[index];
61 61
     main.updateSearchList(obj);
62
-    app.globalData.TempSearcchBackNumber=2;
62
+    app.globalData.TempSearchBackNumber=2;
63 63
     wx.navigateTo({
64 64
       url: './searchWeb2',
65 65
     });

+ 1 - 1
pages/main/searchWeb2.js

@@ -227,7 +227,7 @@ Page({
227 227
       app.globalData.CardList = list;
228 228
 
229 229
       wx.navigateBack({
230
-        delta: app.globalData.TempSearcchBackNumber,
230
+        delta: app.globalData.TempSearchBackNumber,
231 231
       });
232 232
     }
233 233
     else {

+ 13 - 10
pages/main/symbolsetting.js

@@ -55,6 +55,9 @@ Page({
55 55
       that.getXY();
56 56
     });
57 57
   },
58
+  onUnload:function(){
59
+    main.UploadUserConfig();
60
+  },
58 61
   getXY:function(){
59 62
     var that=this;
60 63
     var query = wx.createSelectorQuery();
@@ -64,8 +67,8 @@ Page({
64 67
       if (rect.length>0 && rect[0]){
65 68
         xStart = rect[0].left;
66 69
         yStart = rect[0].top;
67
-        console.log("xStart:" + xStart);
68
-        console.log("yStart:" + yStart);
70
+        // console.log("xStart:" + xStart);
71
+        // console.log("yStart:" + yStart);
69 72
       }
70 73
     });
71 74
     query = wx.createSelectorQuery();
@@ -75,8 +78,8 @@ Page({
75 78
       if (rect.length > 0 && rect[0]) {
76 79
         xEnd = rect[0].left;
77 80
         yEnd = rect[0].top;
78
-        console.log("xEnd:" + xEnd);
79
-        console.log("yEnd:" + yEnd);
81
+        // console.log("xEnd:" + xEnd);
82
+        // console.log("yEnd:" + yEnd);
80 83
       }
81 84
     });
82 85
   },
@@ -133,12 +136,12 @@ Page({
133 136
     query.exec(function(rect) {
134 137
 
135 138
       Copy.top = (rect[0].top + rect[1].scrollTop);
136
-      console.log("Copy.top:" + Copy.top);
137
-      console.log("e.changedTouches[0].pageY_Start:" + e.changedTouches[0].pageY );
139
+      // console.log("Copy.top:" + Copy.top);
140
+      // console.log("e.changedTouches[0].pageY_Start:" + e.changedTouches[0].pageY );
138 141
       yOffset = e.changedTouches[0].pageY  - Copy.top;
139 142
       Copy.left = rect[0].left ;
140 143
       xOffset = e.changedTouches[0].pageX  - Copy.left;
141
-      console.log("yOffset:" + yOffset);
144
+      // console.log("yOffset:" + yOffset);
142 145
 
143 146
       that.setData({
144 147
         Copy: Copy,
@@ -175,14 +178,14 @@ Page({
175 178
     var index = e.currentTarget.dataset.index;
176 179
     var Copy = that.data.Copy;
177 180
 
178
-    console.log(Copy.left + "," + Copy.top);
181
+    // console.log(Copy.left + "," + Copy.top);
179 182
 
180 183
     var x = Math.round((Copy.left - xStart) / 52);
181 184
     var y = Math.round((Copy.top - yStart) / 52);
182 185
 
183 186
     var index2 = y * 7 + x;
184
-    console.log("index:" + index);
185
-    console.log("index2:" + index2);
187
+    // console.log("index:" + index);
188
+    // console.log("index2:" + index2);
186 189
 
187 190
     for (var i = 0; i < that.data.SymbolMain.length; i++) {
188 191
       if (i == index) {

+ 0 - 1
pages/other/tips.wxml

@@ -19,5 +19,4 @@
19 19
     <view class='lineFooter'></view>
20 20
   </block>
21 21
   <view style='width:100%;height:100rpx;'></view>
22
-
23 22
 </view>

+ 24 - 4
pages/plan/pattern.js

@@ -29,13 +29,12 @@ Page({
29 29
   init: function (id) {
30 30
     var that = this;
31 31
     var secondConfig = wx.getStorageSync("SecondConfigArray");
32
-
32
+    secondConfig = secondConfig.toString().split(",");
33 33
     if (!secondConfig || secondConfig[0] == 0) {
34 34
       that.data.IsChangeRecommend = false;
35
-      secondConfig = [0, 0, 0];
35
+      secondConfig = ["0", "0", "0"];
36 36
     }
37 37
     else {
38
-      secondConfig = DefaultSecondArray;
39 38
       that.data.IsChangeRecommend = true;
40 39
       for (var j = 0; j < 3; j++) {
41 40
         var arr = [];
@@ -47,9 +46,15 @@ Page({
47 46
       }
48 47
     }
49 48
 
49
+    if (that.data.IsChangeRecommend)
50
+      that.data.ArrMemoryLevelAll[1].Value[3].H = 50;
51
+    else
52
+      that.data.ArrMemoryLevelAll[1].Value[3].H = 10;
53
+
50 54
     that.setData({
51 55
       IsChangeRecommend: that.data.IsChangeRecommend,
52 56
       SecondConfig: that.data.SecondConfig,
57
+      ArrMemoryLevelAll: that.data.ArrMemoryLevelAll,
53 58
     });
54 59
     wx.setStorageSync("SecondConfigArray", secondConfig);
55 60
 
@@ -60,6 +65,9 @@ Page({
60 65
     else if (MemoryLevel>0){
61 66
       MemoryLevel=1;
62 67
     }
68
+    that.setData({
69
+      MemoryLevel: MemoryLevel,
70
+    });
63 71
     app.globalData.MemoryLevel = MemoryLevel;
64 72
   },
65 73
   selectPattern:function(e){
@@ -76,13 +84,19 @@ Page({
76 84
     var that = this;
77 85
     that.data.IsChangeRecommend = e.detail.value;
78 86
 
87
+    if (that.data.IsChangeRecommend)
88
+      that.data.ArrMemoryLevelAll[1].Value[3].H = 50;
89
+    else
90
+      that.data.ArrMemoryLevelAll[1].Value[3].H = 10;
91
+
79 92
     that.setData({
80 93
       IsChangeRecommend: that.data.IsChangeRecommend,
94
+      ArrMemoryLevelAll: that.data.ArrMemoryLevelAll,
81 95
     });
82 96
     if (that.data.IsChangeRecommend)
83 97
       wx.setStorageSync("SecondConfigArray", DefaultSecondArray);
84 98
     else
85
-      wx.setStorageSync("SecondConfigArray", [0, 0, 0]);
99
+      wx.setStorageSync("SecondConfigArray", ["0", "0", "0"]);
86 100
 
87 101
     main.UploadUserConfig();
88 102
     that.init();
@@ -110,6 +124,12 @@ Page({
110 124
       main.UploadUserConfig();
111 125
     }
112 126
   },
127
+  goto: function (e) {
128
+    var url = e.currentTarget.dataset.url;
129
+    wx.navigateTo({
130
+      url: url,
131
+    });
132
+  },
113 133
   onShareAppMessage: function () {
114 134
     return {
115 135
       title: app.globalData.ShareTitle,

+ 9 - 9
pages/plan/pattern.wxml

@@ -55,23 +55,23 @@
55 55
         <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
56 56
           <view class="lineWidth720"></view>
57 57
         </view>
58
-        <view class="panelItem3 panelItem FlexRow">
59
-          <view class="panelItem31">{{item.Key}}按键凸起</view>
60
-          <view class="panelItem32 FlexRow">
61
-            <picker bindchange="bindRecommendTime" data-index="{{index}}" value="{{item.Value-3}}" range="{{item.NumberArray}}">
58
+        <picker class="panelItem30" bindchange="bindRecommendTime" data-index="{{index}}" value="{{item.Value-3}}" range="{{item.NumberArray}}">
59
+          <view class="panelItem3 panelItem FlexRow">
60
+            <view class="panelItem31">{{item.Key}}按键凸起</view>
61
+            <view class="panelItem32 FlexRow">
62 62
               <view class="picker">
63 63
                 {{item.Value}}秒内
64 64
               </view>
65
-            </picker>
66
-            <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
65
+              <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
66
+            </view>
67 67
           </view>
68
-        </view>
68
+        </picker>
69 69
       </block>
70 70
       <view class='lineFooter'></view>
71 71
       <view class="line"></view>
72 72
     </block>
73 73
   </block>
74
-  <view class="panelItem3 panelItem FlexRow">
74
+  <view class="panelItem3 panelItem FlexRow" bindtap="goto" data-url="../other/help?id=2&idchild=0">
75 75
     <view class="panelItem31">帮助:记忆评价的作用</view>
76 76
     <view class="panelItem32 FlexRow">
77 77
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
@@ -80,7 +80,7 @@
80 80
   <view class="lineWidthAll FlexRow">
81 81
     <view class="lineWidth720"></view>
82 82
   </view>
83
-  <view class="panelItem3 panelItem FlexRow">
83
+  <view class="panelItem3 panelItem FlexRow" bindtap="goto" data-url="../other/help?id=2&idchild=1">
84 84
     <view class="panelItem31">帮助:时间指标的作用</view>
85 85
     <view class="panelItem32 FlexRow">
86 86
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />

+ 4 - 0
pages/plan/pattern.wxss

@@ -112,7 +112,11 @@
112 112
   margin-right: 76rpx;
113 113
 }
114 114
 
115
+.panelItem30{
116
+  width:100%;
117
+}
115 118
 .panelItem3{
119
+  width:100%;
116 120
   height:100rpx;
117 121
   justify-content: space-between;
118 122
 }

+ 0 - 20
pages/plan/setting.js

@@ -2,7 +2,6 @@ import common from '../../utils/util';
2 2
 import main from '../../utils/main';
3 3
 
4 4
 const app = getApp();
5
-const arrClickType = ["专属按钮", "点击空白", "两种方式"];
6 5
 
7 6
 Page({
8 7
   data: {
@@ -17,26 +16,7 @@ Page({
17 16
   },
18 17
   onShow: function () {
19 18
     var that = this;
20
-    
21
-    var colorIndex = wx.getStorageSync("ColorIndexArr");
22
-    if (!colorIndex || colorIndex.length > 1) {
23
-      this.setData({
24
-        ColorName: "多色变换",
25
-      });
26
-    }
27
-    else {
28
-      var color = main.getDetailColor(colorIndex[0]);
29
-      this.setData({
30
-        ColorName: color.Name,
31
-      });
32
-    }
33
-
34
-    that.setData({
35
-      ClickTypeName: arrClickType[app.globalData.ClickType],
36
-    });
37
-
38 19
     common.getStorageValue(that, "CardType", 0, function () {});
39
-
40 20
   },
41 21
   setColorPlan: function () {
42 22
     wx.navigateTo({

+ 1 - 1
pages/plan/studyplan.js

@@ -175,7 +175,7 @@ Page({
175 175
       });
176 176
     }
177 177
     else{
178
-      var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID + "&IsToday=2&CardType="+that.data.CardType;
178
+      var url = 'GetMiaoguoCardList2?UserID=' + app.globalData.userInfo.UserID + "&IsToday=2&CardType="+that.data.CardType;
179 179
       main.getData(url, function (data) {
180 180
         if (data) {
181 181
           var list = [];

+ 6 - 1
pages/plan/studyplan.wxml

@@ -20,7 +20,12 @@
20 20
     </view>
21 21
     <view class='lineFooter'></view>
22 22
   </view>
23
-  <view class="line0 line"></view>
23
+  <view class="line0 FlexRow">
24
+    <view class="spot">●</view>
25
+    <view class="spot">●</view>
26
+    <view class="spot">●</view>
27
+  </view>
28
+  <view class="line"></view>
24 29
   <view class="panelTitle FlexRow">
25 30
     <image class="universalpic_plan_2line_black_30x32" src="../images/universalpic_plan_data_black_30x32.png" />
26 31
     <view class="panelTitle1">参考数据</view>

+ 13 - 4
pages/plan/studyplan.wxss

@@ -15,14 +15,23 @@
15 15
   z-index: 100;
16 16
 }
17 17
 
18
+.line0{
19
+  width:100%;
20
+  height:217rpx;
21
+  background-color: #fff;
22
+  align-items: flex-end;
23
+}
24
+.spot{
25
+  font-size: 16rpx;
26
+  color:#9b9b9b;
27
+  font-weight: 400;
28
+  margin: 0 4rpx 60rpx 4rpx;
29
+}
18 30
 .line{
19 31
   width:100%;
20 32
   height:30rpx;
21 33
   background-color: #F0F0F0;
22 34
 }
23
-.line0{
24
-  height:267rpx;
25
-}
26 35
 
27 36
 .panelTitle{
28 37
   width:100%;
@@ -332,7 +341,7 @@
332 341
   height:110rpx;
333 342
   border-radius: 20rpx;
334 343
   border:1rpx solid #787878;
335
-  color: #0071EF;
344
+  color: #1e1e1e;
336 345
   background-color: #fff;
337 346
   line-height: 110rpx;
338 347
   font-size:36rpx;

+ 2 - 2
pages/plan/studyplandetail.js

@@ -1,9 +1,9 @@
1 1
 import common from '../../utils/util';
2 2
 import main from '../../utils/main';
3 3
 import fanObj from '../template/FanObject';
4
+import constant from '../../utils/constant';
4 5
 
5 6
 const app = getApp();
6
-const arrSortType = ["自由安排", "到期时间较早的题卡", "到期时间较近的题卡"];
7 7
 var historyLimitMax=5;
8 8
 
9 9
 Page({
@@ -114,7 +114,7 @@ Page({
114 114
       });
115 115
       common.getStorageValue(that, "SortTypeIndex", 0, function () {
116 116
         that.setData({
117
-          SortType: arrSortType[that.data.SortTypeIndex],
117
+          SortType: constant.arrSortType[that.data.SortTypeIndex],
118 118
         });
119 119
       });
120 120
     }

+ 95 - 17
utils/constant.js

@@ -1,27 +1,106 @@
1 1
 module.exports = {
2
-  arrMemoryLevelAll: [
3
-    {
2
+  arrMemoryLevelAll: [{
4 3
       Name: "基本模式",
5 4
       Name2: "三色按键,通俗易懂,容易操作,适合初学者",
6
-      Value: [
7
-        { Name: "答错", IsShow: true, BGColor: "#FE6659", W: 210, H: 10 },
8
-        { Name: "生疏", IsShow: true, BGColor: "#FFBC00", W: 210, H: 10 },
9
-        { Name: "答对", IsShow: true, BGColor: "#329468", W: 210, H: 10 },
10
-        { Name: "秒过", IsShow: false, BGColor: "#0A60BE", W: 155, H: 50 },
5
+      Value: [{
6
+          Name: "答错",
7
+          IsShow: true,
8
+          BGColor: "#FE6659",
9
+          W: 210,
10
+          H: 10
11
+        },
12
+        {
13
+          Name: "生疏",
14
+          IsShow: true,
15
+          BGColor: "#FFBC00",
16
+          W: 210,
17
+          H: 10
18
+        },
19
+        {
20
+          Name: "答对",
21
+          IsShow: true,
22
+          BGColor: "#329468",
23
+          W: 210,
24
+          H: 10
25
+        },
26
+        {
27
+          Name: "秒过",
28
+          IsShow: false,
29
+          BGColor: "#0A60BE",
30
+          W: 155,
31
+          H: 10
32
+        },
11 33
       ],
12 34
     },
13 35
     {
14 36
       Name: "高级模式",
15 37
       Name2: "四色按键,配有时间指标功能,能更准确地操作记忆评价,对长期使用有极大帮助,适合已掌握基础使用知识的用户",
16
-      Value: [
17
-        { Name: "1分钟内", IsShow: true, BGColor: "#FE6659", W: 155, H: 10 },
18
-        { Name: "明天", IsShow: true, BGColor: "#FFBC00", W: 155, H: 10 },
19
-        { Name: "3天后", IsShow: true, BGColor: "#329468", W: 155, H: 10 },
20
-        { Name: "6天后", IsShow: true, BGColor: "#0A60BE", W: 155, H: 50 },
38
+      Value: [{
39
+          Name: "1分钟内",
40
+          IsShow: true,
41
+          BGColor: "#FE6659",
42
+          W: 155,
43
+          H: 10
44
+        },
45
+        {
46
+          Name: "明天",
47
+          IsShow: true,
48
+          BGColor: "#FFBC00",
49
+          W: 155,
50
+          H: 10
51
+        },
52
+        {
53
+          Name: "3天后",
54
+          IsShow: true,
55
+          BGColor: "#329468",
56
+          W: 155,
57
+          H: 10
58
+        },
59
+        {
60
+          Name: "6天后",
61
+          IsShow: true,
62
+          BGColor: "#0A60BE",
63
+          W: 155,
64
+          H: 10
65
+        },
21 66
       ]
22 67
     }
23 68
   ],
24
-  arrShareImageBackColor:[
69
+  arrStudyPlay: [{
70
+      CardType: 0,
71
+      Name: "日常练习",
72
+      Remark: "常规长期记忆,系统首选"
73
+    },
74
+    {
75
+      CardType: 1,
76
+      Name: "紧急练习",
77
+      Remark: "临时短期记忆,容量200张"
78
+    },
79
+    {
80
+      CardType: -1,
81
+      Name: "留白题卡",
82
+      Remark: "暂不练习,到期时间留白"
83
+    },
84
+  ],
85
+  arrSortType: ["自由安排", "到期时间较早的题卡", "到期时间较近的题卡"],
86
+  arrFontSize: [{
87
+      Name: "紧凑",
88
+      Value: 36
89
+    },
90
+    {
91
+      Name: "标准",
92
+      Value: 48
93
+    },
94
+    {
95
+      Name: "宽松",
96
+      Value: 68
97
+    },
98
+    {
99
+      Name: "超大",
100
+      Value: 108
101
+    }
102
+  ],
103
+  arrShareImageBackColor: [
25 104
     "#616161",
26 105
     "#E13528",
27 106
     "#634033",
@@ -36,8 +115,7 @@ module.exports = {
36 115
     "#C5326A",
37 116
     "#FF7A91",
38 117
   ],
39
-  arrDetailColor: [
40
-    {//随机
118
+  arrDetailColor: [{ //随机
41 119
       Name: "每次更换配色",
42 120
     },
43 121
     {
@@ -387,7 +465,7 @@ module.exports = {
387 465
     ['fen3', 'fěn', ['粉']],
388 466
     ['fen4', 'fèn', ['分', '份', '奋']],
389 467
     ['fen5', 'fen', ['']],
390
-    ['feng1', 'fēng', ['风', '丰', '峰',]],
468
+    ['feng1', 'fēng', ['风', '丰', '峰', ]],
391 469
     ['feng2', 'féng', ['冯', '逢', '缝']],
392 470
     ['feng3', 'fěng', ['讽']],
393 471
     ['feng4', 'fèng', ['凤', '奉', '俸']],
@@ -1553,5 +1631,5 @@ module.exports = {
1553 1631
     ['zuo4', 'zuò', ['做']],
1554 1632
     ['zuo5', 'zuo', ['咗']]
1555 1633
   ],
1556
-  
1634
+
1557 1635
 }

+ 118 - 74
utils/main.js

@@ -145,12 +145,12 @@ function getWindowHeight() {
145 145
   //console.log("app.globalData.systemInfo.windowHeight:" + app.globalData.systemInfo.windowHeight * 2);
146 146
   if (app.globalData.systemInfo.model) {
147 147
     if (height == 504 && (
148
-        app.globalData.systemInfo.model.indexOf("iPhone 6<") >= 0 ||
149
-        app.globalData.systemInfo.model.indexOf("iPhone 7<") >= 0 ||
150
-        app.globalData.systemInfo.model.indexOf("iPhone 6s<") >= 0 ||
151
-        app.globalData.systemInfo.model.indexOf("iPhone 5") >= 0 ||
152
-        app.globalData.systemInfo.model.indexOf("iPhone SE") >= 0
153
-      )) {
148
+      app.globalData.systemInfo.model.indexOf("iPhone 6<") >= 0 ||
149
+      app.globalData.systemInfo.model.indexOf("iPhone 7<") >= 0 ||
150
+      app.globalData.systemInfo.model.indexOf("iPhone 6s<") >= 0 ||
151
+      app.globalData.systemInfo.model.indexOf("iPhone 5") >= 0 ||
152
+      app.globalData.systemInfo.model.indexOf("iPhone SE") >= 0
153
+    )) {
154 154
       height = 596;
155 155
     } else if (app.globalData.systemInfo.model.indexOf("iPad") >= 0) {
156 156
       height = 470;
@@ -188,25 +188,25 @@ function getStorageValue(obj, name, defaultStatus, callback) {
188 188
 
189 189
 function getProgramList() {
190 190
   return [{
191
-      id: 89,
192
-      appId: 'wx46a7b4c420e6d38f',
193
-      path: 'pages/index/start?SourceID=' + app.globalData.ProgramID,
194
-    },
195
-    {
196
-      id: 98,
197
-      appId: 'wx331e8dd070f01d0e',
198
-      path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
199
-    },
200
-    {
201
-      id: 99,
202
-      appId: 'wxb54a6d5aff836ee3',
203
-      path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
204
-    },
205
-    {
206
-      id: 106,
207
-      appId: 'wx313a8f2c0741efe1',
208
-      path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
209
-    },
191
+    id: 89,
192
+    appId: 'wx46a7b4c420e6d38f',
193
+    path: 'pages/index/start?SourceID=' + app.globalData.ProgramID,
194
+  },
195
+  {
196
+    id: 98,
197
+    appId: 'wx331e8dd070f01d0e',
198
+    path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
199
+  },
200
+  {
201
+    id: 99,
202
+    appId: 'wxb54a6d5aff836ee3',
203
+    path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
204
+  },
205
+  {
206
+    id: 106,
207
+    appId: 'wx313a8f2c0741efe1',
208
+    path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
209
+  },
210 210
   ];
211 211
 }
212 212
 
@@ -236,7 +236,7 @@ function changeViewToString(content) {
236 236
     str = ""
237 237
   else {
238 238
     str = str.replace(/\n\n\n/g, "\n\n");
239
-    if (str.indexOf("\n") == 0 && str.indexOf("[")==1) {
239
+    if (str.indexOf("\n") == 0 && str.indexOf("[") == 1) {
240 240
       str = str.substr(1);
241 241
     }
242 242
     if (str.lastIndexOf("\n") == str.length - 1) {
@@ -303,11 +303,11 @@ function changeStringToView(field) {
303 303
         var str = field[j].Content.toString();
304 304
 
305 305
         str = DecryptUrl(str);
306
-        
307
-        if (str.indexOf("[读")>0)
306
+
307
+        if (str.indexOf("[读") > 0)
308 308
           str = str.replace(/\[读/g, "\n[读");
309 309
         str = str.replace(/\[图/g, "\n[图");
310
-        if (str.indexOf("[音")>0)
310
+        if (str.indexOf("[音") > 0)
311 311
           str = str.replace(/\[音/g, "\n[音");
312 312
         str = str.replace(/\[\/读\]/g, "[\/读]\n");
313 313
         str = str.replace(/\[\/图\]/g, "[\/图]\n");
@@ -530,7 +530,7 @@ function getTaskTodayList(callback) {
530 530
 
531 531
   var that = this;
532 532
   var url = 'GetMiaoguoCardToday2?UserID=' + app.globalData.userInfo.UserID;
533
-  
533
+
534 534
   getData(url, function (data) {
535 535
     clearTimeout(intervalTask);
536 536
     if (isNotData) {
@@ -540,7 +540,7 @@ function getTaskTodayList(callback) {
540 540
 
541 541
     if (data) {
542 542
       app.globalData.TaskToday = data;
543
-      
543
+
544 544
       callback(data);
545 545
     }
546 546
   });
@@ -605,28 +605,6 @@ function saveTempImage(serverUrl, tempUrl) {
605 605
   }
606 606
 }
607 607
 
608
-function UploadUserConfig(callback) {
609
-  var that = this;
610
-  var param1 = {};
611
-  param1.CardType = wx.getStorageSync("CardType");
612
-  param1.CardMaxNumberNew = wx.getStorageSync("CardMaxNumberNew");
613
-  param1.CardMaxNumberHistory = wx.getStorageSync("CardMaxNumberHistory");
614
-  param1.CardMaxNumberNewUrgent = wx.getStorageSync("CardMaxNumberNewUrgent");
615
-  param1.CardMaxNumberHistoryUrgent = wx.getStorageSync("CardMaxNumberHistoryUrgent");
616
-  param1.SortTypeIndex = wx.getStorageSync("SortTypeIndex");
617
-  param1.MemoryLevel = wx.getStorageSync("MemoryLevel");
618
-
619
-  param1.ClickType = wx.getStorageSync("ClickType");
620
-  param1.SecondConfigArray = wx.getStorageSync("SecondConfigArray");
621
-  param1.ColorIndexArr = wx.getStorageSync("ColorIndexArr");
622
-
623
-  that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {
624
-    if (callback){
625
-      callback();
626
-    }
627
-  });
628
-}
629
-
630 608
 function UpdateMiaoguoCardTodayAll(isShowLoading, callback) {
631 609
   var that = this;
632 610
   if (isShowLoading) {
@@ -686,7 +664,7 @@ function updateSearchList(obj) {
686 664
 
687 665
   if (obj.Type == "shici") {
688 666
     if (obj.Value.CHN.ShiciTitle)
689
-      obj.Key=obj.Value.CHN.ShiciTitle;
667
+      obj.Key = obj.Value.CHN.ShiciTitle;
690 668
     if (obj.Key.indexOf("《") == 0)
691 669
       obj.Key = obj.Key.substring(1, obj.Key.length - 1);
692 670
   }
@@ -793,14 +771,14 @@ function getMemoryLevel(index, number, time) {
793 771
           var month1 = Math.floor(dayNum / 30);
794 772
           var month = month1 + Math.round(10 * (dayNum - month1 * 30) / 30) / 10;
795 773
           result = month + "月后";
796
-        } else{
774
+        } else {
797 775
           result = Number(data.replace("d", ""));
798
-          if (result==1)
799
-            result="明天";
800
-          else if (result==2)
801
-            result="后天";
776
+          if (result == 1)
777
+            result = "明天";
778
+          else if (result == 2)
779
+            result = "后天";
802 780
           else
803
-            result=(result-1)+"天后";
781
+            result = (result - 1) + "天后";
804 782
         }
805 783
       }
806 784
 
@@ -820,24 +798,24 @@ function GetHanziUnitWords(unitsID, testType, callback) {
820 798
           FontSize: 144,
821 799
           TagWidth: 136,
822 800
           Content: [{
823
-              ContentType: 0,
824
-              Content: []
825
-            },
826
-            {
827
-              ContentType: 1,
828
-              Content: []
829
-            },
830
-            {
831
-              ContentType: 2,
832
-              Content: []
833
-            },
801
+            ContentType: 0,
802
+            Content: []
803
+          },
804
+          {
805
+            ContentType: 1,
806
+            Content: []
807
+          },
808
+          {
809
+            ContentType: 2,
810
+            Content: []
811
+          },
834 812
           ]
835 813
         };
836 814
         taskInfo.Word = words[k].Name;
837 815
 
838 816
         var pinyinNormal = "(" + getPinyinNormal(words[k].Pinyin) + ")";
839
-        var combineWords = common.ReplaceAllString(words[k].CombineWords, words[k].Name, words[k].Name+pinyinNormal);
840
-          
817
+        var combineWords = common.ReplaceAllString(words[k].CombineWords, words[k].Name, words[k].Name + pinyinNormal);
818
+
841 819
         taskInfo.ReadString = words[k].Name + pinyinNormal + "," + combineWords + "的" + words[k].Name + pinyinNormal;
842 820
 
843 821
         if (testType == "read") {
@@ -1072,6 +1050,71 @@ function getHanzi(callback) {
1072 1050
   });
1073 1051
 }
1074 1052
 
1053
+function UploadUserConfig(callback) {
1054
+  var that = this;
1055
+  var param1 = {};
1056
+  param1.CardType = wx.getStorageSync("CardType");
1057
+  param1.CardMaxNumberNew = wx.getStorageSync("CardMaxNumberNew");
1058
+  param1.CardMaxNumberHistory = wx.getStorageSync("CardMaxNumberHistory");
1059
+  param1.CardMaxNumberNewUrgent = wx.getStorageSync("CardMaxNumberNewUrgent");
1060
+  param1.CardMaxNumberHistoryUrgent = wx.getStorageSync("CardMaxNumberHistoryUrgent");
1061
+  param1.SortTypeIndex = wx.getStorageSync("SortTypeIndex");
1062
+  param1.MemoryLevel = wx.getStorageSync("MemoryLevel");
1063
+
1064
+  param1.ClickType = wx.getStorageSync("ClickType");
1065
+  param1.SecondConfigArray = wx.getStorageSync("SecondConfigArray").join(",");
1066
+  param1.ColorIndexArr = wx.getStorageSync("ColorIndexArr").join(",");
1067
+
1068
+  var symboMain = wx.getStorageSync("SymbolMain");
1069
+  var symbol1 = [];
1070
+  for (var i = 0; i < symboMain.length; i++) {
1071
+    symbol1.push(symboMain[i].Name);
1072
+  }
1073
+  symbol1 = JSON.stringify(symbol1);
1074
+  param1.SymbolList = symbol1;
1075
+
1076
+  that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {
1077
+    if (callback) {
1078
+      callback();
1079
+    }
1080
+  });
1081
+}
1082
+
1083
+function getUserConfig() {
1084
+  var that = this;
1085
+  postData('UploadUserConfig?Type=getData&UserID=' + app.globalData.userInfo.UserID, {}, function (data) {
1086
+
1087
+    var cardType = wx.getStorageSync("CardType");
1088
+
1089
+    wx.setStorageSync("CardType", data.CardType);
1090
+    wx.setStorageSync("CardMaxNumberNew", data.CardMaxNumberNew);
1091
+    wx.setStorageSync("CardMaxNumberHistory", data.CardMaxNumberHistory);
1092
+    wx.setStorageSync("CardMaxNumberNewUrgent", data.CardMaxNumberNewUrgent);
1093
+    wx.setStorageSync("CardMaxNumberHistoryUrgent", data.CardMaxNumberHistoryUrgent);
1094
+    wx.setStorageSync("SortTypeIndex", data.SortTypeIndex);
1095
+    wx.setStorageSync("MemoryLevel", data.MemoryLevel);
1096
+    wx.setStorageSync("ClickType", data.ClickType);
1097
+    wx.setStorageSync("SecondConfigArray", data.SecondConfigArray.split(","));
1098
+    wx.setStorageSync("ColorIndexArr", data.ColorIndexArr.split(","));
1099
+
1100
+    var symbol1 = [];
1101
+    if (data.SymbolList) {
1102
+      for (var i = 0; i < data.SymbolList.length; i++) {
1103
+        var obj = {};
1104
+        obj.Name = data.SymbolList[i];
1105
+        obj.CSS = "btn2";
1106
+        symbol1.push(obj);
1107
+      }
1108
+    }
1109
+    else {
1110
+      symbol1 = app.globalData.SymbolMain;
1111
+    }
1112
+    wx.setStorageSync("SymboMain", symbol1);
1113
+    app.globalData.SymbolMain=symbol1;
1114
+
1115
+  });
1116
+}
1117
+
1075 1118
 
1076 1119
 module.exports = {
1077 1120
   getData: getData,
@@ -1105,5 +1148,6 @@ module.exports = {
1105 1148
   getPinyinNormal: getPinyinNormal,
1106 1149
   getHanzi: getHanzi,
1107 1150
   GetHanziUnitWords: GetHanziUnitWords,
1108
-  GetTestReportInfo: GetTestReportInfo
1151
+  GetTestReportInfo: GetTestReportInfo,
1152
+  getUserConfig: getUserConfig
1109 1153
 }