chengjie 6 vuotta sitten
vanhempi
commit
a422caf39f
47 muutettua tiedostoa jossa 966 lisäystä ja 537 poistoa
  1. 1 1
      app.json
  2. BIN
      pages/images/universalpic_hide_black_20p_34x34.png
  3. 0 0
      pages/images/universalpic_hide_black_34x34.png
  4. BIN
      pages/images/universalpic_hide_white_20p_34x34.png
  5. 0 0
      pages/images/universalpic_hide_white_34x34.png
  6. BIN
      pages/images/universalpic_shelve_black_26x26.png
  7. BIN
      pages/images/universalpic_shelve_black_46x24.png
  8. BIN
      pages/images/universalpic_shelve_white_26x26.png
  9. BIN
      pages/images/universalpic_undo_black_26x20.png
  10. BIN
      pages/images/universalpic_undo_black_30p_26x20.png
  11. BIN
      pages/images/universalpic_undo_white_30p_26x20.png
  12. 1 1
      pages/index/index.js
  13. 1 1
      pages/index/index.wxml
  14. 1 0
      pages/index/index.wxss
  15. 28 20
      pages/main/add.js
  16. 1 1
      pages/main/add.json
  17. 3 8
      pages/main/add.wxss
  18. 77 52
      pages/main/addItem.js
  19. 3 3
      pages/main/addItem.wxml
  20. 1 1
      pages/main/cardInfo.wxml
  21. 82 0
      pages/main/colorplan.js
  22. 3 0
      pages/main/colorplan.json
  23. 27 0
      pages/main/colorplan.wxml
  24. 65 0
      pages/main/colorplan.wxss
  25. 1 3
      pages/main/default.js
  26. 1 1
      pages/main/default.wxml
  27. 127 74
      pages/main/detail.js
  28. 1 6
      pages/main/detail.json
  29. 40 39
      pages/main/detail.wxml
  30. 38 61
      pages/main/detail.wxss
  31. 47 6
      pages/main/preview.js
  32. 29 23
      pages/main/preview.wxml
  33. 62 23
      pages/main/preview.wxss
  34. 1 1
      pages/main/searchCard.json
  35. 3 3
      pages/main/searchCard.wxml
  36. 1 1
      pages/main/searchCardList.json
  37. 2 2
      pages/main/searchCardList.wxml
  38. 17 0
      pages/main/searchWeb.js
  39. 6 3
      pages/main/searchWeb.wxml
  40. 17 1
      pages/main/searchWeb.wxss
  41. 16 0
      pages/main/searchWeb2.js
  42. 36 7
      pages/main/searchWeb2.wxml
  43. 65 0
      pages/main/searchWeb2.wxss
  44. 28 11
      pages/main/setting.js
  45. 25 10
      pages/main/setting.wxml
  46. 8 1
      project.config.json
  47. 101 173
      utils/main.js

+ 1 - 1
app.json

@@ -14,6 +14,7 @@
14 14
     "pages/main/searchWeb1",
15 15
     "pages/main/searchWeb",
16 16
     "pages/main/detail",
17
+    "pages/main/colorplan",
17 18
     "pages/main/setting"
18 19
   ],
19 20
   "window": {
@@ -21,7 +22,6 @@
21 22
     "navigationBarTitleText": "秒过",
22 23
     "navigationBarTextStyle": "black",
23 24
     "backgroundColor": "#ffffff",
24
-    "disableScroll": false,
25 25
     "enablePullDownRefresh": false
26 26
   },
