chengjie 6 年之前
父节点
当前提交
296d036753

二进制
pages/images/universalpic_add_gray_30x30.png


二进制
pages/images/universalpic_editbar_underline_gray.png


二进制
pages/images/universalpic_saved_white_120x120.png


二进制
pages/images/universalpic_shelve_white_120x120.png


二进制
pages/images/universalpic_undo_white_120x90.png


二进制
pages/images/universalpic_wrong_white_120x120.png


+ 13 - 5
pages/main/add.js

@@ -16,13 +16,14 @@ Page({
16
       fieldid = options.fieldid;
16
       fieldid = options.fieldid;
17
     that.setData({
17
     that.setData({
18
       Containnerheight: main.getWindowHeight(),
18
       Containnerheight: main.getWindowHeight(),
19
-      IsTodayStudy: true,
20
       UpdateType: options.type,
19
       UpdateType: options.type,
21
       MiaoguoCardID: options.id,
20
       MiaoguoCardID: options.id,
22
       FieldID: fieldid,
21
       FieldID: fieldid,
23
     });
22
     });
24
 
23
 
25
     wx.setStorageSync("TempMiaoguoCardID", that.data.MiaoguoCardID);
24
     wx.setStorageSync("TempMiaoguoCardID", that.data.MiaoguoCardID);
25
+
26
+    common.getStorageValue(that, "IsTodayStudy", true, function () {});
26
   },
27
   },
