chengjie лет назад: 5
Родитель
Сommit
0249104057
63 измененных файлов с 2175 добавлено и 503 удалено
  1. 3 3
      app.js
  2. 8 3
      app.json
  3. 5 0
      app.wxss
  4. BIN
      pages/images/doc_website_infor_01.png
  5. BIN
      pages/images/study_index_board_avater01.png
  6. BIN
      pages/images/study_index_board_close.png
  7. BIN
      pages/images/study_index_board_message.png
  8. BIN
      pages/images/study_index_footer.png
  9. BIN
      pages/images/study_index_plan.png
  10. BIN
      pages/images/universalpic_exmark_black_26x26.png
  11. BIN
      pages/images/universalpic_exmark_deepyellow_70x70.png
  12. BIN
      pages/images/universalpic_plan_2line_black_30x32.png
  13. BIN
      pages/images/universalpic_plan_data_black_30x32.png
  14. BIN
      pages/images/universalpic_plan_done_black_30x32.png
  15. BIN
      pages/images/universalpic_plan_right_black_30x32.png
  16. 9 0
      pages/index/index.js
  17. 2 2
      pages/main/cardInfo.wxml
  18. 9 1
      pages/main/default.js
  19. 26 13
      pages/main/default.wxml
  20. 108 14
      pages/main/default.wxss
  21. 5 0
      pages/main/detail.js
  22. 5 1
      pages/main/detail.json
  23. 9 4
      pages/main/detail.wxml
  24. 17 2
      pages/main/detail.wxss
  25. 99 91
      pages/main/preview.js
  26. 8 8
      pages/main/preview.wxml
  27. 2 1
      pages/main/preview.wxss
  28. 49 0
      pages/main/previewMenu.js
  29. 3 0
      pages/main/previewMenu.json
  30. 23 0
      pages/main/previewMenu.wxml
  31. 58 0
      pages/main/previewMenu.wxss
  32. 10 5
      pages/main/searchCard.js
  33. 123 80
      pages/main/searchCard.wxml
  34. 11 0
      pages/main/searchCard.wxss
  35. 6 6
      pages/main/searchCard1.js
  36. 2 2
      pages/main/searchCard1.wxml
  37. 39 14
      pages/main/searchCardList.js
  38. 11 5
      pages/main/searchCardList.wxml
  39. 2 0
      pages/main/searchCardList.wxss
  40. 7 0
      pages/main/searchWeb2.js
  41. 1 2
      pages/main/searchWeb2.wxml
  42. 8 19
      pages/plan/setting.js
  43. 28 36
      pages/plan/setting.wxml
  44. 1 1
      pages/plan/sortRule.wxml
  45. 2 1
      pages/plan/sortRule.wxss
  46. 198 0
      pages/plan/studyplan.js
  47. 4 0
      pages/plan/studyplan.json
  48. 197 0
      pages/plan/studyplan.wxml
  49. 362 0
      pages/plan/studyplan.wxss
  50. 178 0
      pages/plan/studyplandetail.js
  51. 3 0
      pages/plan/studyplandetail.json
  52. 163 0
      pages/plan/studyplandetail.wxml
  53. 207 0
      pages/plan/studyplandetail.wxss
  54. 0 68
      pages/plan/taskLimit.js
  55. 0 3
      pages/plan/taskLimit.json
  56. 0 45
      pages/plan/taskLimit.wxml
  57. 0 54
      pages/plan/taskLimit.wxss
  58. 2 0
      pages/template/Fan.js
  59. 1 0
      pages/template/Fan.json
  60. 27 0
      pages/template/Fan.wxml
  61. 52 0
      pages/template/Fan.wxss
  62. 53 0
      pages/template/FanObject.js
  63. 29 19
      utils/main.js

Разница между файлами не показана из-за своего большого размера
+ 3 - 3
app.js


+ 8 - 3
app.json