27 27
   "navigateToMiniProgramAppIdList": [

BIN
pages/images/universalpic_hide_black_20p_34x34.png


pages/images/universalpic_shelve_black_30x14.png → pages/images/universalpic_hide_black_34x34.png


BIN
pages/images/universalpic_hide_white_20p_34x34.png


pages/images/universalpic_shelve_white_30x14.png → pages/images/universalpic_hide_white_34x34.png


BIN
pages/images/universalpic_shelve_black_26x26.png


BIN
pages/images/universalpic_shelve_black_46x24.png


BIN
pages/images/universalpic_shelve_white_26x26.png


BIN
pages/images/universalpic_undo_black_26x20.png


BIN
pages/images/universalpic_undo_black_30p_26x20.png


BIN
pages/images/universalpic_undo_white_30p_26x20.png


+ 1 - 1
pages/index/index.js

@@ -213,7 +213,7 @@ Page({
213 213
 
214 214
     updateManager.onCheckForUpdate(function (res) {
215 215
       // 请求完新版本信息的回调
216
-      console.log(res.hasUpdate)
216
+      //console.log(res.hasUpdate)
217 217
     });
218 218
 
219 219
     updateManager.onUpdateReady(function () {

+ 1 - 1
pages/index/index.wxml

@@ -1,4 +1,4 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2 2
   <image src='../images/program_start_footer.png' class="program_start_footer" />
3
-  <view class="text1">可以用来记忆一切的工具</view>  
3
+  <text class="text1">荀子曰:\n君子博学而日参省乎己,\n则知明而行无过矣</text>  
4 4
 </view>

+ 1 - 0
pages/index/index.wxss

@@ -16,4 +16,5 @@
16 16
   font-size:26rpx;
17 17
   position: fixed;
18 18
   top:130rpx;
19
+  text-align: center;
19 20
 }

+ 28 - 20
pages/main/add.js

@@ -23,12 +23,12 @@ Page({
23 23
       MiaoguoCardID: options.id,
24 24
       FieldID: fieldid,
25 25
     });
26
-    
26
+
27 27
     wx.setStorageSync("TempMiaoguoCardID", that.data.MiaoguoCardID);
28 28
   },
29 29
   onShow: function () {
30 30
     var that = this;
31
-    
31
+
32 32
     if (that.data.UpdateType == "add") {
33 33
       that.initAddCard();
34 34
     }
@@ -50,14 +50,14 @@ Page({
50 50
       });
51 51
 
52 52
       wx.setNavigationBarTitle({
53
-        title: '编辑笔记'
53
+        title: '编辑题卡'
54 54
       });
55 55
 
56
-      if (that.data.UpdateType=="edit3"){
56
+      if (that.data.UpdateType == "edit3") {
57 57
         that.setData({
58
-          UpdateType:"edit2",
58
+          UpdateType: "edit2",
59 59
         });
60
-        that.gotoAddItem({currentTarget:{dataset:{fieldid:that.data.FieldID}}});
60
+        that.gotoAddItem({ currentTarget: { dataset: { fieldid: that.data.FieldID } } });
61 61
       }
62 62
     }
63 63
 
@@ -68,11 +68,11 @@ Page({
68 68
   onUnload: function () {
69 69
     field = [[], [], [], []];
70 70
     var card = wx.getStorageSync("TempCardInfo");
71
-    if (card){
71
+    if (card) {
72 72
       var list = wx.getStorageSync("CardList");
73 73
       for (var i = 0; i < list.length; i++) {
74 74
         if (this.data.MiaoguoCardID == list[i].MiaoguoCardID) {
75
-          list[i]=card;
75
+          list[i] = card;
76 76
           break;
77 77
         }
78 78
       }
@@ -97,9 +97,17 @@ Page({
97 97
     })
98 98
   },
99 99
   onPreview: function (e) {
100
-    wx.navigateTo({
101
-      url: './preview?type=preview&id='+this.data.MiaoguoCardID,
102
-    })
100
+    var that=this;
101
+    if (that.data.Field[1] == "") {
102
+      that.setData({
103
+        IsShowRemind: true,
104
+      });
105
+    }
106
+    else {
107
+      wx.navigateTo({
108
+        url: './preview?type=preview&id=' + this.data.MiaoguoCardID,
109
+      });
110
+    }
103 111
   },
104 112
   switch1Change(e) {
105 113
     this.setData({
@@ -120,8 +128,8 @@ Page({
120 128
       if (that.data.IsTodayStudy)
121 129
         isTodayStudy = 1;
122 130
 
123
-      var tags=[];
124
-      for(var i=0;i<that.data.Tags.length;i++){
131
+      var tags = [];
132
+      for (var i = 0; i < that.data.Tags.length; i++) {
125 133
         if (that.data.Tags[i])
126 134
           tags.push(that.data.Tags[i]);
127 135
       }
@@ -141,10 +149,10 @@ Page({
141 149
             str = "[图]" + item.Content + "[/图]";
142 150
           }
143 151
           else if (item.Type == "line") {
144
-            for(var j=0;j<item.Content.length;j++){
145
-              if (item.Content[j].key=="normal")
152
+            for (var j = 0; j < item.Content.length; j++) {
153
+              if (item.Content[j].key == "normal")
146 154
                 str += item.Content[j].value;
147
-              if (item.Content[j].key == "line"){
155
+              if (item.Content[j].key == "line") {
148 156
                 str += "[线]" + item.Content[j].value + "[/线]";
149 157
               }
150 158
             }
@@ -174,7 +182,7 @@ Page({
174 182
           that.saveNewData();
175 183
           that.onClose();
176 184
         }
177
-        else{
185
+        else {
178 186
           that.setData({
179 187
             IsShowRemind2: true,
180 188
           });
@@ -183,7 +191,7 @@ Page({
183 191
               IsShowRemind2: false,
184 192
             });
185 193
           }, 2000);
186
-          
194
+
187 195
           if (that.data.UpdateType == "add2") {
188 196
             that.initAddCard();
189 197
           }
@@ -197,7 +205,7 @@ Page({
197 205
       });
198 206
     }
199 207
   },
200
-  saveNewData:function(){
208
+  saveNewData: function () {
201 209
     var list = wx.getStorageSync("CardList");
202 210
     for (var i = 0; i < list.length; i++) {
203 211
       if (this.data.MiaoguoCardID == list[i].MiaoguoCardID) {
@@ -206,7 +214,7 @@ Page({
206 214
       }
207 215
     }
208 216
   },
209
-  initAddCard:function(){
217
+  initAddCard: function () {
210 218
     var card = {};
211 219
     card.MiaoguoCardID = 0;
212 220
     card.Content = [];

+ 1 - 1
pages/main/add.json

@@ -1,3 +1,3 @@
1 1
 {
2
-  "navigationBarTitleText": "添加笔记"
2
+  "navigationBarTitleText": "添加题卡"
3 3
 }

+ 3 - 8
pages/main/add.wxss

@@ -14,14 +14,9 @@
14 14
 }
15 15
 
16 16
 .panelTag .tag{
17
-  font-size: 24rpx;
18
-  background-color: #1e1e1e;
19
-  color:#fff;
20
-  text-align: center;
21
-  line-height: 45rpx;
22
-  padding: 0 20rpx;
23
-  border-radius: 30rpx;
24
-  margin-left: 10rpx;
17
+  font-size: 28rpx;
18
+  color:#787878;
19
+  margin-left: 20rpx;
25 20
 }
26 21
 
27 22
 .panelTitle {

+ 77 - 52
pages/main/addItem.js

@@ -5,8 +5,10 @@ const app = getApp();
5 5
 
6 6
 var field = "";
7 7
 var tempCursor = 0, btnName = "";
8
-var arrSoundMark=[];
9
-var isUpload=true;
8
+var arrSoundMark = [];
9
+var isUpload = true;
10
+
11
+var isEdit = true;
10 12
 
11 13
 Page({
12 14
   data: {
@@ -19,10 +21,10 @@ Page({
19 21
     wx.hideShareMenu();
20 22
     var id = options.id;
21 23
     var fieldid = options.fieldid;
22
-     
24
+
23 25
     var that = this;
24 26
     that.setData({
25
-      MiaoguoCardID:id,
27
+      MiaoguoCardID: id,
26 28
       Focus: true,
27 29
       FieldNumber: fieldid,
28 30
       Containnerheight: main.getWindowHeight(),
@@ -34,7 +36,7 @@ Page({
34 36
   onShow: function () {
35 37
     var that = this;
36 38
     var list = wx.getStorageSync("CardList");
37
-    
39
+
38 40
     var card = {};
39 41
     for (var i = 0; i < list.length; i++) {
40 42
       if (that.data.MiaoguoCardID == list[i].MiaoguoCardID) {
@@ -43,7 +45,7 @@ Page({
43 45
           Field: content,
44 46
         });
45 47
 
46
-        if (!wx.getStorageSync("TempCardInfoAddItem")){
48
+        if (!wx.getStorageSync("TempCardInfoAddItem")) {
47 49
           wx.setStorageSync("TempCardInfoAddItem", content);
48 50
         }
49 51
 
@@ -51,22 +53,25 @@ Page({
51 53
       }
52 54
     }
53 55
 
54
-    isUpload=true;
56
+    isUpload = true;
55 57
   },
56
-  onUnload:function(){
57
-    if (isUpload){
58
+  onUnload: function () {
59
+    if (isUpload) {
58 60
       var content = wx.getStorageSync("TempCardInfoAddItem");
59
-      if (content!=undefined){
61
+      if (content != undefined) {
60 62
         this.updateField(content);
61 63
         wx.removeStorageSync("TempCardInfoAddItem");
62 64
       }
63 65
     }
64 66
   },
65 67
   bindinputField: function (e) {
66
-    field = e.detail.value;
67
-    this.setData({
68
-      Field: e.detail.value,
69
-    });
68
+    if (isEdit) {
69
+      field = e.detail.value;
70
+      this.setData({
71
+        Field: e.detail.value,
72
+      });
73
+      //console.log("bindinputField:" + field);
74
+    }
70 75
   },
71 76
   addSymbol: function (e) {
72 77
     btnName = e.currentTarget.dataset.id;
@@ -79,11 +84,8 @@ Page({
79 84
       this.setData({
80 85
         SoundSign: "[读]",
81 86
       });
82
-    } 
83
-  },
84
-  addLine: function (e) {
85
-    btnName = e.currentTarget.dataset.id;
86
-    if (btnName == "[线]") {
87
+    }
88
+    else if (btnName == "[线]") {
87 89
       this.setData({
88 90
         LineSign: "[/线]",
89 91
       });
@@ -93,40 +95,63 @@ Page({
93 95
         LineSign: "[线]",
94 96
       });
95 97
     }
96
-  },
97
-  onBindblur: function (e) {
98
-    //console.log(e);
99
-    tempCursor = e.detail.cursor;
100
-    //console.log("tempCursor:" + tempCursor);
101
-
102
-    if (tempCursor == undefined)
103
-      tempCursor = this.data["Field"].length;
104
-    var str1 = "", str2 = "";
105
-    if (this.data.Field.length > 0) {
106
-      str1 = this.data.Field.substr(0, tempCursor);
107
-      str2 = this.data.Field.substring(tempCursor, this.data.Field.length);
108
-    }
109
-    //console.log("str1:" + str1);
110
-    //console.log("str2:" + str2);
111
-    var cur = 1;
112
-    if (btnName == "[读]") {
113
-      cur = 3;
114
-    }
115
-    else if (btnName == "[/读]") {
116
-      cur = 4;
117
-    }
118
-    else if (btnName == "[线]") {
119
-      cur = 3;
120
-    }
121
-    else if (btnName == "[/线]") {
122
-      cur = 4;
98
+
99
+    if (!this.data.Focus){
100
+      field=field+btnName;
101
+      this.setData({
102
+        Field: field,
103
+      });
123 104
     }
105
+    //console.log("addSymbol:" + field); 
106
+  },
107
+  onBindFocus:function(){
124 108
     this.setData({
125
-      Field: str1 + btnName + str2,
126
-      Cursor: tempCursor + cur,
109
+      Focus: true,
127 110
     });
111
+  },
112
+  onBindblur: function (e) {
113
+    //console.log("onBindblur:" + field + " btnName:" + btnName);
114
+    if (isEdit) {
115
+      var systemInfo = wx.getSystemInfoSync();
116
+      if (systemInfo.system && systemInfo.system.indexOf("Android") >= 0) {
117
+        isEdit = false;
118
+      }
128 119
 
129
-    btnName = "";
120
+      //console.log(e);
121
+      tempCursor = e.detail.cursor;
122
+      //console.log("tempCursor:" + tempCursor);
123
+      if (tempCursor == undefined)
124
+        tempCursor = this.data["Field"].length;
125
+      var str1 = "", str2 = "";
126
+      if (this.data.Field.length > 0) {
127
+        str1 = this.data.Field.substr(0, tempCursor);
128
+        str2 = this.data.Field.substring(tempCursor, this.data.Field.length);
129
+      }
130
+      //console.log("str1:" + str1);
131
+      //console.log("str2:" + str2);
132
+      var cur = 1;
133
+      if (btnName == "[读]" || btnName == "[线]") {
134
+        cur = 3;
135
+      }
136
+      else if (btnName == "[/读]" || btnName == "[/线]") {
137
+        cur = 4;
138
+      }
139
+
140
+      field = str1 + btnName + str2;
141
+      this.setData({
142
+        Field: field,
143
+        Focus:false,
144
+        Cursor: tempCursor + cur,
145
+      });
146
+
147
+      btnName = "";
148
+
149
+      if (systemInfo.system && systemInfo.system.indexOf("Android") >= 0) {
150
+        setTimeout(function () {
151
+          isEdit = true;
152
+        }, 500);
153
+      }
154
+    }
130 155
   },
131 156
   onSearch: function (e) {
132 157
     wx.setStorageSync("TempFieldNumber", this.data.FieldNumber);
@@ -145,7 +170,7 @@ Page({
145 170
   },
146 171
   closeAddItem: function (e) {
147 172
     var isSave = e.currentTarget.dataset.idsave;
148
-    if (isSave=="true") {
173
+    if (isSave == "true") {
149 174
       isUpload = false;
150 175
       wx.removeStorageSync("TempCardInfoAddItem");
151 176
       this.updateField();
@@ -154,7 +179,7 @@ Page({
154 179
       delta: 1,
155 180
     });
156 181
   },
157
-  updateField:function(history){
182
+  updateField: function (history) {
158 183
     var str = this.data.Field;
159 184
     str = main.decryptUrl(str);
160 185
 
@@ -167,7 +192,7 @@ Page({
167 192
     var list = wx.getStorageSync("CardList");
168 193
     for (var i = 0; i < list.length; i++) {
169 194
       if (this.data.MiaoguoCardID == list[i].MiaoguoCardID) {
170
-        if (history!=undefined)
195
+        if (history != undefined)
171 196
           list[i].Content[this.data.FieldNumber].Content = history;
172 197
         else
173 198
           list[i].Content[this.data.FieldNumber].Content = str;

+ 3 - 3
pages/main/addItem.wxml

@@ -10,10 +10,10 @@
10 10
       <view class="panelSave3 panelSave1 FlexRow" bindtap="addSymbol" data-id="{{SoundSign}}" wx:if="{{SoundSign=='[/读]'}}">
11 11
         <image class="universalpic_read_end_white_38x22" src='../images/universalpic_read_end_white_38x22.png' />
12 12
       </view>
13
-      <view class="panelSave2 panelSave1 FlexRow" bindtap="addLine" data-id="{{LineSign}}" wx:if="{{LineSign=='[线]'}}">
13
+      <view class="panelSave2 panelSave1 FlexRow" bindtap="addSymbol" data-id="{{LineSign}}" wx:if="{{LineSign=='[线]'}}">
14 14
         <image class="universalpic_editbar_underline_gray_14x20" src='../images/universalpic_editbar_underline_gray_14x20.png' />
15 15
       </view>
16
-      <view class="panelSave3 panelSave1 FlexRow" bindtap="addLine" data-id="{{LineSign}}" wx:if="{{LineSign=='[/线]'}}">
16
+      <view class="panelSave3 panelSave1 FlexRow" bindtap="addSymbol" data-id="{{LineSign}}" wx:if="{{LineSign=='[/线]'}}">
17 17
         <image class="universalpic_underline_end_white_30x22" src='../images/universalpic_underline_end_white_30x22.png' />
18 18
       </view>
19 19
       <image class="universalpic_help_gray_26x26" src='../images/universalpic_help_gray_26x26.png' />
@@ -25,7 +25,7 @@
25 25
   </view>
26 26
   <view class='lineFooter'></view>
27 27
   <view class='panelInput'>
28
-    <textarea class="input" maxlength='-1' bindinput="bindinputField" show-confirm-bar="true" value="{{Field}}" focus="{{Focus}}" cursor="{{Cursor}}" bindblur="onBindblur" data-id='{{FieldNumber}}' />
28
+    <textarea class="input" maxlength='-1' show-confirm-bar="true" value="{{Field}}" focus="{{Focus}}" cursor="{{Cursor}}" bindinput="bindinputField" bindblur="onBindblur" bindfocus="onBindFocus" data-id='{{FieldNumber}}' />
29 29
   </view>
30 30
   <cover-view class='lineFooter'></cover-view>
31 31
   <cover-view class="panelTag0 panelTag FlexRow">

+ 1 - 1
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>

+ 82 - 0
pages/main/colorplan.js

@@ -0,0 +1,82 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+  },
9
+  onLoad: function (options) {
10
+    wx.hideShareMenu();
11
+    var that = this;
12
+    that.setData({
13
+      Containnerheight: main.getWindowHeight(),
14
+    });
15
+
16
+    that.init(options.id);
17
+  },
18
+  init: function (id) {
19
+    var that = this;
20
+    var arr = main.getDetailColor(-1);
21
+
22
+
23
+    common.getStorageValue(this, "ColorIndex", 0, function () {
24
+      var isChangeColor = false;
25
+      if (that.data.ColorIndex == 0)
26
+        isChangeColor = true;
27
+      else {
28
+        for (var i = 1; i < arr.length; i++) {
29
+          arr[i].SelectedCSS = "";
30
+          if (that.data.ColorIndex == i) {
31
+            arr[i].SelectedCSS = "panelItemSelected";
32
+          }
33
+        }
34
+      }
35
+      that.setData({
36
+        ColorList: arr,
37
+        IsChangeColor: isChangeColor,
38
+      });
39
+    });
40
+  },
41
+  switch1Change(e) {
42
+    var that = this;
43
+    that.data.IsChangeColor = e.detail.value;
44
+    for (var i = 0; i < that.data.ColorList.length; i++) {
45
+      that.data.ColorList[i].SelectedCSS = "";
46
+      if (!that.data.IsChangeColor && i == 1) {
47
+        that.data.ColorList[i].SelectedCSS = "panelItemSelected";
48
+      }
49
+    }
50
+    that.setData({
51
+      ColorList: that.data.ColorList,
52
+      IsChangeColor: that.data.IsChangeColor,
53
+    });
54
+    var index = 1;
55
+    if (that.data.IsChangeColor)
56
+      index = 0;
57
+    wx.setStorageSync("ColorIndex", index);
58
+  },
59
+  selectColor: function (e) {
60
+    var that = this;
61
+    var index = e.currentTarget.dataset.index;
62
+    for (var i = 0; i < that.data.ColorList.length; i++) {
63
+      that.data.ColorList[i].SelectedCSS = "";
64
+      if (i == index) {
65
+        that.data.ColorList[i].SelectedCSS = "panelItemSelected";
66
+      }
67
+    }
68
+    that.setData({
69
+      ColorList: that.data.ColorList,
70
+      IsChangeColor: false,
71
+    });
72
+
73
+    wx.setStorageSync("ColorIndex", index);
74
+  },
75
+  onShareAppMessage: function () {
76
+    return {
77
+      title: app.globalData.ShareTitle,
78
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
79
+      imageUrl: app.globalData.ShareImage,
80
+    }
81
+  },
82
+})

+ 3 - 0
pages/main/colorplan.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "主题色"
3
+}

+ 27 - 0
pages/main/colorplan.wxml

@@ -0,0 +1,27 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelTitle FlexRow">
3
+    <view class="panelTitle1">练习中界面</view>
4
+  </view>
5
+  <view class="panelItem FlexRow">
6
+    <view class="panelItem1">每次更换颜色</view>
7
+    <view class="panelItem2 FlexRow">
8
+      <switch checked="{{IsChangeColor}}" bindchange="switch1Change" />
9
+    </view>
10
+  </view>
11
+  <view class='lineFooter'></view>
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>
22
+    </view>
23
+  </view>
24
+  <view class='lineFooter'></view>
25
+
26
+  <view style='height:100rpx'></view>
27
+</view>

+ 65 - 0
pages/main/colorplan.wxss

@@ -0,0 +1,65 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color:#1e1e1e;
4
+  font-weight: 500;
5
+  justify-content: flex-start;
6
+}
7
+
8
+.panelTitle{
9
+  width:100%;
10
+  margin-top: 50rpx;
11
+  justify-content: flex-start;
12
+}
13
+.panelTitle .panelTitle1{
14
+  font-size:32rpx;
15
+  margin-left: 30rpx;
16
+  margin-bottom: 30rpx;
17
+}
18
+
19
+.panelItem{
20
+  width:100%;
21
+  justify-content: space-between;
22
+  font-size:28rpx;
23
+  min-height:100rpx;
24
+  background-color: #fff;
25
+}
26
+
27
+.panelItem0{
28
+  width:690rpx;
29
+  height:100rpx;
30
+  border-radius: 10rpx;
31
+  margin-bottom: 30rpx;
32
+  border:1rpx solid #E3E3E3;
33
+}
34
+
35
+.panelItemSelected{
36
+  border:5rpx solid #fff;
37
+  box-shadow:0 0 0 3px #1e1e1e;
38
+}
39
+
40
+.panelItem01{
41
+  width:360rpx;
42
+  line-height: 100rpx;
43
+  padding-left: 30rpx;
44
+  font-weight: 400;
45
+  border-top-left-radius: 10rpx;
46
+  border-bottom-left-radius: 10rpx;
47
+}
48
+.panelItem02{
49
+  width:230rpx;
50
+  height:100rpx;
51
+}
52
+.panelItem03{
53
+  width:100rpx;
54
+  height:100rpx;
55
+  border-top-right-radius: 10rpx;
56
+  border-bottom-right-radius: 10rpx;
57
+}
58
+
59
+.panelItem .panelItem1{
60
+  margin-left: 30rpx;
61
+  font-weight: 400;
62
+}
63
+.panelItem .panelItem2{
64
+  margin-right: 30rpx;
65
+}

+ 1 - 3
pages/main/default.js

@@ -81,9 +81,7 @@ Page({
81 81
         });
82 82
 
83 83
         wx.setStorageSync("TaskToday", data);
84
-        main.getData("GetBaiduToken", function (data) {
85
-          app.globalData.BaiduToken = data;
86
-        });
84
+        
87 85
       }
88 86
     });
89 87
   },

+ 1 - 1
pages/main/default.wxml

@@ -28,7 +28,7 @@
28 28
       <view class='line1'></view>
29 29
       <view class='panelBottom11 FlexColumn' bindtap='gotoCard'>
30 30
         <image class="program_tabbar_task_default" src='../images/program_tabbar_note_default.png' />
31
-        <view>笔记</view>
31
+        <view>题卡</view>
32 32
       </view>
33 33
 
34 34
     </view>

+ 127 - 74
pages/main/detail.js

@@ -3,14 +3,14 @@ import main from '../../utils/main';
3 3
 
4 4
 const app = getApp();
5 5
 
6
-const arrFontSize=[46,68,108];
6
+const arrFontSize = [46, 68, 108];
7 7
 
8 8
 var innerAudioContext1;
9
+var innerAudioContext2;
9 10
 
10 11
 var listTaskFinished = []; //完成的任务
11
-var listTaskReview = []; //需重新复习的任务
12 12
 var timeStart; //计算时长
13
-var TaskList=[];
13
+var TaskList = [];
14 14
 
15 15
 Page({
16 16
   data: {
@@ -18,6 +18,21 @@ Page({
18 18
     NumberReview: 0,
19 19
     NumberHistory: 30,
20 20
     IsShowNumberInfo: false,
21
+    TaskInfo:{},
22
+    Color: {//配色1
23
+      Name: "黑白",
24
+      BackColor: "#ffffff",
25
+      BackColor1: "#D2D2D2",
26
+      FrontColor: "#1E1E1E",
27
+      FrontColor1: "rgba(0,0,0,0.3)",
28
+      BackColor2: "#E3E3E3",
29
+      BackColor20: 'rgba(227,227,227,0)',
30
+      FrontColor2: "#1E1E1E",
31
+      TagColor: "#9B9B9B",
32
+      FieldLineColor: "#4B3840",
33
+      IconColor: "black",
34
+      FrontColorNavigationBar: "#000000",
35
+    },
21 36
   },
22 37
   onLoad: function () {
23 38
     wx.hideShareMenu();
@@ -29,10 +44,11 @@ Page({
29 44
     });
30 45
 
31 46
     innerAudioContext1 = wx.createInnerAudioContext();
32
-    this.audioCtx = wx.createAudioContext('playAudio');
47
+    innerAudioContext2 = wx.createInnerAudioContext();
33 48
 
34 49
     this.getList();
35 50
 
51
+    this.getColor();
36 52
   },
37 53
   onShow: function () {
38 54
     var that = this;
@@ -43,26 +59,26 @@ Page({
43 59
       listTaskFinished = [];
44 60
       that.setSoundFile(1);
45 61
     }
46
-    else{
62
+    else {
47 63
       that.setSoundFile(-1);
48 64
 
49
-      
65
+
50 66
       var list = wx.getStorageSync("CardList");
51
-      if (list && list.length>0){
67
+      if (list && list.length > 0) {
52 68
         for (var i = 0; i < list.length; i++) {
53 69
           if (TaskList[0].MiaoguoCardID == list[i].MiaoguoCardID) {
54 70
             var card = {};
55 71
             TaskList[0].Content = list[i].Content;
56 72
             TaskList[0].ContentNew = main.changeStringToView(list[i].Content);
57 73
             that.setData({
58
-              TaskInfo:TaskList[0],
74
+              TaskInfo: TaskList[0],
59 75
             });
60 76
             wx.removeStorageSync("CardList");
61 77
             break;
62 78
           }
63 79
         }
64 80
       }
65
-      
81
+
66 82
     }
67 83
   },
68 84
   onPullDownRefresh: function () {
@@ -82,21 +98,43 @@ Page({
82 98
     else {
83 99
       url += "short2.mp3";
84 100
     }
85
-    if (isFinish>=0){
101
+    if (isFinish >= 0) {
86 102
       innerAudioContext1.src = url;
87 103
       innerAudioContext1.play();
88 104
     }
89
-    
105
+
90 106
     wx.pageScrollTo({
91 107
       scrollTop: 0,
92 108
     });
93 109
   },
110
+  getColor: function () {
111
+    var that = this;
112
+    common.getStorageValue(that, "ColorIndex", 0, function () {
113
+      var color = main.getDetailColor(that.data.ColorIndex);
114
+      that.setData({
115
+        Color: color,
116
+      });
117
+      if (wx.setBackgroundColor) {
118
+        wx.setBackgroundColor({
119
+          backgroundColor: color.BackColor,
120
+          backgroundColorTop: color.BackColor, // 顶部窗口的背景色为白色
121
+          backgroundColorBottom: color.BackColor2, // 底部窗口的背景色为白色
122
+        })
123
+      }
124
+      if (wx.setNavigationBarColor) {
125
+        wx.setNavigationBarColor({
126
+          frontColor: color.FrontColorNavigationBar,
127
+          backgroundColor: color.BackColor,
128
+        })
129
+      }
130
+    });
131
+  },
94 132
   getList: function () {
95 133
     var task = wx.getStorageSync("TaskToday");
96 134
     var that = this;
97 135
     var arrNew = task.ListNew;
98 136
     var arrHistory = task.ListHistory;
99
-    listTaskReview = task.ListReview;
137
+    var listTaskReview = task.ListReview;
100 138
 
101 139
     var nMax = [1, 1];
102 140
     if (arrNew.length == 0 || arrHistory.length == 0) {
@@ -135,29 +173,22 @@ Page({
135 173
     }
136 174
 
137 175
     that.data.NumberReview = listTaskReview.length;
138
-    if (TaskList.length == 0 && listTaskReview.length > 0) {
139
-      TaskList.push(listTaskReview.shift());
176
+    for (var i = 0; i < listTaskReview.length; i++) {
177
+      listTaskReview[i].IsReview = true;
178
+      TaskList.push(listTaskReview[i]);
140 179
     }
141 180
 
142 181
     TaskList = updateNumberStr(TaskList);
143
-    listTaskReview = updateNumberStr(listTaskReview);
144
-
145 182
 
146 183
     //处理列表
147 184
     TaskList = formatList(TaskList);
148
-    listTaskReview = formatList(listTaskReview);
149 185
 
150
-    var fontSize=0;
151
-    if (TaskList.length>0)
152
-      fontSize = TaskList[0].FontSize;
153 186
 
154
-    
155 187
     that.setData({
156 188
       NumberNew: arrNew.length,
157 189
       NumberReview: that.data.NumberReview,
158 190
       NumberHistory: arrHistory.length,
159 191
       TaskInfo: TaskList[0],
160
-      FontSize: fontSize,
161 192
       CanUndo: 0,
162 193
     });
163 194
 
@@ -189,7 +220,7 @@ Page({
189 220
         }
190 221
 
191 222
       } else if (data.indexOf("m") > 0)
192
-        result = "<"+data.replace("m", "分钟");
223
+        result = "<" + data.replace("m", "分钟");
193 224
       return result;
194 225
     }
195 226
 
@@ -241,7 +272,7 @@ Page({
241 272
       url: './add'
242 273
     });
243 274
   },
244
-  gotoEdit:function(){
275
+  gotoEdit: function () {
245 276
     var that = this;
246 277
     //console.log(res.tapIndex);
247 278
     var list = [];
@@ -252,17 +283,17 @@ Page({
252 283
       url: './add?type=edit&id=' + TaskList[0].MiaoguoCardID,
253 284
     });
254 285
   },
255
-  onFontSize:function(){
256
-    for(var i=0;i<arrFontSize.length;i++){
257
-      if (arrFontSize[i] == TaskList[0].FontSize){
286
+  onFontSize: function () {
287
+    for (var i = 0; i < arrFontSize.length; i++) {
288
+      if (arrFontSize[i] == TaskList[0].FontSize) {
258 289
         i++;
259
-        if (i==arrFontSize.length)
260
-          i=0;
290
+        if (i == arrFontSize.length)
291
+          i = 0;
261 292
         TaskList[0].FontSize = arrFontSize[i];
262 293
         break;
263 294
       }
264 295
     }
265
-    
296
+
266 297
     this.setData({
267 298
       TaskInfo: TaskList[0],
268 299
     });
@@ -277,8 +308,8 @@ Page({
277 308
       url += "ID=" + card.Card.ID;
278 309
       url += "&UserID=" + app.globalData.userInfo.UserID;
279 310
       url += "&IntervalTime=" + card.IntervalTime;
280
-      url += "&IntervalDay=" + card.IntervalDay;
281
-      url += "&RepetitionCoefficient=" + card.RepetitionCoefficient;
311
+      url += "&IntervalDay=" + card.Card.IntervalDay;
312
+      url += "&RepetitionCoefficient=" + card.Card.RepetitionCoefficient;
282 313
       if (card.Card.FirstTime)
283 314
         url += "&FirstTime=" + card.Card.FirstTime;
284 315
       if (card.Card.LastTime)
@@ -296,9 +327,16 @@ Page({
296 327
         card.Card.Number3 = card.Number3Old;
297 328
         card.Card.Number3Str = card.Number3StrOld;
298 329
 
299
-        if (card.NumberReview < that.data.NumberReview) {
300
-          listTaskReview.pop();
330
+        if (card.IsReviewOld)
331
+          card.Card.IsReview = card.IsReviewOld;
332
+
333
+        //去除重复
334
+        for (var i = 0; i < TaskList.length; i++) {
335
+          if (TaskList[i].ID == card.Card.ID) {
336
+            TaskList.splice(i, 1);
337
+          }
301 338
         }
339
+
302 340
         TaskList.unshift(card.Card);
303 341
         var canUndo = 1;
304 342
         if (listTaskFinished.length == 0)
@@ -316,10 +354,10 @@ Page({
316 354
 
317 355
       wx.showToast({
318 356
         title: '已返回',
319
-        icon:'none',
357
+        icon: 'none',
320 358
       });
321 359
     }
322
-    
360
+
323 361
   },
324 362
   gotoNext: function (e) {
325 363
     var that = this;
@@ -331,6 +369,7 @@ Page({
331 369
     var btnnumber = e.currentTarget.dataset.btnnumber;
332 370
     var time = e.currentTarget.dataset.time;
333 371
 
372
+    //处理当前卡片进入历史数组
334 373
     var finishCard = {};
335 374
     finishCard.Card = TaskList[0];
336 375
 
@@ -384,8 +423,14 @@ Page({
384 423
           delete TaskList[0].Number3;
385 424
           delete TaskList[0].Number3Str;
386 425
         }
426
+
427
+        finishCard.IsReviewOld = TaskList[0].IsReview;
428
+
387 429
         TaskList[0].IsReview = true;
388
-        listTaskReview.push(TaskList[0]);
430
+
431
+
432
+
433
+        TaskList.push(TaskList[0]);
389 434
       }
390 435
       //若是天月年
391 436
       else {
@@ -395,7 +440,7 @@ Page({
395 440
       }
396 441
 
397 442
     }
398
-    else{
443
+    else {
399 444
       wx.showToast({
400 445
         title: '已搁置',
401 446
         icon: 'none',
@@ -406,19 +451,14 @@ Page({
406 451
     var learningType = 0;
407 452
     if (TaskList[0].IsReview) {
408 453
       learningType = 2;
409
-      this.data.NumberReview = listTaskReview.length;
410 454
     }
411 455
     if (TaskList[0].IsNew) {
412 456
       learningType = 0;
413
-      this.data.NumberNew--;
414
-      if (this.data.NumberNew < 0)
415
-        this.data.NumberNew = 0;
416
-    } else if (TaskList[0].IsHistory) {
457
+    }
458
+    else if (TaskList[0].IsHistory) {
417 459
       learningType = 1;
418
-      this.data.NumberHistory--;
419
-      if (this.data.NumberHistory < 0)
420
-        this.data.NumberHistory = 0;
421 460
     }
461
+
422 462
     if (btnnumber == "1") {
423 463
       learningType = 3;
424 464
     }
@@ -438,16 +478,29 @@ Page({
438 478
     this.saveCard(obj, function () {
439 479
 
440 480
       wx.hideLoading();
441
-      
481
+
442 482
       //添加完成列表,去掉任务列表数据
443 483
       listTaskFinished.push(finishCard);
444 484
       TaskList.shift();
445 485
 
446
-      that.data.NumberReview = listTaskReview.length;
447
-
448
-      //查看复习卡是否到时间
449
-      if (listTaskReview.length > 0 && listTaskReview[0].LimitTime < common.formatTime(new Date()) || TaskList.length == 0) {
450
-        TaskList.unshift(listTaskReview.shift());
486
+      that.data.NumberNew = 0;
487
+      that.data.NumberHistory = 0;
488
+      that.data.NumberReview = 0;
489
+      var arrTemp = [];
490
+      for (var i = 0; i < TaskList.length; i++) {
491
+        if (TaskList[i].IsReview) {
492
+          if (TaskList[i].LimitTime < common.formatTime(new Date())) {
493
+            var card = TaskList.splice(i, 1);
494
+            TaskList.unshift(card[0]);
495
+          }
496
+          that.data.NumberReview++;
497
+        }
498
+        else if (TaskList[i].IsNew) {
499
+          that.data.NumberNew++;
500
+        }
501
+        else if (TaskList[i].IsHistory) {
502
+          that.data.NumberHistory++;
503
+        }
451 504
       }
452 505
 
453 506
       //console.log(JSON.stringify(TaskList[0]));
@@ -471,7 +524,6 @@ Page({
471 524
           NumberNew: that.data.NumberNew,
472 525
           NumberReview: that.data.NumberReview,
473 526
           NumberHistory: that.data.NumberHistory,
474
-          FontSize: TaskList[0].FontSize,
475 527
           CanUndo: 1,
476 528
         });
477 529
 
@@ -480,7 +532,7 @@ Page({
480 532
       }
481 533
     });
482 534
 
483
-    
535
+
484 536
   },
485 537
   saveCard: function (obj, callback) {
486 538
     var url = "UpdateMiaoguoCardToday?";
@@ -504,33 +556,33 @@ Page({
504 556
     });
505 557
   },
506 558
   playSound: function (e) {
507
-    var that=this;
559
+    var that = this;
508 560
     var str = e.currentTarget.dataset.content;
509
-    var url;
561
+    var url = "";
510 562
     if (str.indexOf("英 [") >= 0 || str.indexOf("美 [") >= 0) {
511 563
       str = str.replace("英 [", "[");
512 564
       str = str.replace("美 [", "[");
513 565
       url = e.currentTarget.dataset.soundmark;
514 566
     }
515
-    else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark == "undefined") {
567
+    else if (e.currentTarget.dataset.soundmark && e.currentTarget.dataset.soundmark != "undefined") {
516 568
       url = e.currentTarget.dataset.soundmark;
517 569
     }
518 570
     else {
519
-      var url = app.globalData.audioUrlBaidu;
571
+      url = app.globalData.audioUrlBaidu;
520 572
       url = url.replace("[token]", app.globalData.BaiduToken);
521 573
       url = url.replace("[word]", str);
522 574
     }
523
-    this.audioCtx.setSrc(url);
524
-    this.audioCtx.play();
575
+    innerAudioContext2.src = url;
576
+    innerAudioContext2.play();
525 577
 
526 578
     var fieldid = e.currentTarget.dataset.fieldid;
527 579
     var content = TaskList[0].ContentNew.Field[fieldid];
528
-    var selectIndex=0;
529
-    for (var i = 0; i < content.length;i++){
530
-      if (content[i].Type == 'sound'){
580
+    var selectIndex = 0;
581
+    for (var i = 0; i < content.length; i++) {
582
+      if (content[i].Type == 'sound') {
531 583
         if (content[i].Content == e.currentTarget.dataset.content) {
532
-          content[i].SoundImageName="gif";
533
-          selectIndex=i;
584
+          content[i].SoundImageName = "gif";
585
+          selectIndex = i;
534 586
           break;
535 587
         }
536 588
       }
@@ -538,28 +590,29 @@ Page({
538 590
     that.setData({
539 591
       TaskInfo: TaskList[0],
540 592
     });
541
-    setTimeout(function(){
593
+    setTimeout(function () {
542 594
       content[selectIndex].SoundImageName = "png";
543
-      TaskList[0].ContentNew.Field[fieldid]=content;
595
+      TaskList[0].ContentNew.Field[fieldid] = content;
544 596
       that.setData({
545 597
         TaskInfo: TaskList[0],
546 598
       });
547
-    },2000);
599
+
600
+    }, 2000);
548 601
   },
549 602
   getTaskTime: function () {
550
-    var that=this;
603
+    var that = this;
551 604
     var url = "GetMiaoguoTaskTime?";
552 605
     url += "UserID=" + app.globalData.userInfo.UserID;
553 606
     main.getData(url, function (data) {
554
-      if (data){
555
-        var duration = common.getMinuteSecond(data.Duration,true);
607
+      if (data) {
608
+        var duration = common.getMinuteSecond(data.Duration, true);
556 609
         var speed1 = Math.round(100 * data.Count / (data.Duration / 60)) / 100;
557
-        var speed2 = common.getMinuteSecond(Math.round(data.Duration / data.Count),true);
610
+        var speed2 = common.getMinuteSecond(Math.round(data.Duration / data.Count), true);
558 611
 
559 612
         that.setData({
560 613
           TodayTime: duration,
561
-          Speed1:speed1+"条笔记",
562
-          Speed2:speed2,
614
+          Speed1: speed1 + "张题卡",
615
+          Speed2: speed2,
563 616
         });
564 617
       }
565 618
     });

+ 1 - 6
pages/main/detail.json

@@ -1,8 +1,3 @@
1 1
 {
2
-  "navigationBarBackgroundColor": "#a5656e",
3
-  "navigationBarTextStyle": "white",
4
-  "navigationBarTitleText": "学习中",
5
-  "backgroundColor": "#3157BA",
6
-  "backgroundColorTop": "#a5656e",
7
-  "backgroundColorBottom": "#362738"
2
+  "navigationBarTitleText": "练习中"
8 3
 }

+ 40 - 39
pages/main/detail.wxml

@@ -1,34 +1,34 @@
1
-<view class="container FlexColumn" style='min-height:{{Containnerheight-50}}rpx;'>
2
-  <view class='panelTop FlexRow'>
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight-50}}rpx;background-color:{{Color.BackColor2}}'>
2
+  <view class='panelTop FlexRow' style='background-color:{{Color.BackColor}};color:{{Color.FrontColor}};'>
3 3
     <view class='panelCancel' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}">
4 4
     </view>
5 5
     <view class='panelCancel' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}">
6 6
     </view>
7 7
 
8 8
     <view class='panelCancel FlexRow' bindtap='gotoEdit' wx:if="{{NumberNew+NumberReview+NumberHistory>0}}">
9
-      <image src="../images/universalpic_edit_white_25x25.png" class='universalpic_edit_white_25x25' />
9
+      <image src="../images/universalpic_edit_{{Color.IconColor}}_25x25.png" class='universalpic_edit_white_25x25' />
10 10
     </view>
11 11
     <view class='panelCancel FlexRow' bindtap='onFontSize' wx:if="{{NumberNew+NumberReview+NumberHistory>0}}">
12
-      <image src="../images/universalpic_typesize_white_30x18.png" class='universalpic_typesize_white_30x18' />
12
+      <image src="../images/universalpic_typesize_{{Color.IconColor}}_30x18.png" class='universalpic_typesize_white_30x18' />
13 13
     </view>
14 14
 
15 15
     <view class='panelNumber FlexRow' bindtap='showNumberContainner'>
16
-      <view class="panelNumber1">{{NumberNew}}</view>
17
-      <view class="panelNumber1">{{NumberHistory}}</view>
18
-      <view class="panelNumber1">{{NumberReview}}</view>
19
-      <view class="panelNumber2 panelNumber1">{{NumberNew+NumberReview+NumberHistory}}</view>
16
+      <view class="panelNumber1" style='color:{{Color.FrontColor1}};'>{{NumberNew}}</view>
17
+      <view class="panelNumber1" style='color:{{Color.FrontColor1}};'>{{NumberHistory}}</view>
18
+      <view class="panelNumber1" style='color:{{Color.FrontColor1}};'>{{NumberReview}}</view>
19
+      <view class="panelNumber2 panelNumber1" style='background-color:{{Color.FrontColor1}};'>{{NumberNew+NumberReview+NumberHistory}}</view>
20 20
     </view>
21 21
     <view class='panelCancel FlexRow' bindtap='gotoNext' data-time="1d" data-btnnumber="1" wx:if="{{NumberNew+NumberReview+NumberHistory>0}}">
22
-      <image src="../images/universalpic_shelve_white_30x14.png" class='universalpic_shelve_white_30x14' />
22
+      <image src="../images/universalpic_shelve_{{Color.IconColor}}_26x26.png" class='universalpic_shelve_white_26x26' />
23 23
     </view>
24 24
     <view class='panelCancel' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}">
25 25
     </view>
26 26
 
27
-    <view class='panelCancel FlexRow' bindtap='gotoPrev' wx:if="{{CanUndo==1}}">
28
-      <image src="../images/universalpic_undo_white_26x20.png" class='universalpic_undo_white_26x20' />
27
+    <view class='panelCancel FlexRow' wx:if="{{CanUndo==0}}">
28
+      <image src="../images/universalpic_undo_black_30p_26x20.png" class='universalpic_undo_white_30p_26x20' />
29 29
     </view>
30
-
31
-    <view class='panelCancel' wx:if="{{CanUndo==0}}">
30
+    <view class='panelCancel FlexRow' bindtap='gotoPrev' wx:if="{{CanUndo==1}}">
31
+      <image src="../images/universalpic_undo_{{Color.IconColor}}_26x20.png" class='universalpic_undo_white_30p_26x20' />
32 32
     </view>
33 33
 
34 34
   </view>
@@ -36,8 +36,8 @@
36 36
   <!-- 练习页 -->
37 37
   <block wx:if="{{(NumberNew+NumberReview+NumberHistory)>0}}">
38 38
 
39
-    <view class="panelField10"></view>
40
-    <view class="panelField1 FlexColumn" bindtap="onShowAnswer">
39
+    <view class="panelField10" style='background-color:{{Color.BackColor}};'></view>
40
+    <view class="panelField1 FlexColumn" bindtouchstart="onShowAnswer" style='background-color:{{Color.BackColor}};color:{{Color.FrontColor}};'>
41 41
       <view class="panelField11 panelItem FlexRow" style="font-size:{{TaskInfo.FontSize}}rpx;">
42 42
         <block wx:for="{{TaskInfo.ContentNew.Field[1]}}" wx:key="index">
43 43
           <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
@@ -62,22 +62,25 @@
62 62
   </view>
63 63
 
64 64
   </view>
65
-  <view class="panelTag FlexRow" bindtap="onShowAnswer">
65
+  <view class="panelTag FlexRow" bindtouchstart="onShowAnswer" style='background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};'>
66 66
     <view wx:if="{{!TaskInfo.ContentNew.Tags || TaskInfo.ContentNew.Tags.length==0}}"></view>
67 67
     <view class="panelTag1 FlexRow" wx:if="{{TaskInfo.ContentNew.Tags && TaskInfo.ContentNew.Tags.length>0}}">
68
+      <view class='tagDot' style='background-color:{{Color.TagColor}};'></view>
68 69
       <view class="tag" wx:for="{{TaskInfo.ContentNew.Tags}}" wx:key="index">{{item}}</view>
69 70
     </view>
70 71
 
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' />
74
+    </view>
71 75
     <view class='right2 FlexRow' catchtap='onShowAnswer' data-start="true" wx:if="{{IsShowAnswer[0]==1}}">
72
-      <view class="line1"></view>
73
-      <image class="universalpic_restore_black_34x34" src='../images/universalpic_restore_white_34x34.png' />
76
+      <image class="universalpic_hide_white_34x34" src='../images/universalpic_hide_{{Color.IconColor}}_34x34.png' />
74 77
     </view>
75 78
 
76 79
   </view>
77 80
 
78
-  <view class="panelField20 FlexColumn" style='min-height:{{Containnerheight-480}}rpx;' bindtap="onShowAnswer">
81
+  <view class="panelField20 FlexColumn" style='min-height:{{Containnerheight-480}}rpx;background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};' bindtouchstart="onShowAnswer">
79 82
     <view class="panelField2 FlexColumn" wx:for="{{[2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent" wx:if="{{TaskInfo.ContentNew.Field[itemParent].length>0 && IsShowAnswer[itemParent-2]}}">
80
-
83
+      <view wx:if="{{itemParent==3}}" class="lineField" style='background-color:{{Color.FieldLineColor}};'></view>
81 84
       <view class="panelField21 panelItem FlexRow">
82 85
         <block wx:for="{{TaskInfo.ContentNew.Field[itemParent]}}" wx:key="index">
83 86
           <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
@@ -106,27 +109,27 @@
106 109
   </block>
107 110
 
108 111
   <!-- 最后一页 -->
109
-  <view class='panelLast FlexColumn' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}" style='height:{{Containnerheight-50}}rpx;'>
112
+  <view class='panelLast FlexColumn' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}" style='height:{{Containnerheight-50}}rpx;background-color:{{Color.BackColor}};color:{{Color.FrontColor}};'>
110 113
     <view class='text1'>做完了</view>
111 114
 
112 115
     <view class="panelLastTime FlexColumn">
113
-      <view>今日用时</view>
116
+      <view style='color:{{Color.FrontColor1}};'>今日用时</view>
114 117
       <view class="time">{{TodayTime}}</view>
115 118
     </view>
116 119
     <view class="panelLastTime FlexColumn">
117
-      <view>每分钟可练习</view>
120
+      <view style='color:{{Color.FrontColor1}};'>每分钟可练习</view>
118 121
       <view class="time">{{Speed1}}</view>
119 122
     </view>
120 123
     <view class="panelLastTime FlexColumn">
121
-      <view>单条笔记平均用时</view>
124
+      <view style='color:{{Color.FrontColor1}};'>单张题卡平均用时</view>
122 125
       <view class="time">{{Speed2}}</view>
123 126
     </view>
124 127
 
125
-    <image src="../images/practice_introduction_marks_a.png" class='practice_introduction_marks_a' />
128
+    <!-- <image src="../images/practice_introduction_marks_a.png" class='practice_introduction_marks_a' />
126 129
     <text class='text2'>君子曰:学不可以已\n——意指求学之路无止境。</text>
127 130
     <image src="../images/practice_introduction_marks_b.png" class='practice_introduction_marks_b' />
128 131
 
129
-    <text class='text3'>我是荀子,战国末期赵国人\n思想家、文学家、政治家\n约公元前313年-公元前238年</text>
132
+    <text class='text3'>我是荀子,战国末期赵国人\n思想家、文学家、政治家\n约公元前313年-公元前238年</text> -->
130 133
 
131 134
   </view>
132 135
 
@@ -134,8 +137,8 @@
134 137
   <view class='footer1 footer' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}"></view>
135 138
 
136 139
   <block wx:if="{{IsShowAnswer[1]}}">
137
-    <view class="panelBottomAnswer0"></view>
138
-    <view class='panelBottomAnswer panelBottom FlexRow'>
140
+    <view class="panelBottomAnswer0" style='background:linear-gradient({{Color.BackColor20}},{{Color.BackColor2}});'></view>
141
+    <view class='panelBottomAnswer panelBottom FlexRow' style='background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};'>
139 142
       <view class="Answer FlexColumn" hover-class="AnswerHover" catchtap='gotoNext' data-time="{{TaskInfo.Number0}}" data-btnnumber="0">
140 143
         <view class="Answer0 btnColor"></view>
141 144
         <view class="btnTime">
@@ -167,32 +170,30 @@
167 170
 <view wx:if="{{IsShowNumberInfo}}" catchtap='closeNumberContainner' class="numberContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
168 171
   <view class='numberContainer1 FlexColumn'>
169 172
     <view class="numberContainer11 FlexRow">
170
-      <view class='left'>剩余任务</view>
171
-      <view class='numberContainer111 right'>今天还剩{{NumberNew+NumberReview+NumberHistory}}条</view>
173
+      <view class='left'>今天剩余{{NumberNew+NumberReview+NumberHistory}}张</view>
174
+      <view></view>
172 175
     </view>
173 176
     <view class="numberContainer12 FlexRow">
174
-      <view class='left'>新笔记</view>
175
-      <view class='right'>{{NumberNew}}条</view>
177
+      <view class='left'>新题卡</view>
178
+      <view class='right3'>{{NumberNew}}张</view>
176 179
     </view>
177 180
     <view class="lineWidthAll FlexRow">
178 181
       <view class="lineWidth700"></view>
179 182
     </view>
180 183
     <view class="numberContainer12 FlexRow">
181
-      <view class='left'>旧笔记</view>
182
-      <view class='right'>{{NumberHistory}}条</view>
184
+      <view class='left'>旧题卡</view>
185
+      <view class='right3'>{{NumberHistory}}张</view>
183 186
     </view>
184 187
     <view class="lineWidthAll FlexRow">
185 188
       <view class="lineWidth700"></view>
186 189
     </view>
187 190
     <view class="numberContainer12 FlexRow">
188
-      <view class='left'>重</view>
189
-      <view class='right'>{{NumberReview}}条</view>
191
+      <view class='left'>重点回顾</view>
192
+      <view class='right3'>{{NumberReview}}张</view>
190 193
     </view>
191 194
     <view class='lineFooter'></view>
192 195
     <view class="numberContainer13 FlexRow">
193 196
       <view>知道了</view>
194 197
     </view>
195 198
   </view>
196
-</view>
197
-
198
-<audio hidden='true' id="playAudio"></audio>
199
+</view>

+ 38 - 61
pages/main/detail.wxss

@@ -1,7 +1,6 @@
1 1
 .container {
2 2
   justify-content: flex-start;
3 3
   font-weight: 500;
4
-  background-color: #a5656e;
5 4
 }
6 5
 
7 6
 /* 工具栏 */
@@ -13,7 +12,6 @@
13 12
   top: 0;
14 13
   font-size: 20rpx;
15 14
   z-index: 10;
16
-  background-color: #a5656e;
17 15
 }
18 16
 
19 17
 .panelCancel {
@@ -23,7 +21,7 @@
23 21
 }
24 22
 
25 23
 
26
-.universalpic_undo_white_26x20 {
24
+.universalpic_undo_white_30p_26x20 {
27 25
   width: 26rpx;
28 26
   height: 19rpx;
29 27
 }
@@ -31,16 +29,12 @@
31 29
   width: 29rpx;
32 30
   height: 18rpx;
33 31
 }
34
-.universalpic_shelve_white_30x14 {
35
-  width: 36rpx;
36
-  height: 20rpx;
37
-}
38
-
39
-.universalpic_restore_white_34x34 {
32
+.universalpic_shelve_white_26x26 {
40 33
   width: 26rpx;
41 34
   height: 26rpx;
42 35
 }
43 36
 
37
+
44 38
 .universalpic_edit_white_25x25 {
45 39
   width: 25rpx;
46 40
   height: 25rpx;
@@ -56,7 +50,6 @@
56 50
   font-family: 'Roboto-Black';
57 51
   font-size: 20rpx;
58 52
   margin: 0 3rpx;
59
-  color: rgba(255, 255, 255, 0.5);
60 53
   height: 50rpx;
61 54
   min-width: 50rpx;
62 55
   text-align: center;
@@ -64,30 +57,37 @@
64 57
 }
65 58
 
66 59
 .panelNumber2 {
67
-  background-color: rgba(0, 0, 0, 0.3);
68 60
   color: #fff;
69 61
   border-radius: 50%;
70 62
 }
71 63
 
72 64
 /* 段落 */
65
+
66
+.panelItem {
67
+  width: 650rpx;
68
+  font-weight: 400;
69
+  flex-wrap: wrap;
70
+  justify-content: flex-start;
71
+  z-index: 5;
72
+}
73
+
73 74
 .panelField10{
74 75
   width: 100%;
75
-  background-color: #a5656e;
76 76
   height: 110rpx;
77 77
 }
78 78
 
79 79
 .panelField1 {
80 80
   width: 100%;
81
-  background-color: #a5656e;
82 81
   min-height: 320rpx;
83 82
   justify-content: flex-start;
83
+  border-bottom-left-radius: 50rpx;
84
+  border-bottom-right-radius: 50rpx;
84 85
 }
85 86
 
86 87
 .panelField11 {
87
-  width: 100%;
88
-  font-size: 68rpx;
88
+  font-size: 46rpx;
89 89
   justify-content: flex-start;
90
-  margin: 60rpx 0 80rpx 0;
90
+  margin: 40rpx 0 80rpx 0;
91 91
 }
92 92
 
93 93
 
@@ -98,21 +98,23 @@
98 98
   height:110rpx;
99 99
   padding-bottom: 20rpx;
100 100
   position: relative;
101
-  background-color: #362738;
102 101
 }
103 102
 
104 103
 .panelTag1 {
105 104
   font-size: 28rpx;
106
-  border-radius: 25rpx;
107
-  background-color: #000;
108 105
   margin-left: 50rpx;
109
-  padding: 0 10rpx;
106
+}
107
+
108
+.panelTag .tagDot{
109
+  width:20rpx;
110
+  height:20rpx;
111
+  border-radius: 5rpx;
112
+  background-color: #7F4B52;
113
+  margin-right: 20rpx;
110 114
 }
111 115
 
112 116
 .panelTag .tag {
113
-  color: #fff;
114
-  text-align: center;
115
-  margin: 6rpx 10rpx 6rpx 10rpx;
117
+  margin: 6rpx 20rpx 6rpx 0;
116 118
 }
117 119
 
118 120
 .right2 {
@@ -131,16 +133,15 @@
131 133
   margin-top: 66rpx;
132 134
 }
133 135
 
134
-.universalpic_restore_black_34x34 {
135
-  width: 26rpx;
136
-  height: 26rpx;
136
+.universalpic_hide_white_34x34 {
137
+  width: 36rpx;
138
+  height: 20rpx;
137 139
   margin: 68rpx 50rpx 0 50rpx;
138 140
 }
139 141
 
140 142
 .panelField20 {
141 143
   width: 100%;
142 144
   justify-content: flex-start;
143
-  background-color: #362738;
144 145
 }
145 146
 
146 147
 .panelField2 {
@@ -155,13 +156,11 @@
155 156
   min-height: 50rpx;
156 157
 }
157 158
 
158
-.panelItem {
159
-  width: 650rpx;
160
-  font-weight: 400;
161
-  flex-wrap: wrap;
162
-  justify-content: flex-start;
163
-  color: #fff;
164
-  z-index: 5;
159
+.lineField{
160
+  width:650rpx;
161
+  height:3rpx;
162
+  background-color: #4B3840;
163
+  margin-top: 30rpx;
165 164
 }
166 165
 
167 166
 .panelItem .panelSound {
@@ -214,10 +213,6 @@
214 213
 
215 214
 .panelBottomAnswer0 {
216 215
   height: 30rpx;
217
-  background:-webkit-linear-gradient(rgba(54,39,56,0),#362738);
218
-  background:-o-linear-gradient(rgba(54,39,56,0),#362738);
219
-  background:-moz-linear-gradient(rgba(54,39,56,0),#362738);
220
-  background:linear-gradient(rgba(54,39,56,0),#362738);
221 216
   width: 100%;
222 217
   position: fixed;
223 218
   bottom: 120rpx;
@@ -226,7 +221,6 @@
226 221
 
227 222
 .panelBottomAnswer {
228 223
   height: 120rpx;
229
-  background-color: #362738;
230 224
   width: 100%;
231 225
   position: fixed;
232 226
   bottom: 0;
@@ -239,7 +233,6 @@
239 233
   flex: 1;
240 234
   height: 120rpx;
241 235
   font-size: 24rpx;
242
-  color: #F8F8F8;
243 236
   justify-content: flex-start;
244 237
 }
245 238
 
@@ -295,21 +288,15 @@
295 288
   width: 100%;
296 289
 }
297 290
 
298
-.numberContainer111 {
299
-  line-height: 45rpx;
300
-  text-align: center;
301
-  color: #fff;
302
-  padding: 0 20rpx;
303
-  border-radius: 22rpx;
304
-  background-color: #1e1e1e;
305
-}
306
-
307
-.left {
291
+.numberContainer .left {
308 292
   margin-left: 30rpx;
293
+  font-weight: 400;
309 294
 }
310 295
 
311
-.right {
296
+.numberContainer .right3 {
312 297
   margin-right: 30rpx;
298
+  color:#787878;
299
+  font-weight: 500;
313 300
 }
314 301
 
315 302
 .numberContainer12 {
@@ -331,18 +318,13 @@
331 318
 }
332 319
 
333 320
 .footer{
334
-  background-color: #362738;
335 321
   height:180rpx;
336 322
   width: 100%;
337 323
 }
338
-.footer1{
339
-  background-color: #a5656e;
340
-}
341 324
 
342 325
 .panelLast {
343 326
   width: 100%;
344 327
   justify-content: flex-start;
345
-  background-color: #a5656e;
346 328
   position: fixed;
347 329
   top:0;
348 330
 }
@@ -350,19 +332,16 @@
350 332
 .text1 {
351 333
   margin: 230rpx 0 60rpx 0;
352 334
   font-size: 64rpx;
353
-  color: #fff;
354 335
 }
355 336
 
356 337
 .panelLastTime {
357 338
   font-size: 28rpx;
358 339
   font-weight: 400;
359
-  color: #f0f0f0;
360 340
   margin-bottom: 40rpx;
361 341
 }
362 342
 
363 343
 .panelLastTime .time {
364 344
   font-size: 30rpx;
365
-  color: #f0f0f0;
366 345
   font-family: 'Roboto-Black';
367 346
 }
368 347
 
@@ -375,7 +354,6 @@
375 354
 
376 355
 .text2 {
377 356
   margin-top: 30rpx;
378
-  color: #f0f0f0;
379 357
   font-size: 28rpx;
380 358
   font-weight: 400;
381 359
   text-align: center;
@@ -390,7 +368,6 @@
390 368
 
391 369
 .text3 {
392 370
   margin-top: 40rpx;
393
-  color: #f0f0f0;
394 371
   font-size: 20rpx;
395 372
   font-weight: 500;
396 373
   text-align: center;

+ 47 - 6
pages/main/preview.js

@@ -2,6 +2,7 @@ import common from '../../utils/util';
2 2
 import main from '../../utils/main';
3 3
 
4 4
 const app = getApp();
5
+var innerAudioContext1;
5 6
 
6 7
 Page({
7 8
   data: {
@@ -18,7 +19,9 @@ Page({
18 19
       ShowType: options.type,
19 20
       MiaoguoCardID: id,
20 21
     });
21
-    this.audioCtx = wx.createAudioContext('myAudio');
22
+
23
+    innerAudioContext1 = wx.createInnerAudioContext();
24
+
22 25
   },
23 26
   onShow: function () {
24 27
     var that = this;
@@ -58,6 +61,9 @@ Page({
58 61
         break;
59 62
       }
60 63
     }
64
+    if (!card.FontSize)
65
+      card.FontSize=46;
66
+      
61 67
     this.setData({
62 68
       ID: card.MiaoguoCardID,
63 69
       Field: card.Field,
@@ -72,7 +78,7 @@ Page({
72 78
     var that = this;
73 79
     wx.showModal({
74 80
       title: '要今天练吗?',
75
-      content: '这条笔记今天必须练习',
81
+      content: '这张题卡今天必须练习',
76 82
       success(res) {
77 83
         if (res.confirm) {
78 84
           var obj = {
@@ -117,6 +123,35 @@ Page({
117 123
       callback();
118 124
     });
119 125
   },
126
+  copyCard: function () {
127
+    wx.showLoading({
128
+      title: '处理中',
129
+    })
130
+    var that=this;
131
+    var url = "CollectMiaoguoCard?";
132
+    url += "MiaoguoCardID=" + that.data.MiaoguoCardID;
133
+    url += "&UserIDSource=" + app.globalData.introducer;
134
+    url += "&UserIDTarget=" + app.globalData.userInfo.UserID;
135
+    
136
+    main.getData(url, function (data) {
137
+      wx.hideLoading();
138
+
139
+      var title ="题卡已存在!";
140
+      if (data==1){
141
+        title = "收藏成功!";
142
+      }
143
+      wx.showToast({
144
+        title: title,
145
+        mask: true,
146
+        duration: 3000,
147
+        success: function () {
148
+          that.setData({
149
+            ShowType:'preview'
150
+          });
151
+        }
152
+      });
153
+    });
154
+  },
120 155
   playSound: function (e) {
121 156
     var str = e.currentTarget.dataset.content;
122 157
     var url;
@@ -133,13 +168,14 @@ Page({
133 168
       url = url.replace("[token]", app.globalData.BaiduToken);
134 169
       url = url.replace("[word]", str);
135 170
     }
136
-    this.audioCtx.setSrc(url);
137
-    this.audioCtx.play();
171
+    
172
+    innerAudioContext1.src = url;
173
+    innerAudioContext1.play();
138 174
   },
139 175
   onMore: function () {
140 176
     var that = this;
141 177
     wx.showActionSheet({
142
-      itemList: ["详细信息", "编辑笔记", "删除笔记"],
178
+      itemList: ["详细信息", "编辑题卡", "删除题卡"],
143 179
       success(res) {
144 180
         //console.log(res.tapIndex);
145 181
         if (res.tapIndex == 0) {
@@ -162,7 +198,7 @@ Page({
162 198
     var that = this;
163 199
     wx.showModal({
164 200
       title: '提醒',
165
-      content: '这条笔记要删除吗?',
201
+      content: '这张题卡要删除吗?',
166 202
       success(res) {
167 203
         if (res.confirm) {
168 204
           var url = 'DeleteMiaoguoCard?UserID=' + app.globalData.userInfo.UserID;
@@ -176,6 +212,11 @@ Page({
176 212
               }
177 213
             }
178 214
             wx.setStorageSync("CardList", list);
215
+            
216
+            var taskToday = wx.getStorageSync("TaskToday");
217
+            taskToday.CardNumber--;
218
+            wx.setStorageSync("TaskToday", taskToday);
219
+
179 220
             wx.navigateBack({
180 221
               delta: 1,
181 222
             });

+ 29 - 23
pages/main/preview.wxml

@@ -4,14 +4,13 @@
4 4
       <view class="text1">到期时间</view>
5 5
       <view class="text2">{{LimitTimeStr}}</view>
6 6
     </view>
7
-    <view class='FlexRow'>
8
-      <view class="line1"></view>
7
+    <view class='right FlexRow'>
9 8
       <view class="text3" bindtap='practiceToday'>今天练</view>
10 9
     </view>
11 10
   </view>
12 11
   <view class='lineFooter'></view>
13 12
   <view class="panelField1 FlexColumn" bindlongpress='editField' data-id="1">
14
-    <view class="panelField11 panelItem FlexRow" style="font-size:{{FontSize}}rpx;" >
13
+    <view class="panelField11 panelItem FlexRow" style="font-size:{{FontSize}}rpx;">
15 14
       <block wx:for="{{Field[1]}}" wx:key="index">
16 15
         <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
17 16
 
@@ -20,14 +19,14 @@
20 19
         <text class="textNormal FlexRow" wx:if="{{item.Type=='line'}}">
21 20
           <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
22 21
             <text wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
23
-            <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
24
-          </block>
25
-        </text>
22
+        <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
23
+      </block>
24
+      </text>
26 25
 
27
-        <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}}" />
28
-        <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}">{{item.Content}}</text>
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 28
 
30
-        <image class="imageBishun" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' />
29
+      <image class="imageBishun" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' />
31 30
       </block>
32 31
     </view>
33 32
 
@@ -35,13 +34,15 @@
35 34
 
36 35
   <view class="panelTag FlexRow" wx:if="{{Tags && Tags.length>0}}">
37 36
     <view class="panelTag1 FlexRow" wx:if="{{Tags && Tags.length>0}}">
37
+      <view class='tagDot'></view>
38 38
       <view class="tag" wx:for="{{Tags}}" wx:key="index">{{item}}</view>
39 39
     </view>
40 40
 
41 41
     <view wx:if="{{true}}"></view>
42 42
 
43 43
   </view>
44
-  <view class="panelField2 FlexRow" wx:for="{{[2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent" wx:if="{{Field[itemParent].length>0}}" bindlongpress='editField' data-id="{{itemParent}}">
44
+  <view class="panelField2 FlexColumn" wx:for="{{[2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent" wx:if="{{Field[itemParent].length>0}}" bindlongpress='editField' data-id="{{itemParent}}">
45
+    <view wx:if="{{itemParent==3}}" class="lineField"></view>
45 46
 
46 47
     <view class="panelField21 panelItem FlexRow">
47 48
       <block wx:for="{{Field[itemParent]}}" wx:key="index">
@@ -52,29 +53,36 @@
52 53
         <text class="textNormal FlexRow" wx:if="{{item.Type=='line'}}">
53 54
           <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
54 55
             <text wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
55
-            <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
56
-          </block>
57
-        </text>
56
+        <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
57
+      </block>
58
+      </text>
58 59
 
59
-        <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}}" />
60
-        <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}">{{item.Content}}</text>
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>
61 62
 
62
-        <image class="imageBishun" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' />
63
+      <image class="imageBishun" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' />
63 64
 
64 65
       </block>
65 66
     </view>
66 67
   </view>
67 68
 
68 69
   <view style='height:150rpx'></view>
69
-  
70
-  <view class='panelSave' bindtap="close" wx:if="{{ShowType=='preview' || ShowType=='share'}}">关闭</view>
71
-  
70
+
71
+  <view class='panelSave' bindtap="close" wx:if="{{ShowType=='preview'}}">关闭</view>
72
+
73
+  <view class='panelSave FlexRow' wx:if="{{ShowType=='share'}}">
74
+    <view class='btn3' bindtap="close">取消</view>
75
+    <view class='btn31 btn3' bindtap="copyCard">收藏</view>
76
+  </view>
77
+
72 78
   <view class='panelSave FlexRow' wx:if="{{ShowType=='show'}}">
73 79
     <view class='btn1' wx:if="{{PrevID==0}}"></view>
74 80
     <view class='btn1 FlexRow' bindtap="onPreview" data-id="{{PrevID}}" wx:if="{{PrevID>0}}">
75 81
       <image class="universalpic_prev_black_30x30" src='../images/universalpic_prev_black_30x30.png' />
76 82
     </view>
77
-    <button class="btn2" open-type='share'>共享给大家</button>
83
+    <view class='btn2 FlexRow'>
84
+      <button class="btn21" open-type='share'>共享给大家</button>
85
+    </view>
78 86
     <view class='btn2 FlexRow' bindtap="onMore">
79 87
       <image class="universalpic_more_40x10" src='../images/universalpic_more_40x10.png' />
80 88
     </view>
@@ -85,6 +93,4 @@
85 93
 
86 94
   </view>
87 95
 
88
-</view>
89
-
90
-<audio hidden='true' src="{{AudioSrc}}" id="myAudio"></audio>
96
+</view>

+ 62 - 23
pages/main/preview.wxss

@@ -19,7 +19,7 @@
19 19
 }
20 20
 
21 21
 .right {
22
-  margin-right: 25rpx;
22
+  margin-right: 30rpx;
23 23
 }
24 24
 
25 25
 .text2 {
@@ -30,9 +30,23 @@
30 30
 
31 31
 .text3 {
32 32
   color: #0071ef;
33
-  width: 164rpx;
34
-  line-height: 120rpx;
33
+  width: 132rpx;
34
+  line-height: 80rpx;
35 35
   text-align: center;
36
+  background-color: #fff;
37
+  border:1rpx solid #9B9B9B;
38
+  border-radius: 10rpx;
39
+  font-size: 24rpx;
40
+}
41
+
42
+
43
+
44
+.panelItem {
45
+  width: 650rpx;
46
+  font-weight: 400;
47
+  flex-wrap: wrap;
48
+  justify-content: flex-start;
49
+  color: #1e1e1e;
36 50
 }
37 51
 
38 52
 .panelField1 {
@@ -40,21 +54,14 @@
40 54
   background-color: #fff;
41 55
   min-height: 320rpx;
42 56
   justify-content: flex-start;
57
+  border-bottom-left-radius: 50rpx;
58
+  border-bottom-right-radius: 50rpx;
43 59
 }
44 60
 
45 61
 .panelField11 {
46
-  width: 100%;
47
-  font-size: 68rpx;
48
-  justify-content: flex-start;
49
-  margin: 60rpx 0 80rpx 0;
50
-}
51
-
52
-.panelItem {
53
-  width: 650rpx;
54
-  font-weight: 400;
55
-  flex-wrap: wrap;
62
+  font-size: 46rpx;
56 63
   justify-content: flex-start;
57
-  color: #1e1e1e;
64
+  margin: 40rpx 0 80rpx 0;
58 65
 }
59 66
 
60 67
 .panelItem .universalpic_read_gray_40x40 {
@@ -95,16 +102,20 @@
95 102
 
96 103
 .panelTag1 {
97 104
   font-size: 28rpx;
98
-  border-radius: 25rpx;
99
-  background-color: #000;
100 105
   margin-left: 50rpx;
101
-  padding: 0 10rpx;
106
+}
107
+
108
+.panelTag .tagDot{
109
+  width:20rpx;
110
+  height:20rpx;
111
+  border-radius: 5rpx;
112
+  background-color: #9B9B9B;
113
+  margin-right: 20rpx;
102 114
 }
103 115
 
104 116
 .panelTag .tag {
105
-  color: #fff;
106
-  text-align: center;
107
-  margin: 6rpx 10rpx 6rpx 10rpx;
117
+  color: #1E1E1E;
118
+  margin: 6rpx 20rpx 6rpx 0;
108 119
 }
109 120
 
110 121
 .right2 {
@@ -134,6 +145,13 @@
134 145
   margin: 40rpx 30rpx 0 30rpx;
135 146
 }
136 147
 
148
+.lineField{
149
+  width:650rpx;
150
+  height:3rpx;
151
+  background-color: #D2D2D2;
152
+  margin-top: 30rpx;
153
+}
154
+
137 155
 .panelSave {
138 156
   width: 100%;
139 157
   background-color: #fff;
@@ -156,16 +174,24 @@
156 174
 .btn2 {
157 175
   width: 225rpx;
158 176
   height: 120rpx;
159
-  font-size: 28rpx;
177
+  background-color: #fff;
178
+}
179
+
180
+.btn21 {
181
+  width: 180rpx;
182
+  height: 80rpx;
183
+  font-size: 24rpx;
160 184
   color: #0071ef;
161
-  line-height: 120rpx;
185
+  line-height: 80rpx;
162 186
   text-align: center;
163 187
   padding-left: 0;
164 188
   padding-right: 0;
165 189
   background-color: #fff;
190
+  border:1rpx solid #9B9B9B;
191
+  border-radius: 10rpx;
166 192
 }
167 193
 
168
-.btn2::after {
194
+.btn21::after {
169 195
   border: 0px;
170 196
 }
171 197
 
@@ -174,6 +200,19 @@
174 200
   height: 26rpx;
175 201
 }
176 202
 
203
+
204
+.btn3 {
205
+  width: 375rpx;
206
+  line-height: 120rpx;
207
+  background-color: #fff;
208
+  text-align: center;
209
+  color:#1e1e1e;
210
+}
211
+
212
+.btn31 {
213
+  color: #0071ef;
214
+}
215
+
177 216
 .universalpic_more_40x10 {
178 217
   width: 40rpx;
179 218
   height: 10rpx;

+ 1 - 1
pages/main/searchCard.json

@@ -1,3 +1,3 @@
1 1
 {
2
-  "navigationBarTitleText": "笔记"
2
+  "navigationBarTitleText": "题卡"
3 3
 }

+ 3 - 3
pages/main/searchCard.wxml

@@ -2,13 +2,13 @@
2 2
   <view class="panelSearch FlexRow">
3 3
     <view class="panelSearch1 FlexRow" bindtap="onSearch">
4 4
       <image class="universalpic_search_gray_30x30" src='../images/universalpic_search_gray_30x30.png' />
5
-      <view>搜索笔记</view>
5
+      <view>搜索题卡</view>
6 6
     </view>
7 7
   </view>
8 8
   <view class='lineFooter'></view>
9 9
   <view class='panelBtn FlexRow'>
10 10
     <view class='text1 FlexRow' bindtap="getList" data-id="0">
11
-      <view>全部笔记</view>
11
+      <view>全部题卡</view>
12 12
       <view class="text2">{{CardNumber}}</view>
13 13
     </view>
14 14
     <view class='line1'></view>
@@ -31,7 +31,7 @@
31 31
       <view class='line1'></view>
32 32
       <view class='panelBottom11 FlexColumn'>
33 33
         <image class="program_tabbar_task_default" src='../images/program_tabbar_note_normal.png' />
34
-        <view class='text5'>笔记</view>
34
+        <view class='text5'>题卡</view>
35 35
       </view>
36 36
     </view>
37 37
   </view>

+ 1 - 1
pages/main/searchCardList.json

@@ -1,4 +1,4 @@
1 1
 {
2
-  "navigationBarTitleText": "全部笔记",
2
+  "navigationBarTitleText": "全部题卡",
3 3
   "enablePullDownRefresh": true
4 4
 }

+ 2 - 2
pages/main/searchCardList.wxml

@@ -30,7 +30,7 @@
30 30
   </block>
31 31
 
32 32
   <block wx:if="{{List.length==0}}">
33
-    <view class='Text3'>无此笔记</view>
34
-    <view class='Text4'>请搜索笔记文字内容</view>
33
+    <view class='Text3'>无此题卡</view>
34
+    <view class='Text4'>请搜索题卡文字内容</view>
35 35
   </block>
36 36
 </view>

+ 17 - 0
pages/main/searchWeb.js

@@ -49,6 +49,23 @@ Page({
49 49
       url: './searchWeb2?back=2&search=' + search+'&type=1',
50 50
     });
51 51
   },
52
+  deleteItem:function(e){
53
+    var that=this;
54
+    wx.showModal({
55
+      title: '提醒',
56
+      content: '删除这条搜索记录?',
57
+      success(res) {
58
+        if (res.confirm) {
59
+          var index = e.currentTarget.dataset.id;
60
+          that.data.SelectList.splice(index, 1);
61
+          that.setData({
62
+            SelectList: that.data.SelectList,
63
+          });
64
+          wx.setStorageSync("SearchWord", that.data.SelectList);
65
+        }
66
+      }
67
+    });
68
+  },
52 69
   onShareAppMessage: function () {
53 70
     return {
54 71
       title: app.globalData.ShareTitle,

+ 6 - 3
pages/main/searchWeb.wxml

@@ -14,11 +14,14 @@
14 14
     <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
15 15
       <view class="lineWidth720"></view>
16 16
     </view>
17
-    <view class="panelItem FlexRow" bindtap='onSearchHistory' data-search="{{item.Key}}">
17
+    <view class="panelItem FlexRow" >
18 18
       <view class="panelItem1">
19 19
       </view>
20
-      <view class="panelItem2">
21
-        <text class="textNull">{{item.Key}}</text>
20
+      <view class="panelItem2 FlexRow">
21
+        <text class="text1" bindtap='onSearchHistory' data-search="{{item.Key}}">{{item.Key}}</text>
22
+        <view class="panelItem21 FlexRow" bindtap='deleteItem' data-id="{{index}}">
23
+            <image src='../images/universalpic_del_gray_14x14.png' class="universalpic_del_gray_14x14" />
24
+         </view>
22 25
       </view>
23 26
     </view>
24 27
   </block>

+ 17 - 1
pages/main/searchWeb.wxss

@@ -65,7 +65,23 @@
65 65
 }
66 66
 
67 67
 .panelItem2 {
68
-  margin-right: 30rpx;
69 68
   color: #1e1e1e;
70 69
   font-weight: 400;
70
+  justify-content: space-between;
71
+  width:720rpx;
72
+}
73
+
74
+.text1{
75
+  width:624rpx;
76
+  line-height: 100rpx;
77
+}
78
+
79
+.panelItem21{
80
+  width:96rpx;
81
+  height:100rpx;
82
+}
83
+
84
+.universalpic_del_gray_14x14{
85
+  width:14rpx;
86
+  height:14rpx;
71 87
 }

+ 16 - 0
pages/main/searchWeb2.js

@@ -6,6 +6,7 @@ var back = 3;
6 6
 
7 7
 Page({
8 8
   data: {
9
+    IsShowHelp: 1,
9 10
     CSS: {},
10 11
   },
11 12
   onLoad: function (options) {
@@ -21,6 +22,10 @@ Page({
21 22
     if (options.back)
22 23
       back = Number(options.back);
23 24
 
25
+    common.getStorageValue(this, "IsShowHelp", 0, function () {
26
+      
27
+    });
28
+
24 29
   },
25 30
   getList: function (word, type) {
26 31
 
@@ -225,6 +230,17 @@ Page({
225 230
       })
226 231
     }
227 232
   },
233
+  openHelp: function () {
234
+    this.setData({
235
+      IsShowHelp: 0,
236
+    });
237
+  },
238
+  close:function(){
239
+    this.setData({
240
+      IsShowHelp:1,
241
+    });
242
+    wx.setStorageSync("IsShowHelp",1);
243
+  },
228 244
   onShareAppMessage: function () {
229 245
     return {
230 246
       title: app.globalData.ShareTitle,

+ 36 - 7
pages/main/searchWeb2.wxml

@@ -4,6 +4,9 @@
4 4
   <block wx:if="{{Result.CHN.HanZi}}">
5 5
     <view class="panelTitle FlexRow">
6 6
       <view class="panelTitle1">搜索内容</view>
7
+      <view class="right FlexColumn" bindtap='openHelp'>
8
+        <image class="universalpic_help_gray_26x26" src='../images/universalpic_help_gray_26x26.png' />
9
+      </view>
7 10
     </view>
8 11
     <view class="panelItem FlexRow">
9 12
       <view class="{{CSS.CHN_HanZi.Css1}} panelItemFrame FlexRow" bindtap='getInputData' data-type="normal" data-content="{{Result.CHN.HanZi}}" data-css="CHN_HanZi">
@@ -52,14 +55,14 @@
52 55
       <view class="panelTitle1">拼音</view>
53 56
     </view>
54 57
     <view class="panelItem FlexRow">
55
-      <view class="{{CSS['CHN_PinYin_'+index+'_pinyin'].Css1}} panelItemFrame FlexRow" wx:for="{{Result.CHN.PinYin}}" wx:key="index" bindtap='getInputData' data-type="sound" data-content="{{item.pinyin}}" data-css="CHN_PinYin_{{index}}_pinyin"  data-tag="拼音">
58
+      <view class="{{CSS['CHN_PinYin_'+index+'_pinyin'].Css1}} panelItemFrame FlexRow" wx:for="{{Result.CHN.PinYin}}" wx:key="index" bindtap='getInputData' data-type="sound" data-content="{{item.pinyin}}" data-css="CHN_PinYin_{{index}}_pinyin" data-tag="拼音">
56 59
         <view class="{{CSS['CHN_PinYin_'+index+'_pinyin'].Css2}} panelSelect0">{{CSS['CHN_PinYin_'+index+'_pinyin'].Number}}</view>
57 60
         <view class="text2 text1">{{item.pinyin}}</view>
58 61
       </view>
59 62
     </view>
60 63
     <view class='lineFooter'></view>
61 64
   </block>
62
-  
65
+
63 66
   <!-- 组词 -->
64 67
   <block wx:if="{{Result.CHN.CombineWords && Result.CHN.CombineWords.length>0}}">
65 68
     <view class="panelTitle FlexRow">
@@ -87,7 +90,7 @@
87 90
     </view>
88 91
     <view class='lineFooter'></view>
89 92
   </block>
90
-  
93
+
91 94
   <!-- 反义词 -->
92 95
   <block wx:if="{{Result.CHN.Antonym && Result.CHN.Antonym.length>0}}">
93 96
     <view class="panelTitle FlexRow">
@@ -108,7 +111,7 @@
108 111
       <view class="panelTitle1">中文释义</view>
109 112
     </view>
110 113
     <view class="panelItem FlexRow">
111
-      <view class="{{CSS['CHN_PinYin_explain_'+index].Css1}} panelItemFrame FlexRow" wx:for="{{Result.CHN.PinYin}}" wx:key="index" bindtap='getInputData' data-type="normal" data-content="{{item.explain}}" data-css="CHN_PinYin_explain_{{index}}"  data-tag="释义">
114
+      <view class="{{CSS['CHN_PinYin_explain_'+index].Css1}} panelItemFrame FlexRow" wx:for="{{Result.CHN.PinYin}}" wx:key="index" bindtap='getInputData' data-type="normal" data-content="{{item.explain}}" data-css="CHN_PinYin_explain_{{index}}" data-tag="释义">
112 115
         <view class="{{CSS['CHN_PinYin_explain_'+index].Css2}} panelSelect0">{{CSS['CHN_PinYin_explain_'+index].Number}}</view>
113 116
         <text class="text1"><block wx:if="{{Result.CHN.PinYin.length>1}}">
114 117
         [{{item.pinyin}}]\n 
@@ -138,11 +141,13 @@
138 141
       <view class="panelTitle1">音标</view>
139 142
     </view>
140 143
     <view class="panelItem FlexRow">
141
-      <view class="{{CSS.ENG_Soundmark_Eng.Css1}} panelItemFrame FlexRow" wx:if="{{Result.ENG.Soundmark.Eng}}" bindtap='getInputData' data-type="sound" data-content="英 {{Result.ENG.Soundmark.Eng}}" data-soundmark="{{Result.ENG.Soundmark.EngSound}}" data-css="ENG_Soundmark_Eng" data-tag="发音">
144
+      <view class="{{CSS.ENG_Soundmark_Eng.Css1}} panelItemFrame FlexRow" wx:if="{{Result.ENG.Soundmark.Eng}}" bindtap='getInputData' data-type="sound" data-content="英 {{Result.ENG.Soundmark.Eng}}" data-soundmark="{{Result.ENG.Soundmark.EngSound}}" data-css="ENG_Soundmark_Eng"
145
+        data-tag="发音">
142 146
         <view class="{{CSS.ENG_Soundmark_Eng.Css2}} panelSelect0">{{CSS.ENG_Soundmark_Eng.Number}}</view>
143 147
         <view class="text2 text1">英 {{Result.ENG.Soundmark.Eng}}</view>
144 148
       </view>
145
-      <view class="{{CSS.ENG_Soundmark_AmE.Css1}} panelItemFrame FlexRow" wx:if="{{Result.ENG.Soundmark.AmE}}" bindtap='getInputData' data-type="sound" data-content="美 {{Result.ENG.Soundmark.AmE}}" data-soundmark="{{Result.ENG.Soundmark.AmESound}}" data-css="ENG_Soundmark_AmE" data-tag="发音">
149
+      <view class="{{CSS.ENG_Soundmark_AmE.Css1}} panelItemFrame FlexRow" wx:if="{{Result.ENG.Soundmark.AmE}}" bindtap='getInputData' data-type="sound" data-content="美 {{Result.ENG.Soundmark.AmE}}" data-soundmark="{{Result.ENG.Soundmark.AmESound}}" data-css="ENG_Soundmark_AmE"
150
+        data-tag="发音">
146 151
         <view class="{{CSS.ENG_Soundmark_AmE.Css2}} panelSelect0">{{CSS.ENG_Soundmark_AmE.Number}} </view>
147 152
         <view class="text2 text1">美 {{Result.ENG.Soundmark.AmE}}</view>
148 153
       </view>
@@ -157,7 +162,8 @@
157 162
     </view>
158 163
     <view class="panelItem FlexRow">
159 164
       <block wx:for="{{Result.ENG.Paraphrase}}" wx:key="index" wx:if="{{item.ParaphraseList}}">
160
-        <view class="{{CSS['ENG_ParaphraseList_'+index+'_'+indexChild].Css1}} panelItemFrame FlexRow" wx:for="{{item.ParaphraseList}}" wx:key="index1" wx:for-item="itemChild"  wx:for-index="indexChild" bindtap='getInputData' data-type="normal" data-content="{{item.PartOfSpeech}} {{itemChild}}" data-css="ENG_ParaphraseList_{{index}}_{{indexChild}}" data-tag="翻译">
165
+        <view class="{{CSS['ENG_ParaphraseList_'+index+'_'+indexChild].Css1}} panelItemFrame FlexRow" wx:for="{{item.ParaphraseList}}" wx:key="index1" wx:for-item="itemChild" wx:for-index="indexChild" bindtap='getInputData' data-type="normal" data-content="{{item.PartOfSpeech}} {{itemChild}}"
166
+          data-css="ENG_ParaphraseList_{{index}}_{{indexChild}}" data-tag="翻译">
161 167
           <view class="{{CSS['ENG_ParaphraseList_'+index+'_'+indexChild].Css2}} panelSelect0">{{CSS['ENG_ParaphraseList_'+index+'_'+indexChild].Number}}</view>
162 168
           <text class="text1">{{item.PartOfSpeech}} {{itemChild}}</text>
163 169
         </view>
@@ -177,4 +183,27 @@
177 183
 
178 184
   <view class='panelSave' bindtap="addData">添加</view>
179 185
 
186
+</view>
187
+
188
+<view wx:if="{{IsShowHelp==0}}" catchtap='close' class="numberContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
189
+  <view class='numberContainer1 FlexColumn'>
190
+    <view class="numberContainer11 FlexRow">
191
+      <view class='left'>快捷键</view>
192
+      <view class='right'>
193
+      </view>
194
+    </view>
195
+    <view class="numberContainer12 FlexRow">
196
+      <text class='numberContainer121'>
197
+      点一下,添加到段落1;\n
198
+      第两下,添加到段落2;\n
199
+      第三下,添加到段落3;\n
200
+      第四下,不添加;\n
201
+      1、2、3是段落号码,和点选的先后顺序无关。
202
+      </text>
203
+    </view>
204
+    <view class='lineFooter'></view>
205
+    <view class="numberContainer13 FlexRow">
206
+      <view>知道了</view>
207
+    </view>
208
+  </view>
180 209
 </view>

+ 65 - 0
pages/main/searchWeb2.wxss

@@ -99,3 +99,68 @@
99 99
   line-height: 120rpx;
100 100
   border-top: 1rpx solid #d2d2d2;
101 101
 }
102
+
103
+
104
+.numberContainer {
105
+  background-color: rgba(0, 0, 0, 0.7);
106
+  position: fixed;
107
+  width: 100%;
108
+  top: 0;
109
+  z-index: 20;
110
+}
111
+
112
+.numberContainer1 {
113
+  background-color: #f0f0f0;
114
+  margin-top: 10rpx;
115
+  width: 730rpx;
116
+  border-radius: 10rpx;
117
+  font-size: 28rpx;
118
+  color: #1e1e1e;
119
+}
120
+
121
+.numberContainer11 {
122
+  border-top-left-radius: 10rpx;
123
+  border-top-right-radius: 10rpx;
124
+  justify-content: space-between;
125
+  height: 100rpx;
126
+  width: 100%;
127
+}
128
+
129
+.left {
130
+  margin-left: 30rpx;
131
+}
132
+
133
+.right {
134
+  width:100rpx;
135
+  height:80rpx;
136
+  justify-content: flex-start;
137
+}
138
+
139
+.universalpic_help_gray_26x26 {
140
+  width: 26rpx;
141
+  height: 26rpx;
142
+  margin-top: 12rpx;
143
+}
144
+
145
+.numberContainer12 {
146
+  width: 100%;
147
+  background-color: #fff;
148
+  margin-bottom: 50rpx;
149
+}
150
+.numberContainer121 {
151
+  width: 100%;
152
+  font-weight: 400;
153
+  font-size: 28rpx;
154
+  margin: 30rpx;
155
+  line-height: 20rpx;
156
+}
157
+
158
+.numberContainer13 {
159
+  height: 100rpx;
160
+  width: 100%;
161
+  color: #0071ef;
162
+  border-bottom-left-radius: 10rpx;
163
+  border-bottom-right-radius: 10rpx;
164
+  text-align: center;
165
+  font-weight: 500;
166
+}

+ 28 - 11
pages/main/setting.js

@@ -2,14 +2,14 @@ import common from '../../utils/util';
2 2
 import main from '../../utils/main';
3 3
 
4 4
 const app = getApp();
5
-const arrSortType = ["以前落下的笔记", "近期到期的笔记"];
6
-var arrUserName = ["程杰", "程晟涵"];
7
-var arrUserID = [1, 2];
5
+const arrSortType = ["过期时间较远的题卡", "过期时间较近的题卡"];
6
+var arrUserName = ["程杰", "程晟涵", "洪立人"];
7
+var arrUserID = [1, 2, 3];
8 8
 
9 9
 Page({
10 10
   data: {
11 11
     CardNumber: [],
12
-    IsShowChange:false,
12
+    IsShowChange: false,
13 13
   },
14 14
   onLoad: function () {
15 15
     wx.hideShareMenu();
@@ -41,8 +41,8 @@ Page({
41 41
       });
42 42
     });
43 43
     common.getStorageValue(this, "UserID", 1, function () {
44
-      for (var i = 0; i < arrUserID.length;i++){
45
-        if (arrUserID[i] == that.data.UserID){
44
+      for (var i = 0; i < arrUserID.length; i++) {
45
+        if (arrUserID[i] == that.data.UserID) {
46 46
           that.setData({
47 47
             UserName: arrUserName[i],
48 48
           });
@@ -50,13 +50,25 @@ Page({
50 50
         }
51 51
       }
52 52
     });
53
-
54
-    if (app.globalData.userInfo.UserID==1 || app.globalData.userInfo.UserID==2){
53
+    if (app.globalData.userInfo.UserID == 1 || app.globalData.userInfo.UserID == 2) {
55 54
       that.setData({
56 55
         IsShowChange: true,
57 56
       });
58 57
     }
59
-
58
+  },
59
+  onShow: function () {
60
+    var colorIndex = wx.getStorageSync("ColorIndex");
61
+    if (!colorIndex) {
62
+      this.setData({
63
+        ColorName: "每次更换配色",
64
+      });
65
+    }
66
+    else {
67
+      var color = main.getDetailColor(colorIndex);
68
+      this.setData({
69
+        ColorName: color.Name,
70
+      });
71
+    }
60 72
   },
61 73
   bindUpdateCardNumberNewMax: function (e) {
62 74
     this.data.CardMaxNumberNewIndex = e.detail.value;
@@ -74,8 +86,8 @@ Page({
74 86
     });
75 87
     wx.setStorageSync("CardMaxNumberHistory", this.data.CardNumber[this.data.CardMaxNumberHistoryIndex]);
76 88
   },
77
-  setSortType:function(){
78
-    var that=this;
89
+  setSortType: function () {
90
+    var that = this;
79 91
     wx.showActionSheet({
80 92
       itemList: arrSortType,
81 93
       success(res) {
@@ -111,6 +123,11 @@ Page({
111 123
       }
112 124
     })
113 125
   },
126
+  setColorPlan: function () {
127
+    wx.navigateTo({
128
+      url: './colorplan',
129
+    })
130
+  },
114 131
   onShareAppMessage: function () {
115 132
     return {
116 133
       title: app.globalData.ShareTitle,

+ 25 - 10
pages/main/setting.wxml

@@ -1,10 +1,10 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2 2
   <view class="panelTitle FlexRow">
3 3
     <view class="panelTitle1">任务量</view>
4
-    <view class="panelTitle2">每天最多{{CardMaxNumberNew+CardMaxNumberHistory}}条笔记</view>
4
+    <view class="panelTitle2">每天{{CardMaxNumberNew+CardMaxNumberHistory}}张题卡</view>
5 5
   </view>
6 6
   <view class="panelItem FlexRow">
7
-    <view class="panelItem1">新笔记数量上限</view>
7
+    <view class="panelItem1">新题卡上限</view>
8 8
     <view class="panelItem2 FlexRow">
9 9
       <picker bindchange="bindUpdateCardNumberNewMax" value="{{CardMaxNumberNewIndex}}" range="{{CardNumber}}">
10 10
         <view class="picker">
@@ -18,7 +18,7 @@
18 18
     <view class="lineWidth720"></view>
19 19
   </view>
20 20
   <view class="panelItem FlexRow">
21
-    <view class="panelItem1">旧笔记数量上限</view>
21
+    <view class="panelItem1">旧题卡上限</view>
22 22
     <view class="panelItem2 FlexRow">
23 23
       <picker bindchange="bindUpdateCardNumberHistoryMax" value="{{CardMaxNumberHistoryIndex}}" range="{{CardNumber}}">
24 24
         <view class="picker">
@@ -34,7 +34,7 @@
34 34
     <view class="panelTitle2"></view>
35 35
   </view>
36 36
   <view class="panelItem FlexRow" bindtap='setSortType'>
37
-    <view class="panelItem1">优先选取</view>
37
+    <view class="panelItem1">优先安排</view>
38 38
     <view class="panelItem2 FlexRow">
39 39
       <view class="picker">
40 40
         {{SortType}}
@@ -43,22 +43,37 @@
43 43
     </view>
44 44
   </view>
45 45
   <view class='lineFooter'></view>
46
-  <block wx:if="{{IsShowChange}}">
47 46
   <view class="panelTitle FlexRow">
48
-    <view class="panelTitle1">切换帐号</view>
47
+    <view class="panelTitle1">主题色</view>
49 48
     <view class="panelTitle2"></view>
50 49
   </view>
51
-  <view class="panelItem FlexRow" bindtap='setSelectUser'>
52
-    <view class="panelItem1">当前帐号</view>
50
+  <view class="panelItem FlexRow" bindtap='setColorPlan'>
51
+    <view class="panelItem1">练习中界面</view>
53 52
     <view class="panelItem2 FlexRow">
54 53
       <view class="picker">
55
-        {{UserName}}
54
+        {{ColorName}}
56 55
       </view>
57 56
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
58 57
     </view>
59 58
   </view>
60 59
   <view class='lineFooter'></view>
60
+
61
+  <block wx:if="{{IsShowChange}}">
62
+    <view class="panelTitle FlexRow">
63
+      <view class="panelTitle1">切换帐号</view>
64
+      <view class="panelTitle2"></view>
65
+    </view>
66
+    <view class="panelItem FlexRow" bindtap='setSelectUser'>
67
+      <view class="panelItem1">当前帐号</view>
68
+      <view class="panelItem2 FlexRow">
69
+        <view class="picker">
70
+          {{UserName}}
71
+        </view>
72
+        <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
73
+      </view>
74
+    </view>
75
+    <view class='lineFooter'></view>
61 76
   </block>
62
-  
77
+
63 78
   <view style='height:350rpx'></view>
64 79
 </view>

+ 8 - 1
project.config.json

@@ -43,7 +43,14 @@
43 43
 					"id": 0,
44 44
 					"name": "分享",
45 45
 					"pathName": "pages/index/index",
46
-					"query": "UserID=1&Share=1&MiaoguoCardID=3947",
46
+					"query": "UserID=1&Share=1&MiaoguoCardID=3978",
47
+					"scene": null
48
+				},
49
+				{
50
+					"id": -1,
51
+					"name": "帮助",
52
+					"pathName": "pages/main/searchWeb2",
53
+					"query": "",
47 54
 					"scene": null
48 55
 				}
49 56
 			]

+ 101 - 173
utils/main.js

@@ -237,22 +237,6 @@ function getStorageValue(obj, name, defaultStatus, callback) {
237 237
   });
238 238
 }
239 239
 
240
-function getDifficulty(num) {
241
-  switch (Number(num)) {
242
-    case 3:
243
-    case 4:
244
-    case 5:
245
-      return "EASY";
246
-    case 6:
247
-    case 7:
248
-      return "HARD";
249
-    case 8:
250
-    case 9:
251
-      return "SUPER";
252
-  }
253
-}
254
-
255
-
256 240
 function getProgramList() {
257 241
   return [
258 242
     {
@@ -397,8 +381,8 @@ function changeStringToView(field) {
397 381
                   });
398 382
                   temp = "";
399 383
                 }
400
-                else{
401
-                  if (temp && temp.indexOf("[线]")<0){
384
+                else {
385
+                  if (temp && temp.indexOf("[线]") < 0) {
402 386
                     content.push({
403 387
                       key: "normal",
404 388
                       value: temp,
@@ -467,185 +451,130 @@ function changeStringToView(field) {
467 451
   return result;
468 452
 }
469 453
 
470
-function getDetailColor() {
454
+function getDetailColor(index) {
471 455
   var arr = [
456
+    {//随机
457
+      Name: "每次更换配色",
458
+    },
472 459
     {//配色1
473
-      BackColor: "#F44336",
474
-      FrontColor: "#ffffff",
475
-      SelectBackColor: "#ffffff",
476
-      SelectFrontColor: "#1E1E1E",
477
-      TagBackColor: "#9C2880",
460
+      Name:"黑白",
461
+      BackColor: "#ffffff",
462
+      BackColor1: "#D2D2D2",
463
+      FrontColor: "#1E1E1E",
464
+      FrontColor1: "rgba(0,0,0,0.3)",
465
+      BackColor2: "#E3E3E3",
466
+      BackColor20: 'rgba(227,227,227,0)',
467
+      FrontColor2: "#1E1E1E",
468
+      TagColor: "#9B9B9B",
469
+      FieldLineColor: "#4B3840",
470
+      IconColor: "black",
471
+      FrontColorNavigationBar: "#000000",
478 472
     },
479 473
     {//配色2
480
-      BackColor: "#D81B60",
474
+      Name: "珊瑚树",
475
+      BackColor: "#A5656E",
476
+      BackColor1: "#7F4B52",
481 477
       FrontColor: "#ffffff",
482
-      SelectBackColor: "#ffffff",
483
-      SelectFrontColor: "#1E1E1E",
484
-      TagBackColor: "#E86D24",
478
+      FrontColor1: "rgba(255,255,255,0.5)",
479
+      BackColor2: "#362738",
480
+      BackColor20: 'rgba(54,39,56,0)',
481
+      FrontColor2: "#D2AFBC",
482
+      TagColor: "#7F4B52",
483
+      FieldLineColor: "#D2D2D2",
484
+      IconColor: "white",
485
+      FrontColorNavigationBar: "#ffffff",
485 486
     },
486 487
     {//配色3
487
-      BackColor: "#8E24AA",
488
+      Name: "水果沙拉",
489
+      BackColor: "#67A05D",
490
+      BackColor1: "#467A5C",
488 491
       FrontColor: "#ffffff",
489
-      SelectBackColor: "#ffffff",
490
-      SelectFrontColor: "#1E1E1E",
491
-      TagBackColor: "#E86D24",
492
+      FrontColor1: "rgba(255,255,255,0.5)",
493
+      BackColor2: "#403F48",
494
+      BackColor20: 'rgba(64,63,72,0)',
495
+      FrontColor2: "#E3D9CA",
496
+      TagColor: "#467A5C",
497
+      FieldLineColor: "#605F6C",
498
+      IconColor: "white",
499
+      FrontColorNavigationBar: "#ffffff",
492 500
     },
493 501
     {//配色4
494
-      BackColor: "#6639B5",
502
+      Name: "瞭望",
503
+      BackColor: "#0B8457",
504
+      BackColor1: "#1F6349",
495 505
       FrontColor: "#ffffff",
496
-      SelectBackColor: "#ffffff",
497
-      SelectFrontColor: "#1E1E1E",
498
-      TagBackColor: "#E86D24",
506
+      FrontColor1: "rgba(255,255,255,0.5)",
507
+      BackColor2: "#292C3B",
508
+      BackColor20: 'rgba(41,44,59,0)',
509
+      FrontColor2: "#AAC4C0",
510
+      TagColor: "#1F6349",
511
+      FieldLineColor: "#353A4C",
512
+      IconColor: "white",
513
+      FrontColorNavigationBar: "#ffffff",
499 514
     },
500 515
     {//配色5
501
-      BackColor: "#3F51B5",
516
+      Name: "软糖豆",
517
+      BackColor: "#018790",
518
+      BackColor1: "#1C686C",
502 519
       FrontColor: "#ffffff",
503
-      SelectBackColor: "#ffffff",
504
-      SelectFrontColor: "#1E1E1E",
505
-      TagBackColor: "#E54627",
520
+      FrontColor1: "rgba(255,255,255,0.5)",
521
+      BackColor2: "#262938",
522
+      BackColor20: 'rgba(38,41,56,0)',
523
+      FrontColor2: "#A9AEC5",
524
+      TagColor: "#1C686C",
525
+      FieldLineColor: "#414760",
526
+      IconColor: "white",
527
+      FrontColorNavigationBar: "#ffffff",
506 528
     },
507 529
     {//配色6
508
-      BackColor: "#1E88E5",
530
+      Name: "沙漏",
531
+      BackColor: "#A3816A",
532
+      BackColor1: "#7D614E",
509 533
       FrontColor: "#ffffff",
510
-      SelectBackColor: "#ffffff",
511
-      SelectFrontColor: "#1E1E1E",
512
-      TagBackColor: "#E54627",
534
+      FrontColor1: "rgba(255,255,255,0.5)",
535
+      BackColor2: "#242337",
536
+      BackColor20: 'rgba(36,35,55,0)',
537
+      FrontColor2: "#A6A4C5",
538
+      TagColor: "#7D614E",
539
+      FieldLineColor: "#3B3F56",
540
+      IconColor: "white",
541
+      FrontColorNavigationBar: "#ffffff",
513 542
     },
514 543
     {//配色7
515
-      BackColor: "#039BE5",
544
+      Name: "曼巴",
545
+      BackColor: "#7E7373",
546
+      BackColor1: "#E08371",
516 547
       FrontColor: "#ffffff",
517
-      SelectBackColor: "#ffffff",
518
-      SelectFrontColor: "#1E1E1E",
519
-      TagBackColor: "#E54627",
548
+      FrontColor1: "rgba(255,255,255,0.5)",
549
+      BackColor2: "#2B2828",
550
+      BackColor20: 'rgba(43,40,40,0)',
551
+      FrontColor2: "#D3C0C0",
552
+      TagColor: "#E08371",
553
+      FieldLineColor: "#4E4949",
554
+      IconColor: "white",
555
+      FrontColorNavigationBar: "#ffffff",
520 556
     },
521 557
     {//配色8
522
-      BackColor: "#00ACC1",
523
-      FrontColor: "#ffffff",
524
-      SelectBackColor: "#ffffff",
525
-      SelectFrontColor: "#1E1E1E",
526
-      TagBackColor: "#E54627",
527
-    },
528
-    {//配色9
529
-      BackColor: "#009688",
558
+      Name: "烧赭",
559
+      BackColor: "#FB6C54",
560
+      BackColor1: "#CC554D",
530 561
       FrontColor: "#ffffff",
531
-      SelectBackColor: "#ffffff",
532
-      SelectFrontColor: "#1E1E1E",
533
-      TagBackColor: "#2A6358",
534
-    },
535
-    {//配色10
536
-      BackColor: "#43A047",
537
-      FrontColor: "#ffffff",
538
-      SelectBackColor: "#ffffff",
539
-      SelectFrontColor: "#1E1E1E",
540
-      TagBackColor: "#2A6358",
541
-    },
542
-    {//配色11
543
-      BackColor: "#71B12D",
544
-      FrontColor: "#ffffff",
545
-      SelectBackColor: "#ffffff",
546
-      SelectFrontColor: "#1E1E1E",
547
-      TagBackColor: "#2A6358",
548
-    },
549
-    {//配色12
550
-      BackColor: "#CFDA37",
551
-      FrontColor: "#1e1e1e",
552
-      SelectBackColor: "#868E25",
553
-      SelectFrontColor: "#FFFFFF",
554
-      TagBackColor: "#868E25",
555
-    },
556
-    {//配色13
557
-      BackColor: "#F9D342",
558
-      FrontColor: "#1e1e1e",
559
-      SelectBackColor: "#C46C28",
560
-      SelectFrontColor: "#FFFFFF",
561
-      TagBackColor: "#C46C28",
562
-    },
563
-    {//配色14
564
-      BackColor: "#FF9F33",
565
-      FrontColor: "#1e1e1e",
566
-      SelectBackColor: "#C46C28",
567
-      SelectFrontColor: "#FFFFFF",
568
-      TagBackColor: "#C46C28",
569
-    },
570
-    {//配色15
571
-      BackColor: "#EE7F33",
572
-      FrontColor: "#ffffff",
573
-      SelectBackColor: "#ffffff",
574
-      SelectFrontColor: "#1E1E1E",
575
-      TagBackColor: "#C43928",
576
-    },
577
-    {//配色16
578
-      BackColor: "#FF5722",
579
-      FrontColor: "#ffffff",
580
-      SelectBackColor: "#ffffff",
581
-      SelectFrontColor: "#1E1E1E",
582
-      TagBackColor: "#C42843",
583
-    },
584
-    {//配色17
585
-      BackColor: "#795548",
586
-      FrontColor: "#ffffff",
587
-      SelectBackColor: "#ffffff",
588
-      SelectFrontColor: "#1E1E1E",
589
-      TagBackColor: "#CC2A38",
590
-    },
591
-    {//配色18
592
-      BackColor: "#616161",
593
-      FrontColor: "#ffffff",
594
-      SelectBackColor: "#ffffff",
595
-      SelectFrontColor: "#1E1E1E",
596
-      TagBackColor: "#9C3724",
597
-    },
598
-    {//配色19
599
-      BackColor: "#FFBC00",
600
-      FrontColor: "#1e1e1e",
601
-      SelectBackColor: "#9C6226",
602
-      SelectFrontColor: "#ffffff",
603
-      TagBackColor: "#9C6226",
604
-    },
605
-    {//配色20
606
-      BackColor: "#ACC6AA",
607
-      FrontColor: "#1e1e1e",
608
-      SelectBackColor: "#6F7F6D",
609
-      SelectFrontColor: "#ffffff",
610
-      TagBackColor: "#6F7F6D",
611
-    },
612
-    {//配色21
613
-      BackColor: "#74B49B",
614
-      FrontColor: "#ffffff",
615
-      SelectBackColor: "#ffffff",
616
-      SelectFrontColor: "#1e1e1e",
617
-      TagBackColor: "#9A4391",
618
-    },
619
-    {//配色22
620
-      BackColor: "#0B8457",
621
-      FrontColor: "#ffffff",
622
-      SelectBackColor: "#ffffff",
623
-      SelectFrontColor: "#1e1e1e",
624
-      TagBackColor: "#9A4391",
625
-    },
626
-    {//配色23
627
-      BackColor: "#34699A",
628
-      FrontColor: "#ffffff",
629
-      SelectBackColor: "#ffffff",
630
-      SelectFrontColor: "#1e1e1e",
631
-      TagBackColor: "#D44139",
632
-    },
633
-    {//配色24
634
-      BackColor: "#234A9A",
635
-      FrontColor: "#ffffff",
636
-      SelectBackColor: "#ffffff",
637
-      SelectFrontColor: "#1e1e1e",
638
-      TagBackColor: "#D44139",
639
-    },
640
-    {//配色25
641
-      BackColor: "#786489",
642
-      FrontColor: "#ffffff",
643
-      SelectBackColor: "#ffffff",
644
-      SelectFrontColor: "#1e1e1e",
645
-      TagBackColor: "#E69109",
562
+      FrontColor1: "rgba(255,255,255,0.5)",
563
+      BackColor2: "#36303F",
564
+      BackColor20: 'rgba(54,48,63,0)',
565
+      FrontColor2: "#AAA8BC",
566
+      TagColor: "#CC554D",
567
+      FieldLineColor: "#3D3B4D",
568
+      IconColor: "white",
569
+      FrontColorNavigationBar: "#ffffff",
646 570
     },
647 571
   ];
648
-  return arr;
572
+  if (index > 0)
573
+    return arr[index];
574
+  else if (index == 0)
575
+    return arr[common.random(1, arr.length - 1)];
576
+  else if (index==-1)
577
+    return arr;
649 578
 }
650 579
 
651 580
 function getPinyin(pinyin) {
@@ -2153,7 +2082,6 @@ module.exports = {
2153 2082
   getTimeFormat: getTimeFormat,
2154 2083
   getWindowHeight: getWindowHeight,
2155 2084
   getStorageValue: getStorageValue,
2156
-  getDifficulty: getDifficulty,
2157 2085
   getProgramList: getProgramList,
2158 2086
   gotoFeedback: gotoFeedback,
2159 2087
   getDetailColor: getDetailColor,