27
   onShow: function () {
28
   onShow: function () {
28
     var that = this;
29
     var that = this;
@@ -96,7 +97,8 @@ Page({
96
     var that = this;
97
     var that = this;
97
     if (that.data.Field[1] == "") {
98
     if (that.data.Field[1] == "") {
98
       wx.showToast({
99
       wx.showToast({
99
-        title: '请在第一段输入内容',
100
+        title: '第一段必填',
101
+        image: "../images/universalpic_wrong_white_120x120.png",
100
       });
102
       });
101
     }
103
     }
102
     else {
104
     else {
@@ -106,22 +108,27 @@ Page({
106
     }
108
     }
107
   },
109
   },
108
   switch1Change(e) {
110
   switch1Change(e) {
111
+
109
     this.setData({
112
     this.setData({
110
       IsTodayStudy: e.detail.value,
113
       IsTodayStudy: e.detail.value,
111
     });
114
     });
115
+
116
+    wx.setStorageSync("IsTodayStudy", e.detail.value);
117
+
112
   },
118
   },
113
   saveCard: function () {
119
   saveCard: function () {
114
     var that = this;
120
     var that = this;
115
 
121
 
116
     if (that.data.Field[1] == "") {
122
     if (that.data.Field[1] == "") {
117
       wx.showToast({
123
       wx.showToast({
118
-        title: '请在第一段输入内容',
124
+        title: '第一段必填',
125
+        image: "../images/universalpic_wrong_white_120x120.png",
119
       });
126
       });
120
     }
127
     }
121
     else {
128
     else {
122
       var userid = app.globalData.userInfo.UserID;
129
       var userid = app.globalData.userInfo.UserID;
123
       var isTodayStudy = 0;
130
       var isTodayStudy = 0;
124
-      if (that.data.IsTodayStudy)
131
+      if (that.data.IsTodayStudy && that.data.UpdateType=="add2")
125
         isTodayStudy = 1;
132
         isTodayStudy = 1;
126
 
133
 
127
       var tags = [];
134
       var tags = [];
@@ -180,7 +187,8 @@ Page({
180
         }
187
         }
181
         else {
188
         else {
182
           wx.showToast({
189
           wx.showToast({
183
-            title: '保存成功!',
190
+            title: '已保存!',
191
+            image: "../images/universalpic_saved_white_120x120.png",
184
           });
192
           });
185
 
193
 
186
           if (that.data.UpdateType == "add2") {
194
           if (that.data.UpdateType == "add2") {

+ 3 - 1
pages/main/addItem.wxml

@@ -33,7 +33,9 @@
33
     <cover-view class="btn1 FlexRow" bindtap="addSymbol" data-id="(     )">
33
     <cover-view class="btn1 FlexRow" bindtap="addSymbol" data-id="(     )">
34
       <cover-image class="universalpic_editbar_brackets_gray" src='../images/universalpic_editbar_brackets_gray.png' />
34
       <cover-image class="universalpic_editbar_brackets_gray" src='../images/universalpic_editbar_brackets_gray.png' />
35
     </cover-view>
35
     </cover-view>
36
-    <cover-view class="btn" bindtap="addSymbol" data-id="_____">__</cover-view>
36
+    <cover-view class="btn1 FlexRow" bindtap="addSymbol" data-id="_____">
37
+      <cover-image class="universalpic_editbar_underline_gray" src='../images/universalpic_editbar_underline_gray.png' />
38
+    </cover-view>
37
     <cover-view class="btn" bindtap="addSymbol" wx:for="{{BtnArray}}" wx:key="index" data-id="{{item}}">{{item}}</cover-view>
39
     <cover-view class="btn" bindtap="addSymbol" wx:for="{{BtnArray}}" wx:key="index" data-id="{{item}}">{{item}}</cover-view>
38
     <cover-view class="btn1 FlexRow" bindtap="addSymbol" data-id="²">
40
     <cover-view class="btn1 FlexRow" bindtap="addSymbol" data-id="²">
39
       <cover-image class="universalpic_editbar_sqr_gray" src='../images/universalpic_editbar_sqr_gray.png' />
41
       <cover-image class="universalpic_editbar_sqr_gray" src='../images/universalpic_editbar_sqr_gray.png' />

+ 8 - 3
pages/main/addItem.wxss

@@ -136,6 +136,11 @@
136
   height: 26rpx;
136
   height: 26rpx;
137
 }
137
 }
138
 
138
 
139
+.universalpic_editbar_underline_gray{
140
+  width: 18rpx;
141
+  height: 28rpx;
142
+}
143
+
139
 .universalpic_editbar_sqr_gray {
144
 .universalpic_editbar_sqr_gray {
140
   width: 25rpx;
145
   width: 25rpx;
141
   height: 22rpx;
146
   height: 22rpx;
@@ -143,15 +148,15 @@
143
 
148
 
144
 .panelInput {
149
 .panelInput {
145
   width: 100%;
150
   width: 100%;
146
-  height: 300rpx;
147
-  margin-top: 20rpx;
151
+  height: 250rpx;
152
+  margin-top: 10rpx;
148
   background-color: #fff;
153
   background-color: #fff;
149
   font-size: 36rpx;
154
   font-size: 36rpx;
150
   font-weight: 400;
155
   font-weight: 400;
151
 }
156
 }
152
 
157
 
153
 .input {
158
 .input {
154
-  margin: 40rpx 30rpx 0 30rpx;
159
+  margin: 30rpx 30rpx 0 30rpx;
155
   width: 690rpx;
160
   width: 690rpx;
156
 }
161
 }
157
 
162
 

+ 1 - 3
pages/main/colorplan.wxml

@@ -1,7 +1,5 @@
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <view class="panelTitle FlexRow">
3
-    <view class="panelTitle1">学习中界面</view>
4
-  </view>
2
+  <view style='height:50rpx'></view>
5
   <view class="panelItem FlexRow">
3
   <view class="panelItem FlexRow">
6
     <view class="panelItem1">每次更换颜色</view>
4
     <view class="panelItem1">每次更换颜色</view>
7
     <view class="panelItem2 FlexRow">
5
     <view class="panelItem2 FlexRow">

+ 16 - 13
pages/main/detail.js

@@ -83,20 +83,18 @@ Page({
83
   },
83
   },
84
   onPullDownRefresh: function () {
84
   onPullDownRefresh: function () {
85
   },
85
   },
86
-  setSoundFile: function (isFinish) {//isFinish=1 结束 =0正常 =-1开始
86
+  setSoundFile: function (isFinish) {//isFinish=3搁置 =2撤退 =1结束 =0正常 =-1开始
87
     var that = this;
87
     var that = this;
88
     var url = "/pages/sounds/";
88
     var url = "/pages/sounds/";
89
     if (isFinish == 1) {
89
     if (isFinish == 1) {
90
       url += "end.mp3";
90
       url += "end.mp3";
91
-      if (wx.canIUse('setBackgroundColor')) {
92
-        wx.setBackgroundColor({
93
-          backgroundColor: "#a5656e",
94
-        });
95
-      }
96
       that.getTaskTime();
91
       that.getTaskTime();
97
     }
92
     }
93
+    else if (isFinish == 2 || isFinish==3){
94
+      url += "short3.mp3";
95
+    }
98
     else {
96
     else {
99
-      url += "short2.mp3";
97
+    url += "short2.mp3";
100
     }
98
     }
101
     if (isFinish >= 0) {
99
     if (isFinish >= 0) {
102
       innerAudioContext1.src = url;
100
       innerAudioContext1.src = url;
@@ -355,11 +353,12 @@ Page({
355
       });
353
       });
356
 
354
 
357
       wx.showToast({
355
       wx.showToast({
358
-        title: '已返回',
359
-        icon: 'none',
356
+        title: '回到上一张',
357
+        mask: true,
358
+        image:"../images/universalpic_undo_white_120x90.png",
360
       });
359
       });
361
     }
360
     }
362
-
361
+    that.setSoundFile(2);
363
   },
362
   },
364
   gotoNext: function (e) {
363
   gotoNext: function (e) {
365
     var that = this;
364
     var that = this;
@@ -447,8 +446,9 @@ Page({
447
     }
446
     }
448
     else {
447
     else {
449
       wx.showToast({
448
       wx.showToast({
450
-        title: '已搁置',
451
-        icon: 'none',
449
+        title: '今天不练',
450
+        mask: true,
451
+        image: "../images/universalpic_shelve_white_120x120.png",
452
       });
452
       });
453
     }
453
     }
454
 
454
 
@@ -532,8 +532,11 @@ Page({
532
           CanUndo: 1,
532
           CanUndo: 1,
533
         });
533
         });
534
 
534
 
535
-        if (btnnumber != "1")
535
+        if (btnnumber == "1")
536
+          that.setSoundFile(3);
537
+        else
536
           that.setSoundFile(0);
538
           that.setSoundFile(0);
539
+
537
       }
540
       }
538
     });
541
     });
539
 
542
 

+ 38 - 5
pages/main/preview.js

@@ -2,9 +2,11 @@ import common from '../../utils/util';
2
 import main from '../../utils/main';
2
 import main from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
+var iTimeout = 0;
5
 
6
 
6
 Page({
7
 Page({
7
   data: {
8
   data: {
9
+    IsExistCard:false,
8
   },
10
   },
9
   onLoad: function (options) {
11
   onLoad: function (options) {
10
     wx.hideShareMenu();
12
     wx.hideShareMenu();
@@ -35,6 +37,9 @@ Page({
35
     else
37
     else
36
       that.init();
38
       that.init();
37
   },
39
   },
40
+  onUnload:function(){
41
+    clearTimeout(iTimeout);
42
+  },
38
   init: function () {
43
   init: function () {
39
     var list = wx.getStorageSync("CardList");
44
     var list = wx.getStorageSync("CardList");
40
     var card = {};
45
     var card = {};
@@ -135,22 +140,26 @@ Page({
135
       wx.hideLoading();
140
       wx.hideLoading();
136
 
141
 
137
       var title = "题卡已存在!";
142
       var title = "题卡已存在!";
143
+      var image ="universalpic_wrong_white_120x120";
138
       if (data == 1) {
144
       if (data == 1) {
139
-        title = "收藏成功!";
145
+        title = "已保存";
146
+        image = "universalpic_saved_white_120x120";
140
       }
147
       }
141
       wx.showToast({
148
       wx.showToast({
142
         title: title,
149
         title: title,
143
         mask: true,
150
         mask: true,
144
-        duration: 3000,
151
+        image:"../images/"+image+".png",
152
+        duration: 2000,
145
         success: function () {
153
         success: function () {
146
           that.setData({
154
           that.setData({
147
-            ShowType: 'preview'
155
+            IsExistCard:true,
148
           });
156
           });
149
         }
157
         }
150
       });
158
       });
151
     });
159
     });
152
   },
160
   },
153
   playSound: function (e) {
161
   playSound: function (e) {
162
+    var that=this;
154
     var str = e.currentTarget.dataset.content;
163
     var str = e.currentTarget.dataset.content;
155
     var url;
164
     var url;
156
     if (str.indexOf("英 [") >= 0 || str.indexOf("美 [") >= 0) {
165
     if (str.indexOf("英 [") >= 0 || str.indexOf("美 [") >= 0) {
@@ -158,7 +167,7 @@ Page({
158
       str = str.replace("美 [", "[");
167
       str = str.replace("美 [", "[");
159
       url = e.currentTarget.dataset.soundmark;
168
       url = e.currentTarget.dataset.soundmark;
160
     }
169
     }
161
-    else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark == "undefined") {
170
+    else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark != "undefined") {
162
       url = e.currentTarget.dataset.soundmark;
171
       url = e.currentTarget.dataset.soundmark;
163
     }
172
     }
164
     else {
173
     else {
@@ -169,6 +178,29 @@ Page({
169
 
178
 
170
     this.audioCtx.setSrc(url);
179
     this.audioCtx.setSrc(url);
171
     this.audioCtx.play();
180
     this.audioCtx.play();
181
+
182
+    var fieldid = e.currentTarget.dataset.fieldid;
183
+    var content = that.data.Field[fieldid];
184
+    var selectIndex = 0;
185
+    for (var i = 0; i < content.length; i++) {
186
+      if (content[i].Type == 'sound') {
187
+        if (content[i].Content == e.currentTarget.dataset.content) {
188
+          content[i].SoundImageName = "gif";
189
+          selectIndex = i;
190
+          break;
191
+        }
192
+      }
193
+    }
194
+    that.setData({
195
+      Field: that.data.Field,
196
+    });
197
+    iTimeout = setTimeout(function () {
198
+      content[selectIndex].SoundImageName = "png";
199
+      that.data.Field[fieldid] = content;
200
+      that.setData({
201
+        Field: that.data.Field,
202
+      });
203
+    }, 2000);
172
   },
204
   },
173
   onMore: function () {
205
   onMore: function () {
174
     var that = this;
206
     var that = this;
@@ -224,10 +256,11 @@ Page({
224
     });
256
     });
225
   },
257
   },
226
   onPreview: function (e) {
258
   onPreview: function (e) {
259
+    clearTimeout(iTimeout);
227
     var id = e.currentTarget.dataset.id;
260
     var id = e.currentTarget.dataset.id;
228
     wx.redirectTo({
261
     wx.redirectTo({
229
       url: './preview?type=show&id=' + id,
262
       url: './preview?type=show&id=' + id,
230
-    })
263
+    });
231
   },
264
   },
232
   close: function () {
265
   close: function () {
233
     wx.navigateBack({
266
     wx.navigateBack({

+ 24 - 15
pages/main/preview.wxml

@@ -1,14 +1,17 @@
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <view class="panelTop FlexRow" wx:if="{{ShowType=='show'}}">
3
-    <view class='left FlexRow'>
4
-      <view class="text1">到期时间</view>
5
-      <view class="text2">{{LimitTimeStr}}</view>
2
+  <block wx:if="{{ShowType=='show'}}">
3
+    <view class="panelTop FlexRow">
4
+      <view class='left FlexRow'>
5
+        <view class="text1">到期时间</view>
6
+        <view class="text2">{{LimitTimeStr}}</view>
7
+      </view>
8
+      <view class='right FlexRow'>
9
+        <view class="text3" bindtap='practiceToday'>今天练</view>
10
+      </view>
6
     </view>
11
     </view>
7
-    <view class='right FlexRow'>
8
-      <view class="text3" bindtap='practiceToday'>今天练</view>
9
-    </view>
10
-  </view>
11
-  <view class='lineFooter'></view>
12
+    <view class='lineFooter'></view>
13
+    <view style='height:120rpx'></view>
14
+  </block>
12
   <view class="panelField1 FlexColumn" bindlongpress='editField' data-id="1">
15
   <view class="panelField1 FlexColumn" bindlongpress='editField' data-id="1">
13
     <view class="panelField11 panelItem FlexRow" style="font-size:{{FontSize}}rpx;">
16
     <view class="panelField11 panelItem FlexRow" style="font-size:{{FontSize}}rpx;">
14
       <block wx:for="{{Field[1]}}" wx:key="index">
17
       <block wx:for="{{Field[1]}}" wx:key="index">
@@ -23,8 +26,11 @@
23
       </block>
26
       </block>
24
       </text>
27
       </text>
25
 
28
 
26
-      <image class="universalpic_read_gray_40x40" wx:if="{{item.Type=='sound'}}" src='../images/universalpic_read_gray_40x40.png' bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" />
27
-      <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}">{{item.Content}}</text>
29
+      <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
30
+        <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
31
+      </view>
32
+
33
+      <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</text>
28
 
34
 
29
       <image class="imageBishun" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' />
35
       <image class="imageBishun" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' />
30
       </block>
36
       </block>
@@ -57,8 +63,11 @@
57
       </block>
63
       </block>
58
       </text>
64
       </text>
59
 
65
 
60
-      <image class="universalpic_read_gray_40x40" wx:if="{{item.Type=='sound'}}" src='../images/universalpic_read_gray_40x40.png' bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" />
61
-      <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}">{{item.Content}}</text>
66
+      <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">
67
+        <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
68
+      </view>
69
+
70
+      <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</text>
62
 
71
 
63
       <image class="imageBishun" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' />
72
       <image class="imageBishun" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' />
64
 
73
 
@@ -71,8 +80,8 @@
71
   <view class='panelSave' bindtap="close" wx:if="{{ShowType=='preview'}}">关闭</view>
80
   <view class='panelSave' bindtap="close" wx:if="{{ShowType=='preview'}}">关闭</view>
72
 
81
 
73
   <view class='panelSave FlexRow' wx:if="{{ShowType=='share'}}">
82
   <view class='panelSave FlexRow' wx:if="{{ShowType=='share'}}">
74
-    <view class='btn3' bindtap="close">取消</view>
75
-    <view class='btn31 btn3' bindtap="copyCard">收藏</view>
83
+    <view class='btn3' bindtap="close">首页</view>
84
+    <view class='btn31 btn3' bindtap="copyCard" wx:if="{{!IsExistCard}}">存入我的题卡</view>
76
   </view>
85
   </view>
77
 
86
 
78
   <view class='panelSave FlexRow' wx:if="{{ShowType=='show'}}">
87
   <view class='panelSave FlexRow' wx:if="{{ShowType=='show'}}">

+ 16 - 1
pages/main/preview.wxss

@@ -11,6 +11,9 @@
11
   background-color: #fff;
11
   background-color: #fff;
12
   justify-content: space-between;
12
   justify-content: space-between;
13
   font-size: 28rpx;
13
   font-size: 28rpx;
14
+  position: fixed;
15
+  top:0;
16
+  z-index: 10;
14
 }
17
 }
15
 
18
 
16
 .left {
19
 .left {
@@ -70,6 +73,19 @@
70
   margin: 0 10rpx 0 10rpx;
73
   margin: 0 10rpx 0 10rpx;
71
 }
74
 }
72
 
75
 
76
+.panelItem .panelSound {
77
+  width: 40rpx;
78
+  height: 40rpx;
79
+  margin: 0 10rpx 0 0;
80
+  background-color: #F0F0F0;
81
+  border-radius: 50%;
82
+}
83
+
84
+.panelItem .universalpic_read_mark_black_20x20 {
85
+  width: 21rpx;
86
+  height: 20rpx;
87
+}
88
+
73
 .panelItem .textLine {
89
 .panelItem .textLine {
74
   text-decoration: underline;
90
   text-decoration: underline;
75
 }
91
 }
@@ -163,7 +179,6 @@
163
   text-align: center;
179
   text-align: center;
164
   line-height: 120rpx;
180
   line-height: 120rpx;
165
   border-top: 1rpx solid #d2d2d2;
181
   border-top: 1rpx solid #d2d2d2;
166
-  justify-content: space-between;
167
 }
182
 }
168
 
183
 
169
 .btn1 {
184
 .btn1 {

+ 2 - 2
pages/main/searchCard.js

@@ -48,9 +48,9 @@ Page({
48
     main.getData(url, function (data) {
48
     main.getData(url, function (data) {
49
       wx.hideLoading();
49
       wx.hideLoading();
50
       if (data) {
50
       if (data) {
51
-        wx.setStorageSync("CardList", data);
51
+        wx.setStorageSync("CardList", data.List);
52
         wx.navigateTo({
52
         wx.navigateTo({
53
-          url: './searchCardList?type='+IsToday,
53
+          url: './searchCardList?type='+IsToday+"&Count="+data.Count,
54
         })
54
         })
55
       }
55
       }
56
     });
56
     });

+ 2 - 2
pages/main/searchCard1.js

@@ -32,9 +32,9 @@ Page({
32
 
32
 
33
       main.getData(url, function (data) {
33
       main.getData(url, function (data) {
34
         if (data) {
34
         if (data) {
35
-          wx.setStorageSync("CardList", data);
35
+          wx.setStorageSync("CardList", data.List);
36
           wx.navigateTo({
36
           wx.navigateTo({
37
-            url: './searchCardList?search=' + search,
37
+            url: './searchCardList?search=' + search+'&Count='+data.Count,
38
           })
38
           })
39
         }
39
         }
40
       });
40
       });

+ 8 - 5
pages/main/searchCardList.js

@@ -9,9 +9,6 @@ Page({
9
   onLoad: function (options) {
9
   onLoad: function (options) {
10
     wx.hideShareMenu();
10
     wx.hideShareMenu();
11
     var that = this;
11
     var that = this;
12
-    that.setData({
13
-      
14
-    });
15
 
12
 
16
     var Search="",IsToday=0;
13
     var Search="",IsToday=0;
17
 
14
 
@@ -31,6 +28,7 @@ Page({
31
     that.setData({
28
     that.setData({
32
       Search: Search,
29
       Search: Search,
33
       IsToday: IsToday,
30
       IsToday: IsToday,
31
+      Count:options.Count,
34
       Containnerheight: main.getWindowHeight(),
32
       Containnerheight: main.getWindowHeight(),
35
     });
33
     });
36
   },
34
   },
@@ -121,14 +119,19 @@ Page({
121
       if (data) {
119
       if (data) {
122
 
120
 
123
         var list = wx.getStorageSync("CardList");
121
         var list = wx.getStorageSync("CardList");
124
-        for(var i=0;i<data.length;i++){
125
-          list.push(data[i]);
122
+        for(var i=0;i<data.List.length;i++){
123
+          list.push(data.List[i]);
126
         }
124
         }
127
         wx.setStorageSync("CardList", list);
125
         wx.setStorageSync("CardList", list);
128
         that.getList();
126
         that.getList();
129
       }
127
       }
130
     });
128
     });
131
   },
129
   },
130
+  addCard:function(){
131
+    wx.redirectTo({
132
+      url: './add?type=add&id=0',
133
+    });
134
+  },
132
   onShareAppMessage: function () {
135
   onShareAppMessage: function () {
133
     return {
136
     return {
134
       title: app.globalData.ShareTitle,
137
       title: app.globalData.ShareTitle,

+ 9 - 2
pages/main/searchCardList.wxml

@@ -1,6 +1,13 @@
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelTop FlexRow">
3
+    <view class='left'>{{Count}}张题卡</view>
4
+    <view class='right FlexRow' bindtap='addCard'>
5
+      <image class="universalpic_add_gray_30x30" src='../images/universalpic_add_gray_30x30.png' />
6
+    </view>
7
+  </view>
8
+  <view class='lineFooter'></view>
2
   <block wx:if="{{List.length>0}}">
9
   <block wx:if="{{List.length>0}}">
3
-    <view style='width:100%;height:50rpx;'></view>
10
+    <view style='width:100%;height:150rpx;'></view>
4
     <block wx:for="{{List}}" wx:key="index">
11
     <block wx:for="{{List}}" wx:key="index">
5
       <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
12
       <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
6
         <view class="lineWidth720"></view>
13
         <view class="lineWidth720"></view>
@@ -31,6 +38,6 @@
31
 
38
 
32
   <block wx:if="{{List.length==0}}">
39
   <block wx:if="{{List.length==0}}">
33
     <view class='Text3'>无此题卡</view>
40
     <view class='Text3'>无此题卡</view>
34
-    <view class='Text4'>请搜索题卡文字内容</view>
41
+    <view class='Text4'>可按右上角添加</view>
35
   </block>
42
   </block>
36
 </view>
43
 </view>

+ 26 - 1
pages/main/searchCardList.wxss

@@ -5,6 +5,31 @@
5
   background-color: #F0F0F0;
5
   background-color: #F0F0F0;
6
 }
6
 }
7
 
7
 
8
+.panelTop{
9
+  width: 100%;
10
+  height:100rpx;
11
+  background-color: #fff;
12
+  font-size: 28rpx;
13
+  font-weight: 400;
14
+  justify-content: space-between;
15
+  position: fixed;
16
+  top:0;
17
+  z-index: 10;
18
+}
19
+
20
+.left{
21
+  margin-left: 30rpx;
22
+}
23
+
24
+.right{
25
+  width:90rpx;
26
+  height:100rpx;
27
+}
28
+.universalpic_add_gray_30x30{
29
+  width:30rpx;
30
+  height:30rpx;
31
+}
32
+
8
 .panelItem {
33
 .panelItem {
9
   width: 100%;
34
   width: 100%;
10
   justify-content: space-between;
35
   justify-content: space-between;
@@ -48,7 +73,7 @@
48
 }
73
 }
49
 
74
 
50
 .Text3{
75
 .Text3{
51
-  margin-top: 495rpx;
76
+  margin-top: 491rpx;
52
   font-size:32rpx;
77
   font-size:32rpx;
53
 }
78
 }
54
 .Text4{
79
 .Text4{

+ 8 - 8
pages/main/searchWeb2.js

@@ -3,7 +3,7 @@ import main from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
 var back = 3;
5
 var back = 3;
6
-var isStart;
6
+var hasStart={};
7
 
7
 
8
 Page({
8
 Page({
9
   data: {
9
   data: {
@@ -23,11 +23,7 @@ Page({
23
     if (options.back)
23
     if (options.back)
24
       back = Number(options.back);
24
       back = Number(options.back);
25
 
25
 
26
-    common.getStorageValue(this, "IsShowHelp", 0, function () {
27
-      
28
-    });
29
-
30
-    isStart = true;
26
+    hasStart = {};
31
 
27
 
32
   },
28
   },
33
   getList: function (word, type) {
29
   getList: function (word, type) {
@@ -118,6 +114,10 @@ Page({
118
     })
114
     })
119
   },
115
   },
120
   getInputData: function (e) {
116
   getInputData: function (e) {
117
+    common.getStorageValue(this, "IsShowHelp", 0, function () {
118
+
119
+    });
120
+
121
     var type = e.currentTarget.dataset.type;
121
     var type = e.currentTarget.dataset.type;
122
     var css = e.currentTarget.dataset.css;
122
     var css = e.currentTarget.dataset.css;
123
     var tag = e.currentTarget.dataset.tag;
123
     var tag = e.currentTarget.dataset.tag;
@@ -142,9 +142,9 @@ Page({
142
       }
142
       }
143
 
143
 
144
       this.data.CSS[css].Number = "1";
144
       this.data.CSS[css].Number = "1";
145
-      if (wx.getStorageSync("TempFieldNumber") && isStart) {
145
+      if (wx.getStorageSync("TempFieldNumber") && !hasStart[css]) {
146
         this.data.CSS[css].Number = Number(wx.getStorageSync("TempFieldNumber"));
146
         this.data.CSS[css].Number = Number(wx.getStorageSync("TempFieldNumber"));
147
-        isStart=false;
147
+        hasStart[css]=true;
148
       }
148
       }
149
     }
149
     }
150
     else if (this.data.CSS[css].Number == "3") {
150
     else if (this.data.CSS[css].Number == "3") {

+ 4 - 3
pages/main/setting.js

@@ -2,7 +2,8 @@ import common from '../../utils/util';
2
 import main from '../../utils/main';
2
 import main from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
-const arrSortType = ["过期时间较远的题卡", "过期时间较近的题卡"];
5
+const arrSortType = ["时间较早的题卡", "时间较近的题卡"];
6
+const arrSortType2 = ["较早的", "较近的"];
6
 var arrUserName = ["程杰", "程晟涵", "洪立人"];
7
 var arrUserName = ["程杰", "程晟涵", "洪立人"];
7
 var arrUserID = [1, 2, 3];
8
 var arrUserID = [1, 2, 3];
8
 
9
 
@@ -37,7 +38,7 @@ Page({
37
     });
38
     });
38
     common.getStorageValue(this, "SortTypeIndex", 0, function () {
39
     common.getStorageValue(this, "SortTypeIndex", 0, function () {
39
       that.setData({
40
       that.setData({
40
-        SortType: arrSortType[that.data.SortTypeIndex],
41
+        SortType: arrSortType2[that.data.SortTypeIndex],
41
       });
42
       });
42
     });
43
     });
43
     common.getStorageValue(this, "UserID", 1, function () {
44
     common.getStorageValue(this, "UserID", 1, function () {
@@ -92,7 +93,7 @@ Page({
92
       itemList: arrSortType,
93
       itemList: arrSortType,
93
       success(res) {
94
       success(res) {
94
         that.setData({
95
         that.setData({
95
-          SortType: arrSortType[res.tapIndex],
96
+          SortType: arrSortType2[res.tapIndex],
96
         });
97
         });
97
         wx.setStorageSync("SortTypeIndex", res.tapIndex);
98
         wx.setStorageSync("SortTypeIndex", res.tapIndex);
98
       },
99
       },

+ 6 - 6
pages/main/setting.wxml

@@ -8,7 +8,7 @@
8
     <view class="panelItem2 FlexRow">
8
     <view class="panelItem2 FlexRow">
9
       <picker bindchange="bindUpdateCardNumberNewMax" value="{{CardMaxNumberNewIndex}}" range="{{CardNumber}}">
9
       <picker bindchange="bindUpdateCardNumberNewMax" value="{{CardMaxNumberNewIndex}}" range="{{CardNumber}}">
10
         <view class="picker">
10
         <view class="picker">
11
-          {{CardMaxNumberNew}}
11
+          {{CardMaxNumberNew}}
12
         </view>
12
         </view>
13
       </picker>
13
       </picker>
14
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
14
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
@@ -22,7 +22,7 @@
22
     <view class="panelItem2 FlexRow">
22
     <view class="panelItem2 FlexRow">
23
       <picker bindchange="bindUpdateCardNumberHistoryMax" value="{{CardMaxNumberHistoryIndex}}" range="{{CardNumber}}">
23
       <picker bindchange="bindUpdateCardNumberHistoryMax" value="{{CardMaxNumberHistoryIndex}}" range="{{CardNumber}}">
24
         <view class="picker">
24
         <view class="picker">
25
-          {{CardMaxNumberHistory}}
25
+          {{CardMaxNumberHistory}}
26
         </view>
26
         </view>
27
       </picker>
27
       </picker>
28
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
28
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
@@ -30,11 +30,11 @@
30
   </view>
30
   </view>
31
   <view class='lineFooter'></view>
31
   <view class='lineFooter'></view>
32
   <view class="panelTitle FlexRow">
32
   <view class="panelTitle FlexRow">
33
-    <view class="panelTitle1">习内容</view>
33
+    <view class="panelTitle1">习内容</view>
34
     <view class="panelTitle2"></view>
34
     <view class="panelTitle2"></view>
35
   </view>
35
   </view>
36
   <view class="panelItem FlexRow" bindtap='setSortType'>
36
   <view class="panelItem FlexRow" bindtap='setSortType'>
37
-    <view class="panelItem1">优先安排</view>
37
+    <view class="panelItem1">当到期题卡数大于任务量时优先安排</view>
38
     <view class="panelItem2 FlexRow">
38
     <view class="panelItem2 FlexRow">
39
       <view class="picker">
39
       <view class="picker">
40
         {{SortType}}
40
         {{SortType}}
@@ -44,11 +44,11 @@
44
   </view>
44
   </view>
45
   <view class='lineFooter'></view>
45
   <view class='lineFooter'></view>
46
   <view class="panelTitle FlexRow">
46
   <view class="panelTitle FlexRow">
47
-    <view class="panelTitle1">主题色</view>
47
+    <view class="panelTitle1">辅助</view>
48
     <view class="panelTitle2"></view>
48
     <view class="panelTitle2"></view>
49
   </view>
49
   </view>
50
   <view class="panelItem FlexRow" bindtap='setColorPlan'>
50
   <view class="panelItem FlexRow" bindtap='setColorPlan'>
51
-    <view class="panelItem1">学习中界面</view>
51
+    <view class="panelItem1">学习中的主题色</view>
52
     <view class="panelItem2 FlexRow">
52
     <view class="panelItem2 FlexRow">
53
       <view class="picker">
53
       <view class="picker">
54
         {{ColorName}}
54
         {{ColorName}}

二进制
pages/sounds/short3.mp3


+ 1 - 1
project.config.json

@@ -43,7 +43,7 @@
43
 					"id": 0,
43
 					"id": 0,
44
 					"name": "分享",
44
 					"name": "分享",
45
 					"pathName": "pages/index/index",
45
 					"pathName": "pages/index/index",
46
-					"query": "UserID=1&Share=1&MiaoguoCardID=3978",
46
+					"query": "UserID=1&Share=1&MiaoguoCardID=4024",
47
 					"scene": null
47
 					"scene": null
48
 				},
48
 				},
49
 				{
49
 				{

+ 3 - 0
utils/main.js

@@ -310,6 +310,9 @@ function EncryptUrl(str) {
310
     str = str.replace(/iciba.com/g, "#####2#####");
310
     str = str.replace(/iciba.com/g, "#####2#####");
311
     str = str.replace(/kylx365.com/g, "#####3#####");
311
     str = str.replace(/kylx365.com/g, "#####3#####");
312
   }
312
   }
313
+
314
+  if (str.substr(0,1)=="\n")
315
+    str=str.substr(1);
313
   return str;
316
   return str;
314
 }
317
 }
315
 function DecryptUrl(str) {
318
 function DecryptUrl(str) {