@@ -1,6 +1,9 @@
1 1
 {
2 2
   "pages": [
3 3
     "pages/index/index",
4
+    
5
+    "pages/main/preview",
6
+   
4 7
     "pages/index/accredit",
5 8
     "pages/index/openSetting",
6 9
 
@@ -12,7 +15,6 @@
12 15
 
13 16
     "pages/main/default",
14 17
     "pages/main/cardInfo",
15
-    "pages/main/preview",
16 18
     "pages/main/searchCardList",
17 19
     "pages/main/searchCard1",
18 20
     "pages/main/searchCard",
@@ -23,14 +25,17 @@
23 25
     "pages/main/detail",
24 26
     "pages/main/systemsetting",
25 27
     "pages/main/symbolsetting",
26
-    
28
+    "pages/main/previewMenu",
29
+
27 30
     "pages/plan/recommend",
28 31
     "pages/plan/clicktype",
29 32
     "pages/plan/colorplan",
30 33
     "pages/plan/memoryLevel",
31
-    "pages/plan/taskLimit",
32 34
     "pages/plan/sortRule",
33 35
     "pages/plan/setting",
36
+
37
+    "pages/plan/studyplan",
38
+    "pages/plan/studyplandetail",
34 39
     
35 40
     "pages/marketing/extenduser",
36 41
     "pages/marketing/shareuser",

+ 5 - 0
app.wxss

@@ -53,6 +53,11 @@
53 53
   height: 1rpx;
54 54
   background-color: #E3E3E3; 
55 55
 }
56
+.lineWidth690{
57
+  width: 690rpx;
58
+  height: 1rpx;
59
+  background-color: #E3E3E3; 
60
+}
56 61
 .lineWidth680{
57 62
   width: 680rpx;
58 63
   height: 1rpx;

BIN
pages/images/doc_website_infor_01.png


BIN
pages/images/study_index_board_avater01.png


BIN
pages/images/study_index_board_close.png


BIN
pages/images/study_index_board_message.png


BIN
pages/images/study_index_footer.png


BIN
pages/images/study_index_plan.png


BIN
pages/images/universalpic_exmark_black_26x26.png


BIN
pages/images/universalpic_exmark_deepyellow_70x70.png


BIN
pages/images/universalpic_plan_2line_black_30x32.png


BIN
pages/images/universalpic_plan_data_black_30x32.png


BIN
pages/images/universalpic_plan_done_black_30x32.png


BIN
pages/images/universalpic_plan_right_black_30x32.png


+ 9 - 0
pages/index/index.js

@@ -313,8 +313,17 @@ Page({
313 313
     var that = this;
314 314
     main.postData('UploadUserConfig?Type=getData&UserID=' + app.globalData.userInfo.UserID, {}, function (data) {
315 315
 
316
+      var cardType=wx.getStorageSync("CardType");
317
+      //若是用户在别的设备修改了计划,则删除原有的数据
318
+      if (cardType!=data.CardType){
319
+        wx.removeStorageSync("StudyPlan");
320
+      }
321
+      wx.setStorageSync("CardType", data.CardType);
322
+
316 323
       wx.setStorageSync("CardMaxNumberNew", data.CardMaxNumberNew);
317 324
       wx.setStorageSync("CardMaxNumberHistory", data.CardMaxNumberHistory);
325
+      wx.setStorageSync("CardMaxNumberNewUrgent", data.CardMaxNumberNewUrgent);
326
+      wx.setStorageSync("CardMaxNumberHistoryUrgent", data.CardMaxNumberHistoryUrgent);
318 327
       wx.setStorageSync("SortTypeIndex", data.SortTypeIndex);
319 328
       wx.setStorageSync("MemoryLevel", data.MemoryLevel);
320 329
       wx.setStorageSync("ClickType", data.ClickType);

+ 2 - 2
pages/main/cardInfo.wxml

@@ -3,7 +3,7 @@
3 3
     <view class="panelTitle1">时间</view>
4 4
   </view>
5 5
   <view class="panelItem FlexRow">
6
-    <view class="panelItem1">添加题卡</view>
6
+    <view class="panelItem1">题卡创建</view>
7 7
     <view class="panelItem2 FlexRow">
8 8
       {{CardInfo.CreateTimeStr}}
9 9
     </view>
@@ -30,7 +30,7 @@
30 30
     <view class="lineWidth720"></view>
31 31
   </view>
32 32
   <view class="panelItem FlexRow">
33
-    <view class="panelItem1">到期时间</view>
33
+    <view class="panelItem1">到期(题卡可再现的具体时间</view>
34 34
     <view class="panelItem2 FlexRow">
35 35
       {{CardInfo.LimitTimeStr}}
36 36
     </view>

+ 9 - 1
pages/main/default.js

@@ -47,7 +47,7 @@ Page({
47 47
   },
48 48
   onShow: function () {
49 49
     var that = this;
50
-    if (app.globalData.userInfo.IsNewUser==1 && app.globalData.userInfo.IsShow == 1) {
50
+    if (app.globalData.userInfo.IsNewUser && app.globalData.userInfo.IsNewUser==1 && app.globalData.userInfo.IsShow == 1) {
51 51
       if (app.globalData.userInfo.Subscribe == 0) {
52 52
         wx.redirectTo({
53 53
           url: '../other/newuser',
@@ -158,6 +158,14 @@ Page({
158 158
     });
159 159
   },
160 160
   init:function(){
161
+    //显示学习方案
162
+    var cardType = wx.getStorageSync("CardType");
163
+    if (!cardType)
164
+      cardType = 0;
165
+    this.setData({
166
+      CardType:cardType,
167
+    });
168
+
161 169
     //题卡主题色
162 170
     var arrColorIndex = wx.getStorageSync("ColorIndexArr");
163 171
     if (!arrColorIndex) {

+ 26 - 13
pages/main/default.wxml

@@ -1,25 +1,38 @@
1 1
 <view class="container FlexColumn" style='height:{{Containnerheight}}rpx;'>
2
-  <view class='panel1 FlexColumn' bindtap="goto" data-url="../plan/setting">
3
-    <view class='text1 FlexRow'>第<text class="text11">{{DayNumber}}</text>天</view>
4
-    <view class='text3' wx:if="{{TodayTaskNumber>0 && IsStart==0}}">剩余任务</view>
5
-    <view class='text3' wx:if="{{TodayTaskNumber>0 && IsStart==1}}">今天任务</view>
6
-    <view class='panel11 FlexRow' >
7
-      <view class='universalpic_setup_gray_40x40'></view>
2
+  <view class='panel1{{IsIPad}} FlexColumn'>
3
+    <view class='text1 FlexRow'>第
4
+      <text class="text11">{{DayNumber}}</text>天</view>
5
+    <view class='text3' wx:if="{{CardType==0}}">日常练习</view>
6
+    <view class='text3' wx:if="{{CardType==1}}">紧急练习</view>
7
+    <view class='text3' wx:if="{{CardType==2}}">整体练习</view>
8
+    <view class='panel11 FlexRow'>
8 9
       <view class='text2'>{{TodayTaskNumber}}</view>
9
-      <image class="universalpic_setup_white_50x50" src='../images/universalpic_setup_white_50x50.png' />
10 10
     </view>
11 11
   </view>
12 12
   <image wx:if="{{TodayTaskNumber>0 && IsStart==1}}" class="study_index_start{{IsIPad}}" src='../images/study_index_start.png' bindtap="goto" data-url="./detail" />
13 13
   <image wx:if="{{TodayTaskNumber>0 && IsStart==0}}" class="study_index_start{{IsIPad}}" src='../images/study_index_goon.png' bindtap="goto" data-url="./detail" />
14 14
   <image wx:if="{{TodayTaskNumber==0}}" class="study_index_start{{IsIPad}}" src='../images/study_index_report.png' bindtap="goto" data-url="./detail" />
15 15
 
16
+  <image class="study_index_plan{{IsIPad}}" src="../images/study_index_plan.png" bindtap="goto" data-url="../plan/studyplan" />
17
+
16 18
   <view class='panelBottom FlexColumn'>
17 19
 
18
-    <image class="study_index_banner_close" src='../images/study_index_banner_close.png' bindtap="closeMarketing" wx:if="{{IsShowMarketing===2}}"/>
19
-    <image class="study_index_banner" src='{{ImagePath}}web/study_index_banner200112.png' bindtap="goto" data-url="../marketing/index" wx:if="{{IsShowMarketing===0 || IsShowMarketing===2}}" />
20
-    
21
-    <image class="study_index_footer" src='../images/study_index_footer.png' />
20
+    <!-- <image class="study_index_banner_close" src='../images/study_index_banner_close.png' bindtap="closeMarketing" wx:if="{{IsShowMarketing===2}}"/>
21
+    <image class="study_index_banner" src='{{ImagePath}}web/study_index_banner200112.png' bindtap="goto" data-url="../marketing/index" wx:if="{{IsShowMarketing===0 || IsShowMarketing===2}}" /> -->
22
+    <image class="study_index_footer" src='../images/study_index_footer.png' wx:if="{{IsShowMarketing===3}}" />
22 23
 
24
+    <view class="adPanel FlexColumn" wx:if="{{IsShowMarketing===0 || IsShowMarketing===2}}">
25
+      <view class="adLine1 FlexRow" bindtap="goto" data-url="../marketing/index">
26
+        <view class="text6">秒过推广计划 120天有效期等您来拿</view>
27
+      </view>
28
+      <view class="adLine2"></view>
29
+      <view class="adLine3"></view>
30
+      <view class="chalk1 chalk"><view class="chalk11 chalk"></view></view>
31
+      <view class="chalk2 chalk"><view class="chalk11 chalk"></view></view>
32
+      <image class="study_index_board_close" src='../images/study_index_board_close.png' wx:if="{{IsShowMarketing===2}}" catchtap="closeMarketing"/>
33
+      <image class="avatar" src='../images/study_index_board_avater01.png' />
34
+      <image class="message" src='../images/study_index_board_message.png' />
35
+    </view>
23 36
     <view class='panelBottom1 FlexRow'>
24 37
       <view class='panelBottom11 FlexColumn'>
25 38
         <image class="program_tabbar_study_default" src='../images/program_tabbar_study_normal.png' />
@@ -28,7 +41,7 @@
28 41
       <view class='line1'></view>
29 42
       <view class='panelBottom11 FlexColumn' bindtap="goto" data-url="./add?type=add&id=0">
30 43
         <image class="program_tabbar_study_default" src='../images/program_tabbar_add_default.png' />
31
-        <view>添加</view>
44
+        <view>新增</view>
32 45
       </view>
33 46
       <view class='line1'></view>
34 47
       <view class='panelBottom11 FlexColumn' bindtap='gotoSearchCard'>
@@ -54,6 +67,6 @@
54 67
 </view>
55 68
 
56 69
 <view wx:if="{{IsExit}}" class="IsExitContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
57
-  <view class='IsExitText'>请竖起屏幕再打开小程序</view>
70
+  <view class='IsExitText'>请关闭微信(务必),竖起屏幕再打开秒过学习小程序</view>
58 71
   <navigator class='isExit' open-type="exit" target="miniProgram">确认</navigator>
59 72
 </view>

+ 108 - 14
pages/main/default.wxss

@@ -4,30 +4,31 @@
4 4
 
5 5
 .panel1 {
6 6
   position: fixed;
7
-  top:100rpx;
7
+  top:80rpx;
8 8
   color: #fff;
9 9
 }
10 10
 
11
-.panel1 .text1 {
11
+.panel1_iPad {
12
+  position: fixed;
13
+  top:0rpx;
14
+  color: #fff;
15
+}
16
+
17
+.text1 {
12 18
   font-size: 36rpx;
13 19
 }
14
-.panel1 .text11 {
20
+.text11 {
15 21
   font-size: 40rpx;
16 22
   font-family: 'Roboto-Black';
17 23
 }
18
-.panel1 .text3 {
24
+.text3 {
19 25
   font-size: 28rpx;
20 26
   margin-top: 10rpx;
21 27
 }
22 28
 
23
-.panel1 .text2 {
29
+.text2 {
24 30
   font-family: 'Roboto-Black';
25 31
   font-size: 168rpx;
26
-  margin: 0 10rpx;
27
-}
28
-
29
-.panel1 .panel11{
30
-  margin-right: -50rpx;
31 32
 }
32 33
 
33 34
 .universalpic_setup_white_50x50 {
@@ -41,23 +42,38 @@
41 42
   width: 377rpx;
42 43
   height: 240rpx;
43 44
   position: fixed;
44
-  top:523rpx;
45
+  top:437rpx;
45 46
 }
46 47
 
47 48
 .study_index_start_iPad {
48 49
   width: 377rpx;
49 50
   height: 240rpx;
50 51
   position: fixed;
51
-  top:433rpx;
52
+  top:297rpx;
52 53
 }
53 54
 
55
+.study_index_plan{
56
+  width:110rpx;
57
+  height:144rpx;
58
+  position: fixed;
59
+  top:745rpx;
60
+}
61
+
62
+.study_index_plan_iPad{
63
+  width:110rpx;
64
+  height:144rpx;
65
+  position: fixed;
66
+  top:545rpx;
67
+}
68
+
69
+
54 70
 .panelBottom {
55 71
   position: fixed;
56 72
   bottom:0;
57 73
   width: 100%;
58 74
 }
59 75
 
60
-.study_index_banner{
76
+/* .study_index_banner{
61 77
   width: 360rpx;
62 78
   height: 148rpx;
63 79
   align-self: flex-end;
@@ -74,11 +90,89 @@
74 90
   margin-right: 20rpx;
75 91
   margin-bottom: -50rpx;
76 92
   position: relative;
93
+} */
94
+
95
+.adPanel{
96
+  width:100%;
97
+  height:174rpx;
98
+  justify-content: flex-end;
99
+  position: relative;
100
+}
101
+.adLine1{
102
+  width:100%;
103
+  height:120rpx;
104
+  background-color: #222D4C;
105
+  border-top-left-radius: 14rpx;
106
+  border-top-right-radius: 14rpx;
107
+  
108
+}
109
+.text6{
110
+  margin-left: 15rpx;
111
+  font-size:28rpx;
112
+  color:#E3E3E3;
113
+}
114
+.adLine2{
115
+  width:100%;
116
+  height:20rpx;
117
+  background-color: #FFC48D;
118
+}
119
+.adLine3{
120
+  width:100%;
121
+  height:10rpx;
122
+  background-color: #CA8770;
123
+}
124
+.avatar{
125
+  width:110rpx;
126
+  height:169rpx;
127
+  position: absolute;
128
+  bottom:0;
129
+  left:30rpx;
130
+}
131
+.message{
132
+  width:103rpx;
133
+  height:41rpx;
134
+  position: absolute;
135
+  top:0;
136
+  left:160rpx;
137
+}
138
+
139
+.chalk{
140
+  height:8rpx;
141
+  border-radius: 4rpx;
142
+}
143
+.chalk1{
144
+  width:34rpx;
145
+  position: absolute;
146
+  bottom:30rpx;
147
+  right:90rpx;
148
+  background-color: #E3E3E3;
149
+}
150
+
151
+.chalk11{
152
+  width:28rpx;
153
+  background-color: rgba(0,0,0,0.2);
154
+}
155
+
156
+.chalk2{
157
+  width:34rpx;
158
+  position: absolute;
159
+  bottom:30rpx;
160
+  right:40rpx;
161
+  background-color: #19C575;
162
+}
163
+
164
+
165
+.study_index_board_close{
166
+  width:70rpx;
167
+  height:70rpx;
168
+  position: absolute;
169
+  right:10rpx;
170
+  top:49rpx;
77 171
 }
78 172
 
79 173
 .study_index_footer{
80 174
   width: 100%;
81
-  height:130rpx;
175
+  height:140rpx;
82 176
 }
83 177
 .panelBottom1 {
84 178
   width: 100%;

+ 5 - 0
pages/main/detail.js

@@ -479,6 +479,7 @@ Page({
479 479
     if (btnnumber == 2) {
480 480
       var card = TaskList.splice(0, 1);
481 481
       card[0].IsFinally=true;
482
+      card[0].LimitTime=common.formatTime(new Date(),"/",true)+" 23:59:59";
482 483
       TaskList.push(card[0]);
483 484
       that.setData({
484 485
         IsShowAnswer: [0, 0],
@@ -1021,6 +1022,10 @@ Page({
1021 1022
       }
1022 1023
     });
1023 1024
   },
1025
+  //获取导航栏高度
1026
+  getBarInfo(e) {
1027
+    this.setData({ topBarHeight: e.detail.topBarHeight })
1028
+  },
1024 1029
   onShareAppMessage: function () {
1025 1030
     return {
1026 1031
       title: app.globalData.ShareTitle,

+ 5 - 1
pages/main/detail.json

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

+ 9 - 4
pages/main/detail.wxml

@@ -1,4 +1,9 @@
1 1
 <import src="../template/cardShow.wxml" />
2
+<navigation-bar title="学习中" bindgetBarInfo="getBarInfo" show="true" left="true" background="{{Color.BackColor}}" color="#fff">
3
+    <view slot="left" bindtap="onClose">
4
+      <view class="square">退出练习</view>
5
+    </view>
6
+</navigation-bar>
2 7
 
3 8
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}}' bindtap='onShowAnswer' data-type="all">
4 9
   <!-- 练习中 -->
@@ -137,7 +142,7 @@
137 142
     </view>
138 143
   </block>
139 144
   <!-- 今日任务量 -->
140
-  <view wx:if="{{IsShowNumberInfo}}" class="numberContainer FlexColumn" style='height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}};'>
145
+  <view wx:if="{{IsShowNumberInfo}}" class="numberContainer FlexColumn" style='height:{{Containnerheight+100}}rpx;background-color:{{Color.BackColor}};'>
141 146
     <view class="numberContainerFooter1 FlexColumn">
142 147
       <view class='lineFooter'></view>
143 148
       <view class="numberContainer12 FlexRow">
@@ -155,14 +160,14 @@
155 160
         <view class="lineWidth720"></view>
156 161
       </view>
157 162
       <view class="numberContainer12 FlexRow">
158
-        <view class='left'>及时强化</view>
163
+        <view class='left'>本轮及时强化 / 并回顾上次练习未练完的题卡</view>
159 164
         <view class='right3'>{{NumberReview}}张</view>
160 165
       </view>
161 166
       <view class="lineWidthAll FlexRow">
162 167
         <view class="lineWidth720"></view>
163 168
       </view>
164 169
       <view class="numberContainer12 FlexRow">
165
-        <view class='left'>剩余任务</view>
170
+        <view class='left' style='color:{{Color.LineColor}};'>未练完总计</view>
166 171
         <view class='right3' style='color:{{Color.LineColor}};'>{{NumberNew+NumberReview+NumberHistory}}张</view>
167 172
       </view>
168 173
       <view class='lineFooter'></view>
@@ -174,7 +179,7 @@
174 179
   </view>
175 180
 
176 181
   <!-- 更多功能 -->
177
-  <view wx:if="{{IsMore}}" class="numberContainer FlexColumn" style='height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}};'>
182
+  <view wx:if="{{IsMore}}" class="numberContainer FlexColumn" style='height:{{Containnerheight+100}}rpx;background-color:{{Color.BackColor}};'>
178 183
     <view class="numberContainerFooter1 FlexColumn">
179 184
       <view class='lineFooter'></view>
180 185
       <view class='numberContainerFooter102 FlexRow' catchtap='gotoNext' data-btnnumber="2">

+ 17 - 2
pages/main/detail.wxss

@@ -1,9 +1,24 @@
1
+page{
2
+  background-color: #D2D2D2;
3
+}
4
+
5
+.square{
6
+  background-color: #181A21;
7
+  width:136rpx;
8
+  line-height:53rpx;
9
+  text-align: center;
10
+  color: #fff;
11
+  border-radius:10rpx;
12
+  font-size:24rpx;
13
+  font-weight: 500;
14
+}
15
+
1 16
 /* 工具栏 */
2 17
 .panelTop {
3 18
   width: 100%;
4 19
   height: 110rpx;
5 20
   position: fixed;
6
-  top: 0;
21
+  top: 156rpx;
7 22
   font-size: 20rpx;
8 23
   z-index: 10;
9 24
 }
@@ -430,7 +445,7 @@
430 445
   justify-content: flex-start;
431 446
   align-items: flex-start;
432 447
   position: fixed;
433
-  top: 0;
448
+  top: 156rpx;
434 449
   color: #fff;
435 450
   z-index: 20;
436 451
 }

+ 99 - 91
pages/main/preview.js

@@ -16,6 +16,7 @@ var tempPlayUrlLocal = "";
16 16
 Page({
17 17
   data: {
18 18
     IsExistCard: false,
19
+    Containnerheight:1440,
19 20
   },
20 21
   onReady: function () {
21 22
     var that=this;
@@ -169,6 +170,7 @@ Page({
169 170
         card.LimitTime = list[i].LimitTime;
170 171
         card.FontSize = list[i].FontSize;
171 172
         card.IsCollect = list[i].IsCollect;
173
+        card.CardType = list[i].CardType;
172 174
         break;
173 175
       }
174 176
     }
@@ -235,6 +237,7 @@ Page({
235 237
     }
236 238
     this.setData({
237 239
       ID: card.MiaoguoCardID,
240
+      CardType:card.CardType,
238 241
       Field: card.Field,
239 242
       Tags: card.Tags,
240 243
       TagWidth: TagWidth,
@@ -253,97 +256,102 @@ Page({
253 256
 
254 257
     isPlaying = false;
255 258
   },
256
-  practiceToday: function () {
257
-    var that = this;
258
-    wx.showModal({
259
-      title: '要今天练吗?',
260
-      content: '这张题卡今天必须练习',
261
-      success(res) {
262
-        if (res.confirm) {
263
-
264
-          var arr = [];
265
-          var obj = {};
266
-          obj.Card = {};
267
-          obj.Card.MiaoguoCardID = that.data.ID;
268
-          obj.BtnNumber = -1;
269
-          obj.LearningType = 2;
270
-          arr.push(obj);
271
-
272
-          wx.setStorageSync("ListTaskFinished", arr);
273
-
274
-          main.UpdateMiaoguoCardTodayAll(false, function () {
275
-            var time = common.formatTime(new Date());
276
-            that.setData({
277
-              LimitTimeStr: common.formatDateCHS(time),
278
-              IsTodayPractice: false,
279
-            });
280
-            var list = app.globalData.CardList;
281
-            for (var i = 0; i < list.length; i++) {
282
-              if (that.data.ID == list[i].MiaoguoCardID) {
283
-                list[i].LimitTime = time;
284
-                list[i].LimitTimeStr = "今天";
285
-                break;
286
-              }
287
-            }
288
-            app.globalData.CardList = list;
289
-            wx.showToast({
290
-              title: '改为今天练',
291
-              icon: 'none',
292
-            });
293
-          });
294
-        }
295
-        else if (res.cancel) {
296
-
297
-        }
298
-      }
299
-    })
300
-  },
301
-  shelveTask: function () {
302
-    //搁置题卡,今天不练
303
-    var that = this;
304
-    wx.showModal({
305
-      title: '今天不练吗?',
306
-      content: '这张题卡今天不练习',
307
-      success(res) {
308
-        if (res.confirm) {
309
-
310
-          var arr = [];
311
-          var obj = {};
312
-          obj.Card = {};
313
-          obj.Card.MiaoguoCardID = that.data.MiaoguoCardID;
314
-          obj.IntervalTime = "1d";
315
-          obj.BtnNumber = 1;
316
-          obj.Duration = 0;
317
-          obj.LearningType = 3;
318
-          arr.push(obj);
319
-
320
-          wx.setStorageSync("ListTaskFinished", arr);
321
-          main.UpdateMiaoguoCardTodayAll(false, function () {
322
-            var time = common.formatTime(common.addDate("d", 1, new Date()));
323
-            that.setData({
324
-              LimitTimeStr: common.formatDateCHS(time),
325
-              IsTodayPractice: true,
326
-            });
327
-            var list = app.globalData.CardList;
328
-            for (var i = 0; i < list.length; i++) {
329
-              if (that.data.ID == list[i].MiaoguoCardID) {
330
-                list[i].LimitTime = time;
331
-                list[i].LimitTimeStr = "明天";
332
-                break;
333
-              }
334
-            }
335
-            app.globalData.CardList = list;
336
-            wx.showToast({
337
-              title: '改为明天练',
338
-              icon: 'none',
339
-            });
340
-          });
341
-        }
342
-        else if (res.cancel) {
343
-
344
-        }
345
-      }
346
-    })
259
+  // practiceToday: function () {
260
+  //   var that = this;
261
+  //   wx.showModal({
262
+  //     title: '要今天练吗?',
263
+  //     content: '这张题卡今天必须练习',
264
+  //     success(res) {
265
+  //       if (res.confirm) {
266
+
267
+  //         var arr = [];
268
+  //         var obj = {};
269
+  //         obj.Card = {};
270
+  //         obj.Card.MiaoguoCardID = that.data.ID;
271
+  //         obj.BtnNumber = -1;
272
+  //         obj.LearningType = 2;
273
+  //         arr.push(obj);
274
+
275
+  //         wx.setStorageSync("ListTaskFinished", arr);
276
+
277
+  //         main.UpdateMiaoguoCardTodayAll(false, function () {
278
+  //           var time = common.formatTime(new Date());
279
+  //           that.setData({
280
+  //             LimitTimeStr: common.formatDateCHS(time),
281
+  //             IsTodayPractice: false,
282
+  //           });
283
+  //           var list = app.globalData.CardList;
284
+  //           for (var i = 0; i < list.length; i++) {
285
+  //             if (that.data.ID == list[i].MiaoguoCardID) {
286
+  //               list[i].LimitTime = time;
287
+  //               list[i].LimitTimeStr = "今天";
288
+  //               break;
289
+  //             }
290
+  //           }
291
+  //           app.globalData.CardList = list;
292
+  //           wx.showToast({
293
+  //             title: '改为今天练',
294
+  //             icon: 'none',
295
+  //           });
296
+  //         });
297
+  //       }
298
+  //       else if (res.cancel) {
299
+
300
+  //       }
301
+  //     }
302
+  //   })
303
+  // },
304
+  // shelveTask: function () {
305
+  //   //搁置题卡,今天不练
306
+  //   var that = this;
307
+  //   wx.showModal({
308
+  //     title: '今天不练吗?',
309
+  //     content: '这张题卡今天不练习',
310
+  //     success(res) {
311
+  //       if (res.confirm) {
312
+
313
+  //         var arr = [];
314
+  //         var obj = {};
315
+  //         obj.Card = {};
316
+  //         obj.Card.MiaoguoCardID = that.data.MiaoguoCardID;
317
+  //         obj.IntervalTime = "1d";
318
+  //         obj.BtnNumber = 1;
319
+  //         obj.Duration = 0;
320
+  //         obj.LearningType = 3;
321
+  //         arr.push(obj);
322
+
323
+  //         wx.setStorageSync("ListTaskFinished", arr);
324
+  //         main.UpdateMiaoguoCardTodayAll(false, function () {
325
+  //           var time = common.formatTime(common.addDate("d", 1, new Date()));
326
+  //           that.setData({
327
+  //             LimitTimeStr: common.formatDateCHS(time),
328
+  //             IsTodayPractice: true,
329
+  //           });
330
+  //           var list = app.globalData.CardList;
331
+  //           for (var i = 0; i < list.length; i++) {
332
+  //             if (that.data.ID == list[i].MiaoguoCardID) {
333
+  //               list[i].LimitTime = time;
334
+  //               list[i].LimitTimeStr = "明天";
335
+  //               break;
336
+  //             }
337
+  //           }
338
+  //           app.globalData.CardList = list;
339
+  //           wx.showToast({
340
+  //             title: '改为明天练',
341
+  //             icon: 'none',
342
+  //           });
343
+  //         });
344
+  //       }
345
+  //       else if (res.cancel) {
346
+
347
+  //       }
348
+  //     }
349
+  //   })
350
+  // },
351
+  showMenu:function(){
352
+    wx.navigateTo({
353
+      url: './previewMenu?ID='+this.data.MiaoguoCardID+'&CardType=' + this.data.CardType,
354
+    });
347 355
   },
348 356
   copyCard: function () {
349 357
     if (!isCopying) {

+ 8 - 8
pages/main/preview.wxml

@@ -5,8 +5,9 @@
5 5
   <block wx:if="{{ShowType=='show'}}">
6 6
     <view class="panelTop FlexRow">
7 7
       <view class='left FlexColumn'>
8
-        <view class="text3" bindtap='practiceToday' hidden="{{!IsTodayPractice}}">今天必练</view>
9
-        <view class="text4 text3" bindtap='shelveTask' hidden="{{IsTodayPractice}}">搁置</view>
8
+        <view class="text3" bindtap='showMenu' wx:if="{{CardType==0}}">日常练习</view>
9
+        <view class="text3" bindtap='showMenu' wx:if="{{CardType==1}}">紧急练习</view>
10
+        <view class="text3" bindtap='showMenu' wx:if="{{CardType==-1}}">留白题卡</view>
10 11
       </view>
11 12
       <view class='right FlexRow'>
12 13
         <view class="panelTopBtn FlexRow" bindtap='getDetailInfo'>
@@ -17,7 +18,7 @@
17 18
         </view>
18 19
         <view class="panelTopBtn FlexRow" bindtap='gotoCollect'>
19 20
           <image class="universalpic_fav_default_black_26x24" src='../images/universalpic_fav_default_black_26x24.png' wx:if="{{!IsCollect}}" />
20
-          <image class="universalpic_fav_default_black_26x24" src='../images/universalpic_fav_enable_red_26x24.png'  wx:if="{{IsCollect}}" />
21
+          <image class="universalpic_fav_default_black_26x24" src='../images/universalpic_fav_enable_red_26x24.png' wx:if="{{IsCollect}}" />
21 22
         </view>
22 23
         <view class="panelTopBtn FlexRow" bindtap='deleteCard'>
23 24
           <image class="universalpic_del_black_20x28" src='../images/universalpic_del_black_20x28.png' />
@@ -29,9 +30,9 @@
29 30
 
30 31
   <!-- 幻灯片播放 -->
31 32
   <block wx:if="{{ShowType=='play'}}">
32
-    <view class="panelTop FlexRow"  style='background-color:{{Color.BackColor}};border-bottom:0;'>
33
+    <view class="panelTop FlexRow" style='background-color:{{Color.BackColor}};border-bottom:0;'>
33 34
       <view class='left' catchtap='gotoCollect'>
34
-      <view class='panelCancel0 FlexRow'>
35
+        <view class='panelCancel0 FlexRow'>
35 36
           <image hidden='{{IsCollect}}' src="../images/universalpic_fav_default_gray_26x24.png" class='universalpic_fav_default_gray_26x24' />
36 37
           <image hidden='{{!IsCollect}}' src="../images/universalpic_fav_enable_tc0{{Color.ID}}_26x24.png" class='universalpic_fav_default_gray_26x24' />
37 38
         </view>
@@ -50,7 +51,7 @@
50 51
   </block>
51 52
 
52 53
   <template is="CardShow" data="{{Color:Color,Field:Field,Tags:Tags,IsShowAnswer:IsShowAnswer,TagWidth:TagWidth,FontSize:FontSize,LimitTimeStr:LimitTimeStr,ShowType:ShowType}}" />
53
-  
54
+
54 55
   <view style='height:150rpx'></view>
55 56
 
56 57
   <view class='footer FlexColumn' style='background-color:{{Color.BackColor}}'>
@@ -83,7 +84,7 @@
83 84
       <view class='btn2 FlexRow'>
84 85
         <button class="btn23 btn21" catchtap="copyCard">另存为我的题卡</button>
85 86
       </view>
86
-      
87
+
87 88
       <view class='btn1'></view>
88 89
     </view>
89 90
 
@@ -104,7 +105,6 @@
104 105
       <view class='btn1' wx:if="{{NextID==0}}"></view>
105 106
     </view>
106 107
   </view>
107
-  
108 108
 </view>
109 109
 
110 110
 <audio hidden='true' src="{{AudioSrc}}" id="myAudio" bindended="audioBindEnded" binderror="audioBindError"></audio>

+ 2 - 1
pages/main/preview.wxss

@@ -447,4 +447,5 @@
447 447
 .universalpic_home_gray_36x36{
448 448
   width: 36rpx;
449 449
   height: 36rpx;
450
-}
450
+}
451
+

+ 49 - 0
pages/main/previewMenu.js

@@ -0,0 +1,49 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    MenuArr: [
9
+      { CardType: 0, Name: "日常练习", Remark: "需要长期记忆不能遗忘的题卡" },
10
+      { CardType: 1, Name: "紧急练习", Remark: "紧急或临时要练习的题卡,需要近期强化巩固的题卡" },
11
+      { CardType: -1, Name: "留白题卡", Remark: "提前制作的、他人分享的、暂时无需练习的题卡" },
12
+    ]
13
+  },
14
+  onLoad: function (options) {
15
+    var that = this;
16
+    that.setData({
17
+      Containnerheight: main.getWindowHeight(),
18
+      CardType:options.CardType,
19
+      MiaoguoCardID:options.ID,
20
+    });
21
+  },
22
+  changeCardType:function(e){
23
+    var that = this;
24
+    var cardType=e.currentTarget.dataset.cardtype;
25
+    if (cardType!=that.data.CardType){
26
+      var url ='UpdateMiaoguoCardType?UserID=' + app.globalData.userInfo.UserID;
27
+      url += "&CardType=" + cardType;
28
+      url += "&ID=" + that.data.MiaoguoCardID;
29
+      main.getData(url, function (data) {
30
+        var list = app.globalData.CardList;
31
+        for (var i = 0; i < list.length; i++) {
32
+          if (list[i].MiaoguoCardID==that.data.MiaoguoCardID)
33
+            list[i].CardType=cardType;
34
+        }
35
+        app.globalData.CardList = list;
36
+        wx.navigateBack({
37
+          delta: 1,
38
+        });
39
+      });
40
+    }
41
+  },
42
+  onShareAppMessage: function () {
43
+    return {
44
+      title: app.globalData.ShareTitle,
45
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
46
+      imageUrl: app.globalData.ShareImage,
47
+    }
48
+  },
49
+})

+ 3 - 0
pages/main/previewMenu.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "菜单"
3
+}

+ 23 - 0
pages/main/previewMenu.wxml

@@ -0,0 +1,23 @@
1
+<view class="container2 container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelStudyPlan FlexColumn">
3
+    <block wx:for="{{MenuArr}}" wx:key="index">
4
+    <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
5
+      <view class="lineWidth720"></view>
6
+    </view>
7
+    <view class="panelStudyPlan1 FlexRow" bindtap="changeCardType" data-cardtype="{{item.CardType}}">
8
+      <view class="imgTrue"><block wx:if="{{CardType==item.CardType}}">✓</block></view>
9
+      <view class="panelStudyPlan11 FlexColumn">
10
+        <view class="text7">{{item.Name}}</view>
11
+        <view class="text6">{{item.Remark}}</view>
12
+      </view>
13
+    </view>
14
+    </block>
15
+  </view>
16
+  <view class='lineFooter'></view>
17
+  <view class="panelHelp FlexRow">
18
+      <image class="universalpic_exmark_deepyellow_70x70" src='../images/universalpic_exmark_deepyellow_70x70.png' />
19
+      <text class="text8">
20
+      添加到“紧急练习”的旧题卡将被重置操作数据(包括记忆评价结果、到期时间等),在您确认保存后,此操作不能撤销,数据不能回溯,所以请谨慎检查。这种现象仅存在于“添加题卡到紧急练习中”,从紧急练习里移出题卡,以及“日常练习、留白题卡的添加或移出”均会继承原本的操作数据,不会被重置。\n暂时不想练的题卡请移往“留白题卡”,不建议删除。
21
+      </text>
22
+  </view>
23
+</view>

+ 58 - 0
pages/main/previewMenu.wxss

@@ -0,0 +1,58 @@
1
+/* 菜单 */
2
+.container2{
3
+  background-color: #f0f0f0;
4
+}
5
+
6
+.panelStudyPlan{
7
+  width:100%;
8
+  background-color: #fff;
9
+  margin-top: 30rpx;
10
+}
11
+.panelStudyPlan1{
12
+  width:100%;
13
+  height:133rpx;
14
+  justify-content: flex-start;
15
+}
16
+.imgTrue{
17
+  width:100rpx;
18
+  height:134rpx;
19
+  text-align: center;
20
+  line-height: 134rpx;
21
+  font-size:50rpx;
22
+  color:#0071EF;
23
+}
24
+
25
+.panelStudyPlan11{
26
+  align-items: flex-start;
27
+}
28
+
29
+.text7{
30
+  font-size:28rpx;
31
+  margin-bottom: 4rpx;
32
+}
33
+
34
+.text6{
35
+  font-size:20rpx;
36
+  color:#787878;
37
+}
38
+
39
+.panelHelp{
40
+  width:710rpx;
41
+  height:256rpx;
42
+  background-color: #fff;
43
+  border-radius: 20rpx;
44
+  margin-top: 30rpx;
45
+  align-items: flex-start;
46
+}
47
+
48
+.universalpic_exmark_deepyellow_70x70{
49
+  width:70rpx;
50
+  height:70rpx;
51
+  margin-right: 30rpx;
52
+  margin-top: 28rpx;
53
+}
54
+
55
+.text8{
56
+  width:550rpx;
57
+  font-size:20rpx;
58
+}

+ 10 - 5
pages/main/searchCard.js

@@ -98,17 +98,22 @@ Page({
98 98
     else{
99 99
       var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID;
100 100
       var isCollect = e.currentTarget.dataset.iscollect;
101
-      if (!isCollect) 
102
-        isCollect=0;
101
+      if (!isCollect)
102
+        isCollect = 0;
103
+      url += "&IsCollect=" + isCollect;
104
+
105
+      var cardType = 2;
106
+      if (e.currentTarget.dataset.cardtype){
107
+        cardType = e.currentTarget.dataset.cardtype;
108
+        url += "&CardType=" + cardType;
109
+      }
103 110
 
104
-      url+="&IsCollect="+isCollect;
105
-      
106 111
       main.getData(url, function (data) {
107 112
         wx.hideLoading();
108 113
         if (data) {
109 114
           app.globalData.CardList= data.List;
110 115
           wx.navigateTo({
111
-            url: './searchCardList?type=0&Count=' + data.Count+'&IsCollect='+isCollect,
116
+            url: './searchCardList?type=0&Count=' + data.Count+'&IsCollect='+isCollect+'&CardType='+cardType,
112 117
           });
113 118
         }
114 119
       });

+ 123 - 80
pages/main/searchCard.wxml

@@ -1,49 +1,92 @@
1 1
 <view class="container FlexColumn" style='height:{{Containnerheight}}rpx;'>
2
-	<view class='panel'>
3
-		<view class="panelSearch FlexRow">
4
-			<view class="panelSearch1 FlexRow" bindtap="onSearch">
5
-				<image class="universalpic_search_gray_30x30" src='../images/universalpic_search_gray_30x30.png' />
6
-				<view>搜索我的题卡</view>
7
-			</view>
8
-		</view>
9
-		<block wx:if="{{IsShow==0}}">
10
-			<view class='panelBtn FlexColumn'>
11
-				<view class="panelItem3 panelItem FlexRow" bindtap="gotoAccredit">
12
-					<view class="panelItem1 FlexRow">
13
-						<image class="avatar" src='{{AvatarUrl}}' />
14
-						<view class="text6" wx:if="{{NickName=='陌生用户'}}">点击这里登录</view>
15
-						<view class="text6" wx:if="{{NickName!='陌生用户'}}">{{NickName}}</view>
16
-					</view>
17
-					<view class="panelItem2 FlexRow">
18
-					</view>
19
-				</view>
20
-			</view>
21
-			<view class='lineFooter'></view>
22
-		</block>
23
-		<view class='panelBtn FlexColumn'>
24
-			<view class="panelItem FlexRow" bindtap="getList" data-id="0">
25
-				<view class="panelItem1">
26
-					全部题卡
27
-				</view>
28
-				<view class="panelItem2 FlexRow">
29
-					<view>{{CardNumber}}</view>
30
-					<image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
31
-				</view>
32
-			</view>
33
-			<view class="lineWidthAll FlexRow">
34
-				<view class="lineWidth720"></view>
35
-			</view>
36
-			<view class="panelItem FlexRow" bindtap="getList" data-id="0" data-iscollect="1">
37
-				<view class="panelItem1 FlexRow">
38
-					<image class="universalpic_fav_default_gray_26x24" src='../images/universalpic_fav_default_gray_26x24.png' />
39
-					<view>收藏夹</view>
40
-				</view>
41
-				<view class="panelItem2 FlexRow">
42
-					<image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
43
-				</view>
44
-			</view>
45
-		</view>
46
-		<view class='lineFooter'></view>
2
+  <view class='panel'>
3
+    <view class="panelSearch FlexRow">
4
+      <view class="panelSearch1 FlexRow" bindtap="onSearch">
5
+        <image class="universalpic_search_gray_30x30" src='../images/universalpic_search_gray_30x30.png' />
6
+        <view>搜索我的题卡</view>
7
+      </view>
8
+    </view>
9
+    <block wx:if="{{IsShow==0}}">
10
+      <view class='panelBtn FlexColumn'>
11
+        <view class="panelItem3 panelItem FlexRow" bindtap="gotoAccredit">
12
+          <view class="panelItem1 FlexRow">
13
+            <image class="avatar" src='{{AvatarUrl}}' />
14
+            <view class="text6" wx:if="{{NickName=='陌生用户'}}">点击这里登录</view>
15
+            <view class="text6" wx:if="{{NickName!='陌生用户'}}">{{NickName}}</view>
16
+          </view>
17
+          <view class="panelItem2 FlexRow">
18
+          </view>
19
+        </view>
20
+      </view>
21
+      <view class='lineFooter'></view>
22
+    </block>
23
+    <block wx:if="{{IsShow==1}}">
24
+      <view class="panelTitle FlexRow">
25
+        <view class="panelTitle1">题卡管理</view>
26
+        <view class="panelTitle2"></view>
27
+      </view>
28
+    </block>
29
+    <view class='panelBtn FlexColumn'>
30
+      <view class="panelItem FlexRow" bindtap="getList" data-id="0">
31
+        <view class="panelItem1">
32
+          所有题卡
33
+        </view>
34
+        <view class="panelItem2 FlexRow">
35
+          <view>{{CardNumber}}</view>
36
+          <image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
37
+        </view>
38
+      </view>
39
+      <view class="lineWidthAll FlexRow">
40
+        <view class="lineWidth720"></view>
41
+      </view>
42
+      <view class="panelItem FlexRow" bindtap="getList" data-id="0" data-cardtype="0">
43
+        <view class="panelItem1 FlexRow">
44
+          属于日常练习方案的题卡
45
+        </view>
46
+        <view class="panelItem2 FlexRow">
47
+          <image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
48
+        </view>
49
+      </view>
50
+
51
+      <view class="lineWidthAll FlexRow">
52
+        <view class="lineWidth720"></view>
53
+      </view>
54
+      <view class="panelItem FlexRow" bindtap="getList" data-id="0" data-cardtype="1">
55
+        <view class="panelItem1 FlexRow">
56
+          属于紧急练习方案的题卡
57
+        </view>
58
+        <view class="panelItem2 FlexRow">
59
+          <image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
60
+        </view>
61
+      </view>
62
+
63
+      <view class="lineWidthAll FlexRow">
64
+        <view class="lineWidth720"></view>
65
+      </view>
66
+      <view class="panelItem FlexRow" bindtap="getList" data-id="0" data-cardtype="-1">
67
+        <view class="panelItem1 FlexRow">
68
+          属于留白题卡
69
+        </view>
70
+        <view class="panelItem2 FlexRow">
71
+          <image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
72
+        </view>
73
+      </view>
74
+    </view>
75
+
76
+    <view class='lineFooter'></view>
77
+    <view class='panelBtn FlexColumn'>
78
+      <view class="panelItem FlexRow" bindtap="getList" data-id="0" data-iscollect="1">
79
+        <view class="panelItem1 FlexRow">
80
+          <image class="universalpic_fav_default_gray_26x24" src='../images/universalpic_fav_default_gray_26x24.png' />
81
+          <view>收藏夹</view>
82
+        </view>
83
+        <view class="panelItem2 FlexRow">
84
+          <image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
85
+        </view>
86
+      </view>
87
+    </view>
88
+
89
+    <!-- <view class='lineFooter'></view>
47 90
 		<view class='panelBtn FlexColumn'>
48 91
 			<view class="panelItem FlexRow" bindtap="getList" data-id="1">
49 92
 				<view class="panelItem1">
@@ -53,19 +96,19 @@
53 96
 					<image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
54 97
 				</view>
55 98
 			</view>
56
-		</view>
57
-		<view class='lineFooter'></view>
58
-		<view class='panelBtn FlexColumn'>
59
-			<view class="panelItem FlexRow" bindtap="gotoUserbook">
60
-				<view class="panelItem1">
61
-					用户手册
62
-				</view>
63
-				<view class="panelItem2 FlexRow">
64
-					<image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
65
-				</view>
66
-			</view>
67
-		</view>
68
-		<view class='lineFooter'></view>
99
+		</view> -->
100
+    <view class='lineFooter'></view>
101
+    <view class='panelBtn FlexColumn'>
102
+      <view class="panelItem FlexRow" bindtap="gotoUserbook">
103
+        <view class="panelItem1">
104
+          用户手册
105
+        </view>
106
+        <view class="panelItem2 FlexRow">
107
+          <image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
108
+        </view>
109
+      </view>
110
+    </view>
111
+    <!-- <view class='lineFooter'></view>
69 112
 		<block wx:if="{{IsYearReport}}">
70 113
 			<view class='panelBtn FlexColumn'>
71 114
 				<view class="panelItem FlexRow" bindtap="gotoAnnualReport">
@@ -76,29 +119,29 @@
76 119
 						<image class="universalpic_indicator_right_gray" src='../images/universalpic_indicator_right_gray.png' />
77 120
 					</view>
78 121
 				</view>
79
-			</view>
122
+			</view> 
80 123
 			<view class='lineFooter'></view>
81
-		</block>
82
-	</view>
83
-	<view class='panelBottom FlexColumn'>
124
+		</block> -->
125
+  </view>
126
+  <view class='panelBottom FlexColumn'>
84 127
 
85
-		<view class='panelBottom1 FlexRow'>
86
-			<view class='panelBottom11 FlexColumn' bindtap="gotoDefault">
87
-				<image class="program_tabbar_study_default" src='../images/program_tabbar_study_default.png' />
88
-				<view>学习</view>
89
-			</view>
90
-			<view class='line1'></view>
91
-			<view class='panelBottom11 FlexColumn' bindtap="goto" data-url="add?type=add&id=0">
92
-				<image class="program_tabbar_study_default" src='../images/program_tabbar_add_default.png' />
93
-				<view>添加</view>
94
-			</view>
95
-			<view class='line1'></view>
96
-			<view class='panelBottom11 FlexColumn'>
97
-				<image class="program_tabbar_study_default" src='../images/program_tabbar_note_normal.png' />
98
-				<view class='text5'>题卡</view>
99
-			</view>
100
-		</view>
128
+    <view class='panelBottom1 FlexRow'>
129
+      <view class='panelBottom11 FlexColumn' bindtap="gotoDefault">
130
+        <image class="program_tabbar_study_default" src='../images/program_tabbar_study_default.png' />
131
+        <view>学习</view>
132
+      </view>
133
+      <view class='line1'></view>
134
+      <view class='panelBottom11 FlexColumn' bindtap="goto" data-url="add?type=add&id=0">
135
+        <image class="program_tabbar_study_default" src='../images/program_tabbar_add_default.png' />
136
+        <view>添加</view>
137
+      </view>
138
+      <view class='line1'></view>
139
+      <view class='panelBottom11 FlexColumn'>
140
+        <image class="program_tabbar_study_default" src='../images/program_tabbar_note_normal.png' />
141
+        <view class='text5'>题卡</view>
142
+      </view>
143
+    </view>
101 144
 
102
-		<view class="iphone10plus" wx:if="{{IsIPhoneX}}"></view>
103
-	</view>
145
+    <view class="iphone10plus" wx:if="{{IsIPhoneX}}"></view>
146
+  </view>
104 147
 </view>

+ 11 - 0
pages/main/searchCard.wxss

@@ -27,6 +27,17 @@
27 27
   margin-right: 10rpx;
28 28
 }
29 29
 
30
+.panelTitle{
31
+  width:100%;
32
+  margin-top: 50rpx;
33
+  justify-content: space-between;
34
+}
35
+.panelTitle .panelTitle1{
36
+  font-size:32rpx;
37
+  margin-left: 30rpx;
38
+  margin-bottom: 10rpx;
39
+}
40
+
30 41
 
31 42
 .panelBottom {
32 43
   position: fixed;

+ 6 - 6
pages/main/searchCard1.js

@@ -14,7 +14,7 @@ Page({
14 14
       
15 15
     });
16 16
 
17
-    common.getStorageValue(that, "SearchCardTextList", [], function () {
17
+    common.getStorageValue(that, "SearchTextList", [], function () {
18 18
     });
19 19
   },
20 20
   onShow:function(){
@@ -50,7 +50,7 @@ Page({
50 50
       });
51 51
 
52 52
       setTimeout(function () {
53
-        var arr = that.data.SearchCardTextList;
53
+        var arr = that.data.SearchTextList;
54 54
         for (var i = 0; i < arr.length; i++) {
55 55
           if (arr[i] == search) {
56 56
             arr.splice(i, 1);
@@ -63,9 +63,9 @@ Page({
63 63
           arr.pop();
64 64
         }
65 65
 
66
-        wx.setStorageSync("SearchCardTextList", arr);
66
+        wx.setStorageSync("SearchTextList", arr);
67 67
         that.setData({
68
-          SearchCardTextList: arr,
68
+          SearchTextList: arr,
69 69
         });
70 70
       }, 2000);
71 71
     }
@@ -83,9 +83,9 @@ Page({
83 83
   deleteItem: function (e) {
84 84
     var that = this;
85 85
     that.setData({
86
-      SearchCardTextList: [],
86
+      SearchTextList: [],
87 87
     });
88
-    wx.removeStorageSync("SearchCardTextList");
88
+    wx.removeStorageSync("SearchTextList");
89 89
   },
90 90
   onShareAppMessage: function () {
91 91
     return {

+ 2 - 2
pages/main/searchCard1.wxml

@@ -14,7 +14,7 @@
14 14
     </view>
15 15
     <view class='lineFooter'></view>
16 16
 
17
-    <block wx:if="{{SearchCardTextList.length>0}}">
17
+    <block wx:if="{{SearchTextList.length>0}}">
18 18
       <view class="panelTitle0 panelTitle FlexRow">
19 19
         <view class="panelTitle3">近期搜索</view>
20 20
         <view class="panelTitle4 FlexRow" bindtap='deleteItem'>
@@ -23,7 +23,7 @@
23 23
       </view>
24 24
 
25 25
       <view class='panelItemSearch0 FlexRow'>
26
-        <view class="panelTag FlexRow" wx:for="{{SearchCardTextList}}" wx:key="index" bindtap='onSearch' data-search="{{item}}">
26
+        <view class="panelTag FlexRow" wx:for="{{SearchTextList}}" wx:key="index" bindtap='onSearch' data-search="{{item}}">
27 27
           <view class="panelTag0">{{item}}</view>
28 28
         </view>
29 29
       </view>

+ 39 - 14
pages/main/searchCardList.js

@@ -5,7 +5,8 @@ const app = getApp();
5 5
 var intervalRefresh = 0;
6 6
 var arrOrder = [
7 7
   {},
8
-  { Name: "最近添加", Value: "ac.MiaoguoCardID desc", CSS: "numberContainerFooter1121Select" },
8
+  { Name: "最近更新", Value: "ac.UpdateTime desc", CSS: "numberContainerFooter1121Select" },
9
+  { Name: "最近添加", Value: "ac.MiaoguoCardID desc", },
9 10
   { Name: "较早添加", Value: "ac.MiaoguoCardID asc" },
10 11
   { Name: "练习较多", Value: "ac.LearnNumber desc,ac.MiaoguoCardID desc" },
11 12
   { Name: "练习较少", Value: "ac.LearnNumber,ac.MiaoguoCardID" },
@@ -16,12 +17,16 @@ Page({
16 17
   data: {
17 18
     HasPage: false,
18 19
     ArrOrder: arrOrder,
19
-    OrderType: 0,
20
+    OrderType: 1,
21
+    CardType:2,
20 22
   },
21 23
   onLoad: function (options) {
22 24
     var that = this;
23 25
 
24 26
     var Search = "", IsToday = 0, IsCollect = 0;
27
+    var count = 0;
28
+    if (options.Count)
29
+      count = options.Count;
25 30
 
26 31
     if (options.search) {
27 32
       Search = options.search;
@@ -32,7 +37,13 @@ Page({
32 37
     else if (options.type == 1) {
33 38
       IsToday = 1;
34 39
       wx.setNavigationBarTitle({
35
-        title: "任务清单"
40
+        title: "未练完的题卡"
41
+      });
42
+    }
43
+    else if (options.type == 2) {
44
+      IsToday = 2;
45
+      wx.setNavigationBarTitle({
46
+        title: "实际练完的题卡"
36 47
       });
37 48
     }
38 49
     else if (options.IsCollect == 1) {
@@ -41,10 +52,19 @@ Page({
41 52
       });
42 53
       IsCollect = 1;
43 54
     }
44
-
45
-    var count = 0;
46
-    if (options.count)
47
-      count = options.count;
55
+    else if (options.CardType != 2) {
56
+      var title = "日常练习";
57
+      if (options.CardType == 1)
58
+        title = "紧急练习";
59
+      else if (options.CardType == -1)
60
+        title = "留白";
61
+      wx.setNavigationBarTitle({
62
+        title: title + "题卡",
63
+      });
64
+      that.setData({
65
+        CardType: options.CardType,
66
+      });
67
+    }
48 68
 
49 69
     that.setData({
50 70
       IsCollect: IsCollect,
@@ -52,8 +72,8 @@ Page({
52 72
       IsToday: IsToday,
53 73
       Count: count,
54 74
       Containnerheight: main.getWindowHeight(),
55
-      PageType:options.type,
56
-      IsNew:options.IsNew,
75
+      PageType: options.type,
76
+      IsNew: options.IsNew,
57 77
     });
58 78
   },
59 79
   onShow: function () {
@@ -109,13 +129,13 @@ Page({
109 129
     }
110 130
 
111 131
     if (!that.data.IsCollect && !that.data.IsToday && !that.data.Search) {
112
-      main.getData("GetUserCardCount?UserID=" + app.globalData.userInfo.UserID, function (data) {
132
+      main.getData("GetUserCardCount?UserID=" + app.globalData.userInfo.UserID+"&CardType="+that.data.CardType, function (data) {
113 133
         if (data) {
114 134
           that.setData({
115 135
             Count: data.CardNumber,
116 136
           });
117 137
           var hasPage = false;
118
-          if (list.length < that.data.Count && that.data.IsToday == 0 && !that.data.IsCollect)
138
+          if (list.length < that.data.Count && list.length>=20 && that.data.IsToday == 0 && !that.data.IsCollect)
119 139
             hasPage = true;
120 140
 
121 141
           that.setData({
@@ -142,6 +162,7 @@ Page({
142 162
       that.setData({
143 163
         Count: list.length,
144 164
       });
165
+
145 166
       var hasPage = false;
146 167
       if (list.length < that.data.Count && that.data.IsToday == 0 && !that.data.IsCollect)
147 168
         hasPage = true;
@@ -244,6 +265,10 @@ Page({
244 265
     var id = e.currentTarget.dataset.id;
245 266
     if (id && id > 0)
246 267
       url += "&PageID=" + id;
268
+      
269
+    if (that.data.CardType)
270
+      url += "&CardType=" + that.data.CardType;
271
+
247 272
     if (that.data.Search)
248 273
       url += "&Key=" + that.data.Search;
249 274
 
@@ -256,10 +281,10 @@ Page({
256 281
       if (data) {
257 282
 
258 283
         var list = app.globalData.CardList;
259
-        
284
+
260 285
         for (var i = 0; i < data.List.length; i++) {
261 286
           data.List[i].LastTimeStr = common.formatDateCHS(data.List[i].LastTime);
262
-          
287
+
263 288
           list.push(data.List[i]);
264 289
         }
265 290
         app.globalData.CardList = list;
@@ -271,7 +296,7 @@ Page({
271 296
           });
272 297
         }
273 298
 
274
-        if (orderType>0){
299
+        if (orderType > 0) {
275 300
           wx.setNavigationBarTitle({
276 301
             title: "全部题卡:" + arrOrder[orderType].Name,
277 302
           });

+ 11 - 5
pages/main/searchCardList.wxml

@@ -23,7 +23,7 @@
23 23
   <block wx:if="{{List.length>0}}">
24 24
     <view style='width:100%;height:120rpx;margin-top:0rpx;' wx:if="{{!Search}}"></view>
25 25
     <view style='width:100%;height:250rpx;margin-top:0rpx;' wx:if="{{Search}}"></view>
26
-    <view class="remind" wx:if="{{IsToday}}">内容仅供参考。任务由系统实时生成,题卡并不固定。</view>
26
+    <view class="remind" wx:if="{{IsToday==1}}">内容仅供参考。任务由系统实时生成,题卡并不固定。</view>
27 27
     <block wx:for="{{List}}" wx:key="index">
28 28
       <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
29 29
         <view class="lineWidth720"></view>
@@ -39,9 +39,10 @@
39 39
               </view>
40 40
             </view>
41 41
             <view class="panelItem2 FlexColumn">
42
-              <view wx:if="{{OrderType<=2}}">{{item.CreateTimeStr}}</view>
43
-              <view wx:if="{{OrderType==3 || OrderType==4}}">{{item.LearnNumber}}次</view>
44
-              <view wx:if="{{OrderType==5}}">{{item.LastTimeStr}}</view>
42
+              <view wx:if="{{OrderType==1}}">{{item.UpdateTimeStr}}</view>
43
+              <view wx:if="{{OrderType==2 || OrderType==3}}">{{item.CreateTimeStr}}</view>
44
+              <view wx:if="{{OrderType==4 || OrderType==5}}">{{item.LearnNumber}}次</view>
45
+              <view wx:if="{{OrderType==6}}">{{item.LastTimeStr}}</view>
45 46
               <view class='panelItem21'>
46 47
                 <image class="universalpic_fav_default_gray_26x24" src='../images/universalpic_fav_default_gray_26x24.png' wx:if="{{item.IsCollect==1}}" />
47 48
               </view>
@@ -84,10 +85,15 @@
84 85
       <view class='Text4'>在“查看题卡、学习中”界面里,点爱心图标把题卡收藏到这里。</view>
85 86
     </view>
86 87
 
87
-    <view class='panelNull FlexColumn' wx:if="{{IsToday}}">
88
+    <view class='panelNull FlexColumn' wx:if="{{IsToday==1}}">
88 89
       <view class='Text3'>今天剩余任务量</view>
89 90
       <view class='Text4'>没有需要练习的题卡了。</view>
90 91
     </view>
92
+
93
+    <view class='panelNull FlexColumn' wx:if="{{IsToday==2}}">
94
+      <view class='Text3'>今天没有练习过题卡</view>
95
+      <view class='Text4'>请先完成任务后再来查看。</view>
96
+    </view>
91 97
   </block>
92 98
 </view>
93 99
 

+ 2 - 0
pages/main/searchCardList.wxss

@@ -121,6 +121,7 @@
121 121
   font-weight: 400;
122 122
   font-size: 30rpx;
123 123
   overflow: hidden;
124
+  max-width:400rpx;
124 125
 }
125 126
 
126 127
 .panelItem1 .Text2 {
@@ -128,6 +129,7 @@
128 129
   font-size: 24rpx;
129 130
   overflow: hidden;
130 131
   color: #787878;
132
+  max-width:400rpx;
131 133
 }
132 134
 
133 135
 .panelItem2 {

+ 7 - 0
pages/main/searchWeb2.js

@@ -213,6 +213,13 @@ Page({
213 213
 
214 214
             if (list[i].Content[item.Number].Content.indexOf("\n\n")==0)
215 215
               list[i].Content[item.Number].Content=list[i].Content[item.Number].Content.substr(2);
216
+            
217
+            if (item.Tag == "诗词"){
218
+              if (list[i].Content[item.Number].Content.indexOf("\n")>0 && list[i].Content[item.Number].Content.indexOf("[")!=0){
219
+                list[i].Content[item.Number].Content="\n\n"+list[i].Content[item.Number].Content;
220
+              }
221
+            }
222
+            
216 223
           }
217 224
           break;
218 225
         }

+ 1 - 2
pages/main/searchWeb2.wxml

@@ -286,12 +286,11 @@
286 286
     <view class='lineFooter'></view>
287 287
   </block>
288 288
 
289
-
290 289
   <!-- 英文原文 -->
291 290
   <block wx:if="{{Result.ENG.Word && Result.ENG.Word.length>0 && !Result.CHN.HanZi}}">
292 291
     <view class="panelTitle0 panelTitle FlexColumn">
293 292
       <view class="panelTitle3">搜索内容</view>
294
-      <view class="panelTitle4" wx:if="{{Result.ENG.WordFrequency}}">该单词在{{Result.ENG.WordFrequency.Max}}常用词汇范围内</view>
293
+      <view class="panelTitle4" wx:if="{{Result.ENG.WordFrequency}}">该单词大约在{{Result.ENG.WordFrequency.Max}} 词频范围内</view>
295 294
       <view style="height:30rpx"></view>
296 295
     </view>
297 296
     <view class="panelItem FlexRow">

+ 8 - 19
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 arrSortType = ["自由安排", "到期时间较早的题卡", "到期时间较近的题卡"];
6 5
 const arrClickType = ["专属按钮", "点击空白", "两种方式"];
7 6
 var arrUserName = ["程晟涵", "临时"];
8 7
 var arrUserID = app.globalData.SelectUserData;
@@ -66,15 +65,6 @@ Page({
66 65
   },
67 66
   onShow: function () {
68 67
     var that = this;
69
-    common.getStorageValue(this, "CardMaxNumberNew", 10, function () {
70
-    });
71
-    common.getStorageValue(this, "CardMaxNumberHistory", 30, function () {
72
-    });
73
-    common.getStorageValue(this, "SortTypeIndex", 0, function () {
74
-      that.setData({
75
-        SortType: arrSortType[that.data.SortTypeIndex],
76
-      });
77
-    });
78 68
     
79 69
     var colorIndex = wx.getStorageSync("ColorIndexArr");
80 70
     if (!colorIndex || colorIndex.length > 1) {
@@ -106,12 +96,11 @@ Page({
106 96
     });
107 97
 
108 98
     this.getMemoryLevel();
99
+
100
+    common.getStorageValue(that, "CardType", 0, function () {});
101
+
109 102
   },
110
-  setSortType: function () {
111
-    wx.navigateTo({
112
-      url: './sortRule',
113
-    })
114
-  },
103
+  
115 104
   setSelectUser: function () {
116 105
     var that = this;
117 106
     wx.showActionSheet({
@@ -172,12 +161,12 @@ Page({
172 161
       url: './recommend',
173 162
     })
174 163
   },
175
-  setTaskLimit: function () {
164
+  goto: function (e) {
165
+    var url = e.currentTarget.dataset.url;
176 166
     wx.navigateTo({
177
-      url: './taskLimit',
178
-    })
167
+      url: url,
168
+    });
179 169
   },
180
-  
181 170
   onShareAppMessage: function () {
182 171
     return {
183 172
       title: app.globalData.ShareTitle,

+ 28 - 36
pages/plan/setting.wxml

@@ -1,40 +1,5 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <!-- <image src='../images/study_plan_header.png' class="study_plan_header" />
3
-  <view class="panelTop FlexRow">
4
-    <view class="panelTop1">今天的学习任务</view>
5
-  </view>
6
-  <view class="panelTask FlexColumn">
7
-    <view class="panelTaskItem FlexRow">
8
-      <view class="panelTaskItem1">初始任务量</view>
9
-      <view class="panelTaskItem2">新{{CardMaxNumberNew}}张 旧{{CardMaxNumberHistory}}张 / 共{{CardMaxNumberNew+CardMaxNumberHistory}}张</view>
10
-    </view>
11
-    <view class="lineWidth7201 lineWidth720"></view>
12
-    <view class="panelTaskItem FlexRow">
13
-      <view class="panelTaskItem1">剩余任务量</view>
14
-      <view class="panelTaskItem2">{{TaskNumber}}张</view>
15
-    </view>
16
-    <view class="lineWidth7201 lineWidth720"></view>
17
-    <view class="panelTaskItem FlexRow">
18
-      <view class="panelTaskItem1 FlexRow">
19
-        <image src='../images/universalpic_bell_green_30x30.png' class="universalpic_bell_green_30x30" />
20
-        <view>全部做完可能用时</view>
21
-      </view>
22
-      <view class="panelTaskItem2">{{CardEveryTime}}分钟</view>
23
-    </view>
24
-    <view class="lineWidth670"></view>
25
-    <view class="panelTaskItem FlexRow">
26
-      <view class="panelTaskItem1 FlexRow">
27
-        <image src='../images/universalpic_file_green_30x30.png' class="universalpic_file_green_30x30" />
28
-        <view>到期题卡数量</view>
29
-        <image src='../images/universalpic_help_green_26x26.png' class="universalpic_help_green_26x26" />
30
-        
31
-      </view>
32
-      <view class="panelTaskItem2">{{CardLimitTimeNumber}}张</view>
33
-    </view>
34
-    <view class="lineWidthAll2 FlexRow">
35
-    </view>
36
-  </view> -->
37
-  <view class="panelTitle FlexRow">
2
+  <!-- <view class="panelTitle FlexRow">
38 3
     <view class="panelTitle1">任务量</view>
39 4
     <view class="panelTitle2"></view>
40 5
   </view>
@@ -59,6 +24,33 @@
59 24
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
60 25
     </view>
61 26
   </view>
27
+  <view class='lineFooter'></view>
28
+   -->
29
+  <view class="panelTitle FlexRow">
30
+    <view class="panelTitle1">方案管理</view>
31
+    <view class="panelTitle2"></view>
32
+  </view>
33
+  <view class="panelItem FlexRow" bindtap="goto" data-url="./studyplandetail?CardType=0">
34
+    <view class="panelItem1">日常练习方案</view>
35
+    <view class="panelItem2 FlexRow">
36
+      <view class="picker" wx:if="{{CardType==0}}">
37
+        首选
38
+      </view>
39
+      <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
40
+    </view>
41
+  </view>
42
+  <view class="lineWidthAll FlexRow">
43
+    <view class="lineWidth720"></view>
44
+  </view>
45
+  <view class="panelItem FlexRow" bindtap="goto" data-url="./studyplandetail?CardType=1">
46
+    <view class="panelItem1">紧急练习方案</view>
47
+    <view class="panelItem2 FlexRow">
48
+      <view class="picker" wx:if="{{CardType==1}}">
49
+        首选
50
+      </view>
51
+      <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
52
+    </view>
53
+  </view>
62 54
   <view class='lineFooter'></view>
63 55
   <view class="panelTitle FlexRow">
64 56
     <view class="panelTitle1">记忆评价</view>

+ 1 - 1
pages/plan/sortRule.wxml

@@ -34,4 +34,4 @@
34 34
   
35 35
   <view class='lineFooter'></view>
36 36
   <view style='height:100rpx'></view>
37
-</view>
37
+</view>

+ 2 - 1
pages/plan/sortRule.wxss

@@ -115,4 +115,5 @@
115 115
   color: #787878;
116 116
   width: 690rpx;
117 117
   margin: 0 0 30rpx 0;
118
-}
118
+}
119
+

+ 198 - 0
pages/plan/studyplan.js

@@ -0,0 +1,198 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import fanObj from '../template/FanObject';
4
+
5
+const app = getApp();
6
+var cardNumberCommon = 0;
7
+var cardNumberUrgent = 0;
8
+
9
+Page({
10
+  data: {
11
+    IsChangeStudyPLan:false,
12
+    BtnArray: [{ Name: "日常练习", Selected: 1 }, { Name: "紧急练习", Selected: 0 }, { Name: "整体练习", Selected: 0 }],
13
+  },
14
+  onLoad: function (options) {
15
+    var that = this;
16
+    
17
+    that.setData({
18
+      Containnerheight: main.getWindowHeight(),
19
+    });
20
+
21
+    that.init();
22
+  },
23
+  onShow:function(){
24
+    cardNumberCommon = app.globalData.TaskToday.CardNumberCommon;
25
+    cardNumberUrgent = app.globalData.TaskToday.CardNumberUrgent;
26
+    this.init();
27
+  },
28
+  init: function () {
29
+    var that = this;
30
+    common.getStorageValue(that, "CardType", 0, function () {
31
+      that.data.BtnArray[0].Selected = 0;
32
+      that.data.BtnArray[1].Selected = 0;
33
+      that.data.BtnArray[2].Selected = 0;
34
+      that.data.BtnArray[that.data.CardType].Selected = 1;
35
+
36
+      that.setData({
37
+        BtnArray: that.data.BtnArray,
38
+      });
39
+    });
40
+
41
+    var studyPlan = wx.getStorageSync("StudyPlan");
42
+    var planNumber = studyPlan.CommonNewLength + studyPlan.CommonOldLength + studyPlan.UrgentNewLength+studyPlan.UrgentOldLength;
43
+    var taskNumber = app.globalData.TaskToday.ListNew.length + app.globalData.TaskToday.ListReview.length + app.globalData.TaskToday.ListHistory.length;
44
+    var progress = Math.round(100 * (planNumber - taskNumber) / planNumber);
45
+    that.setData({
46
+      StudyPlan: studyPlan,
47
+      PlanNumber: planNumber,
48
+      TaskNumber: taskNumber,
49
+      Progress:progress,
50
+    });
51
+
52
+    var backColor="#f0f0f0";
53
+
54
+    var rate = 0;
55
+    if (studyPlan.CommonNewLength>0 || studyPlan.CommonOldLength>0){
56
+      rate = studyPlan.CommonNewLength / (studyPlan.CommonNewLength + studyPlan.CommonOldLength);
57
+      backColor = "#00B6DD";
58
+    }
59
+      
60
+    fanObj.init(that, rate, 100, 3.8, "#008CAA", backColor, studyPlan.CommonNewLength + studyPlan.CommonOldLength);
61
+    
62
+    var backColor2 = "#f0f0f0";
63
+    var rate2 = 0;
64
+    if (studyPlan.UrgentNewLength>0 || studyPlan.UrgentOldLength>0){
65
+      rate2 = studyPlan.UrgentNewLength / (studyPlan.UrgentNewLength + studyPlan.UrgentOldLength);
66
+      backColor2 = "#FFCC00";
67
+    }
68
+    fanObj.init2(that, rate2, 100, 3.8, "#DDB100", backColor2, studyPlan.UrgentNewLength + studyPlan.UrgentOldLength);
69
+
70
+  },
71
+  btnSelected:function(e){
72
+    var that = this;
73
+    var id = e.currentTarget.dataset.id;
74
+
75
+    if (id!=that.data.CardType){
76
+      var oldName = "", newName = "";
77
+      for (var i = 0; i < that.data.BtnArray.length; i++) {
78
+        if (that.data.BtnArray[i].Selected == 1) {
79
+          oldName = that.data.BtnArray[i].Name;
80
+        }
81
+        if (id == i) {
82
+          newName = that.data.BtnArray[i].Name;
83
+        }
84
+      }
85
+
86
+      if (((id == 1 || id == 2) && cardNumberUrgent == 0) || ((id == 0 || id == 2) && cardNumberCommon == 0)) {
87
+        if (cardNumberCommon == 0)
88
+          newName = "日常练习";
89
+        if (cardNumberUrgent == 0)
90
+          newName = "紧急练习";
91
+        that.setData({
92
+          IsNullCard: true,
93
+          NewName: newName,
94
+        });
95
+      }
96
+      else {
97
+        that.setData({
98
+          IsChangeStudyPLan: true,
99
+          OldName: oldName,
100
+          NewName: newName,
101
+          NewCardType: id,
102
+        });
103
+      }
104
+
105
+      wx.setNavigationBarColor({
106
+        frontColor: '#ffffff',
107
+        backgroundColor: '#0B8457',
108
+      });
109
+    }
110
+  },
111
+  changePlan:function(){
112
+    var that=this;
113
+    that.setData({
114
+      CardType: that.data.NewCardType,
115
+    });
116
+    wx.setStorageSync("CardType", that.data.CardType);
117
+    wx.removeStorageSync("StudyPlan");
118
+
119
+    main.UploadUserConfig(function(){
120
+      main.getTaskTodayList(function (data) {
121
+        that.init();
122
+        that.close();
123
+      });
124
+    });
125
+  },
126
+  close:function(){
127
+    var that = this;
128
+    that.setData({
129
+      IsChangeStudyPLan: false,
130
+      IsNullCard: false,
131
+    });
132
+    wx.setNavigationBarColor({
133
+      frontColor: '#000000',
134
+      backgroundColor: '#ffffff',
135
+    });
136
+  },
137
+  goto: function (e) {
138
+    var url = e.currentTarget.dataset.url;
139
+    wx.navigateTo({
140
+      url: url,
141
+    });
142
+  },
143
+  gotoTaskList:function(e){
144
+    wx.showLoading({
145
+      title: '请稍候',
146
+    });
147
+    setTimeout(function () {
148
+      wx.hideLoading();
149
+    }, 5000);
150
+
151
+    var that = this;
152
+    //未练完的题卡
153
+    if (e.currentTarget.dataset.id==1){
154
+      main.getTaskTodayList(function (task) {
155
+        var list = [];
156
+        for (var i = 0; i < task.ListNew.length; i++) {
157
+          list.push(task.ListNew[i]);
158
+        }
159
+        for (var i = 0; i < task.ListHistory.length; i++) {
160
+          list.push(task.ListHistory[i]);
161
+        }
162
+        for (var i = 0; i < task.ListReview.length; i++) {
163
+          list.push(task.ListReview[i]);
164
+        }
165
+        app.globalData.CardList = list;
166
+        wx.navigateTo({
167
+          url: '../main/searchCardList?type=1&Count=' + list.length,
168
+        });
169
+      });
170
+    }
171
+    else{
172
+      var url = 'GetMiaoguoCardList?UserID=' + app.globalData.userInfo.UserID + "&IsToday=2&CardType="+that.data.CardType;
173
+      main.getData(url, function (data) {
174
+        if (data) {
175
+          var list = [];
176
+
177
+          for (var i = 0; i < data.List.length; i++) {
178
+            data.List[i].LastTimeStr = common.formatDateCHS(data.List[i].LastTime);
179
+
180
+            list.push(data.List[i]);
181
+          }
182
+          app.globalData.CardList = list;
183
+          wx.navigateTo({
184
+            url: '../main/searchCardList?type=2&Count=' + list.length,
185
+          });
186
+        }
187
+      });
188
+    }
189
+    
190
+  },
191
+  onShareAppMessage: function () {
192
+    return {
193
+      title: app.globalData.ShareTitle,
194
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
195
+      imageUrl: app.globalData.ShareImage,
196
+    }
197
+  },
198
+})

+ 4 - 0
pages/plan/studyplan.json

@@ -0,0 +1,4 @@
1
+{
2
+  "navigationBarTitleText": "学习计划",
3
+  "backgroundColorBottom": "#f0f0f0"
4
+}

+ 197 - 0
pages/plan/studyplan.wxml

@@ -0,0 +1,197 @@
1
+<import src="../template/Fan.wxml" />
2
+
3
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
4
+  <view class="panelTitle FlexRow">
5
+    <view class="panelTitle0">当前的学习计划</view>
6
+  </view>
7
+  <view class="panelButton FlexRow">
8
+    <view class="panelButton1{{BtnArray[0].Selected}} FlexRow" bindtap="btnSelected" data-id="0">
9
+      <view class="text1">{{BtnArray[0].Name}}</view>
10
+    </view>
11
+    <view class="line1"></view>
12
+    <view class="panelButton1{{BtnArray[1].Selected}} FlexRow" bindtap="btnSelected" data-id="1">
13
+      <view class="text1">{{BtnArray[1].Name}}</view>
14
+    </view>
15
+    <view class="line1"></view>
16
+    <view class="panelButton1{{BtnArray[2].Selected}} FlexRow" bindtap="btnSelected" data-id="2">
17
+      <view class="text1">{{BtnArray[2].Name}}</view>
18
+    </view>
19
+  </view>
20
+  <view class='lineFooter'></view>
21
+  <view class="line"></view>
22
+
23
+  <view class="panelTitle FlexRow">
24
+    <image class="universalpic_plan_2line_black_30x32" src="../images/universalpic_plan_data_black_30x32.png" />
25
+    <view class="panelTitle1">参考数据</view>
26
+  </view>
27
+  <view class="lineWidthAll FlexRow">
28
+    <view class="lineWidth690"></view>
29
+  </view>
30
+  <view class="panelItem FlexRow">
31
+    <view class="left FlexColumn">
32
+      <view class="text2">计划任务量</view>
33
+      <view class="text3">今天需要练习的题卡总数,方案调整时会被更新</view>
34
+    </view>
35
+    <view class="right FlexRow">
36
+      <view class="Number">{{PlanNumber}}</view>
37
+      <view class="text4">张</view>
38
+    </view>
39
+  </view>
40
+  <view class="lineWidthAll FlexRow">
41
+    <view class="lineWidth690"></view>
42
+  </view>
43
+  <view class="panelItem FlexColumn">
44
+    <view class="panelItem FlexRow">
45
+      <view class="text7">数量组成</view>
46
+    </view>
47
+    <view class="panelItem10 panelItem1 FlexRow">
48
+      <view class="panelItem11 FlexColumn" wx:if="{{CardType==0 || CardType==2}}">
49
+        <template class="fan" is="fanTemplate" data="{{Angle1,Angle2,BGColor,FanSize,FanScale,Color1,Color2,ShowNumber}}">
50
+        </template>
51
+        <view class="list FlexColumn">
52
+          <view class="item FlexRow">
53
+            <view class="block1 block"></view>
54
+            <view class="text6">新题卡</view>
55
+            <view class="Number1">{{StudyPlan.CommonNewLength}}</view>
56
+            <view class="text6">张</view>
57
+          </view>
58
+          <view class="item FlexRow">
59
+            <view class="block2 block"></view>
60
+            <view class="text6">旧题卡</view>
61
+            <view class="Number1">{{StudyPlan.CommonOldLength}}</view>
62
+            <view class="text6">张</view>
63
+          </view>
64
+        </view>
65
+      </view>
66
+      <view class="panelItem11 FlexColumn" wx:if="{{CardType==1 || CardType==2}}">
67
+        <template class="fan" is="fanTemplate2" data="{{Angle12,Angle22,BGColor2,FanSize2,FanScale2,Color12,Color22,ShowNumber2}}">
68
+        </template>
69
+        <view class="list FlexColumn">
70
+          <view class="item FlexRow">
71
+            <view class="block3 block"></view>
72
+            <view class="text6">新题卡</view>
73
+            <view class="Number1">{{StudyPlan.UrgentNewLength}}</view>
74
+            <view class="text6">张</view>
75
+          </view>
76
+          <view class="item FlexRow">
77
+            <view class="block4 block"></view>
78
+            <view class="text6">旧题卡</view>
79
+            <view class="Number1">{{StudyPlan.UrgentOldLength}}</view>
80
+            <view class="text6">张</view>
81
+          </view>
82
+        </view>
83
+      </view>
84
+    </view>
85
+    <block wx:if="{{StudyPlan.ListReviewLength>0}}">
86
+    <view class="text5">其中还有</view>
87
+    <view class="panelItem13 FlexRow">
88
+      <view class="text6">上次练习未练完的题卡</view>
89
+      <view class="Number1">{{StudyPlan.ListReviewLength}}</view>
90
+      <view class="text6">张</view>
91
+    </view>
92
+    </block>
93
+    <view style="height:42rpx;" wx:if="{{StudyPlan.ListReviewLength==0}}"></view>
94
+  </view>
95
+  <view class="lineWidthAll FlexRow">
96
+    <view class="lineWidth690"></view>
97
+  </view>
98
+  <view class="panelItem FlexRow">
99
+    <view class="panelItem2 FlexRow">
100
+      <view class="text2">预计锻炼回想</view>
101
+      <view class="right FlexRow">
102
+        <view class="Number2">{{StudyPlan.PracticeNumber}}</view>
103
+        <view class="text6">次</view>
104
+      </view>
105
+    </view>
106
+    <view class="panelItem2 FlexRow">
107
+      <view class="text2">预计练习用时</view>
108
+      <view class="right FlexRow">
109
+        <view class="Number2">{{StudyPlan.PracticeTime}}</view>
110
+        <view class="text6">分钟</view>
111
+      </view>
112
+    </view>
113
+  </view>
114
+  <view class='lineFooter'></view>
115
+  <view class="line"></view>
116
+  <view class="panelTitle FlexRow">
117
+    <image class="universalpic_plan_2line_black_30x32" src="../images/universalpic_plan_done_black_30x32.png" />
118
+    <view class="panelTitle1">完成情况</view>
119
+  </view>
120
+  <view class="lineWidthAll FlexRow">
121
+    <view class="lineWidth690"></view>
122
+  </view>
123
+  <view class="panelItem FlexColumn">
124
+    <view class="panelItem FlexRow">
125
+      <view class="text7">进度</view>
126
+    </view>
127
+    <view class="panelItem12 panelItem1 FlexRow">
128
+      <view class="progress">
129
+        <view class="progress1" style="width:{{Progress}}%;"></view>
130
+      </view>
131
+      <view class="Number3">{{Progress}}%</view>
132
+    </view>
133
+  </view>
134
+  <view class="panelItem FlexRow">
135
+    <view class="panelItem3 FlexRow">
136
+      <view class="text9">练完</view>
137
+      <view class="right FlexRow">
138
+        <view class="Number2">{{PlanNumber-TaskNumber}}</view>
139
+        <view class="text6">张</view>
140
+      </view>
141
+    </view>
142
+    <view class="panelItem3 FlexRow">
143
+      <view class="text9">未练完</view>
144
+      <view class="right FlexRow">
145
+        <view class="Number2">{{TaskNumber}}</view>
146
+        <view class="text6">张</view>
147
+      </view>
148
+    </view>
149
+  </view>
150
+  <view class="lineWidthAll FlexRow">
151
+    <view class="lineWidth690"></view>
152
+  </view>
153
+  <view class="panelItem FlexRow">
154
+    <view class="panelItem2 FlexRow" bindtap="gotoTaskList" data-id="2">
155
+      <view class="text8">实际练完的题卡</view>
156
+    </view>
157
+    <view class="line3"></view>
158
+    <view class="panelItem2 FlexRow" bindtap="gotoTaskList" data-id="1">
159
+      <view class="text8">未练完的题卡</view>
160
+    </view>
161
+  </view>
162
+  <view class='lineFooter'></view>
163
+  <view class="panelFooter FlexRow">
164
+    <view class="btnChange" bindtap="goto" data-url="./setting">调整学习计划</view>
165
+  </view>
166
+</view>
167
+
168
+<view wx:if="{{IsNullCard}}" class="TempContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
169
+  <image class="Avatar" src='../images/universalpic_logo_200x200.png' />
170
+  <text class='RemindText'>没有题卡不能使用</text>
171
+  <text class='RemindText2'>{{NewName}}方案中没有题卡,\n请登录官网为方案增添题卡后再试。</text>
172
+  <text class='RemindText3' catchtap="goto" data-url="../other/help?id=0&idchild=1">秒过官网地址</text>
173
+  <view class='btn1' catchtap="close">知道了</view>
174
+  <text class='RemindText5 RemindText4'>功能说明</text>
175
+  <text class='RemindText4' space="ensp">∙ 初次使用前,请先登录官网为方案增添一些题卡。</text>
176
+  <text class='RemindText4' space="ensp">∙ 整体练习融合了日常练习和紧急练习,需要两个方案都\n  有题卡才能使用。</text>
177
+  <text class='RemindText4' space="ensp">∙ 日常、紧急练习方案的任务量是各自独立的,请在学习\n  计划页面底部点击“调整练习方案”进行配置。</text>
178
+</view>
179
+
180
+<view wx:if="{{IsChangeStudyPLan}}" class="TempContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
181
+  <image class="Avatar" src='../images/universalpic_logo_200x200.png' />
182
+  <text class='RemindText'>首选变更</text>
183
+  <text class='RemindText2 FlexRow'>
184
+  <text>要从</text>
185
+  <text class="color2">{{OldName}}</text>
186
+  <text>更改为</text>
187
+  <text class="color2">{{NewName}}</text>
188
+  <text>吗?</text>
189
+  </text>
190
+  <view class="FlexRow">
191
+    <view class='btn2 btn1' catchtap="close">取消</view>
192
+    <view class='btn2 btn1' catchtap="changePlan">确定</view>
193
+  </view>
194
+  <text class='RemindText5 RemindText4'>变更后,会发生什么</text>
195
+  <text class='RemindText4' space="ensp">∙ 重新规划学习计划并刷新首页大数字;请回到首页重新\n  开始今天的练习。</text>
196
+  <text class='RemindText4' space="ensp">∙ 系统将保存最终设定作为学习计划的首选模式,下次练\n  习不用重复更改。</text>
197
+</view>

+ 362 - 0
pages/plan/studyplan.wxss

@@ -0,0 +1,362 @@
1
+@import "../template/Fan.wxss";
2
+
3
+.container{
4
+  font-size:28rpx;
5
+}
6
+
7
+.lineWidthAll{
8
+  justify-content: center;
9
+}
10
+
11
+.panelTitle{
12
+  width:100%;
13
+  justify-content: flex-start;
14
+  height:100rpx;
15
+  background-color: #fff;
16
+}
17
+
18
+.universalpic_plan_2line_black_30x32{
19
+  width:30rpx;
20
+  height:32rpx;
21
+  margin-left: 30rpx;
22
+}
23
+
24
+.panelTitle0{
25
+  margin-left: 30rpx;
26
+  color:#4D4D4D;
27
+}
28
+
29
+.panelTitle1{
30
+  margin-left: 20rpx;
31
+  color:#4D4D4D;
32
+}
33
+
34
+.panelButton{
35
+  width:100%;
36
+  height:137rpx;
37
+  background-color: #fff;
38
+  justify-content: center;
39
+}
40
+
41
+.panelButton10{
42
+  width:230rpx;
43
+  height:106rpx;
44
+  background-color: #fff;
45
+  border-radius: 0rpx;
46
+  margin-bottom: 30rpx;
47
+  font-size:32rpx;
48
+  color:#4D4D4D;
49
+}
50
+
51
+.panelButton11{
52
+  width:230rpx;
53
+  height:106rpx;
54
+  background-color: #0071EF;
55
+  border-radius: 10rpx;
56
+  color:#fff;
57
+  margin-bottom: 30rpx;
58
+  font-size:32rpx;
59
+}
60
+
61
+.text1{
62
+  margin: 0 20rpx;
63
+}
64
+
65
+.line1{
66
+  width:2rpx;
67
+  height:20rpx;
68
+  background-color: #D2D2D2;
69
+  margin-bottom: 30rpx;
70
+}
71
+
72
+.line{
73
+  width:100%;
74
+  height:30rpx;
75
+  background-color: #F0F0F0;
76
+}
77
+
78
+.panelItem{
79
+  width:100%;
80
+  background-color: #fff;
81
+  justify-content: space-between;
82
+}
83
+
84
+.left{
85
+  margin-left: 30rpx;
86
+  align-items: flex-start;
87
+}
88
+.left1{
89
+  margin-left: 30rpx;
90
+  width:460rpx;
91
+  justify-content: flex-start;
92
+}
93
+
94
+.text2{
95
+  font-weight: 400;
96
+  margin-top: 30rpx;
97
+  align-self: flex-start;
98
+}
99
+.text3{
100
+  font-size: 20rpx;
101
+  color:#787878;
102
+  margin-bottom: 34rpx;
103
+  margin-top: 4rpx;
104
+}
105
+.right{
106
+  margin-right: 30rpx;
107
+}
108
+
109
+.Number{
110
+  font-size: 64rpx;
111
+  font-family: Roboto-Black;
112
+}
113
+
114
+.text4{
115
+  font-size: 20rpx;
116
+  margin-bottom: -20rpx;
117
+  margin-left:4rpx; 
118
+  color:#4D4D4D;
119
+}
120
+
121
+.panelItem1{
122
+  width:100%;
123
+  background-color: #fff;
124
+}
125
+
126
+.panelItem10{
127
+  width:100%;
128
+  justify-content: space-around;
129
+}
130
+
131
+.panelItem11{
132
+  width:230rpx;
133
+  height:219rpx;
134
+}
135
+
136
+.line2{
137
+  width:2rpx;
138
+  height:219rpx;
139
+  background-color: #E3E3E3;
140
+}
141
+
142
+
143
+.text7{
144
+  font-weight: 400;
145
+  align-self: flex-start;
146
+  margin: 30rpx 0 40rpx 30rpx;
147
+}
148
+
149
+
150
+.fan{
151
+  width:100rpx;
152
+  height:100rpx;
153
+  background-color: #fff;
154
+  position: relative;
155
+  z-index: 10;
156
+  text-align: center;
157
+  line-height: 100rpx;
158
+  font-size:28;
159
+}
160
+
161
+.text5{
162
+  font-size:24rpx;
163
+  margin-top:20rpx;
164
+  color:#4D4D4D;
165
+}
166
+
167
+.list{
168
+  align-items: flex-start;
169
+  width:168rpx;
170
+  margin-top:20rpx;
171
+}
172
+
173
+.item{
174
+  width:100%;
175
+  justify-content: flex-start;
176
+}
177
+
178
+.block{
179
+  width:10rpx;
180
+  height:10rpx;
181
+  margin-right: 10rpx;
182
+}
183
+.block1{
184
+  background-color: #008CAA;
185
+  border:1rpx solid #016175;
186
+}
187
+.block2{
188
+  background-color: #00B6DD;
189
+  border:1rpx solid #00829E;
190
+}
191
+.block3{
192
+  background-color: #DDB100;
193
+  border:1rpx solid #9D7E01;
194
+}
195
+.block4{
196
+  background-color: #FFCC03;
197
+  border:1rpx solid #AE8B00;
198
+}
199
+.block5{
200
+  background-color: #FF8C83;
201
+  border:1rpx solid #BF524A;
202
+}
203
+.block6{
204
+  background-color: #fff;
205
+  border:1rpx solid #fff;
206
+}
207
+.Number1{
208
+  font-size: 24rpx;
209
+  font-family: 'Roboto-Black';
210
+  margin: 0 5rpx 0rpx 5rpx;
211
+}
212
+
213
+.panelItem13{
214
+  margin: 0 0 42rpx 0;
215
+}
216
+
217
+.panelItem2{
218
+  width:50%;
219
+  height:103rpx;
220
+  justify-content: space-around;
221
+}
222
+
223
+.panelItem3{
224
+  width:50%;
225
+  height:103rpx;
226
+  justify-content: space-between;
227
+}
228
+
229
+.Number2{
230
+  font-size: 36rpx;
231
+  font-family: 'Roboto-Black';
232
+}
233
+
234
+.text6{
235
+  font-size: 24rpx;
236
+  margin-left:4rpx; 
237
+  color:#787878;
238
+}
239
+
240
+.text9{
241
+  font-weight: 400;
242
+  margin-left: 30rpx;
243
+}
244
+
245
+.progress{
246
+  width:590rpx;
247
+  height:14rpx;
248
+  border-radius: 7rpx;
249
+  background-color: #F0F0F0;
250
+  margin-right: 31rpx;
251
+  margin-left: 30rpx;
252
+}
253
+
254
+.progress1{
255
+  width:80%;
256
+  height:14rpx;
257
+  border-radius: 7rpx;
258
+  background-color: #19C575;
259
+}
260
+
261
+.Number3{
262
+  font-size: 36rpx;
263
+  font-family: 'Roboto-Black';
264
+  margin-right: 30rpx;
265
+}
266
+
267
+
268
+.panelItem12{
269
+  margin-top: -35rpx;
270
+  justify-content: space-between;
271
+}
272
+
273
+
274
+.text8{
275
+  font-size: 24rpx;
276
+  color:#0071EF;
277
+}
278
+
279
+.line3{
280
+  width:2rpx;
281
+  height:20rpx;
282
+  background-color: #D2D2D2;
283
+}
284
+
285
+.panelFooter{
286
+  width:100%;
287
+  height:210rpx;
288
+  background-color: #F0F0F0;
289
+}
290
+
291
+.btnChange{
292
+  width:710rpx;
293
+  height:110rpx;
294
+  border-radius: 20rpx;
295
+  border:1rpx solid #787878;
296
+  color: #0071EF;
297
+  background-color: #fff;
298
+  line-height: 110rpx;
299
+  font-size:36rpx;
300
+  text-align: center;
301
+}
302
+
303
+/* 临时页面 */
304
+
305
+.TempContainer{
306
+  background-color: #0B8457;
307
+  position: fixed;
308
+  top:0;
309
+  z-index: 100;
310
+}
311
+.TempContainer .Avatar{
312
+  width:200rpx;
313
+  height:200rpx;
314
+  margin-top: 150rpx;
315
+  border-radius: 50%;
316
+}
317
+.TempContainer .RemindText{
318
+  font-size:54rpx;
319
+  color:#fff;
320
+  margin-top: 170rpx;
321
+  text-align: center;
322
+}
323
+.TempContainer .RemindText2{
324
+  font-size:32rpx;
325
+  color:#fff;
326
+  text-align: center;
327
+}
328
+.TempContainer .RemindText3{
329
+  font-size:28rpx;
330
+  color:#B6F57F;
331
+  text-decoration: underline;
332
+  margin-top: 40rpx;
333
+}
334
+.TempContainer .btn1{
335
+  font-size:36rpx;
336
+  color:#fff;
337
+  margin-top: 40rpx;
338
+  border:1rpx solid #fff;
339
+  text-align: center;
340
+  width:600rpx;
341
+  line-height: 90rpx;
342
+  border-radius: 14rpx;
343
+}
344
+
345
+.TempContainer .RemindText4{
346
+  font-size:24rpx;
347
+  color:#fff;
348
+  width:620rpx;
349
+}
350
+
351
+.TempContainer .RemindText5{
352
+  margin-top: 60rpx;
353
+}
354
+
355
+.TempContainer .color2{
356
+  color:#B6F57F;
357
+}
358
+
359
+.TempContainer .btn2{
360
+  width:290rpx;
361
+  margin: 60rpx 15rpx 0 15rpx;
362
+}

+ 178 - 0
pages/plan/studyplandetail.js

@@ -0,0 +1,178 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import fanObj from '../template/FanObject';
4
+
5
+const app = getApp();
6
+const arrSortType = ["自由安排", "到期时间较早的题卡", "到期时间较近的题卡"];
7
+
8
+Page({
9
+  data: {
10
+    CardNumberNew: [],
11
+    CardNumberOld: [],
12
+  },
13
+  onLoad: function (options) {
14
+    var that = this;
15
+
16
+    that.setData({
17
+      Containnerheight: main.getWindowHeight(),
18
+      CardType:options.CardType,
19
+    });
20
+    that.init();
21
+  },
22
+  init: function () {
23
+    var that = this;
24
+    var info = app.globalData.TaskToday;
25
+
26
+    
27
+    if (that.data.CardType==1) {
28
+      wx.setNavigationBarTitle({
29
+        title: "紧急练习方案"
30
+      });
31
+    }
32
+    
33
+    for (var i = 0; i <= 200; i++) {
34
+      that.data.CardNumberNew.push(i);
35
+    }
36
+    for (var i = 5; i <= 500; i++) {
37
+      that.data.CardNumberOld.push(i);
38
+    }
39
+
40
+    that.setData({
41
+      CardNumber: info.CardNumber,
42
+      CardNumberNew: that.data.CardNumberNew,
43
+      CardNumberOld: that.data.CardNumberOld,
44
+    });
45
+
46
+
47
+    var url = "GetMiaoguoCardTotal?UserID=" + app.globalData.userInfo.UserID + "&CardType=" + that.data.CardType;
48
+    main.getData(url, function (data) {
49
+      if (data) {
50
+
51
+        var rate = 0, cardTotal = 0,limitNumber=0;
52
+
53
+        if (that.data.CardType == 0) {
54
+          if (info.CardNumber > 0) {
55
+            limitNumber = data.NewCardNumber + data.LimitCardNumber;
56
+            cardTotal = info.CardNumberCommon;
57
+            rate = limitNumber / cardTotal;
58
+          }
59
+        }
60
+        else if (that.data.CardType == 1) {
61
+          if (info.CardNumber > 0) {
62
+            limitNumber = data.NewCardNumber + data.LimitCardNumber;
63
+            cardTotal = info.CardNumberUrgent;
64
+            rate = limitNumber / cardTotal;
65
+          }
66
+          wx.setNavigationBarTitle({
67
+            title: "紧急练习方案"
68
+          });
69
+        }
70
+        fanObj.init(that, rate, 100, 3.8, "#FF8C83", "#f0f0f0", limitNumber);
71
+
72
+
73
+        that.setData({
74
+          LimitCardNumber:limitNumber,
75
+          CardNumberCurrent: cardTotal,
76
+          NewCardNumber: data.NewCardNumber,
77
+          NewCardNumberToday: data.NewCardNumberToday,
78
+          HistoryCardNumber: data.LimitCardNumber,
79
+          HistoryCardNumberToday: data.LimitCardNumberToday,
80
+        });
81
+      }
82
+    });
83
+  },
84
+  onShow:function(){
85
+    var that = this;
86
+    if (that.data.CardType=="0"){
87
+      common.getStorageValue(that, "CardMaxNumberNew", 10, function () {
88
+        that.setData({
89
+          CardMaxNumberNewIndex: that.data.CardMaxNumberNew,
90
+        });
91
+      });
92
+      common.getStorageValue(that, "CardMaxNumberHistory", 100, function () {
93
+        that.setData({
94
+          CardMaxNumberHistoryIndex: that.data.CardMaxNumberHistory - 5,
95
+        });
96
+      });
97
+      common.getStorageValue(that, "SortTypeIndex", 0, function () {
98
+        that.setData({
99
+          SortType: arrSortType[that.data.SortTypeIndex],
100
+        });
101
+      });
102
+    }
103
+    else if (that.data.CardType == "1") {
104
+      common.getStorageValue(that, "CardMaxNumberNewUrgent", 10, function () {
105
+        that.setData({
106
+          CardMaxNumberNewIndex: that.data.CardMaxNumberNewUrgent,
107
+        });
108
+      });
109
+      common.getStorageValue(that, "CardMaxNumberHistoryUrgent", 100, function () {
110
+        that.setData({
111
+          CardMaxNumberHistoryIndex: that.data.CardMaxNumberHistoryUrgent - 5,
112
+        });
113
+      });
114
+    }
115
+
116
+  },
117
+  setTaskLimit: function (e) {
118
+    wx.navigateTo({
119
+      url: './taskLimit?CardType='+this.data.CardType,
120
+    })
121
+  },
122
+  setSortType: function () {
123
+    wx.navigateTo({
124
+      url: './sortRule',
125
+    })
126
+  },
127
+  bindUpdateCardNumberNewMax: function (e) {
128
+    this.data.CardMaxNumberNewIndex = e.detail.value;
129
+
130
+    if (this.data.CardType == "0") {
131
+      this.setData({
132
+        CardMaxNumberNewIndex: this.data.CardMaxNumberNewIndex,
133
+        CardMaxNumberNew: this.data.CardNumberNew[this.data.CardMaxNumberNewIndex],
134
+      });
135
+      wx.setStorageSync("CardMaxNumberNew", this.data.CardNumberNew[this.data.CardMaxNumberNewIndex]);
136
+    }
137
+    else if (this.data.CardType == "1") {
138
+      this.setData({
139
+        CardMaxNumberNewIndex: this.data.CardMaxNumberNewIndex,
140
+        CardMaxNumberNewUrgent: this.data.CardNumberNew[this.data.CardMaxNumberNewIndex],
141
+      });
142
+      wx.setStorageSync("CardMaxNumberNewUrgent", this.data.CardNumberNew[this.data.CardMaxNumberNewIndex]);
143
+    }
144
+    wx.removeStorageSync("StudyPlan");
145
+    main.UploadUserConfig(function () {
146
+      main.getTaskTodayList(function (data) {});
147
+    });
148
+  },
149
+  bindUpdateCardNumberHistoryMax: function (e) {
150
+    this.data.CardMaxNumberHistoryIndex = e.detail.value;
151
+
152
+    if (this.data.CardType == "0") {
153
+      this.setData({
154
+        CardMaxNumberHistoryIndex: this.data.CardMaxNumberHistoryIndex,
155
+        CardMaxNumberHistory: this.data.CardNumberOld[this.data.CardMaxNumberHistoryIndex],
156
+      });
157
+      wx.setStorageSync("CardMaxNumberHistory", this.data.CardNumberOld[this.data.CardMaxNumberHistoryIndex]);
158
+    }
159
+    else if (this.data.CardType == "1") {
160
+      this.setData({
161
+        CardMaxNumberHistoryIndex: this.data.CardMaxNumberHistoryIndex,
162
+        CardMaxNumberHistoryUrgent: this.data.CardNumberOld[this.data.CardMaxNumberHistoryIndex],
163
+      });
164
+      wx.setStorageSync("CardMaxNumberHistoryUrgent", this.data.CardNumberOld[this.data.CardMaxNumberHistoryIndex]);
165
+    }
166
+    wx.removeStorageSync("StudyPlan");
167
+    main.UploadUserConfig(function () {
168
+      main.getTaskTodayList(function (data) { });
169
+    });
170
+  },
171
+  onShareAppMessage: function () {
172
+    return {
173
+      title: app.globalData.ShareTitle,
174
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
175
+      imageUrl: app.globalData.ShareImage,
176
+    }
177
+  },
178
+})

+ 3 - 0
pages/plan/studyplandetail.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "日常练习方案"
3
+}

+ 163 - 0
pages/plan/studyplandetail.wxml

@@ -0,0 +1,163 @@
1
+<import src="../template/Fan.wxml" />
2
+
3
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
4
+  <view class="panelTitle FlexRow">
5
+    <image class="universalpic_plan_2line_black_30x32" src="../images/universalpic_plan_data_black_30x32.png" />
6
+    <view class="panelTitle1">参考数据</view>
7
+  </view>
8
+  <view class="lineWidthAll1 FlexRow">
9
+    <view class="lineWidth690"></view>
10
+  </view>
11
+  <view class="panelItem FlexRow">
12
+    <view class="panelItem1 FlexColumn">
13
+      <template class="fan" is="fanTemplate" data="{{Angle1,Angle2,BGColor,FanSize,FanScale,Color1,Color2,ShowNumber}}">
14
+      </template>
15
+      <view class="list FlexColumn">
16
+        <view class="item FlexRow">
17
+          <view class="block1 block"></view>
18
+          <view class="text6">已到期题卡</view>
19
+          <view class="Number1">{{LimitCardNumber}}</view>
20
+          <view class="text6">张</view>
21
+        </view>
22
+        <view class="item FlexRow">
23
+          <view class="block2 block"></view>
24
+          <view class="text6">本方案已有</view>
25
+          <view class="Number1">{{CardNumberCurrent}}</view>
26
+          <view class="text6">张</view>
27
+        </view>
28
+        <view class="item FlexRow">
29
+          <view class="block"></view>
30
+          <view class="text6">其中今天增添</view>
31
+          <view class="Number1">{{NewCardNumberToday+HistoryCardNumberToday}}</view>
32
+          <view class="text6">张</view>
33
+        </view>
34
+      </view>
35
+      <view class="cardFull" wx:if="CardType==1 && CardNumberCurrent>=200">容量已满</view>
36
+      
37
+    </view>
38
+    <view class="line2"></view>
39
+    <view class="panelItem1 FlexColumn">
40
+      <view class="panelItem11 FlexColumn">
41
+        <view class="list1 list FlexColumn">
42
+          <view class="item FlexRow">
43
+            <view class="text6">已到期</view>
44
+            <view style="width:10rpx"></view>
45
+            <view class="text6">新</view>
46
+            <view class="Number1">{{NewCardNumber}}</view>
47
+            <view class="text6">张</view>
48
+            <view style="width:10rpx"></view>
49
+            <view class="text6"> 旧</view>
50
+            <view class="Number1">{{HistoryCardNumber}}</view>
51
+            <view class="text6">张</view>
52
+          </view>
53
+          <view class="item FlexRow">
54
+            <text class="text9">到期数量较多时请调整任务限量限制当天需要练习的题卡数</text>
55
+          </view>
56
+        </view>
57
+      </view>
58
+      <view class="panelItem12 panelItem11 FlexColumn">
59
+        <view class="list1 list FlexColumn" wx:if="{{CardType==0}}">
60
+          <view class="item FlexRow">
61
+            <view class="text6">其中今天到期</view>
62
+          </view>
63
+          <view class="item FlexRow">
64
+            <view class="text6">新</view>
65
+            <view class="Number1">{{NewCardNumberToday}}</view>
66
+            <view style="width:10rpx"></view>
67
+            <view class="text6">旧</view>
68
+            <view class="Number1">{{HistoryCardNumberToday}}</view>
69
+            <view class="text6">张</view>
70
+          </view>
71
+          <view class="item FlexRow">
72
+            <text class="text9">该数量较多时可调整选取规则</text>
73
+          </view>
74
+        </view>
75
+
76
+        <view class="list1 list FlexColumn" wx:if="{{CardType==1}}">
77
+          <view class="item FlexRow">
78
+            <view class="text6">本方案最多可容纳</view>
79
+            <view class="Number1">200</view>
80
+            <view class="text6">张</view>
81
+          </view>
82
+          <view class="item FlexRow">
83
+            <text class="text9">使用过程中请适当调配题卡</text>
84
+          </view>
85
+        </view>
86
+      </view>
87
+    </view>
88
+  </view>
89
+  <view class='lineFooter'></view>
90
+  <view class="line"></view>
91
+
92
+  <view class="panelTitle3 FlexRow">
93
+    <view class="left">任务限制</view>
94
+    <view class="right"></view>
95
+  </view>
96
+  
97
+  <picker class="panelItem0" bindchange="bindUpdateCardNumberNewMax" value="{{CardMaxNumberNewIndex}}" range="{{CardNumberNew}}">
98
+		<view class="panelItem FlexRow">
99
+			<view class="panelItem3">新题卡数量上限</view>
100
+			<view class="panelItem4 FlexRow">
101
+				<view class="picker" wx:if="{{CardType=='0'}}">
102
+					{{CardMaxNumberNew}}张
103
+				</view>
104
+        <view class="picker" wx:if="{{CardType=='1'}}">
105
+					{{CardMaxNumberNewUrgent}}张
106
+				</view>
107
+				<image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
108
+			</view>
109
+		</view>
110
+	</picker>
111
+	<view class="lineWidthAll FlexRow">
112
+		<view class="lineWidth720"></view>
113
+	</view>
114
+	<picker class="panelItem0" bindchange="bindUpdateCardNumberHistoryMax" value="{{CardMaxNumberHistoryIndex}}" range="{{CardNumberOld}}">
115
+		<view class="panelItem FlexRow">
116
+			<view class="panelItem3">旧题卡数量上限</view>
117
+			<view class="panelItem4 FlexRow">
118
+				<view class="picker" wx:if="{{CardType=='0'}}">
119
+					{{CardMaxNumberHistory}}张
120
+				</view>
121
+				<view class="picker" wx:if="{{CardType=='1'}}">
122
+					{{CardMaxNumberHistoryUrgent}}张
123
+				</view>
124
+				<image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
125
+			</view>
126
+		</view>
127
+	</picker>
128
+	<view class='lineFooter'></view>
129
+  
130
+  <block wx:if="{{CardType=='0'}}">
131
+  <view class="panelTitle3 FlexRow">
132
+    <view class="left">内容组织</view>
133
+    <view class="right"></view>
134
+  </view>
135
+  <view class="panelItem FlexRow" bindtap='setSortType'>
136
+    <view class="panelItem3">优先规则</view>
137
+    <view class="panelItem4 FlexRow">
138
+      <view class="picker">
139
+        {{SortType}}
140
+      </view>
141
+      <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
142
+    </view>
143
+  </view>
144
+  </block>
145
+  <view class='lineFooter'></view>
146
+  <view class="panelItem5 FlexRow">
147
+    <image src='../images/universalpic_exmark_black_26x26.png' class="universalpic_exmark_black_26x26" />
148
+    <view class="text7">如要调整方案中的题卡内容请至官网www.kylx365.com</view>
149
+  </view>
150
+  <view style="height:50rpx;"></view>
151
+  <view class="panelItem FlexColumn">
152
+		<view class="panelTitle00 panelTitle FlexRow">
153
+			<view class="panelTitle2">任务限量用途说明</view>
154
+		</view>
155
+		<text class="text8">限制“今天学习任务”(任务量)的题卡数量。当任务量太多学习时间过长时,通过限制新、旧题卡数量把学习时间和难度控制在可接受范围内。\n
156
+      通常,新题卡比旧题卡难度较大,练习时间也更长。建议新、旧题卡数量之比维持的1:3到1:5之间。\n
157
+      常见误区:本功能用于对数量的“限制”,而不是要求任务量必须达到这个数量。假设,数量限制是50张题卡,但到期题卡仅有30张时,则按实际情况练习30张,并不会补足20张题卡。当日最适合回想的知识是根据到期时间来安排的,和数量限制无关。另一方面,要让本功能发挥作用,必须有足够的题卡数量和较多的到期题卡数量。
158
+    </text>
159
+		<view style="height:40rpx;"></view>
160
+	</view>
161
+	<view class='lineFooter'></view>
162
+  <view style="height:100rpx;"></view>
163
+</view>

+ 207 - 0
pages/plan/studyplandetail.wxss

@@ -0,0 +1,207 @@
1
+@import "../template/Fan.wxss";
2
+
3
+.container{
4
+  font-size:28rpx;
5
+}
6
+
7
+.lineWidthAll1{
8
+  width: 100%;
9
+  background-color: #fff;
10
+  height: 1rpx;
11
+}
12
+.panelTitle{
13
+  width:100%;
14
+  justify-content: flex-start;
15
+  height:100rpx;
16
+  background-color: #fff;
17
+}
18
+
19
+.universalpic_plan_2line_black_30x32{
20
+  width:30rpx;
21
+  height:32rpx;
22
+  margin-left: 30rpx;
23
+}
24
+
25
+.panelTitle1{
26
+  margin-left: 10rpx;
27
+}
28
+
29
+
30
+.panelItem{
31
+  width:100%;
32
+  background-color: #fff;
33
+  justify-content: space-between;
34
+}
35
+
36
+.panelItem1{
37
+  width:50%;
38
+  height:319rpx;
39
+  position: relative;
40
+}
41
+
42
+.cardFull{
43
+  position: absolute;
44
+  width:120rpx;
45
+  height:40rpx;
46
+  color:#fff;
47
+  background-color: #FE6659;
48
+  border-radius: 20rpx;
49
+  line-height: 40rpx;
50
+  font-size:20rpx;
51
+  text-align: center;
52
+  top:40rpx;
53
+  left:30rpx;
54
+  z-index: 20;
55
+}
56
+
57
+.line2{
58
+  width:2rpx;
59
+  height:219rpx;
60
+  background-color: #E3E3E3;
61
+}
62
+
63
+.panelItem11{
64
+  margin-left: 40rpx;
65
+  align-items: flex-start;
66
+  align-self: flex-start;
67
+}
68
+
69
+.panelItem12{
70
+  margin-top: 27rpx;
71
+}
72
+
73
+.fan{
74
+  width:100rpx;
75
+  height:100rpx;
76
+  background-color: #fff;
77
+  position: relative;
78
+  z-index: 10;
79
+  text-align: center;
80
+  line-height: 100rpx;
81
+  font-size:28;
82
+  margin-bottom: 20rpx;
83
+}
84
+
85
+.text5{
86
+  font-size:24rpx;
87
+  margin-top:20rpx;
88
+}
89
+
90
+.list{
91
+  align-items: flex-start;
92
+  width:240rpx;
93
+  font-size:24rpx;
94
+}
95
+.list1{
96
+  width:300rpx;
97
+  align-items: flex-start;
98
+}
99
+
100
+.item{
101
+  width:100%;
102
+  justify-content: flex-start;
103
+  margin-bottom: 5rpx; 
104
+}
105
+
106
+.block{
107
+  width:10rpx;
108
+  height:10rpx;
109
+  margin-right: 10rpx;
110
+  background-color: #fff;
111
+}
112
+.block1{
113
+  background-color: #FF8C83;
114
+  border:1rpx solid #BF524A;
115
+}
116
+.block2{
117
+  background-color: #F0F0F0;
118
+  border:1rpx solid #9B9B9B;
119
+}
120
+
121
+.Number1{
122
+  font-size: 20rpx;
123
+  font-family: Roboto-Black;
124
+  margin: 0 5rpx 0rpx 5rpx;
125
+}
126
+
127
+.text6{
128
+  font-size:24rpx;
129
+  color:#787878;
130
+}
131
+
132
+.text9{
133
+  font-size:20rpx;
134
+  color:#787878;
135
+}
136
+
137
+.Arrow{
138
+  width:16rpx;
139
+  height:26rpx;
140
+  margin-left: 30rpx;
141
+}
142
+
143
+.panelTitle3{
144
+  width:100%;
145
+  background-color:  #F0F0F0;
146
+  height:75rpx;
147
+  align-items: flex-start;
148
+  justify-content: space-between;
149
+  margin-top: 50rpx;
150
+}
151
+.left{
152
+  margin: 0 0 30rpx 30rpx;
153
+  font-size:32rpx;
154
+}
155
+
156
+.panelItem0 {
157
+  width: 100%;
158
+}
159
+
160
+.panelItem3{
161
+  margin-left: 30rpx;
162
+  line-height: 101rpx;
163
+  font-weight: 400;
164
+}
165
+.panelItem4{
166
+  margin-right: 30rpx;
167
+}
168
+
169
+.picker{
170
+  color:#787878;
171
+  font-weight: 400;
172
+}
173
+
174
+.universalpic_exmark_black_26x26{
175
+  width:26rpx;
176
+  height:26rpx;
177
+  margin-right: 10rpx;
178
+}
179
+
180
+
181
+.panelItem5{
182
+  width:100%;
183
+  background-color: #F0F0F0;
184
+  margin-top: 30rpx;
185
+}
186
+.text7{
187
+  font-size:24rpx;
188
+  font-weight: 400;
189
+}
190
+
191
+
192
+.panelTitle00 {
193
+  margin-top: 20rpx;
194
+}
195
+
196
+.panelTitle2 {
197
+  font-size: 32rpx;
198
+  margin-left: 30rpx;
199
+  margin-bottom: 30rpx;
200
+}
201
+
202
+
203
+.text8{
204
+  font-size:24rpx;
205
+  font-weight: 400;
206
+  width:690rpx;
207
+}

+ 0 - 68
pages/plan/taskLimit.js

@@ -1,68 +0,0 @@
1
-import common from '../../utils/util';
2
-import main from '../../utils/main';
3
-
4
-const app = getApp();
5
-
6
-Page({
7
-  data: {
8
-    CardNumberNew: [],
9
-    CardNumberOld: [],
10
-  },
11
-  onLoad: function (options) {
12
-    var that = this;
13
-
14
-    for (var i = 5; i <= 200; i++) {
15
-      that.data.CardNumberNew.push(i);
16
-    }
17
-    for (var i = 5; i <= 500; i++) {
18
-      that.data.CardNumberOld.push(i);
19
-    }
20
-
21
-    that.setData({
22
-      Containnerheight: main.getWindowHeight(),
23
-      CardNumberNew: that.data.CardNumberNew,
24
-      CardNumberOld: that.data.CardNumberOld,
25
-    });
26
-
27
-    that.init();
28
-  },
29
-  init: function () {
30
-    var that=this;
31
-    common.getStorageValue(this, "CardMaxNumberNew", 10, function () {
32
-      that.setData({
33
-        CardMaxNumberNewIndex: that.data.CardMaxNumberNew - 5,
34
-      });
35
-    });
36
-    common.getStorageValue(this, "CardMaxNumberHistory", 30, function () {
37
-      that.setData({
38
-        CardMaxNumberHistoryIndex: that.data.CardMaxNumberHistory - 5,
39
-      });
40
-    });
41
-  },
42
-  bindUpdateCardNumberNewMax: function (e) {
43
-    this.data.CardMaxNumberNewIndex = e.detail.value;
44
-    this.setData({
45
-      CardMaxNumberNewIndex: this.data.CardMaxNumberNewIndex,
46
-      CardMaxNumberNew: this.data.CardNumberNew[this.data.CardMaxNumberNewIndex],
47
-    });
48
-    wx.setStorageSync("CardMaxNumberNew", this.data.CardNumberNew[this.data.CardMaxNumberNewIndex]);
49
-    main.UploadUserConfig();
50
-  },
51
-  bindUpdateCardNumberHistoryMax: function (e) {
52
-    this.data.CardMaxNumberHistoryIndex = e.detail.value;
53
-    this.setData({
54
-      CardMaxNumberHistoryIndex: this.data.CardMaxNumberHistoryIndex,
55
-      CardMaxNumberHistory: this.data.CardNumberOld[this.data.CardMaxNumberHistoryIndex],
56
-    });
57
-    wx.setStorageSync("CardMaxNumberHistory", this.data.CardNumberOld[this.data.CardMaxNumberHistoryIndex]);
58
-    main.UploadUserConfig();
59
-  },
60
-  
61
-  onShareAppMessage: function () {
62
-    return {
63
-      title: app.globalData.ShareTitle,
64
-      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
65
-      imageUrl: app.globalData.ShareImage,
66
-    }
67
-  },
68
-})

+ 0 - 3
pages/plan/taskLimit.json

@@ -1,3 +0,0 @@
1
-{
2
-  "navigationBarTitleText": "数量限制"
3
-}

+ 0 - 45
pages/plan/taskLimit.wxml

@@ -1,45 +0,0 @@
1
-<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <view style='height:20rpx'></view>
3
-  <view class="panelItem FlexColumn">
4
-    <view class="panelTitle0 panelTitle FlexRow">
5
-      <view class="panelTitle1">用途说明</view>
6
-    </view>
7
-    <text class="text1">限制“今天学习任务”(任务量)的题卡数量。当任务量太多学习时间过长时,通过限制新、旧题卡数量把学习时间和难度控制在可接受范围内。\n
8
-      通常,新题卡比旧题卡难度较大,练习时间也更长。建议新、旧题卡数量之比维持的1:3到1:5之间。\n
9
-      常见误区:本功能用于对数量的“限制”,而不是要求任务量必须达到这个数量。假设,数量限制是50张题卡,但到期题卡仅有30张时,则按实际情况练习30张,并不会补足20张题卡。当日最适合回想的知识是根据到期时间来安排的,和数量限制无关。另一方面,要让本功能发挥作用,必须有足够的题卡数量和较多的到期题卡数量。
10
-    </text>
11
-    <view style="height:40rpx;"></view>
12
-  </view>
13
-  <view class='lineFooter'></view>
14
-
15
-  <view class="panelTitle FlexRow">
16
-    <view class="panelTitle1">限制</view>
17
-  </view>
18
-  <view class="panelItem FlexRow">
19
-    <view class="panelItem1">新题卡数量上限</view>
20
-    <view class="panelItem2 FlexRow">
21
-      <picker bindchange="bindUpdateCardNumberNewMax" value="{{CardMaxNumberNewIndex}}" range="{{CardNumberNew}}">
22
-        <view class="picker">
23
-          {{CardMaxNumberNew}}张
24
-        </view>
25
-      </picker>
26
-      <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
27
-    </view>
28
-  </view>
29
-  <view class="lineWidthAll FlexRow">
30
-    <view class="lineWidth720"></view>
31
-  </view>
32
-  <view class="panelItem FlexRow">
33
-    <view class="panelItem1">旧题卡数量上限</view>
34
-    <view class="panelItem2 FlexRow">
35
-      <picker bindchange="bindUpdateCardNumberHistoryMax" value="{{CardMaxNumberHistoryIndex}}" range="{{CardNumberOld}}">
36
-        <view class="picker">
37
-          {{CardMaxNumberHistory}}张
38
-        </view>
39
-      </picker>
40
-      <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
41
-    </view>
42
-  </view>
43
-  <view class='lineFooter'></view>
44
-  <view style='height:100rpx'></view>
45
-</view>

+ 0 - 54
pages/plan/taskLimit.wxss

@@ -1,54 +0,0 @@
1
-.panelTitle {
2
-  width: 100%;
3
-  margin-top: 50rpx;
4
-  justify-content: flex-start;
5
-}
6
-
7
-.panelTitle0 {
8
-  margin-top: 40rpx;
9
-}
10
-
11
-.panelTitle .panelTitle1 {
12
-  font-size: 32rpx;
13
-  margin-left: 30rpx;
14
-  margin-bottom: 30rpx;
15
-}
16
-
17
-.text1{
18
-  font-size:24rpx;
19
-  font-weight: 400;
20
-  width:690rpx;
21
-}
22
-
23
-.panelItem {
24
-  width: 100%;
25
-  justify-content: space-between;
26
-  font-size: 28rpx;
27
-  min-height: 100rpx;
28
-  background-color: #fff;
29
-}
30
-
31
-
32
-.panelItem01 {
33
-  width: 100%;
34
-  line-height: 100rpx;
35
-  padding-left: 30rpx;
36
-  font-weight: 400;
37
-  border-radius: 10rpx;
38
-}
39
-
40
-.panelItem .panelItem1{
41
-  margin-left: 30rpx;
42
-  font-weight: 400;
43
-}
44
-.panelItem .panelItem2{
45
-  margin-right: 30rpx;
46
-  color:#787878;
47
-  font-weight: 400;
48
-}
49
-
50
-.Arrow{
51
-  width:16rpx;
52
-  height:26rpx;
53
-  margin-left: 30rpx;
54
-}

+ 2 - 0
pages/template/Fan.js

@@ -0,0 +1,2 @@
1
+Page({data: {},});
2
+

+ 1 - 0
pages/template/Fan.json

@@ -0,0 +1 @@
1
+{}

+ 27 - 0
pages/template/Fan.wxml

@@ -0,0 +1,27 @@
1
+<template name="fanTemplate">
2
+  <view class="fan">
3
+    <view class="shanxing" style="width:{{FanSize}}rpx;height:{{FanSize}}rpx;background-color:{{Color2}};">
4
+      <view class="sx1" style="clip: rect(0, {{FanSize/2}}rpx, {{FanSize}}rpx, 0);transform: rotate({{Angle1}}deg);background-color:{{Color1}};">
5
+      </view>
6
+      <view class="sx2" style="clip: rect(0, {{FanSize/2}}rpx, {{FanSize}}rpx, 0);transform: rotate({{Angle2}}deg);{{BGColor}}">
7
+      </view>
8
+    </view>
9
+    <view class="shanxingSmall" style="width:{{FanSize-FanSize/FanScale}}rpx;height:{{FanSize-FanSize/FanScale}}rpx;line-height:{{FanSize-FanSize/FanScale}}rpx;left:{{FanSize/(FanScale*2)}}rpx;top:{{FanSize/(FanScale*2)}}rpx;">
10
+      {{ShowNumber}}
11
+    </view>
12
+  </view>
13
+</template>
14
+
15
+<template name="fanTemplate2">
16
+  <view class="fan">
17
+    <view class="shanxing" style="width:{{FanSize2}}rpx;height:{{FanSize2}}rpx;background-color:{{Color22}};">
18
+      <view class="sx1" style="clip: rect(0, {{FanSize2/2}}rpx, {{FanSize2}}rpx, 0);transform: rotate({{Angle12}}deg);background-color:{{Color12}};">
19
+      </view>
20
+      <view class="sx2" style="clip: rect(0, {{FanSize2/2}}rpx, {{FanSize2}}rpx, 0);transform: rotate({{Angle22}}deg);{{BGColor2}}">
21
+      </view>
22
+    </view>
23
+    <view class="shanxingSmall" style="width:{{FanSize2-FanSize2/FanScale2}}rpx;height:{{FanSize2-FanSize2/FanScale2}}rpx;line-height:{{FanSize2-FanSize2/FanScale2}}rpx;left:{{FanSize2/(FanScale2*2)}}rpx;top:{{FanSize2/(FanScale2*2)}}rpx;">
24
+      {{ShowNumber2}}
25
+    </view>
26
+  </view>
27
+</template>

+ 52 - 0
pages/template/Fan.wxss

@@ -0,0 +1,52 @@
1
+.fan {
2
+  position: relative;
3
+}
4
+
5
+.shanxing {
6
+  width:100rpx;
7
+  height:100rpx;
8
+  border-radius: 50%;
9
+  position: absolute;
10
+  left: 0;
11
+  top: 0;
12
+  background-color: #F0F0F0;
13
+}
14
+.shanxing2 {
15
+  background-color: #FF8C83;
16
+}
17
+
18
+.shanxingSmall {
19
+  width: 72rpx;
20
+  height: 72rpx;
21
+  line-height: 72rpx;
22
+  border-radius: 50%;
23
+  background-color: #fff;
24
+  position: absolute;
25
+  left: 14rpx;
26
+  top: 14rpx;
27
+  font-family: 'Roboto-Black';
28
+  color:#1e1e1e;
29
+}
30
+
31
+.sx1 {
32
+  position: absolute;
33
+  width:100%;
34
+  height: 100%;
35
+  clip: rect(0, 100rpx, 200rpx, 0); /*这个clip属性用来绘制半圆,在clip的rect范围内的内容显示出来,使用clip属性,元素必须是absolute的 */
36
+  border-radius: 50%;
37
+
38
+  background-color: #4cdf95;
39
+  transform: rotate(180deg);
40
+}
41
+
42
+.sx2 {
43
+  position: absolute;
44
+  width:100%;
45
+  height: 100%;
46
+  clip: rect(0, 100rpx, 200rpx, 0);
47
+  border-radius: 50%;
48
+  
49
+  background-color: #f0f0f0;
50
+  transform: rotate(-150deg);
51
+
52
+}

+ 53 - 0
pages/template/FanObject.js

@@ -0,0 +1,53 @@
1
+var fanObject = {
2
+  init: function (that, rateResult, fanSize, fanScale, color1, color2, ShowNumber) {
3
+    
4
+    var rate=rateResult;
5
+    var angle1 = (360 * rate), angle2 = 0, bgColor = "background-color:" + color2;
6
+    if (rate > 0.5) {
7
+      angle1 = 180;
8
+      angle2 = (360 * (rate - 0.5) - 180);
9
+      bgColor = "background-color:" + color1;
10
+    }
11
+    else {
12
+      bgColor = "background-color:" + color2;
13
+    }
14
+
15
+    that.setData({
16
+      Angle1: angle1,
17
+      Angle2: angle2,
18
+      BGColor: bgColor,
19
+      FanSize: fanSize,
20
+      FanScale: fanScale,
21
+      Color1: color1,
22
+      Color2: color2,
23
+      ShowNumber: ShowNumber,
24
+    });
25
+
26
+  },
27
+  init2: function (that, rateResult2, fanSize2, fanScale2, color12, color22, ShowNumber2) {
28
+    
29
+    var rate2 = rateResult2;
30
+    var angle12 = (360 * rate2), angle22 = 0, bgColor2 = "background-color:" + color22;
31
+    if (rate2 > 0.5) {
32
+      angle12 = 180;
33
+      angle22 = (360 * (rate2 - 0.5) - 180);
34
+      bgColor2 = "background-color:" + color12;
35
+    }
36
+    else {
37
+      bgColor2 = "background-color:" + color22;
38
+    }
39
+
40
+    that.setData({
41
+      Angle12: angle12,
42
+      Angle22: angle22,
43
+      BGColor2: bgColor2,
44
+      FanSize2: fanSize2,
45
+      FanScale2: fanScale2,
46
+      Color12: color12,
47
+      Color22: color22,
48
+      ShowNumber2: ShowNumber2,
49
+    });
50
+
51
+  }
52
+}
53
+export default fanObject;

+ 29 - 19
utils/main.js

@@ -529,23 +529,8 @@ function getTaskTodayList(callback) {
529 529
   }, 2000);
530 530
 
531 531
   var that = this;
532
-  var CardMaxNumberNew = wx.getStorageSync("CardMaxNumberNew");
533
-  if (!CardMaxNumberNew)
534
-    CardMaxNumberNew = 10;
535
-
536
-  var CardMaxNumberHistory = wx.getStorageSync("CardMaxNumberHistory");
537
-  if (!CardMaxNumberHistory)
538
-    CardMaxNumberHistory = 30;
539
-
540
-  var SortTypeIndex = wx.getStorageSync("SortTypeIndex");
541
-  if (!SortTypeIndex)
542
-    SortTypeIndex = 0;
543
-
544
-  var url = 'GetMiaoguoCardToday?UserID=' + app.globalData.userInfo.UserID;
545
-  url += "&New=" + CardMaxNumberNew;
546
-  url += "&History=" + CardMaxNumberHistory;
547
-  url += "&SortTypeIndex=" + SortTypeIndex;
548
-
532
+  var url = 'GetMiaoguoCardToday2?UserID=' + app.globalData.userInfo.UserID;
533
+  
549 534
   getData(url, function (data) {
550 535
     clearTimeout(intervalTask);
551 536
     if (isNotData) {
@@ -555,6 +540,24 @@ function getTaskTodayList(callback) {
555 540
 
556 541
     if (data) {
557 542
       app.globalData.TaskToday = data;
543
+      
544
+
545
+      //存储当天的学习计划
546
+      var StudyPlan = wx.getStorageSync("StudyPlan");
547
+      var today = common.formatTime(new Date(), "-",true);
548
+      if (!StudyPlan || StudyPlan.Today < today){
549
+        var StudyPlan = {};
550
+        StudyPlan.UrgentNewLength = data.UrgentNewLength;
551
+        StudyPlan.UrgentOldLength = data.UrgentOldLength;
552
+        StudyPlan.CommonNewLength = data.CommonNewLength;
553
+        StudyPlan.CommonOldLength = data.CommonOldLength;
554
+        StudyPlan.ListReviewLength = data.ListReview.length;
555
+        StudyPlan.PracticeNumber = data.PracticeNumber;
556
+        StudyPlan.PracticeTime = data.PracticeTime;
557
+        StudyPlan.Today = today;
558
+        wx.setStorageSync("StudyPlan", StudyPlan);
559
+      }
560
+
558 561
       callback(data);
559 562
     }
560 563
   });
@@ -619,11 +622,14 @@ function saveTempImage(serverUrl, tempUrl) {
619 622
   }
620 623
 }
621 624
 
622
-function UploadUserConfig() {
625
+function UploadUserConfig(callback) {
623 626
   var that = this;
624 627
   var param1 = {};
628
+  param1.CardType = wx.getStorageSync("CardType");
625 629
   param1.CardMaxNumberNew = wx.getStorageSync("CardMaxNumberNew");
626 630
   param1.CardMaxNumberHistory = wx.getStorageSync("CardMaxNumberHistory");
631
+  param1.CardMaxNumberNewUrgent = wx.getStorageSync("CardMaxNumberNewUrgent");
632
+  param1.CardMaxNumberHistoryUrgent = wx.getStorageSync("CardMaxNumberHistoryUrgent");
627 633
   param1.SortTypeIndex = wx.getStorageSync("SortTypeIndex");
628 634
   param1.MemoryLevel = wx.getStorageSync("MemoryLevel");
629 635
 
@@ -631,7 +637,11 @@ function UploadUserConfig() {
631 637
   param1.SecondConfigArray = wx.getStorageSync("SecondConfigArray");
632 638
   param1.ColorIndexArr = wx.getStorageSync("ColorIndexArr");
633 639
 
634
-  that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {});
640
+  that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {
641
+    if (callback){
642
+      callback();
643
+    }
644
+  });
635 645
 }
636 646
 
637 647
 function UpdateMiaoguoCardTodayAll(isShowLoading, callback) {