chengjie 6 gadi atpakaļ
vecāks
revīzija
d29d63a708

+ 1 - 1
app.js

@@ -26,7 +26,7 @@ App({
26 26
   },
27 27
   globalData: {
28 28
     Version: "1.1.9",
29
-    IsProduction: true,
29
+    IsProduction: false,
30 30
     ShareTitle: "刻意学习,高效成长",
31 31
     SharePath: "pages/index/index",
32 32
     ShareImage: '',

BIN
pages/images/universalpic_fav_white_120x110.png


BIN
pages/images/universalpic_home_gray_28x28.png


BIN
pages/images/universalpic_home_gray_36x36.png


BIN
pages/images/universalpic_shelve_white_120x120.png


BIN
pages/images/universalpic_undo_white_120x90.png


+ 27 - 23
pages/index/index.js

@@ -233,32 +233,36 @@ Page({
233 233
   //得到当天任务
234 234
   getTaskTodayList: function () {
235 235
     var that = this;
236
-    common.getStorageValue(that, "CardMaxNumberNew", 10, function () {
237
-      common.getStorageValue(that, "CardMaxNumberHistory", 30, function () {
238
-        common.getStorageValue(that, "SortTypeIndex", 0, function () {
239
-          var url = 'GetMiaoguoCardToday?UserID=' + app.globalData.userInfo.UserID;
240
-          url += "&New=" + that.data.CardMaxNumberNew;
241
-          url += "&History=" + that.data.CardMaxNumberHistory;
242
-          url += "&SortTypeIndex=" + that.data.SortTypeIndex;
243
-
244
-          main.getData(url, function (data) {
245
-            if (data) {
246
-              var TodayTaskNumber = data.ListNew.length + data.ListReview.length + data.ListHistory.length;
247
-              that.setData({
248
-                List: data,
249
-                DayNumber: data.DayNumber,
250
-                TodayTaskNumber: TodayTaskNumber,
251
-                IsStart: data.IsStart,
252
-              });
253
-
254
-              app.globalData.TaskToday = data;
255
-              app.globalData.CardList = [];
256
-            }
236
+    main.postData('UploadUserConfig?Type=getData&UserID=' + app.globalData.userInfo.UserID, {}, function (data) {
237
+      var url = 'GetMiaoguoCardToday?UserID=' + app.globalData.userInfo.UserID;
238
+      url += "&New=" + data.CardMaxNumberNew;
239
+      url += "&History=" + data.CardMaxNumberHistory;
240
+      url += "&SortTypeIndex=" + data.SortTypeIndex;
241
+
242
+      main.getData(url, function (data) {
243
+        if (data) {
244
+          var TodayTaskNumber = data.ListNew.length + data.ListReview.length + data.ListHistory.length;
245
+          that.setData({
246
+            List: data,
247
+            DayNumber: data.DayNumber,
248
+            TodayTaskNumber: TodayTaskNumber,
249
+            IsStart: data.IsStart,
257 250
           });
258
-        });
251
+
252
+          app.globalData.TaskToday = data;
253
+          app.globalData.CardList = [];
254
+        }
259 255
       });
260
-    });
261 256
 
257
+      wx.setStorageSync("CardMaxNumberNew", data.CardMaxNumberNew);
258
+      wx.setStorageSync("CardMaxNumberHistory", data.CardMaxNumberHistory);
259
+      wx.setStorageSync("SortTypeIndex", data.SortTypeIndex);
260
+      wx.setStorageSync("MemoryLevel", data.MemoryLevel);
261
+      wx.setStorageSync("ClickType", data.ClickType);
262
+      wx.setStorageSync("SecondConfigArray", data.SecondConfigArray.split(","));
263
+      wx.setStorageSync("ColorIndexArr", data.ColorIndexArr.split(","));
264
+    
265
+    });
262 266
   },
263 267
   updateProgram: function () {
264 268
     const updateManager = wx.getUpdateManager();

+ 1 - 0
pages/main/clicktype.js

@@ -67,6 +67,7 @@ Page({
67 67
     });
68 68
 
69 69
     wx.setStorageSync("ClickType", index);
70
+    main.UploadUserConfig();
70 71
   },
71 72
   onShareAppMessage: function () {
72 73
     return {

+ 1 - 0
pages/main/colorplan.js

@@ -63,6 +63,7 @@ Page({
63 63
     });
64 64
 
65 65
     wx.setStorageSync("ColorIndexArr", arr);
66
+    main.UploadUserConfig();
66 67
   },
67 68
   onShareAppMessage: function () {
68 69
     return {

+ 1 - 0
pages/main/memoryLevel.js

@@ -36,6 +36,7 @@ Page({
36 36
     this.init(index);
37 37
     wx.setStorageSync("MemoryLevel", index);
38 38
     app.globalData.MemoryLevel=index;
39
+    main.UploadUserConfig();
39 40
   },
40 41
   onShareAppMessage: function () {
41 42
     return {

+ 1 - 1
pages/main/preview.wxml

@@ -74,7 +74,7 @@
74 74
 
75 75
     <view class="panelFooter FlexRow" wx:if="{{ShowType=='share'}}">
76 76
       <view class='btn1 FlexRow' catchtap="returnDefault">
77
-        <image class="universalpic_home_gray_28x28" src='../images/universalpic_home_gray_28x28.png' />
77
+        <image class="universalpic_home_gray_36x36" src='../images/universalpic_home_gray_36x36.png' />
78 78
       </view>
79 79
       <view class='btn2 FlexRow'>
80 80
         <button class="btn21" catchtap="copyCard">另存为我的题卡</button>

+ 3 - 3
pages/main/preview.wxss

@@ -412,7 +412,7 @@
412 412
   height: 10rpx;
413 413
 }
414 414
 
415
-.universalpic_home_gray_28x28{
416
-  width: 28rpx;
417
-  height: 28rpx;
415
+.universalpic_home_gray_36x36{
416
+  width: 36rpx;
417
+  height: 36rpx;
418 418
 }

+ 6 - 3
pages/main/recommend.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
+const DefaultSecondArray=[5,40,60];
5 6
 
6 7
 Page({
7 8
   data: {
@@ -34,7 +35,7 @@ Page({
34 35
       secondConfig=[0,0,0];
35 36
     }
36 37
     else{
37
-      secondConfig = [5, 40, 60];
38
+      secondConfig = DefaultSecondArray;
38 39
       that.data.IsChangeRecommend = true;
39 40
       for (var j = 0; j < 3; j++) {
40 41
         var arr = [];
@@ -72,6 +73,7 @@ Page({
72 73
       });
73 74
       var arr = [this.data.SecondConfig[0].Value, this.data.SecondConfig[1].Value, this.data.SecondConfig[2].Value];
74 75
       wx.setStorageSync("SecondConfigArray", arr);
76
+      main.UploadUserConfig();
75 77
     }
76 78
   },
77 79
   switch1Change(e) {
@@ -82,10 +84,11 @@ Page({
82 84
       IsChangeRecommend: that.data.IsChangeRecommend,
83 85
     });
84 86
     if (that.data.IsChangeRecommend)
85
-      wx.setStorageSync("SecondConfigArray", [10, 30, 50]);
87
+      wx.setStorageSync("SecondConfigArray", DefaultSecondArray);
86 88
     else
87 89
       wx.setStorageSync("SecondConfigArray", [0, 0, 0]);
88
-
90
+    
91
+    main.UploadUserConfig();
89 92
     that.init();
90 93
   },
91 94
   onShareAppMessage: function () {

+ 3 - 0
pages/main/setting.js

@@ -103,6 +103,7 @@ Page({
103 103
       CardMaxNumberNew: this.data.CardNumber[this.data.CardMaxNumberNewIndex],
104 104
     });
105 105
     wx.setStorageSync("CardMaxNumberNew", this.data.CardNumber[this.data.CardMaxNumberNewIndex]);
106
+    main.UploadUserConfig();
106 107
   },
107 108
   bindUpdateCardNumberHistoryMax: function (e) {
108 109
     this.data.CardMaxNumberHistoryIndex = e.detail.value;
@@ -111,6 +112,7 @@ Page({
111 112
       CardMaxNumberHistory: this.data.CardNumber[this.data.CardMaxNumberHistoryIndex],
112 113
     });
113 114
     wx.setStorageSync("CardMaxNumberHistory", this.data.CardNumber[this.data.CardMaxNumberHistoryIndex]);
115
+    main.UploadUserConfig();
114 116
   },
115 117
   setSortType: function () {
116 118
     var that = this;
@@ -121,6 +123,7 @@ Page({
121 123
           SortType: arrSortType2[res.tapIndex],
122 124
         });
123 125
         wx.setStorageSync("SortTypeIndex", res.tapIndex);
126
+        main.UploadUserConfig();
124 127
       },
125 128
       fail(res) {
126 129
         console.log(res.errMsg)

+ 19 - 2
utils/main.js

@@ -558,6 +558,22 @@ function saveTempImage(serverUrl, tempUrl) {
558 558
   wx.setStorageSync("TempImageList", list);
559 559
 }
560 560
 
561
+function UploadUserConfig() {
562
+  var that=this;
563
+  var param1 = {};
564
+  param1.CardMaxNumberNew = wx.getStorageSync("CardMaxNumberNew");
565
+  param1.CardMaxNumberHistory = wx.getStorageSync("CardMaxNumberHistory");
566
+  param1.SortTypeIndex = wx.getStorageSync("SortTypeIndex");
567
+  param1.MemoryLevel = wx.getStorageSync("MemoryLevel");
568
+  
569
+  param1.ClickType = wx.getStorageSync("ClickType");
570
+  param1.SecondConfigArray = wx.getStorageSync("SecondConfigArray");
571
+  param1.ColorIndexArr = wx.getStorageSync("ColorIndexArr");
572
+
573
+  that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {
574
+  });
575
+}
576
+
561 577
 function UpdateMiaoguoCardTodayAll(isShowLoading, callback) {
562 578
   var that = this;
563 579
   if (isShowLoading) {
@@ -659,14 +675,14 @@ function setCollect(id,collect,callback) {
659 675
     wx.showToast({
660 676
       title: '添加到幻灯片',
661 677
       duration: 2000,
662
-      image: "../images/universalpic_fav_enable_white_120x110.png",
678
+      image: "../images/universalpic_fav_white_120x110.png",
663 679
     });
664 680
   }
665 681
   else {
666 682
     wx.showToast({
667 683
       title: '从幻灯片移除',
668 684
       duration: 2000,
669
-      image: "../images/universalpic_fav_enable_white_120x110.png",
685
+      image: "../images/universalpic_fav_white_120x110.png",
670 686
     });
671 687
   }
672 688
   getData("UpdateMiaoguoCardInfo?UserID=" + app.globalData.userInfo.UserID + "&MiaoguoCardID=" + id+ "&IsCollect=" + collect, function (data) { 
@@ -2316,4 +2332,5 @@ module.exports = {
2316 2332
   getShareImageBackColor: getShareImageBackColor,
2317 2333
   UpdateMiaoguoCardTodayAll: UpdateMiaoguoCardTodayAll,
2318 2334
   setCollect: setCollect,
2335
+  UploadUserConfig: UploadUserConfig,
2319 2336
 }