chengjie 6 years ago
parent
commit
801cf69284

+ 1 - 1
app.js

@@ -14,7 +14,7 @@ App({
14
   },
14
   },
15
   globalData: {
15
   globalData: {
16
     Version: "1.0.0",
16
     Version: "1.0.0",
17
-    IsProduction: true,
17
+    IsProduction: false,
18
     ShareTitle: "可以用来记忆一切的工具",
18
     ShareTitle: "可以用来记忆一切的工具",
19
     SharePath: "pages/index/index",
19
     SharePath: "pages/index/index",
20
     ShareImage: '',
20
     ShareImage: '',

+ 36 - 9
pages/index/index.js

@@ -1,5 +1,5 @@
1
 import common from '../../utils/util';
1
 import common from '../../utils/util';
2
-import server from '../../utils/main';
2
+import main from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
 
5
 
@@ -61,7 +61,6 @@ Page({
61
     this.updateProgram();
61
     this.updateProgram();
62
 
62
 
63
     this.getUserInfo();
63
     this.getUserInfo();
64
-
65
   },
64
   },
66
   //得到用户信息
65
   //得到用户信息
67
   getUserInfo: function (cb) {
66
   getUserInfo: function (cb) {
@@ -117,8 +116,8 @@ Page({
117
   login: function (param) {
116
   login: function (param) {
118
     var that = this;
117
     var that = this;
119
 
118
 
120
-    server.getLocalHost(function () {
121
-      server.postData('MiaoguoLogin', {
119
+    main.getLocalHost(function () {
120
+      main.postData('MiaoguoLogin', {
122
         Code: param.Code,
121
         Code: param.Code,
123
         NickName: param.nickName,
122
         NickName: param.nickName,
124
         Language: param.language,
123
         Language: param.language,
@@ -180,10 +179,10 @@ Page({
180
           //   url: url,
179
           //   url: url,
181
           // });
180
           // });
182
 
181
 
183
-          var url = '../main/default';
182
+          var url = '../main/default?IsStart=1';
184
 
183
 
185
           if (that.data.MiaoguoCardID){
184
           if (that.data.MiaoguoCardID){
186
-            url += "?Share=1&MiaoguoCardID=" + that.data.MiaoguoCardID;
185
+            url += "&Share=1&MiaoguoCardID=" + that.data.MiaoguoCardID;
187
           }
186
           }
188
 
187
 
189
           setTimeout(function () {
188
           setTimeout(function () {
@@ -193,22 +192,50 @@ Page({
193
           }, 2000);
192
           }, 2000);
194
 
193
 
195
           that.getBaiduToken();
194
           that.getBaiduToken();
195
+          that.getTaskTodayList();
196
         }
196
         }
197
       });
197
       });
198
 
198
 
199
     });
199
     });
200
   },
200
   },
201
   getBaiduToken: function () {
201
   getBaiduToken: function () {
202
-    server.getLocalHost(function () {
203
-      server.getData('GetBaiduToken', function (data) {
202
+      main.getData('GetBaiduToken', function (data) {
204
         if (data) {
203
         if (data) {
205
           app.globalData.BaiduToken = data;
204
           app.globalData.BaiduToken = data;
206
           //console.log(app.globalData.BaiduToken);
205
           //console.log(app.globalData.BaiduToken);
207
         }
206
         }
208
       });
207
       });
209
-    });
210
   },
208
   },
209
+  //得到当天任务
210
+  getTaskTodayList: function () {
211
+    var that = this;
212
+    common.getStorageValue(that, "CardMaxNumberNew", 10, function () {
213
+      common.getStorageValue(that, "CardMaxNumberHistory", 30, function () {
214
+        common.getStorageValue(that, "SortTypeIndex", 0, function () {
215
+          var url = 'GetMiaoguoCardToday?UserID=' + app.globalData.userInfo.UserID;
216
+          url += "&New=" + that.data.CardMaxNumberNew;
217
+          url += "&History=" + that.data.CardMaxNumberHistory;
218
+          url += "&SortTypeIndex=" + that.data.SortTypeIndex;
219
+
220
+          main.getData(url, function (data) {
221
+            if (data) {
222
+              var TodayTaskNumber = data.ListNew.length + data.ListReview.length + data.ListHistory.length;
223
+              that.setData({
224
+                List: data,
225
+                DayNumber: data.DayNumber,
226
+                TodayTaskNumber: TodayTaskNumber,
227
+                IsStart: data.IsStart,
228
+              });
229
+
230
+              wx.setStorageSync("TaskToday", data);
211
 
231
 
232
+            }
233
+          });
234
+        });
235
+      });
236
+    });
237
+
238
+  },
212
   updateProgram: function () {
239
   updateProgram: function () {
213
     const updateManager = wx.getUpdateManager();
240
     const updateManager = wx.getUpdateManager();
214
 
241
 

+ 12 - 21
pages/main/add.js

@@ -7,8 +7,6 @@ var arrTag = [];
7
 
7
 
8
 Page({
8
 Page({
9
   data: {
9
   data: {
10
-    IsShowRemind: false,
11
-    IsShowRemind2: false,
12
   },
10
   },
13
   onLoad: function (options) {
11
   onLoad: function (options) {
14
     wx.hideShareMenu();
12
     wx.hideShareMenu();
@@ -49,9 +47,11 @@ Page({
49
         Tags: card.Tags,
47
         Tags: card.Tags,
50
       });
48
       });
51
 
49
 
52
-      wx.setNavigationBarTitle({
53
-        title: '编辑题卡'
54
-      });
50
+      if (that.data.UpdateType != "add2") {
51
+        wx.setNavigationBarTitle({
52
+          title: '编辑题卡'
53
+        });
54
+      }
55
 
55
 
56
       if (that.data.UpdateType == "edit3") {
56
       if (that.data.UpdateType == "edit3") {
57
         that.setData({
57
         that.setData({
@@ -60,10 +60,6 @@ Page({
60
         that.gotoAddItem({ currentTarget: { dataset: { fieldid: that.data.FieldID } } });
60
         that.gotoAddItem({ currentTarget: { dataset: { fieldid: that.data.FieldID } } });
61
       }
61
       }
62
     }
62
     }
63
-
64
-    this.setData({
65
-      IsShowRemind: false,
66
-    });
67
   },
63
   },
68
   onUnload: function () {
64
   onUnload: function () {
69
     field = [[], [], [], []];
65
     field = [[], [], [], []];
@@ -97,10 +93,10 @@ Page({
97
     })
93
     })
98
   },
94
   },
99
   onPreview: function (e) {
95
   onPreview: function (e) {
100
-    var that=this;
96
+    var that = this;
101
     if (that.data.Field[1] == "") {
97
     if (that.data.Field[1] == "") {
102
-      that.setData({
103
-        IsShowRemind: true,
98
+      wx.showToast({
99
+        title: '请在第一段输入内容',
104
       });
100
       });
105
     }
101
     }
106
     else {
102
     else {
@@ -118,8 +114,8 @@ Page({
118
     var that = this;
114
     var that = this;
119
 
115
 
120
     if (that.data.Field[1] == "") {
116
     if (that.data.Field[1] == "") {
121
-      that.setData({
122
-        IsShowRemind: true,
117
+      wx.showToast({
118
+        title: '请在第一段输入内容',
123
       });
119
       });
124
     }
120
     }
125
     else {
121
     else {
@@ -183,14 +179,9 @@ Page({
183
           that.onClose();
179
           that.onClose();
184
         }
180
         }
185
         else {
181
         else {
186
-          that.setData({
187
-            IsShowRemind2: true,
182
+          wx.showToast({
183
+            title: '保存成功!',
188
           });
184
           });
189
-          setTimeout(function () {
190
-            that.setData({
191
-              IsShowRemind2: false,
192
-            });
193
-          }, 2000);
194
 
185
 
195
           if (that.data.UpdateType == "add2") {
186
           if (that.data.UpdateType == "add2") {
196
             that.initAddCard();
187
             that.initAddCard();

+ 2 - 1
pages/main/add.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "添加题卡"
2
+  "navigationBarTitleText": "添加题卡",
3
+  "backgroundColor": "#F0F0F0"
3
 }
4
 }

+ 2 - 4
pages/main/add.wxml

@@ -21,8 +21,8 @@
21
       </view>
21
       </view>
22
       <view class="panelItem21 FlexRow">
22
       <view class="panelItem21 FlexRow">
23
         <text class="textNull" wx:if="{{!Field[itemParent] || Field[itemParent].length==0}}">
23
         <text class="textNull" wx:if="{{!Field[itemParent] || Field[itemParent].length==0}}">
24
-          <block wx:if="{{itemParent==1}}">题目,必填</block>
25
-          <block wx:if="{{itemParent==2}}">答案</block>
24
+          <block wx:if="{{itemParent==1}}">题目</block>
25
+          <block wx:if="{{itemParent==2}}">答案</block>
26
           <block wx:if="{{itemParent==3}}">其它</block>
26
           <block wx:if="{{itemParent==3}}">其它</block>
27
         </text>
27
         </text>
28
         <block wx:for="{{Field[itemParent]}}" wx:key="index">
28
         <block wx:for="{{Field[itemParent]}}" wx:key="index">
@@ -58,8 +58,6 @@
58
 
58
 
59
   <view style='height:300rpx;'></view>
59
   <view style='height:300rpx;'></view>
60
 
60
 
61
-  <view wx:if="{{IsShowRemind}}" class="remind">请在第一段输入内容</view>
62
-  <view wx:if="{{IsShowRemind2}}" class="remind1 remind">保存成功</view>
63
   <view class='panelSave FlexRow'>
61
   <view class='panelSave FlexRow'>
64
     <view class="panelSave1 FlexRow" bindtap="onSearch">
62
     <view class="panelSave1 FlexRow" bindtap="onSearch">
65
       <view class="add">+</view>  资料
63
       <view class="add">+</view>  资料

+ 6 - 16
pages/main/add.wxss

@@ -143,21 +143,6 @@
143
   margin-right: 30rpx;
143
   margin-right: 30rpx;
144
 }
144
 }
145
 
145
 
146
-.remind{
147
-  width:100%;
148
-  line-height: 60rpx;
149
-  text-align: center;
150
-  color:#fff;
151
-  background-color: #B3443B;
152
-  font-size:24rpx;
153
-  position: fixed;
154
-  bottom: 120rpx;
155
-}
156
-
157
-.remind1{
158
-  background-color: #2e2e2e;
159
-}
160
-
161
 .panelSave {
146
 .panelSave {
162
   width: 100%;
147
   width: 100%;
163
   background-color: #fff;
148
   background-color: #fff;
@@ -168,6 +153,7 @@
168
   z-index: 10;
153
   z-index: 10;
169
   color: #0071ef;
154
   color: #0071ef;
170
   justify-content: space-between;
155
   justify-content: space-between;
156
+  border-top: 1rpx solid #d2d2d2;
171
 }
157
 }
172
 
158
 
173
 .panelSave .panelSave1 {
159
 .panelSave .panelSave1 {
@@ -180,7 +166,11 @@
180
   height:80rpx;
166
   height:80rpx;
181
   border-radius: 10rpx;
167
   border-radius: 10rpx;
182
   font-size:28rpx;
168
   font-size:28rpx;
183
-  margin-left: 30rpx;
169
+  margin-left: 20rpx;
170
+}
171
+.panelSave .panelSave2 {
172
+  width: 168rpx;
173
+  justify-content: flex-end;
184
 }
174
 }
185
 
175
 
186
 .add {
176
 .add {

+ 2 - 1
pages/main/addItem.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "编辑 段落1"
2
+  "navigationBarTitleText": "编辑 段落1",
3
+  "backgroundColor": "#F0F0F0"
3
 }
4
 }

+ 1 - 1
pages/main/addItem.wxml

@@ -16,7 +16,7 @@
16
       <view class="panelSave3 panelSave1 FlexRow" bindtap="addSymbol" data-id="{{LineSign}}" wx:if="{{LineSign=='[/线]'}}">
16
       <view class="panelSave3 panelSave1 FlexRow" bindtap="addSymbol" data-id="{{LineSign}}" wx:if="{{LineSign=='[/线]'}}">
17
         <image class="universalpic_underline_end_white_30x22" src='../images/universalpic_underline_end_white_30x22.png' />
17
         <image class="universalpic_underline_end_white_30x22" src='../images/universalpic_underline_end_white_30x22.png' />
18
       </view>
18
       </view>
19
-      <image class="universalpic_help_gray_26x26" src='../images/universalpic_help_gray_26x26.png' />
19
+      <!-- <image class="universalpic_help_gray_26x26" src='../images/universalpic_help_gray_26x26.png' /> -->
20
 
20
 
21
     </view>
21
     </view>
22
     <view class='right FlexRow'>
22
     <view class='right FlexRow'>

+ 3 - 3
pages/main/cardInfo.wxml

@@ -12,7 +12,7 @@
12
     <view class="lineWidth720"></view>
12
     <view class="lineWidth720"></view>
13
   </view>
13
   </view>
14
   <view class="panelItem FlexRow">
14
   <view class="panelItem FlexRow">
15
-    <view class="panelItem1">首次练习</view>
15
+    <view class="panelItem1">首次练习</view>
16
     <view class="panelItem2 FlexRow">
16
     <view class="panelItem2 FlexRow">
17
       {{CardInfo.FirstTimeStr}}
17
       {{CardInfo.FirstTimeStr}}
18
     </view>
18
     </view>
@@ -44,7 +44,7 @@
44
     <view class="panelTitle1">进展</view>
44
     <view class="panelTitle1">进展</view>
45
   </view>
45
   </view>
46
   <view class="panelItem FlexRow">
46
   <view class="panelItem FlexRow">
47
-    <view class="panelItem1">练习数</view>
47
+    <view class="panelItem1">练习数</view>
48
     <view class="panelItem2 FlexRow">
48
     <view class="panelItem2 FlexRow">
49
       {{CardInfo.LearnNumber}}
49
       {{CardInfo.LearnNumber}}
50
     </view>
50
     </view>
@@ -53,7 +53,7 @@
53
     <view class="lineWidth720"></view>
53
     <view class="lineWidth720"></view>
54
   </view>
54
   </view>
55
   <view class="panelItem FlexRow">
55
   <view class="panelItem FlexRow">
56
-    <view class="panelItem1">总习用时</view>
56
+    <view class="panelItem1">总习用时</view>
57
     <view class="panelItem2 FlexRow">
57
     <view class="panelItem2 FlexRow">
58
       {{CardInfo.Duration}}
58
       {{CardInfo.Duration}}
59
     </view>
59
     </view>

+ 14 - 13
pages/main/colorplan.wxml

@@ -1,6 +1,6 @@
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">
2
   <view class="panelTitle FlexRow">
3
-    <view class="panelTitle1">习中界面</view>
3
+    <view class="panelTitle1">习中界面</view>
4
   </view>
4
   </view>
5
   <view class="panelItem FlexRow">
5
   <view class="panelItem FlexRow">
6
     <view class="panelItem1">每次更换颜色</view>
6
     <view class="panelItem1">每次更换颜色</view>
@@ -10,18 +10,19 @@
10
   </view>
10
   </view>
11
   <view class='lineFooter'></view>
11
   <view class='lineFooter'></view>
12
 
12
 
13
-  <view class="panelTitle FlexRow">
14
-    <view class="panelTitle1">配色</view>
15
-  </view>
16
-  <view class="panelItem FlexColumn">
17
-    <view style="height:30rpx;"></view>
18
-    <view class="{{item.SelectedCSS}} panelItem0 FlexRow"  wx:for="{{ColorList}}" wx:key="index" wx:if="{{index>0}}" bindtap="selectColor" data-index="{{index}}">
19
-      <view class='panelItem01' style='background-color:{{item.BackColor}};color:{{item.FrontColor}};'>{{item.Name}}</view>
20
-      <view class='panelItem02' style='background-color:{{item.BackColor1}};'></view>
21
-      <view class='panelItem03' style='background-color:{{item.BackColor2}};'></view>
13
+  <block wx:if="{{!IsChangeColor}}">
14
+    <view class="panelTitle FlexRow">
15
+      <view class="panelTitle1">配色</view>
22
     </view>
16
     </view>
23
-  </view>
24
-  <view class='lineFooter'></view>
25
-
17
+    <view class="panelItem FlexColumn">
18
+      <view style="height:30rpx;"></view>
19
+      <view class="{{item.SelectedCSS}} panelItem0 FlexRow" wx:for="{{ColorList}}" wx:key="index" wx:if="{{index>0}}" bindtap="selectColor" data-index="{{index}}">
20
+        <view class='panelItem01' style='background-color:{{item.BackColor}};color:{{item.FrontColor}};'>{{item.Name}}</view>
21
+        <view class='panelItem02' style='background-color:{{item.BackColor1}};'></view>
22
+        <view class='panelItem03' style='background-color:{{item.BackColor2}};'></view>
23
+      </view>
24
+    </view>
25
+    <view class='lineFooter'></view>
26
+  </block>
26
   <view style='height:100rpx'></view>
27
   <view style='height:100rpx'></view>
27
 </view>
28
 </view>

+ 40 - 38
pages/main/default.js

@@ -17,27 +17,25 @@ Page({
17
       var id = options.MiaoguoCardID;
17
       var id = options.MiaoguoCardID;
18
       wx.navigateTo({
18
       wx.navigateTo({
19
         url: './preview?type=share&id=' + id,
19
         url: './preview?type=share&id=' + id,
20
-      })
20
+      });
21
     }
21
     }
22
   },
22
   },
23
   onShow: function () {
23
   onShow: function () {
24
     var that = this;
24
     var that = this;
25
-
26
-    common.getStorageValue(that, "CardMaxNumberNew", 10, function () {
27
-      common.getStorageValue(that, "CardMaxNumberHistory", 30, function () {
28
-        common.getStorageValue(that, "SortTypeIndex", 0, function () {
29
-          that.getList();
30
-          wx.stopPullDownRefresh();
31
-        });
32
-      });
33
-    });
34
-
35
     wx.getSetting({
25
     wx.getSetting({
36
       success(res) {
26
       success(res) {
37
         if (res.authSetting['scope.userInfo']) {
27
         if (res.authSetting['scope.userInfo']) {
38
           that.setData({
28
           that.setData({
39
             IsAccredit: true,
29
             IsAccredit: true,
40
           });
30
           });
31
+
32
+          common.getStorageValue(that, "UserName", "秒过", function () {
33
+            wx.setNavigationBarTitle({
34
+              title: that.data.UserName
35
+            });
36
+          });
37
+
38
+          that.getTaskTodayList();
41
         }
39
         }
42
         else {
40
         else {
43
           wx.navigateTo({
41
           wx.navigateTo({
@@ -46,16 +44,6 @@ Page({
46
         }
44
         }
47
       }
45
       }
48
     });
46
     });
49
-
50
-    common.getStorageValue(this, "UserName", "秒过", function () {
51
-      wx.setNavigationBarTitle({
52
-        title: that.data.UserName
53
-      });
54
-    });
55
-    
56
-  },
57
-  onPullDownRefresh: function () {
58
-    this.onShow();
59
   },
47
   },
60
   goto: function (e) {
48
   goto: function (e) {
61
     var url = e.currentTarget.dataset.url;
49
     var url = e.currentTarget.dataset.url;
@@ -63,27 +51,41 @@ Page({
63
       url: './' + url,
51
       url: './' + url,
64
     })
52
     })
65
   },
53
   },
66
-  getList: function () {
54
+  //得到当天任务
55
+  getTaskTodayList: function () {
56
+    wx.showLoading({
57
+      title: '请稍候',
58
+      mask:true,
59
+    })
67
     var that = this;
60
     var that = this;
68
-    var url = 'GetMiaoguoCardToday?UserID=' + app.globalData.userInfo.UserID;
69
-    url += "&New=" + this.data.CardMaxNumberNew;
70
-    url += "&History=" + this.data.CardMaxNumberHistory;
71
-    url += "&SortTypeIndex=" + this.data.SortTypeIndex;
61
+    common.getStorageValue(that, "CardMaxNumberNew", 10, function () {
62
+      common.getStorageValue(that, "CardMaxNumberHistory", 30, function () {
63
+        common.getStorageValue(that, "SortTypeIndex", 0, function () {
64
+          var url = 'GetMiaoguoCardToday?UserID=' + app.globalData.userInfo.UserID;
65
+          url += "&New=" + that.data.CardMaxNumberNew;
66
+          url += "&History=" + that.data.CardMaxNumberHistory;
67
+          url += "&SortTypeIndex=" + that.data.SortTypeIndex;
72
 
68
 
73
-    main.getData(url, function (data) {
74
-      if (data) {
75
-        var TodayTaskNumber = data.ListNew.length + data.ListReview.length + data.ListHistory.length;
76
-        that.setData({
77
-          List: data,
78
-          DayNumber: data.DayNumber,
79
-          TodayTaskNumber: TodayTaskNumber,
80
-          IsStart:data.IsStart,
81
-        });
69
+          main.getData(url, function (data) {
70
+            wx.hideLoading();
82
 
71
 
83
-        wx.setStorageSync("TaskToday", data);
84
-        
85
-      }
72
+            if (data) {
73
+              var TodayTaskNumber = data.ListNew.length + data.ListReview.length + data.ListHistory.length;
74
+              that.setData({
75
+                List: data,
76
+                DayNumber: data.DayNumber,
77
+                TodayTaskNumber: TodayTaskNumber,
78
+                IsStart: data.IsStart,
79
+              });
80
+
81
+              wx.setStorageSync("TaskToday", data);
82
+
83
+            }
84
+          });
85
+        });
86
+      });
86
     });
87
     });
88
+    
87
   },
89
   },
88
   gotoCard: function () {
90
   gotoCard: function () {
89
     wx.redirectTo({
91
     wx.redirectTo({

+ 1 - 2
pages/main/default.json

@@ -2,6 +2,5 @@
2
   "navigationBarBackgroundColor": "#3157BA",
2
   "navigationBarBackgroundColor": "#3157BA",
3
   "navigationBarTextStyle": "white",
3
   "navigationBarTextStyle": "white",
4
   "navigationBarTitleText": "秒过",
4
   "navigationBarTitleText": "秒过",
5
-  "backgroundColor": "#3157BA",
6
-  "enablePullDownRefresh": true
5
+  "backgroundColor": "#3157BA"
7
 }
6
 }

+ 1 - 1
pages/main/default.wxml

@@ -18,7 +18,7 @@
18
     <view class='panelBottom1 FlexRow'>
18
     <view class='panelBottom1 FlexRow'>
19
       <view class='panelBottom11 FlexColumn'>
19
       <view class='panelBottom11 FlexColumn'>
20
         <image class="program_tabbar_task_default" src='../images/program_tabbar_task_normal.png' />
20
         <image class="program_tabbar_task_default" src='../images/program_tabbar_task_normal.png' />
21
-        <view class='text5'>习</view>
21
+        <view class='text5'>习</view>
22
       </view>
22
       </view>
23
       <view class='line1'></view>
23
       <view class='line1'></view>
24
       <view class='panelBottom11 FlexColumn' bindtap="goto" data-url="add?type=add&id=0">
24
       <view class='panelBottom11 FlexColumn' bindtap="goto" data-url="add?type=add&id=0">

+ 6 - 3
pages/main/default.wxss

@@ -6,7 +6,8 @@
6
 }
6
 }
7
 
7
 
8
 .panel1 {
8
 .panel1 {
9
-  margin-top: 120rpx;
9
+  position: fixed;
10
+  top:120rpx;
10
   color: #fff;
11
   color: #fff;
11
 }
12
 }
12
 
13
 
@@ -29,7 +30,8 @@
29
 .task_index_start {
30
 .task_index_start {
30
   width: 377rpx;
31
   width: 377rpx;
31
   height: 240rpx;
32
   height: 240rpx;
32
-  margin-top: 156rpx;
33
+  position: fixed;
34
+  top:523rpx;
33
 }
35
 }
34
 
36
 
35
 .panelBottom {
37
 .panelBottom {
@@ -51,6 +53,7 @@
51
   font-size:20rpx;
53
   font-size:20rpx;
52
   color:#787878;
54
   color:#787878;
53
   height:98rpx;
55
   height:98rpx;
56
+  justify-content: flex-start;
54
 }
57
 }
55
 .panelBottom1 .line1{
58
 .panelBottom1 .line1{
56
   height:98rpx;
59
   height:98rpx;
@@ -64,5 +67,5 @@
64
 .program_tabbar_task_default {
67
 .program_tabbar_task_default {
65
   width: 54rpx;
68
   width: 54rpx;
66
   height: 54rpx;
69
   height: 54rpx;
67
-  margin-bottom: 4rpx;
70
+  margin: 10rpx 0 4rpx 0;
68
 }
71
 }

+ 6 - 6
pages/main/detail.js

@@ -6,7 +6,6 @@ const app = getApp();
6
 const arrFontSize = [46, 68, 108];
6
 const arrFontSize = [46, 68, 108];
7
 
7
 
8
 var innerAudioContext1;
8
 var innerAudioContext1;
9
-var innerAudioContext2;
10
 
9
 
11
 var listTaskFinished = []; //完成的任务
10
 var listTaskFinished = []; //完成的任务
12
 var timeStart; //计算时长
11
 var timeStart; //计算时长
@@ -45,8 +44,8 @@ Page({
45
     });
44
     });
46
 
45
 
47
     innerAudioContext1 = wx.createInnerAudioContext();
46
     innerAudioContext1 = wx.createInnerAudioContext();
48
-    innerAudioContext2 = wx.createInnerAudioContext();
49
-
47
+    this.audioCtx = wx.createAudioContext('myAudio');
48
+    
50
     this.getList();
49
     this.getList();
51
 
50
 
52
     this.getColor();
51
     this.getColor();
@@ -369,6 +368,7 @@ Page({
369
 
368
 
370
     wx.showLoading({
369
     wx.showLoading({
371
       title: '请稍候',
370
       title: '请稍候',
371
+      mask: true,
372
     });
372
     });
373
 
373
 
374
     var btnnumber = e.currentTarget.dataset.btnnumber;
374
     var btnnumber = e.currentTarget.dataset.btnnumber;
@@ -577,9 +577,9 @@ Page({
577
       url = url.replace("[token]", app.globalData.BaiduToken);
577
       url = url.replace("[token]", app.globalData.BaiduToken);
578
       url = url.replace("[word]", str);
578
       url = url.replace("[word]", str);
579
     }
579
     }
580
-    innerAudioContext2.src = url;
581
-    innerAudioContext2.play();
582
-    console.log(url);
580
+    this.audioCtx.setSrc(url);
581
+    this.audioCtx.play();
582
+    //console.log(url);
583
 
583
 
584
     var fieldid = e.currentTarget.dataset.fieldid;
584
     var fieldid = e.currentTarget.dataset.fieldid;
585
     var content = TaskList[0].ContentNew.Field[fieldid];
585
     var content = TaskList[0].ContentNew.Field[fieldid];

+ 1 - 1
pages/main/detail.json

@@ -1,3 +1,3 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "习中"
2
+  "navigationBarTitleText": "习中"
3
 }
3
 }

+ 5 - 3
pages/main/detail.wxml

@@ -33,7 +33,7 @@
33
 
33
 
34
   </view>
34
   </view>
35
 
35
 
36
-  <!-- 习页 -->
36
+  <!-- 习页 -->
37
   <block wx:if="{{(NumberNew+NumberReview+NumberHistory)>0}}">
37
   <block wx:if="{{(NumberNew+NumberReview+NumberHistory)>0}}">
38
 
38
 
39
     <view class="panelField10" style='background-color:{{Color.BackColor}};'></view>
39
     <view class="panelField10" style='background-color:{{Color.BackColor}};'></view>
@@ -70,7 +70,7 @@
70
     </view>
70
     </view>
71
 
71
 
72
     <view class='right2 FlexRow' wx:if="{{IsShowAnswer[0]==0}}">
72
     <view class='right2 FlexRow' wx:if="{{IsShowAnswer[0]==0}}">
73
-      <image class="universalpic_hide_white_34x34" src='../images/universalpic_hide_white_20p_34x34.png' />
73
+      <image class="universalpic_hide_white_34x34" src='../images/universalpic_hide_{{Color.IconColor}}_20p_34x34.png' />
74
     </view>
74
     </view>
75
     <view class='right2 FlexRow' catchtap='onShowAnswer' data-start="true" wx:if="{{IsShowAnswer[0]==1}}">
75
     <view class='right2 FlexRow' catchtap='onShowAnswer' data-start="true" wx:if="{{IsShowAnswer[0]==1}}">
76
       <image class="universalpic_hide_white_34x34" src='../images/universalpic_hide_{{Color.IconColor}}_34x34.png' />
76
       <image class="universalpic_hide_white_34x34" src='../images/universalpic_hide_{{Color.IconColor}}_34x34.png' />
@@ -189,4 +189,6 @@
189
       <view>知道了</view>
189
       <view>知道了</view>
190
     </view>
190
     </view>
191
   </view>
191
   </view>
192
-</view>
192
+</view>
193
+
194
+<audio hidden='true' id="myAudio"></audio>

+ 3 - 5
pages/main/preview.js

@@ -2,7 +2,6 @@ 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 innerAudioContext1;
6
 
5
 
7
 Page({
6
 Page({
8
   data: {
7
   data: {
@@ -20,8 +19,7 @@ Page({
20
       MiaoguoCardID: id,
19
       MiaoguoCardID: id,
21
     });
20
     });
22
 
21
 
23
-    innerAudioContext1 = wx.createInnerAudioContext();
24
-
22
+    this.audioCtx = wx.createAudioContext('myAudio');
25
   },
23
   },
26
   onShow: function () {
24
   onShow: function () {
27
     var that = this;
25
     var that = this;
@@ -169,8 +167,8 @@ Page({
169
       url = url.replace("[word]", str);
167
       url = url.replace("[word]", str);
170
     }
168
     }
171
 
169
 
172
-    innerAudioContext1.src = url;
173
-    innerAudioContext1.play();
170
+    this.audioCtx.setSrc(url);
171
+    this.audioCtx.play();
174
   },
172
   },
175
   onMore: function () {
173
   onMore: function () {
176
     var that = this;
174
     var that = this;

+ 2 - 2
pages/main/preview.wxml

@@ -90,7 +90,7 @@
90
       <image class="universalpic_prev_black_30x30" src='../images/universalpic_next_black_30x30.png' />
90
       <image class="universalpic_prev_black_30x30" src='../images/universalpic_next_black_30x30.png' />
91
     </view>
91
     </view>
92
     <view class='btn1' wx:if="{{NextID==0}}"></view>
92
     <view class='btn1' wx:if="{{NextID==0}}"></view>
93
-
94
   </view>
93
   </view>
94
+</view>
95
 
95
 
96
-</view>
96
+<audio hidden='true' id="myAudio"></audio>

+ 3 - 1
pages/main/searchCard.json

@@ -1,3 +1,5 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "题卡"
2
+  "navigationBarTitleText": "题卡",
3
+  "backgroundColor": "#F0F0F0"
4
+  
3
 }
5
 }

+ 1 - 1
pages/main/searchCard.wxml

@@ -21,7 +21,7 @@
21
     <view class='panelBottom1 FlexRow'>
21
     <view class='panelBottom1 FlexRow'>
22
       <view class='panelBottom11 FlexColumn' bindtap="gotoDefault">
22
       <view class='panelBottom11 FlexColumn' bindtap="gotoDefault">
23
         <image class="program_tabbar_task_default" src='../images/program_tabbar_task_default.png' />
23
         <image class="program_tabbar_task_default" src='../images/program_tabbar_task_default.png' />
24
-        <view>习</view>
24
+        <view>习</view>
25
       </view>
25
       </view>
26
       <view class='line1'></view>
26
       <view class='line1'></view>
27
       <view class='panelBottom11 FlexColumn' bindtap="goto" data-url="add?type=add&id=0">
27
       <view class='panelBottom11 FlexColumn' bindtap="goto" data-url="add?type=add&id=0">

+ 2 - 2
pages/main/searchCard.wxss

@@ -67,7 +67,7 @@
67
   font-size:20rpx;
67
   font-size:20rpx;
68
   color:#787878;
68
   color:#787878;
69
   height:98rpx;
69
   height:98rpx;
70
-
70
+  justify-content: flex-start;
71
 }
71
 }
72
 .panelBottom1 .line1{
72
 .panelBottom1 .line1{
73
   height:98rpx;
73
   height:98rpx;
@@ -77,7 +77,7 @@
77
 .program_tabbar_task_default {
77
 .program_tabbar_task_default {
78
   width: 54rpx;
78
   width: 54rpx;
79
   height: 54rpx;
79
   height: 54rpx;
80
-  margin-bottom: 4rpx;
80
+  margin: 10rpx 0 4rpx 0;
81
 }
81
 }
82
 
82
 
83
 .text5{
83
 .text5{

+ 2 - 1
pages/main/searchCard1.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "搜索中"
2
+  "navigationBarTitleText": "搜索中",
3
+  "backgroundColor": "#F0F0F0"
3
 }
4
 }

+ 1 - 0
pages/main/searchCardList.json

@@ -1,4 +1,5 @@
1
 {
1
 {
2
   "navigationBarTitleText": "全部题卡",
2
   "navigationBarTitleText": "全部题卡",
3
+  "backgroundColor": "#F0F0F0",
3
   "enablePullDownRefresh": true
4
   "enablePullDownRefresh": true
4
 }
5
 }

+ 2 - 1
pages/main/searchWeb.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "搜索资料"
2
+  "navigationBarTitleText": "搜索资料",
3
+  "backgroundColor": "#F0F0F0"
3
 }
4
 }

+ 2 - 1
pages/main/searchWeb1.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "搜索中"
2
+  "navigationBarTitleText": "搜索中",
3
+  "backgroundColor": "#F0F0F0"
3
 }
4
 }

+ 13 - 9
pages/main/searchWeb2.js

@@ -3,6 +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
 
7
 
7
 Page({
8
 Page({
8
   data: {
9
   data: {
@@ -26,6 +27,8 @@ Page({
26
       
27
       
27
     });
28
     });
28
 
29
 
30
+    isStart = true;
31
+
29
   },
32
   },
30
   getList: function (word, type) {
33
   getList: function (word, type) {
31
 
34
 
@@ -139,8 +142,9 @@ Page({
139
       }
142
       }
140
 
143
 
141
       this.data.CSS[css].Number = "1";
144
       this.data.CSS[css].Number = "1";
142
-      if (wx.getStorageSync("TempFieldNumber")) {
145
+      if (wx.getStorageSync("TempFieldNumber") && isStart) {
143
         this.data.CSS[css].Number = Number(wx.getStorageSync("TempFieldNumber"));
146
         this.data.CSS[css].Number = Number(wx.getStorageSync("TempFieldNumber"));
147
+        isStart=false;
144
       }
148
       }
145
     }
149
     }
146
     else if (this.data.CSS[css].Number == "3") {
150
     else if (this.data.CSS[css].Number == "3") {
@@ -153,14 +157,14 @@ Page({
153
     }
157
     }
154
     else {
158
     else {
155
       this.data.CSS[css].Number = Number(this.data.CSS[css].Number) + 1;
159
       this.data.CSS[css].Number = Number(this.data.CSS[css].Number) + 1;
156
-      if (wx.getStorageSync("TempFieldNumber")) {
157
-        this.data.CSS[css].Css1 = "";
158
-        this.data.CSS[css].Css2 = "";
159
-        this.data.CSS[css].Number = "";
160
-        this.data.CSS[css].Content = "";
161
-        this.data.CSS[css].Type = "";
162
-        this.data.CSS[css].Tag = "";
163
-      }
160
+      //if (wx.getStorageSync("TempFieldNumber")) {
161
+        // this.data.CSS[css].Css1 = "";
162
+        // this.data.CSS[css].Css2 = "";
163
+        // this.data.CSS[css].Number = "";
164
+        // this.data.CSS[css].Content = "";
165
+        // this.data.CSS[css].Type = "";
166
+        // this.data.CSS[css].Tag = "";
167
+      //}
164
     }
168
     }
165
 
169
 
166
     this.setData({
170
     this.setData({

+ 2 - 1
pages/main/searchWeb2.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "资料"
2
+  "navigationBarTitleText": "资料",
3
+  "backgroundColor": "#F0F0F0"
3
 }
4
 }

+ 2 - 1
pages/main/setting.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "练习方案"
2
+  "navigationBarTitleText": "练习方案",
3
+  "backgroundColor": "#F0F0F0"
3
 }
4
 }

+ 1 - 1
pages/main/setting.wxml

@@ -48,7 +48,7 @@
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}}