chengjie 6 years ago
parent
commit
b48bde7a16

+ 1 - 1
app.js

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

+ 1 - 1
app.json

@@ -19,11 +19,11 @@
19
     "pages/main/searchWeb",
19
     "pages/main/searchWeb",
20
     "pages/main/detail",
20
     "pages/main/detail",
21
     "pages/main/memoryLevel",
21
     "pages/main/memoryLevel",
22
-    "pages/other/payinfo",
23
     "pages/other/lessonlist",
22
     "pages/other/lessonlist",
24
     "pages/other/userlist",
23
     "pages/other/userlist",
25
     "pages/other/binding",
24
     "pages/other/binding",
26
     "pages/other/homework",
25
     "pages/other/homework",
26
+    "pages/other/pay",
27
     "pages/main/setting"
27
     "pages/main/setting"
28
   ],
28
   ],
29
   "window": {
29
   "window": {

BIN
pages/images/universalpic_bell_black_30x30.png


BIN
pages/images/universalpic_highlighter_begin_gray_24x20.png


BIN
pages/images/universalpic_highlighter_end_white_24x20.png


+ 1 - 2
pages/index/accredit.wxml

@@ -12,6 +12,5 @@
12
     </button>
12
     </button>
13
   </view>
13
   </view>
14
 
14
 
15
-  <view class="text3">本产品仅对受邀用户开放
16
-  </view>
15
+  <view class="text3">本产品仅对受邀用户开放</view>
17
 </view>
16
 </view>

+ 9 - 26
pages/index/index.js

@@ -32,6 +32,7 @@ Page({
32
     })
32
     })
33
   },
33
   },
34
   onLoad: function (options) {
34
   onLoad: function (options) {
35
+    console.log("Time1:"+new Date().getTime());
35
     if (options) {
36
     if (options) {
36
       if (options.UserID) {
37
       if (options.UserID) {
37
         console.log("UserID:" + options.UserID);
38
         console.log("UserID:" + options.UserID);
@@ -108,7 +109,7 @@ Page({
108
         app.globalData.userInfo = {};
109
         app.globalData.userInfo = {};
109
         app.globalData.userInfo.Code = res0.code;
110
         app.globalData.userInfo.Code = res0.code;
110
         //console.log("Code:" + res0.code);
111
         //console.log("Code:" + res0.code);
111
-
112
+        console.log("Time2:" + new Date().getTime());
112
         wx.getSetting({
113
         wx.getSetting({
113
           scope: "scope.userInfo",
114
           scope: "scope.userInfo",
114
           success(res) {
115
           success(res) {
@@ -126,6 +127,7 @@ Page({
126
               wx.getUserInfo({
127
               wx.getUserInfo({
127
                 withCredentials: false,
128
                 withCredentials: false,
128
                 success: function (res) {
129
                 success: function (res) {
130
+                  console.log("Time3:" + new Date().getTime());
129
                   app.globalData.userInfo = res.userInfo;
131
                   app.globalData.userInfo = res.userInfo;
130
 
132
 
131
                   app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
133
                   app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
@@ -181,6 +183,7 @@ Page({
181
         SDKVersion: app.globalData.systemInfo.SDKVersion,
183
         SDKVersion: app.globalData.systemInfo.SDKVersion,
182
         ProgramVersion: app.globalData.Version,
184
         ProgramVersion: app.globalData.Version,
183
       }, function (data) {
185
       }, function (data) {
186
+        console.log("Time4:" + new Date().getTime());
184
         if (!data) {
187
         if (!data) {
185
           timeout3 = setTimeout(function () {
188
           timeout3 = setTimeout(function () {
186
             that.getUserInfo();
189
             that.getUserInfo();
@@ -231,6 +234,7 @@ Page({
231
             var url = '../main/default?IsStart=1';
234
             var url = '../main/default?IsStart=1';
232
 
235
 
233
             setTimeout(function () {
236
             setTimeout(function () {
237
+              console.log("Time5:" + new Date().getTime());
234
               clearTimeout(timeout1);
238
               clearTimeout(timeout1);
235
 
239
 
236
               wx.redirectTo({
240
               wx.redirectTo({
@@ -238,9 +242,8 @@ Page({
238
               });
242
               });
239
             }, 2000);
243
             }, 2000);
240
 
244
 
241
-            main.UpdateMiaoguoCardTodayAll(false,function () {
242
-              that.getTaskTodayList();
243
-            });
245
+            that.getUserConfig();
246
+            
244
           }
247
           }
245
           that.getBaiduToken();
248
           that.getBaiduToken();
246
         }
249
         }
@@ -256,30 +259,10 @@ Page({
256
       }
259
       }
257
     });
260
     });
258
   },
261
   },
259
-  //得到当天任务
260
-  getTaskTodayList: function () {
262
+  getUserConfig: function () {
261
     var that = this;
263
     var that = this;
262
     main.postData('UploadUserConfig?Type=getData&UserID=' + app.globalData.userInfo.UserID, {}, function (data) {
264
     main.postData('UploadUserConfig?Type=getData&UserID=' + app.globalData.userInfo.UserID, {}, function (data) {
263
-      var url = 'GetMiaoguoCardToday?UserID=' + app.globalData.userInfo.UserID;
264
-      url += "&New=" + data.CardMaxNumberNew;
265
-      url += "&History=" + data.CardMaxNumberHistory;
266
-      url += "&SortTypeIndex=" + data.SortTypeIndex;
267
-
268
-      main.getData(url, function (data) {
269
-        if (data) {
270
-          var TodayTaskNumber = data.ListNew.length + data.ListReview.length + data.ListHistory.length;
271
-          that.setData({
272
-            List: data,
273
-            DayNumber: data.DayNumber,
274
-            TodayTaskNumber: TodayTaskNumber,
275
-            IsStart: data.IsStart,
276
-          });
277
-
278
-          app.globalData.TaskToday = data;
279
-          app.globalData.CardList = [];
280
-        }
281
-      });
282
-
265
+      
283
       wx.setStorageSync("CardMaxNumberNew", data.CardMaxNumberNew);
266
       wx.setStorageSync("CardMaxNumberNew", data.CardMaxNumberNew);
284
       wx.setStorageSync("CardMaxNumberHistory", data.CardMaxNumberHistory);
267
       wx.setStorageSync("CardMaxNumberHistory", data.CardMaxNumberHistory);
285
       wx.setStorageSync("SortTypeIndex", data.SortTypeIndex);
268
       wx.setStorageSync("SortTypeIndex", data.SortTypeIndex);

+ 77 - 49
pages/main/add.js

@@ -2,6 +2,7 @@ import common from '../../utils/util';
2
 import main from '../../utils/main';
2
 import main from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
+const PracticeTimeArr = ["智能安排", "今天必练", "推迟一周", "推迟一个月", "推迟三个月"];
5
 var arrTag = [];
6
 var arrTag = [];
6
 
7
 
7
 var tempCursor = undefined,
8
 var tempCursor = undefined,
@@ -13,14 +14,14 @@ var isSave = true;
13
 var interval;
14
 var interval;
14
 var timeoutUploadImage = 0;
15
 var timeoutUploadImage = 0;
15
 
16
 
17
+
16
 Page({
18
 Page({
17
   data: {
19
   data: {
18
-    PracticeTimeStr: "智能安排",
19
     HiddenFieldEdit: true,
20
     HiddenFieldEdit: true,
20
     FieldContent: "",
21
     FieldContent: "",
21
     SoundSign: "[读]",
22
     SoundSign: "[读]",
22
     LineSign: "[线]",
23
     LineSign: "[线]",
23
-    IsTodayStudy: false,
24
+    HighlighterSign: "[光]",
24
     BtnArray: ["+", "-", "×", "÷", "=", "<", ">"],
25
     BtnArray: ["+", "-", "×", "÷", "=", "<", ">"],
25
   },
26
   },
26
   onLoad: function (options) {
27
   onLoad: function (options) {
@@ -35,6 +36,7 @@ Page({
35
       UpdateType: options.type,
36
       UpdateType: options.type,
36
       MiaoguoCardID: options.id,
37
       MiaoguoCardID: options.id,
37
       FieldNumber: fieldNumber,
38
       FieldNumber: fieldNumber,
39
+      PracticeTimeStr: PracticeTimeArr[0],
38
     });
40
     });
39
 
41
 
40
     var list = app.globalData.CardList;
42
     var list = app.globalData.CardList;
@@ -182,15 +184,21 @@ Page({
182
       });
184
       });
183
     }
185
     }
184
   },
186
   },
185
-  switch1Change(e) {
186
-
187
-    var str = "智能安排";
188
-    if (e.detail.value) {
189
-      str = "今日必练";
190
-    }
191
-    this.setData({
192
-      IsTodayStudy: e.detail.value,
193
-    });
187
+  changePracticeTime: function () {
188
+    var that = this;
189
+    wx.showActionSheet({
190
+      itemList: PracticeTimeArr,
191
+      success(res) {
192
+        for (var i = 0; i < PracticeTimeArr.length; i++) {
193
+          if (i == res.tapIndex) {
194
+            that.setData({
195
+              PracticeTimeStr: PracticeTimeArr[i],
196
+            });
197
+            break;
198
+          }
199
+        }
200
+      },
201
+    })
194
 
202
 
195
   },
203
   },
196
   saveCard: function () {
204
   saveCard: function () {
@@ -209,14 +217,11 @@ Page({
209
           isSave = true;
217
           isSave = true;
210
         }, 5000);
218
         }, 5000);
211
 
219
 
212
-        if (that.checkImageCount(that.data.Field)){
220
+        if (that.checkImageCount(that.data.Field)) {
213
           that.uploadImageAll(that.data.Field, function (success, field) {
221
           that.uploadImageAll(that.data.Field, function (success, field) {
214
             if (success) {
222
             if (success) {
215
               that.data.Field = field;
223
               that.data.Field = field;
216
               var userid = app.globalData.userInfo.UserID;
224
               var userid = app.globalData.userInfo.UserID;
217
-              var isTodayStudy = 0;
218
-              if (that.data.IsTodayStudy && that.data.UpdateType == "add2")
219
-                isTodayStudy = 1;
220
 
225
 
221
               var tags = [];
226
               var tags = [];
222
               for (var i = 0; i < that.data.Tags.length; i++) {
227
               for (var i = 0; i < that.data.Tags.length; i++) {
@@ -226,14 +231,23 @@ Page({
226
               var param1 = {};
231
               var param1 = {};
227
               param1 = that.formatField(that.data.Field);
232
               param1 = that.formatField(that.data.Field);
228
               param1.Tags = tags;
233
               param1.Tags = tags;
229
-              param1.IsTodayStudy = isTodayStudy;
230
-              param1.ID = that.data.MiaoguoCardID;
231
-              that.saveLocalCardList(param1);
232
 
234
 
235
+              param1.IsTodayStudy = 0;
236
+              if (that.data.PracticeTimeStr == PracticeTimeArr[1])
237
+                param1.IsTodayStudy = 1;
233
 
238
 
234
-              wx.hideLoading();
239
+              if (that.data.PracticeTimeStr == PracticeTimeArr[2])
240
+                param1.LimitTime = common.addDate("w", 1, new Date());
241
+              else if (that.data.PracticeTimeStr == PracticeTimeArr[3])
242
+                param1.LimitTime = common.addDate("m", 1, new Date());
243
+              else if (that.data.PracticeTimeStr == PracticeTimeArr[4])
244
+                param1.LimitTime = common.addDate("m", 3, new Date());
235
 
245
 
236
 
246
 
247
+              param1.ID = that.data.MiaoguoCardID;
248
+              that.saveLocalCardList(param1);
249
+
250
+              wx.hideLoading();
237
 
251
 
238
               wx.showLoading({
252
               wx.showLoading({
239
                 title: '保存数据请稍候',
253
                 title: '保存数据请稍候',
@@ -260,10 +274,6 @@ Page({
260
                     that.initAddCard();
274
                     that.initAddCard();
261
                   }
275
                   }
262
 
276
 
263
-                  var taskToday = app.globalData.TaskToday;
264
-                  taskToday.CardNumber++;
265
-                  app.globalData.TaskToday = taskToday;
266
-
267
                 }
277
                 }
268
                 wx.removeStorageSync("TempCardInfo");
278
                 wx.removeStorageSync("TempCardInfo");
269
               });
279
               });
@@ -276,7 +286,7 @@ Page({
276
             }
286
             }
277
           });
287
           });
278
         }
288
         }
279
-        
289
+
280
       }
290
       }
281
       else {
291
       else {
282
         wx.showToast({
292
         wx.showToast({
@@ -304,8 +314,11 @@ Page({
304
             if (item.Content[j].key == "line") {
314
             if (item.Content[j].key == "line") {
305
               str += "[线]" + item.Content[j].value + "[/线]";
315
               str += "[线]" + item.Content[j].value + "[/线]";
306
             }
316
             }
317
+            if (item.Content[j].key == "highlighter") {
318
+              str += "[光]" + item.Content[j].value + "[/光]";
319
+            }
307
           }
320
           }
308
-        }
321
+        } 
309
         else if (item.Type == "sound") {
322
         else if (item.Type == "sound") {
310
           if (item.SoundMark)
323
           if (item.SoundMark)
311
             str = "[读 src='" + item.SoundMark + "']" + item.Content + "[/读]";
324
             str = "[读 src='" + item.SoundMark + "']" + item.Content + "[/读]";
@@ -325,23 +338,23 @@ Page({
325
     }
338
     }
326
     return result;
339
     return result;
327
   },
340
   },
328
-  checkImageCount:function(arr){
329
-    var count=0;
341
+  checkImageCount: function (arr) {
342
+    var count = 0;
330
     for (var i = 0; i < arr.length; i++) {
343
     for (var i = 0; i < arr.length; i++) {
331
       for (var j = 0; j < arr[i].length; j++) {
344
       for (var j = 0; j < arr[i].length; j++) {
332
         if (arr[i][j].Type == "image" && arr[i][j].Content) {
345
         if (arr[i][j].Type == "image" && arr[i][j].Content) {
333
-          
346
+
334
           count++;
347
           count++;
335
         }
348
         }
336
       }
349
       }
337
     }
350
     }
338
-    if (count>3){
351
+    if (count > 3) {
339
       wx.showToast({
352
       wx.showToast({
340
         title: '只能上传三张图片',
353
         title: '只能上传三张图片',
341
       });
354
       });
342
       return false;
355
       return false;
343
     }
356
     }
344
-    else 
357
+    else
345
       return true;
358
       return true;
346
   },
359
   },
347
   uploadImageAll: function (arr, callback) {
360
   uploadImageAll: function (arr, callback) {
@@ -354,7 +367,7 @@ Page({
354
           arrSource.push(arr[i][j].Content);
367
           arrSource.push(arr[i][j].Content);
355
           if (arr[i][j].ContentServer.indexOf(app.globalData.uploadImageUrl) >= 0
368
           if (arr[i][j].ContentServer.indexOf(app.globalData.uploadImageUrl) >= 0
356
             || arr[i][j].ContentServer.indexOf("baidu.com") >= 0) {
369
             || arr[i][j].ContentServer.indexOf("baidu.com") >= 0) {
357
-            var result={};
370
+            var result = {};
358
             result.Source = arr[i][j].ContentServer;
371
             result.Source = arr[i][j].ContentServer;
359
             result.Target = arr[i][j].ContentServer;
372
             result.Target = arr[i][j].ContentServer;
360
 
373
 
@@ -363,9 +376,9 @@ Page({
363
           else {
376
           else {
364
             var source = arr[i][j].Content;
377
             var source = arr[i][j].Content;
365
             that.uploadImage(source, function (data) {
378
             that.uploadImage(source, function (data) {
366
-              if (data){
367
-                data=JSON.parse(data);
368
-                var result=data.result;
379
+              if (data) {
380
+                data = JSON.parse(data);
381
+                var result = data.result;
369
                 result.Target = app.globalData.uploadImageUrl + result.Target;
382
                 result.Target = app.globalData.uploadImageUrl + result.Target;
370
                 arrResult.push(result);
383
                 arrResult.push(result);
371
               }
384
               }
@@ -393,7 +406,7 @@ Page({
393
         console.log("arrResult:" + JSON.stringify(arrResult));
406
         console.log("arrResult:" + JSON.stringify(arrResult));
394
 
407
 
395
         clearInterval(interval);
408
         clearInterval(interval);
396
-        var success=true;
409
+        var success = true;
397
 
410
 
398
         var ari = 0;
411
         var ari = 0;
399
         for (var i = 0; i < arr.length; i++) {
412
         for (var i = 0; i < arr.length; i++) {
@@ -401,30 +414,30 @@ Page({
401
             if (arr[i][j].Type == "image" && arr[i][j].Content) {
414
             if (arr[i][j].Type == "image" && arr[i][j].Content) {
402
               var tempUrl = arr[i][j].Content;
415
               var tempUrl = arr[i][j].Content;
403
               var serverUrl = "";
416
               var serverUrl = "";
404
-              for(var k=0;k<arrResult.length;k++){
405
-                if (tempUrl.indexOf(arrResult[k].Source)>=0){
417
+              for (var k = 0; k < arrResult.length; k++) {
418
+                if (tempUrl.indexOf(arrResult[k].Source) >= 0) {
406
                   serverUrl = arrResult[k].Target;
419
                   serverUrl = arrResult[k].Target;
407
                   break;
420
                   break;
408
                 }
421
                 }
409
               }
422
               }
410
               //console.log("serverUrl:" + serverUrl);
423
               //console.log("serverUrl:" + serverUrl);
411
               //console.log("tempUrl:" + tempUrl);
424
               //console.log("tempUrl:" + tempUrl);
412
-              if (serverUrl=="")
425
+              if (serverUrl == "")
413
                 serverUrl = main.getServerImage(tempUrl);
426
                 serverUrl = main.getServerImage(tempUrl);
414
 
427
 
415
               main.saveTempImage(serverUrl, tempUrl);
428
               main.saveTempImage(serverUrl, tempUrl);
416
               arr[i][j].Content = serverUrl;
429
               arr[i][j].Content = serverUrl;
417
               arr[i][j].ContentServer = serverUrl;
430
               arr[i][j].ContentServer = serverUrl;
418
 
431
 
419
-              if (serverUrl==""){
420
-                success=false;
432
+              if (serverUrl == "") {
433
+                success = false;
421
                 break;
434
                 break;
422
               }
435
               }
423
             }
436
             }
424
           }
437
           }
425
         }
438
         }
426
         //console.log(JSON.stringify(arr));
439
         //console.log(JSON.stringify(arr));
427
-        callback(success,arr);
440
+        callback(success, arr);
428
       }
441
       }
429
     }, 500);
442
     }, 500);
430
   },
443
   },
@@ -461,6 +474,13 @@ Page({
461
           else
474
           else
462
             list[i].Content[j].Content = param1["Field" + j];
475
             list[i].Content[j].Content = param1["Field" + j];
463
         }
476
         }
477
+        if (param1.LimitTime)
478
+          list[i].LimitTime = common.formatTime(param1.LimitTime);
479
+        if (param1.IsTodayStudy == 1) {
480
+          list[i].LimitTime = common.formatTime(new Date());
481
+
482
+          main.getTaskTodayList(function () { });
483
+        }
464
         app.globalData.CardList = list;
484
         app.globalData.CardList = list;
465
         break;
485
         break;
466
       }
486
       }
@@ -601,6 +621,14 @@ Page({
601
       this.setData({
621
       this.setData({
602
         LineSign: "[线]",
622
         LineSign: "[线]",
603
       });
623
       });
624
+    } else if (btnName == "[光]") {
625
+      this.setData({
626
+        HighlighterSign: "[/光]",
627
+      });
628
+    } else if (btnName == "[/光]") {
629
+      this.setData({
630
+        HighlighterSign: "[光]",
631
+      });
604
     }
632
     }
605
 
633
 
606
     if (!this.data.Focus) {
634
     if (!this.data.Focus) {
@@ -657,9 +685,9 @@ Page({
657
     //console.log("str1:" + str1);
685
     //console.log("str1:" + str1);
658
     //console.log("str2:" + str2);
686
     //console.log("str2:" + str2);
659
     var cur = 1;
687
     var cur = 1;
660
-    if (btnName == "[读]" || btnName == "[线]") {
688
+    if (btnName == "[读]" || btnName == "[线]" || btnName == "[光]") {
661
       cur = 3;
689
       cur = 3;
662
-    } else if (btnName == "[/读]" || btnName == "[/线]") {
690
+    } else if (btnName == "[/读]" || btnName == "[/线]" || btnName == "[/光]") {
663
       cur = 4;
691
       cur = 4;
664
     } else if (btnName == "(   )") {
692
     } else if (btnName == "(   )") {
665
       cur = 5;
693
       cur = 5;
@@ -758,11 +786,11 @@ Page({
758
     if (app.globalData.IsAndroid) {
786
     if (app.globalData.IsAndroid) {
759
       selectImage(that);
787
       selectImage(that);
760
     }
788
     }
761
-    else{
789
+    else {
762
       wx.showActionSheet({
790
       wx.showActionSheet({
763
         itemList: ['拍照', '从手机相册选择'],
791
         itemList: ['拍照', '从手机相册选择'],
764
         success(res) {
792
         success(res) {
765
-          if (res.tapIndex==0){
793
+          if (res.tapIndex == 0) {
766
             wx.chooseImage({
794
             wx.chooseImage({
767
               count: 1,
795
               count: 1,
768
               sizeType: ['compressed'],
796
               sizeType: ['compressed'],
@@ -770,12 +798,12 @@ Page({
770
               success(res2) {
798
               success(res2) {
771
                 wx.showLoading({
799
                 wx.showLoading({
772
                   title: '请秒候',
800
                   title: '请秒候',
773
-                  mask:true,
801
+                  mask: true,
774
                 });
802
                 });
775
-                setTimeout(function(){
803
+                setTimeout(function () {
776
                   wx.hideLoading();
804
                   wx.hideLoading();
777
                   selectImage(that);
805
                   selectImage(that);
778
-                },2000);
806
+                }, 2000);
779
               },
807
               },
780
             });
808
             });
781
           }
809
           }
@@ -789,7 +817,7 @@ Page({
789
       });
817
       });
790
     }
818
     }
791
 
819
 
792
-    function selectImage(that){
820
+    function selectImage(that) {
793
       var sizeType = ['album'];
821
       var sizeType = ['album'];
794
       //若是安卓机
822
       //若是安卓机
795
       if (app.globalData.IsAndroid)
823
       if (app.globalData.IsAndroid)

+ 27 - 14
pages/main/add.wxml

@@ -30,17 +30,19 @@
30
           <text class="textNormal FlexRow" wx:if="{{item.Type=='line'}}">
30
           <text class="textNormal FlexRow" wx:if="{{item.Type=='line'}}">
31
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
31
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
32
               <text wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
32
               <text wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
33
-          <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
33
+              <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
34
+              <text class="textHighlighter" wx:if="{{contentItem.key=='highlighter'}}">{{contentItem.value}}</text>
35
+            </block>
36
+          </text>
37
+          
38
+          <view class="sound FlexRow" wx:if="{{item.Type=='sound'}}">
39
+            <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.png' />
40
+          </view>
41
+          <text class="textPinyin" wx:if="{{item.Type=='sound'}}">{{item.Content}}</text>
42
+          <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' binderror="onBindError" />
43
+          <view class="textBr" wx:if="{{item.Type=='br'}}"></view>
44
+          <text class="textReturn" wx:if="{{item.Type=='return'}}"></text>
34
         </block>
45
         </block>
35
-        </text>
36
-        <view class="sound FlexRow" wx:if="{{item.Type=='sound'}}">
37
-          <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.png' />
38
-        </view>
39
-        <text class="textPinyin" wx:if="{{item.Type=='sound'}}">{{item.Content}}</text>
40
-        <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' binderror="onBindError" />
41
-        <view class="textBr" wx:if="{{item.Type=='br'}}"></view>
42
-        <text class="textReturn" wx:if="{{item.Type=='return'}}"></text>
43
-  </block>
44
   </view>
46
   </view>
45
   </view>
47
   </view>
46
   <block wx:if="{{Tags && Tags.length>0 && indexParent==0}}">
48
   <block wx:if="{{Tags && Tags.length>0 && indexParent==0}}">
@@ -64,15 +66,17 @@
64
   </block>
66
   </block>
65
   <view class='lineFooter'></view>
67
   <view class='lineFooter'></view>
66
 
68
 
67
-  <view class="panelTimePlan FlexRow" wx:if="{{UpdateType=='add' || UpdateType=='add2'}}">
69
+  <view class="panelTimePlan FlexRow" bindtap="changePracticeTime">
68
     <view class="panelItem1 FlexRow">
70
     <view class="panelItem1 FlexRow">
69
       <image src='../images/universalpic_clock_gray_24x24.png' class="universalpic_clock_gray_24x24" />
71
       <image src='../images/universalpic_clock_gray_24x24.png' class="universalpic_clock_gray_24x24" />
70
       <view>练习时间</view>
72
       <view>练习时间</view>
71
     </view>
73
     </view>
72
     <view class="panelItem2 FlexRow">
74
     <view class="panelItem2 FlexRow">
73
-      <view class="panelTimePlan1" hidden="{{IsTodayStudy}}">智能安排</view>
74
-      <view class="panelTimePlan1" hidden="{{!IsTodayStudy}}">今日必练</view>
75
-      <switch class='panelTimePlan2' checked="{{IsTodayStudy}}" bindchange="switch1Change" />
75
+      <view class="panelTimePlan1" hidden="{{PracticeTimeStr!='智能安排'}}">{{PracticeTimeStr}}</view>
76
+      <view class="panelTimePlan2" hidden="{{PracticeTimeStr=='智能安排'}}">{{PracticeTimeStr}}</view>
77
+      <!-- <switch class='panelTimePlan2' checked="{{IsTodayStudy}}" bindchange="switch1Change" /> -->
78
+      <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
79
+    
76
     </view>
80
     </view>
77
   </view>
81
   </view>
78
   <view style='height:300rpx;'></view>
82
   <view style='height:300rpx;'></view>
@@ -100,12 +104,21 @@
100
       <view class="panelSaveTag3 panelSaveTag1 FlexRow" bindtap="addSymbol" data-id="{{SoundSign}}" hidden="{{SoundSign=='[读]'}}">
104
       <view class="panelSaveTag3 panelSaveTag1 FlexRow" bindtap="addSymbol" data-id="{{SoundSign}}" hidden="{{SoundSign=='[读]'}}">
101
         <image class="universalpic_read_end_white_38x22" src='../images/universalpic_read_end_white_38x22.png' />
105
         <image class="universalpic_read_end_white_38x22" src='../images/universalpic_read_end_white_38x22.png' />
102
       </view>
106
       </view>
107
+      
103
       <view class="panelSaveTag2 panelSaveTag1 FlexRow" bindtap="addSymbol" data-id="{{LineSign}}" hidden="{{LineSign=='[/线]'}}">
108
       <view class="panelSaveTag2 panelSaveTag1 FlexRow" bindtap="addSymbol" data-id="{{LineSign}}" hidden="{{LineSign=='[/线]'}}">
104
         <image class="universalpic_underline_begin_gray_14x20" src='../images/universalpic_underline_begin_gray_14x20.png' />
109
         <image class="universalpic_underline_begin_gray_14x20" src='../images/universalpic_underline_begin_gray_14x20.png' />
105
       </view>
110
       </view>
106
       <view class="panelSaveTag3 panelSaveTag1 FlexRow" bindtap="addSymbol" data-id="{{LineSign}}" hidden="{{LineSign=='[线]'}}">
111
       <view class="panelSaveTag3 panelSaveTag1 FlexRow" bindtap="addSymbol" data-id="{{LineSign}}" hidden="{{LineSign=='[线]'}}">
107
         <image class="universalpic_underline_end_white_30x22" src='../images/universalpic_underline_end_white_30x22.png' />
112
         <image class="universalpic_underline_end_white_30x22" src='../images/universalpic_underline_end_white_30x22.png' />
108
       </view>
113
       </view>
114
+
115
+      <view class="panelSaveTag2 panelSaveTag1 FlexRow" bindtap="addSymbol" data-id="{{HighlighterSign}}" hidden="{{HighlighterSign=='[/光]'}}">
116
+        <image class="universalpic_highlighter_begin_gray_24x20" src='../images/universalpic_highlighter_begin_gray_24x20.png' />
117
+      </view>
118
+      <view class="panelSaveTag3 panelSaveTag1 FlexRow" bindtap="addSymbol" data-id="{{HighlighterSign}}" hidden="{{HighlighterSign=='[光]'}}">
119
+        <image class="universalpic_highlighter_begin_gray_24x20" src='../images/universalpic_highlighter_end_white_24x20.png' />
120
+      </view>
121
+
109
       <view class="panelSaveTag2 panelSaveTag1 FlexRow" catchtap="uploadImageField">
122
       <view class="panelSaveTag2 panelSaveTag1 FlexRow" catchtap="uploadImageField">
110
         <image class="universalpic_picture_gray_26x26" src='../images/universalpic_picture_gray_26x26.png' />
123
         <image class="universalpic_picture_gray_26x26" src='../images/universalpic_picture_gray_26x26.png' />
111
       </view>
124
       </view>

+ 28 - 0
pages/main/add.wxss

@@ -60,6 +60,17 @@
60
   color:#787878;
60
   color:#787878;
61
   font-weight: 500;
61
   font-weight: 500;
62
 }
62
 }
63
+.panelTimePlan .panelTimePlan2{
64
+  border: 2rpx solid #0071EF;
65
+  border-radius: 22rpx;
66
+  font-size: 28rpx;
67
+  font-weight: 500;
68
+  color: #0071EF;
69
+  text-align: center;
70
+  line-height: 45rpx;
71
+  padding: 0 20rpx;
72
+}
73
+
63
 .universalpic_clock_gray_24x24{
74
 .universalpic_clock_gray_24x24{
64
   width:24rpx;
75
   width:24rpx;
65
   height:24rpx;
76
   height:24rpx;
@@ -169,6 +180,11 @@
169
 .panelItem .textLine {
180
 .panelItem .textLine {
170
   text-decoration: underline;
181
   text-decoration: underline;
171
 }
182
 }
183
+.panelItem .textHighlighter {
184
+  color:#fff;
185
+  background-color: #1E1E1E;
186
+}
187
+
172
 .panelItem .textPinyin {
188
 .panelItem .textPinyin {
173
   text-decoration: underline;
189
   text-decoration: underline;
174
   margin-right: 10rpx;
190
   margin-right: 10rpx;
@@ -359,6 +375,11 @@
359
   height: 22rpx;
375
   height: 22rpx;
360
 }
376
 }
361
 
377
 
378
+.universalpic_highlighter_begin_gray_24x20{
379
+  width: 24rpx;
380
+  height: 20rpx;
381
+}
382
+
362
 .universalpic_picture_gray_26x26 {
383
 .universalpic_picture_gray_26x26 {
363
   width: 26rpx;
384
   width: 26rpx;
364
   height: 26rpx;
385
   height: 26rpx;
@@ -494,3 +515,10 @@
494
 .lineFooter {
515
 .lineFooter {
495
   z-index: 10;
516
   z-index: 10;
496
 }
517
 }
518
+
519
+
520
+.Arrow{
521
+  width:16rpx;
522
+  height:26rpx;
523
+  margin-left: 30rpx;
524
+}

+ 22 - 9
pages/main/default.js

@@ -7,6 +7,9 @@ Page({
7
   data: {
7
   data: {
8
     IsTempCardNoSaved:false,
8
     IsTempCardNoSaved:false,
9
     IsExit:false,
9
     IsExit:false,
10
+    DayNumber: 0,
11
+    TodayTaskNumber: 1,
12
+    IsStart: 1,
10
   },
13
   },
11
   onPullDownRefresh: function () {
14
   onPullDownRefresh: function () {
12
     wx.redirectTo({
15
     wx.redirectTo({
@@ -47,10 +50,19 @@ Page({
47
         if (res.authSetting['scope.userInfo']) {
50
         if (res.authSetting['scope.userInfo']) {
48
 
51
 
49
           if (!app.globalData.userInfo.IsMember && app.globalData.userInfo.IsShow == 1){
52
           if (!app.globalData.userInfo.IsMember && app.globalData.userInfo.IsShow == 1){
50
-            wx.navigateTo({
51
-              url: '../other/payinfo',
53
+            wx.redirectTo({
54
+              url: '../other/pay?paypanel=0&payindex=1',
52
             });
55
             });
53
           }
56
           }
57
+          else if (app.globalData.userInfo.IsMember && app.globalData.userInfo.IsShow == 1){
58
+            var productServiceTime = common.formatDateCHS(common.formatTime(new Date(app.globalData.userInfo.ProductServiceTime)));
59
+            var today = common.formatDateCHS(common.formatTime(new Date()));
60
+            if (productServiceTime < today) {
61
+              wx.redirectTo({
62
+                url: '../other/pay?paypanel=3&payindex=4',
63
+              });
64
+            }
65
+          }
54
 
66
 
55
           if (app.globalData.userInfo.IsMember && app.globalData.Homework == 1) {
67
           if (app.globalData.userInfo.IsMember && app.globalData.Homework == 1) {
56
             wx.navigateTo({
68
             wx.navigateTo({
@@ -117,13 +129,14 @@ Page({
117
   //得到当天任务
129
   //得到当天任务
118
   getTaskTodayList: function () {
130
   getTaskTodayList: function () {
119
     var that=this;
131
     var that=this;
120
-    main.getTaskTodayList(function(data){
121
-      var TodayTaskNumber = data.ListNew.length + data.ListReview.length + data.ListHistory.length;
122
-      that.setData({
123
-        List: data,
124
-        DayNumber: data.DayNumber,
125
-        TodayTaskNumber: TodayTaskNumber,
126
-        IsStart: data.IsStart,
132
+    main.UpdateMiaoguoCardTodayAll(true, function () {
133
+      main.getTaskTodayList(function (data) {
134
+        var TodayTaskNumber = data.ListNew.length + data.ListReview.length + data.ListHistory.length;
135
+        that.setData({
136
+          DayNumber: data.DayNumber,
137
+          TodayTaskNumber: TodayTaskNumber,
138
+          IsStart: data.IsStart,
139
+        });
127
       });
140
       });
128
     });
141
     });
129
   },
142
   },

+ 15 - 9
pages/main/detail.js

@@ -13,13 +13,13 @@ const arrFontSize = [
13
 const arrDelayedTime = [
13
 const arrDelayedTime = [
14
   {
14
   {
15
     DayNumber: 7,
15
     DayNumber: 7,
16
-    Name: "一周",
16
+    Name: "推迟一周",
17
   }, {
17
   }, {
18
     DayNumber: 30,
18
     DayNumber: 30,
19
-    Name: "一个月",
19
+    Name: "推迟一个月",
20
   }, {
20
   }, {
21
     DayNumber: 90,
21
     DayNumber: 90,
22
-    Name: "三个月",
22
+    Name: "推迟三个月",
23
   },
23
   },
24
 ]
24
 ]
25
 
25
 
@@ -119,9 +119,7 @@ Page({
119
   },
119
   },
120
   onUnload: function () {
120
   onUnload: function () {
121
     clearInterval(intervalSound);
121
     clearInterval(intervalSound);
122
-    main.UpdateMiaoguoCardTodayAll(false, function () {
123
-      listTaskFinished = [];
124
-    });
122
+    listTaskFinished = [];
125
   },
123
   },
126
   onPullDownRefresh: function () {
124
   onPullDownRefresh: function () {
127
     this.onShowAnswer({
125
     this.onShowAnswer({
@@ -673,8 +671,16 @@ Page({
673
         if (duration > 0) {
671
         if (duration > 0) {
674
           duration = Math.round(duration / 60);
672
           duration = Math.round(duration / 60);
675
         }
673
         }
676
-        var speed1 = Math.round(100 * data.Count / (data.Duration / 60)) / 100;
677
-        var speed2 = common.getMinuteSecond(Math.round(data.Duration / data.Count), true);
674
+
675
+        var speed1 = 0;
676
+        if (data.Duration>0)
677
+          speed1 = Math.round(100 * data.Count / (data.Duration / 60)) / 100;
678
+
679
+        var speed2 = 0+"秒";
680
+        if (data.Count > 0)
681
+          speed2 = common.getMinuteSecond(Math.round(data.Duration / data.Count), true);
682
+
683
+        
678
         app.globalData.TaskToday.DayNumber = data.DayNumber;
684
         app.globalData.TaskToday.DayNumber = data.DayNumber;
679
         that.setData({
685
         that.setData({
680
           TodayTime: duration,
686
           TodayTime: duration,
@@ -752,7 +758,7 @@ Page({
752
   onMore: function () {
758
   onMore: function () {
753
     for (var i = 0; i < this.data.FontSizeArray.length; i++) {
759
     for (var i = 0; i < this.data.FontSizeArray.length; i++) {
754
       if (this.data.FontSizeArray[i].Value == this.data.TaskInfo.FontSize)
760
       if (this.data.FontSizeArray[i].Value == this.data.TaskInfo.FontSize)
755
-        this.data.FontSizeArray[i].CSS = "border:3rpx solid " + this.data.Color.LineColor + ";color:" + this.data.Color.LineColor;
761
+        this.data.FontSizeArray[i].CSS = "color:#1E1E1E;background-color:" + this.data.Color.LineColor+";border:3rpx solid " + this.data.Color.LineColor + ";";
756
       else
762
       else
757
         this.data.FontSizeArray[i].CSS = "";
763
         this.data.FontSizeArray[i].CSS = "";
758
     }
764
     }

+ 1 - 1
pages/main/detail.wxml

@@ -183,7 +183,7 @@
183
       <view class='lineFooter'></view>
183
       <view class='lineFooter'></view>
184
       <view class='numberContainerFooter103 FlexRow' catchtap="gotoEdit">
184
       <view class='numberContainerFooter103 FlexRow' catchtap="gotoEdit">
185
         <image src="../images/universalpic_bell_gray_30x30.png" class='universalpic_bell_gray_30x30' />
185
         <image src="../images/universalpic_bell_gray_30x30.png" class='universalpic_bell_gray_30x30' />
186
-        <view class='numberContainerFooter1111 numberContainerFooter111'>延后练习</view>
186
+        <view class='numberContainerFooter1111 numberContainerFooter111'>练习时间</view>
187
       </view>
187
       </view>
188
       <block wx:for="{{ArrDelayedTime}}" wx:key="index">
188
       <block wx:for="{{ArrDelayedTime}}" wx:key="index">
189
         <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
189
         <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">

+ 4 - 0
pages/main/detail.wxss

@@ -225,6 +225,10 @@
225
   text-decoration: underline;
225
   text-decoration: underline;
226
 }
226
 }
227
 
227
 
228
+.panelItem .textHighlighter {
229
+  color:#1E1E1E;
230
+}
231
+
228
 .panelItem .textNormal {
232
 .panelItem .textNormal {
229
   min-height: 50rpx;
233
   min-height: 50rpx;
230
 }
234
 }

+ 15 - 5
pages/main/preview.js

@@ -95,6 +95,21 @@ Page({
95
             app.globalData.CardList = [data];
95
             app.globalData.CardList = [data];
96
             that.init();
96
             that.init();
97
           }
97
           }
98
+          else{
99
+            var time=2000;
100
+            wx.showToast({
101
+              title: '分享人已删除',
102
+              mask:true,
103
+              duration: time,
104
+              complete:function(){
105
+                setTimeout(function(){
106
+                  wx.reLaunch({
107
+                    url: './default?IsStart=1',
108
+                  });
109
+                }, time);
110
+              }
111
+            });
112
+          }
98
         });
113
         });
99
       }
114
       }
100
       else
115
       else
@@ -459,11 +474,6 @@ Page({
459
   editField: function (e) {
474
   editField: function (e) {
460
     if (this.data.ShowType == "show") {
475
     if (this.data.ShowType == "show") {
461
       var that = this;
476
       var that = this;
462
-      // var fieldid = e.currentTarget.dataset.id;
463
-      // wx.navigateTo({
464
-      //   url: './add?type=edit3&id=' + that.data.MiaoguoCardID + '&fieldid=' + fieldid,
465
-      // });
466
-
467
       wx.navigateTo({
477
       wx.navigateTo({
468
         url: './add?type=edit&id=' + that.data.MiaoguoCardID,
478
         url: './add?type=edit&id=' + that.data.MiaoguoCardID,
469
       });
479
       });

+ 5 - 0
pages/main/preview.wxss

@@ -280,6 +280,11 @@
280
   text-decoration: underline;
280
   text-decoration: underline;
281
 }
281
 }
282
 
282
 
283
+
284
+.panelItem .textHighlighter {
285
+  color:#1E1E1E;
286
+}
287
+
283
 .panelItem .textNormal {
288
 .panelItem .textNormal {
284
   min-height: 50rpx;
289
   min-height: 50rpx;
285
 }
290
 }

+ 49 - 3
pages/main/setting.js

@@ -6,7 +6,7 @@ const arrSortType = ["随机抽取的题卡", "时间较早的题卡", "时间
6
 const arrSortType2 = ["随机的", "较早的", "较近的"];
6
 const arrSortType2 = ["随机的", "较早的", "较近的"];
7
 const arrClickType = ["专属按钮", "点击空白", "两种方式"];
7
 const arrClickType = ["专属按钮", "点击空白", "两种方式"];
8
 var arrUserName = ["程晟涵", "大耳兔", "teresa", "古利古拉", "Lucy-chan", "临时"];
8
 var arrUserName = ["程晟涵", "大耳兔", "teresa", "古利古拉", "Lucy-chan", "临时"];
9
-var arrUserID = [2, 11, 8, 9, 10, 222];
9
+var arrUserID = [2, 11, 8, 9, 10, 95];
10
 
10
 
11
 Page({
11
 Page({
12
   data: {
12
   data: {
@@ -15,6 +15,28 @@ Page({
15
     ProgramName: app.globalData.ProgramName,
15
     ProgramName: app.globalData.ProgramName,
16
     Version: app.globalData.Version,
16
     Version: app.globalData.Version,
17
     RecommendName: "启用",
17
     RecommendName: "启用",
18
+    ChildUserID: 0,
19
+    IsPay: true,
20
+    IsShow: 0,
21
+  },
22
+  onPullDownRefresh: function () {
23
+    //得到当天任务
24
+    var that = this;
25
+    main.postData('UploadUserConfig?Type=getData&UserID=' + app.globalData.userInfo.UserID, {}, function (data) {
26
+      if (data) {
27
+        wx.setStorageSync("CardMaxNumberNew", data.CardMaxNumberNew);
28
+        wx.setStorageSync("CardMaxNumberHistory", data.CardMaxNumberHistory);
29
+        wx.setStorageSync("SortTypeIndex", data.SortTypeIndex);
30
+        wx.setStorageSync("MemoryLevel", data.MemoryLevel);
31
+        wx.setStorageSync("ClickType", data.ClickType);
32
+        wx.setStorageSync("SecondConfigArray", data.SecondConfigArray.split(","));
33
+        wx.setStorageSync("ColorIndexArr", data.ColorIndexArr.split(","));
34
+        that.onLoad();
35
+        that.onShow();
36
+      }
37
+    });
38
+    wx.stopPullDownRefresh();
39
+    
18
   },
40
   },
19
   onLoad: function () {
41
   onLoad: function () {
20
     var that = this;
42
     var that = this;
@@ -22,11 +44,26 @@ Page({
22
     for (var i = 5; i <= 200; i++) {
44
     for (var i = 5; i <= 200; i++) {
23
       that.data.CardNumber.push(i);
45
       that.data.CardNumber.push(i);
24
     }
46
     }
47
+
48
+    var childUserID = 0;
49
+    if (app.globalData.userInfo.ChildUserID && app.globalData.userInfo.ChildUserID != undefined)
50
+      childUserID = app.globalData.userInfo.ChildUserID;
51
+    var productServiceTime = common.formatDateCHS(common.formatTime(new Date(app.globalData.userInfo.ProductServiceTime)));
52
+    var today15 = common.formatDateCHS(common.formatTime(common.addDate("d", 15, new Date())));
53
+    var isPay = true;
54
+    if (productServiceTime > today15) {
55
+      isPay = false;
56
+    }
57
+
25
     that.setData({
58
     that.setData({
26
       Containnerheight: main.getWindowHeight(),
59
       Containnerheight: main.getWindowHeight(),
27
       CardNumber: that.data.CardNumber,
60
       CardNumber: that.data.CardNumber,
28
       MinSecond: 10,
61
       MinSecond: 10,
29
       TimeSecond: 60,
62
       TimeSecond: 60,
63
+      ChildUserID: childUserID,
64
+      ProductServiceTime: productServiceTime,
65
+      IsPay: isPay,
66
+      IsShow: app.globalData.IsShow,
30
     });
67
     });
31
 
68
 
32
     common.getStorageValue(this, "CardMaxNumberNew", 10, function () {
69
     common.getStorageValue(this, "CardMaxNumberNew", 10, function () {
@@ -166,7 +203,7 @@ Page({
166
       url: './clicktype',
203
       url: './clicktype',
167
     })
204
     })
168
   },
205
   },
169
-  gotoBinding:function(){
206
+  gotoBinding: function () {
170
     wx.navigateTo({
207
     wx.navigateTo({
171
       url: '../other/binding',
208
       url: '../other/binding',
172
     })
209
     })
@@ -199,9 +236,18 @@ Page({
199
     })
236
     })
200
   },
237
   },
201
   gotoPay: function () {
238
   gotoPay: function () {
239
+    var payindex = 3;
240
+    if (app.globalData.userInfo.IsFinishTask == 1)
241
+      payindex = 2;
242
+
243
+    wx.navigateTo({
244
+      url: '../other/pay?paypanel=1&payindex=' + payindex,
245
+    });
246
+  },
247
+  gotoPayTemp: function (e) {
202
     if (app.globalData.userInfo.UserID <= 7) {
248
     if (app.globalData.userInfo.UserID <= 7) {
203
       wx.navigateTo({
249
       wx.navigateTo({
204
-        url: '../other/payinfo',
250
+        url: '../other/pay?paypanel=0&payindex=0',
205
       });
251
       });
206
     }
252
     }
207
   },
253
   },

+ 2 - 1
pages/main/setting.json

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

+ 21 - 14
pages/main/setting.wxml

@@ -98,21 +98,36 @@
98
     </view>
98
     </view>
99
   </view>
99
   </view>
100
   <view class='lineFooter'></view>
100
   <view class='lineFooter'></view>
101
-  <view class="panelTitle FlexRow">
101
+  <view class="panelTitle FlexRow" wx:if="{{ChildUserID==0}}">
102
     <view class="panelTitle1">系统</view>
102
     <view class="panelTitle1">系统</view>
103
     <view class="panelTitle2"></view>
103
     <view class="panelTitle2"></view>
104
   </view>
104
   </view>
105
-  <view class="panelItem FlexRow" bindtap='gotoBinding'>
105
+  <view class="panelItem FlexRow" bindtap='gotoBinding' wx:if="{{ChildUserID==0}}">
106
     <view class="panelItem1">帐号绑定</view>
106
     <view class="panelItem1">帐号绑定</view>
107
     <view class="panelItem2 FlexRow">
107
     <view class="panelItem2 FlexRow">
108
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
108
       <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
109
     </view>
109
     </view>
110
   </view>
110
   </view>
111
-  <block wx:if="{{IsShowChange}}">
112
-    <view class="panelTitle FlexRow">
113
-      <view class="panelTitle1">切换帐号</view>
114
-      <view class="panelTitle2"></view>
111
+
112
+
113
+  <view class="panelItem00 panelItem FlexRow" bindtap='updateMember'>
114
+    重启小程序
115
+  </view>
116
+  <view class='lineFooter'></view>
117
+
118
+  <view class='text2'>有效期 {{ProductServiceTime}}</view>
119
+  <block wx:if="{{ChildUserID==0 && IsPay && IsShow}}">
120
+    <view class="panelItem00 panelItem FlexRow" bindtap='gotoPay'>
121
+      续费
115
     </view>
122
     </view>
123
+    <view class='lineFooter'></view>
124
+  </block>
125
+
126
+  <view style='width:100%;height:100rpx;' bindtap='gotoPayTemp'></view>
127
+  <text class='text1'>©2019 {{ProgramName}}\n微信小程序 版本 {{Version}}</text>
128
+  <view style='width:100%;height:100rpx;' bindtap='gotoLesson'></view>
129
+
130
+  <block wx:if="{{IsShowChange}}">
116
     <view class="panelItem FlexRow" bindtap='setSelectUser'>
131
     <view class="panelItem FlexRow" bindtap='setSelectUser'>
117
       <view class="panelItem1">当前帐号</view>
132
       <view class="panelItem1">当前帐号</view>
118
       <view class="panelItem2 FlexRow">
133
       <view class="panelItem2 FlexRow">
@@ -124,12 +139,4 @@
124
     </view>
139
     </view>
125
     <view class='lineFooter'></view>
140
     <view class='lineFooter'></view>
126
   </block>
141
   </block>
127
-
128
-  <view class="panelItem00 panelItem FlexRow" bindtap='updateMember'>
129
-    重启小程序
130
-  </view>
131
-
132
-  <view style='width:100%;height:100rpx;' bindtap='gotoPay'></view>
133
-  <text class='text1'>©2019 {{ProgramName}}\n微信小程序 版本 {{Version}}</text>
134
-  <view style='width:100%;height:100rpx;' bindtap='gotoLesson'></view>
135
 </view>
142
 </view>

+ 7 - 0
pages/main/setting.wxss

@@ -73,4 +73,11 @@
73
   align-self: flex-start;
73
   align-self: flex-start;
74
   margin: 30rpx 0 0 30rpx;
74
   margin: 30rpx 0 0 30rpx;
75
   padding: 0 20rpx;
75
   padding: 0 20rpx;
76
+}
77
+
78
+
79
+.text2{
80
+  margin-top: 50rpx;
81
+  font-size:24rpx;
82
+  color:#787878;
76
 }
83
 }

+ 20 - 17
pages/other/binding.wxml

@@ -1,10 +1,11 @@
1
 <view wx:if="{{ShowPanel=='binding'}}" class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
1
 <view wx:if="{{ShowPanel=='binding'}}" class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
   <text class="text2">使用协议:\n
2
   <text class="text2">使用协议:\n
3
-1)绑定帐号用于:与家人一同督导孩子学习,在您繁忙时,由另一位家长的微信帐号继续学习。这是官方唯一认可的用途。\n
4
-2)绑定后并非共享、分享您的数据,而是多个帐号均使用您的数据。\n
5
-3)与对方绑定后,对方将失去自己的独立数据和使用权,对方的小程序将看到和您完全相同的内容,直接对您的数据进行操作(包括但不限于题卡、任务、站内通知、设置等),对方的任何操作均被视同您本人的行为,其结果不可区分不可回溯。特别注意,对方同样拥有帐号绑定的操作权,可将自己解除绑定。\n
6
-4)请勿将此功能用于多人学习。这会极大干扰制定任务、编排计划、同步数据等,使得程序核心功能完全失去效用,反而丧失了使用本产品的价值,这是得不偿失的。\n
7
-5)发现绑定错误,请立即解绑。期间造成的隐私、数据等问题由个人承担。再次提醒您谨慎使用这项功能。
3
+1)绑定帐号用于:与家人一同督导孩子学习,在您繁忙时,由另一位家长的微信帐号继续学习,或与孩子专用的微信帐号分立。这是官方唯一认可的用途。\n
4
+2)绑定后并非共享、分享您的数据,而是与对方一起使用您名下的数据。\n
5
+3)启用帐号绑定,您将作为主帐号,对方将作为子帐号。\n
6
+4)子账号将失去自己的独立数据和使用权。子账号的小程序将看到和主账号完全相同的内容,直接对主账号的数据进行操作(包括但不限于题卡、任务、站内通知、练习设置等)。子账号的任何操作均被视同主账号本人的行为,其结果不可区分不可回溯。特别注意,子账号无续费、解除绑定等帐号级别的操作权。子账号不能同时为另一个子账号的主帐号。\n
7
+5)请勿将此功能用于多人学习。这会极大干扰制定任务、编排计划、同步数据等,使得程序核心功能完全失去效用,反而丧失了使用本产品的价值,这是得不偿失的。\n
8
+6)发现绑定错误,请立即解绑。期间造成的隐私、数据等问题由个人承担。再次提醒您谨慎使用这项功能。
8
   </text>
9
   </text>
9
 
10
 
10
   <text class="text3">请仔细阅读协议并谨慎操作,\n请再三确定对方身份(禁止转发聊天群)</text>
11
   <text class="text3">请仔细阅读协议并谨慎操作,\n请再三确定对方身份(禁止转发聊天群)</text>
@@ -14,18 +15,19 @@
14
 </view>
15
 </view>
15
 
16
 
16
 <view wx:if="{{ShowPanel=='unbinding'}}" class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
17
 <view wx:if="{{ShowPanel=='unbinding'}}" class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
17
-  <view class="text1">已绑定的微信帐号</view>
18
+  <view class="text1">子账号清单</view>
18
   <view class='userinfo FlexRow' wx:for="{{List}}" wx:key="index">
19
   <view class='userinfo FlexRow' wx:for="{{List}}" wx:key="index">
19
     <image class='avatar' src="{{item.AvatarUrl}}" />
20
     <image class='avatar' src="{{item.AvatarUrl}}" />
20
     <view class="nickname">{{item.NickName}}</view>
21
     <view class="nickname">{{item.NickName}}</view>
21
   </view>
22
   </view>
22
   <view class='lineFooter'></view>
23
   <view class='lineFooter'></view>
23
   <text class="text2">使用协议:\n
24
   <text class="text2">使用协议:\n
24
-1)绑定帐号用于:与家人一同督导孩子学习,在您繁忙时,由另一位家长的微信帐号继续学习。这是官方唯一认可的用途。\n
25
-2)绑定后并非共享、分享您的数据,而是多个帐号均使用您的数据。\n
26
-3)与对方绑定后,对方将失去自己的独立数据和使用权,对方的小程序将看到和您完全相同的内容,直接对您的数据进行操作(包括但不限于题卡、任务、站内通知、设置等),对方的任何操作均被视同您本人的行为,其结果不可区分不可回溯。特别注意,对方同样拥有帐号绑定的操作权,可将自己解除绑定。\n
27
-4)请勿将此功能用于多人学习。这会极大干扰制定任务、编排计划、同步数据等,使得程序核心功能完全失去效用,反而丧失了使用本产品的价值,这是得不偿失的。\n
28
-5)发现绑定错误,请立即解绑。期间造成的隐私、数据等问题由个人承担。再次提醒您谨慎使用这项功能。
25
+1)绑定帐号用于:与家人一同督导孩子学习,在您繁忙时,由另一位家长的微信帐号继续学习,或与孩子专用的微信帐号分立。这是官方唯一认可的用途。\n
26
+2)绑定后并非共享、分享您的数据,而是与对方一起使用您名下的数据。\n
27
+3)启用帐号绑定,您将作为主帐号,对方将作为子帐号。\n
28
+4)子账号将失去自己的独立数据和使用权。子账号的小程序将看到和主账号完全相同的内容,直接对主账号的数据进行操作(包括但不限于题卡、任务、站内通知、练习设置等)。子账号的任何操作均被视同主账号本人的行为,其结果不可区分不可回溯。特别注意,子账号无续费、解除绑定等帐号级别的操作权。子账号不能同时为另一个子账号的主帐号。\n
29
+5)请勿将此功能用于多人学习。这会极大干扰制定任务、编排计划、同步数据等,使得程序核心功能完全失去效用,反而丧失了使用本产品的价值,这是得不偿失的。\n
30
+6)发现绑定错误,请立即解绑。期间造成的隐私、数据等问题由个人承担。再次提醒您谨慎使用这项功能。
29
   </text>
31
   </text>
30
 
32
 
31
   <button class='btn2 btn' bindtap='gotoUnBinding'>解除绑定</button>
33
   <button class='btn2 btn' bindtap='gotoUnBinding'>解除绑定</button>
@@ -35,7 +37,7 @@
35
 
37
 
36
 
38
 
37
 <view wx:if="{{ShowPanel=='bebound'}}" class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
39
 <view wx:if="{{ShowPanel=='bebound'}}" class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
38
-  <view class="text1">这位用户邀请您“绑定帐号”</view>
40
+  <text class="text1">秒过“帐号绑定”邀请函\n邀请人和协议如下:</text>
39
   <view class='userinfo FlexRow'>
41
   <view class='userinfo FlexRow'>
40
     <image class='avatar' src="{{AvatarUrl}}" />
42
     <image class='avatar' src="{{AvatarUrl}}" />
41
     <view class="nickname">{{NickName}}</view>
43
     <view class="nickname">{{NickName}}</view>
@@ -43,11 +45,12 @@
43
   <view class='lineFooter'></view>
45
   <view class='lineFooter'></view>
44
 
46
 
45
   <text class="text2">使用协议:\n
47
   <text class="text2">使用协议:\n
46
-1)《秒过学习》的绑定帐号功能用于:与家人一同督导孩子学习,在您繁忙时,由另一位家长的微信帐号继续学习。这是官方唯一认可的用途。\n
47
-2)绑定后并非共享、分享您的数据,而是多个帐号均使用您的数据。\n
48
-3)与对方绑定后,您将失去自己的独立数据和使用权。您将和对方看到并使用相同的数据(包括但不限于题卡、任务、站内通知、设置等),您的任何操作均被视为对方本人的行为,其结果不可区分不可回溯。\n
49
-4)错误绑定,请立即通过微信联系对方。对方可能是您的直接联系人或某个群聊里的用户,请自行查找和解决。\n
50
-5)绑定期间对双方造成的隐私、数据等问题由您和对方承担。再次提醒您谨慎接受这则邀请。
48
+1)《秒过学习》的绑定帐号功能用于:与家人一同督导孩子学习,在您繁忙时,由另一位家长的微信帐号继续学习,或与孩子专用的微信帐号分立。这是官方唯一认可的用途。\n
49
+2)绑定后并非共享、分享邀请人的数据,而是一起使用邀请人名下的数据。\n
50
+3)接受帐号绑定,您将作为子帐号,邀请人将作为主帐号。\n
51
+4)子账号将失去自己的独立数据和使用权。子账号的小程序将看到和主账号完全相同的内容,直接对主账号的数据进行操作(包括但不限于题卡、任务、站内通知、练习设置等)。子账号的任何操作均被视同主账号本人的行为,其结果不可区分不可回溯。\n
52
+5)发现绑定错误,请立即通过微信联系邀请人。对方可能是您的直接联系人或某个群聊里的用户,请自行查找和解决。\n
53
+6)绑定期间造成的一系列涉及但不限于个人隐私、数据安全等问题、责任及后果,主子账号共同承担。再次提醒您谨慎答复这则邀请。
51
   </text>
54
   </text>
52
   <text class="text3">请仔细阅读协议并答复</text>
55
   <text class="text3">请仔细阅读协议并答复</text>
53
   <view class="panelBtn FlexRow">
56
   <view class="panelBtn FlexRow">

+ 6 - 1
pages/other/lesson.js

@@ -93,10 +93,13 @@ Page({
93
     var id = this.data.LessonPage;
93
     var id = this.data.LessonPage;
94
     if (id < this.data.ArrTirtle.length)
94
     if (id < this.data.ArrTirtle.length)
95
       this.playAudio({ currentTarget: { dataset: { id: id } } });
95
       this.playAudio({ currentTarget: { dataset: { id: id } } });
96
+      if(currentContent.length>3)
97
+        this.InsertMiaoguoUserLesson();
96
     else{
98
     else{
97
       this.setData({
99
       this.setData({
98
         IsPause: true,
100
         IsPause: true,
99
       });
101
       });
102
+      this.InsertMiaoguoUserLesson();
100
     }
103
     }
101
   },
104
   },
102
   audioPlay: function () {
105
   audioPlay: function () {
@@ -124,13 +127,15 @@ Page({
124
   },
127
   },
125
   onShareAppMessage: function () {
128
   onShareAppMessage: function () {
126
     var title ="秒过学习法";
129
     var title ="秒过学习法";
130
+    var imageUrl = '../images/program_screenshot_l' + this.data.LessonID + '.png';
127
     if (this.data.LessonPage>0){
131
     if (this.data.LessonPage>0){
128
       title = this.data.ArrTirtle[this.data.LessonPage - 1].Title;
132
       title = this.data.ArrTirtle[this.data.LessonPage - 1].Title;
133
+      imageUrl=this.data.ImageUrl;
129
     }
134
     }
130
     return {
135
     return {
131
       title: title,
136
       title: title,
132
       path: app.globalData.SharePath + '?LessonID=' + this.data.LessonID + '&LessonPage=' + this.data.LessonPage+'&UserID=' + app.globalData.userInfo.UserID,
137
       path: app.globalData.SharePath + '?LessonID=' + this.data.LessonID + '&LessonPage=' + this.data.LessonPage+'&UserID=' + app.globalData.userInfo.UserID,
133
-      imageUrl: '../images/program_screenshot_l' + this.data.LessonID+'.png',
138
+      imageUrl: imageUrl,
134
     }
139
     }
135
   },
140
   },
136
 });
141
 });

+ 108 - 0
pages/other/pay.js

@@ -0,0 +1,108 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+var app = getApp();
5
+var userid = 0;
6
+var introducer = 0;
7
+var payindex=1;
8
+
9
+Page({
10
+  data: {
11
+    PayPanel: 0,
12
+  },
13
+  onPullDownRefresh: function () {
14
+    this.gotoIndex();
15
+    wx.stopPullDownRefresh();
16
+  },
17
+  onLoad: function (options) {
18
+    userid = options.UserID;
19
+    introducer = options.Introducer;
20
+
21
+    payindex = options.payindex;
22
+    if (!payindex)
23
+      payindex = 1;
24
+    this.init(payindex);
25
+
26
+    if (options.paypanel){
27
+      this.setData({
28
+        PayPanel: options.paypanel,
29
+      });
30
+    }
31
+
32
+    if (!app.globalData.userInfo.IsMember){
33
+      var imageUrl = wx.getStorageSync("MiaoguoCode");
34
+      if (imageUrl) {
35
+        this.setData({
36
+          PayPanel: 2,
37
+        });
38
+      }
39
+    }
40
+    else{
41
+      wx.removeStorageSync("MiaoguoCode");
42
+    }
43
+  },
44
+  gotoPay: function () {
45
+    this.setData({
46
+      PayPanel: 1,
47
+    });
48
+  },
49
+  init: function (param) {
50
+    var that = this;
51
+    main.getData('GetMiaoguoPayInfo2?payType=' + param+'&UserID='+app.globalData.userInfo.UserID, function (data) {
52
+      if (data) {
53
+        that.setData({
54
+          Info: data,
55
+        });
56
+      }
57
+    });
58
+  },
59
+  payMoney: function () {
60
+    var that = this;
61
+    var money = this.data.Info.PayMoney;
62
+    var detail = {};
63
+    detail.UserID = app.globalData.userInfo.UserID;
64
+    detail.Introducer = app.globalData.introducer;
65
+    detail = JSON.stringify(detail);
66
+
67
+    console.log(money);
68
+    main.payMoney(7, null, money, detail,function(){
69
+      if (that.data.PayPanel == 1 && payindex==1){
70
+        that.setData({
71
+          PayPanel: 2,
72
+        });
73
+        wx.setStorageSync("MiaoguoCode", that.data.Info.Text7);
74
+      }
75
+      else if (that.data.PayPanel == 3 || (that.data.PayPanel == 1 && payindex > 1)) {
76
+        that.setData({
77
+          PayPanel: 4,
78
+        })
79
+      }
80
+    })
81
+  },
82
+  copyManager: function () {
83
+    wx.setClipboardData({
84
+      data: this.data.Info.Text7,
85
+      success(res) {
86
+        wx.showModal({
87
+          title: '已复制',
88
+          showCancel: false,
89
+          content: "复制成功,请在“添加朋友”中长按粘贴微信号。",
90
+          confirmText: "知道了",
91
+        });
92
+      }
93
+    })
94
+    wx.setStorageSync("MiaoguoCode", this.data.Info.Text7);
95
+  },
96
+  gotoIndex:function(){
97
+    wx.reLaunch({
98
+      url: '../index/index',
99
+    })
100
+  },
101
+  onShareAppMessage: function () {
102
+    return {
103
+      title: app.globalData.ShareTitle,
104
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
105
+      imageUrl: app.globalData.ShareImage,
106
+    }
107
+  },
108
+})

+ 7 - 0
pages/other/pay.json

@@ -0,0 +1,7 @@
1
+{
2
+  "navigationBarBackgroundColor": "#ffffff",
3
+  "navigationBarTextStyle": "black",
4
+  "navigationBarTitleText": "支付",
5
+  "backgroundColor": "#ffffff",
6
+  "enablePullDownRefresh": true
7
+}

+ 55 - 0
pages/other/pay.wxml

@@ -0,0 +1,55 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;' wx:if="{{PayPanel==0}}">
2
+  <image class='imageDM' src="http://miaguo-1253256735.file.myqcloud.com/DM.png" ></image>
3
+  <view class='btn' bindtap='gotoPay'>报名</view>
4
+  <view style='height:100rpx;'></view>
5
+</view>
6
+
7
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;' wx:if="{{PayPanel==3}}">
8
+  <image class='imageDM2' src="http://miaguo-1253256735.file.myqcloud.com/DM2.png" ></image>
9
+  <view class='btn' bindtap='gotoPay'>续费</view>
10
+  <view style='height:100rpx;'></view>
11
+</view>
12
+
13
+<view class="container FlexColumn" wx:if="{{PayPanel==1}}">
14
+  <view class='text1'>{{Info.Text1}}</view>
15
+  <view class="List FlexColumn">
16
+    <block wx:for="{{Info.List1}}" wx:key="index">
17
+      <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
18
+        <view class="lineWidth720"></view>
19
+      </view>
20
+      <view class='item FlexRow'>
21
+        <view class="Name">{{item.Name}}</view>
22
+        <view class="Content">{{item.Content}}</view>
23
+      </view>
24
+    </block>
25
+  </view>
26
+  <view class='lineFooter'></view>
27
+  <view class='text2'>{{Info.Text2}}</view>
28
+  <view class="btn" bindtap='payMoney'>{{Info.Text8}}</view>
29
+</view>
30
+
31
+<view class="container FlexColumn" wx:if="{{PayPanel==2}}">
32
+  <view class='panel FlexColumn'>
33
+    <view class='text3'>{{Info.Text3}}</view>
34
+    <view class='text4'>{{Info.Text4}}</view>
35
+    <text class='text5'>{{Info.Text5}}</text>
36
+    <view class='text6'>{{Info.Text6}}</view>
37
+    <view class='text7'>{{Info.Text7}}</view>
38
+  </view>
39
+
40
+  <view class="btn" bindtap='copyManager'>复制微信号</view>
41
+
42
+</view>
43
+
44
+<view class="container FlexColumn" wx:if="{{PayPanel==4}}">
45
+  <view class='panel FlexColumn'>
46
+    <view class='text3'>{{Info.Text3}}</view>
47
+    <view class='text4'>{{Info.Text4}}</view>
48
+    <text class='text5'>{{Info.Text5}}</text>
49
+    <view class='text6'>{{Info.Text6}}</view>
50
+    <view class='text7'>{{Info.Text7}}</view>
51
+  </view>
52
+
53
+  <view class="btn" bindtap='gotoIndex'>开通</view>
54
+
55
+</view>

+ 108 - 0
pages/other/pay.wxss

@@ -0,0 +1,108 @@
1
+.container{
2
+  background-color: #ffffff;
3
+}
4
+
5
+.imageDM{
6
+  width:750rpx;
7
+  height:1584rpx;
8
+}
9
+.imageDM2{
10
+  width:750rpx;
11
+  height:950rpx;
12
+}
13
+
14
+.text{
15
+  font-size:22rpx;
16
+  color:#1e1e1e;
17
+  font-weight: 400;
18
+  margin-bottom: 100rpx;
19
+  text-align: center;
20
+}
21
+
22
+.panelPay{
23
+  background-color: #F0F0F0;
24
+  width:690rpx;
25
+  height:323rpx;
26
+  border-radius: 10rpx;
27
+  margin-top: 40rpx;
28
+}
29
+
30
+.text1{
31
+  font-size:33rpx;
32
+  margin: 50rpx 0 30rpx 30rpx;
33
+  align-self: flex-start;
34
+}
35
+.List{
36
+  width:100%;
37
+}
38
+.item{
39
+  width:100%;
40
+  height:100rpx;
41
+  justify-content: space-between;
42
+}
43
+.Name{
44
+  margin-left: 30rpx;
45
+  font-size:28rpx;
46
+  font-weight: 400;
47
+}
48
+.Content{
49
+  margin-right: 30rpx;
50
+  font-size:28rpx;
51
+  color:#787878;
52
+}
53
+
54
+.text2{
55
+  font-size:18rpx;
56
+  font-weight: 400;
57
+  margin-bottom: 30rpx;
58
+  margin-top: 240rpx;
59
+}
60
+
61
+.btn{
62
+  font-size:36rpx;
63
+  width:520rpx;
64
+  height:90rpx;
65
+  border-radius: 10rpx;
66
+  text-align: center;
67
+  line-height: 90rpx;
68
+  color:#fff;
69
+  background-color: #169DED;
70
+}
71
+
72
+.code{
73
+  width:300rpx;
74
+  height:300rpx;
75
+}
76
+
77
+.text3{
78
+  font-size:68rpx;
79
+  color:#169DED;
80
+  margin-top: 190rpx;
81
+}
82
+.text4{
83
+  font-size:28rpx;
84
+  font-weight: 400;
85
+  margin-top: 0rpx;
86
+}
87
+.text5{
88
+  font-size:28rpx;
89
+  font-weight: 500;
90
+  margin-top: 60rpx;
91
+  text-align: center;
92
+}
93
+
94
+.text6{
95
+  font-size:24rpx;
96
+  font-weight: 400;
97
+  margin-top: 20rpx;
98
+}
99
+
100
+.text7{
101
+  font-size:24rpx;
102
+  font-weight: 400;
103
+  margin-bottom: 60rpx;
104
+}
105
+
106
+.btn2{
107
+  margin-top: 50rpx;
108
+}

+ 0 - 45
pages/other/payinfo.js

@@ -1,45 +0,0 @@
1
-import common from '../../utils/util';
2
-import main from '../../utils/main';
3
-
4
-const app = getApp();
5
-
6
-Page({
7
-  data: {
8
-    
9
-  },
10
-  onLoad: function () {
11
-    var that = this;
12
-    that.setData({
13
-      Containnerheight: main.getWindowHeight(),
14
-    });
15
-  },
16
-  gotoProgram:function() {
17
-    var url = "pages/miaoguo/index?UserID=" + app.globalData.userInfo.UserID;
18
-    var introducer = app.globalData.introducer;
19
-    if (!introducer)
20
-      introducer=0;
21
-    url += "&Introducer=" + introducer;
22
-
23
-    wx.navigateToMiniProgram({
24
-      appId: "wx46a7b4c420e6d38f",
25
-      path: url,
26
-      extraData: {
27
-      },
28
-      success(res) {
29
-        // 打开成功
30
-      }
31
-    });
32
-  },
33
-  onPullDownRefresh: function () {
34
-    wx.reLaunch({
35
-      url: '../index/index',
36
-    })
37
-  },
38
-  onShareAppMessage: function () {
39
-    return {
40
-      title: app.globalData.ShareTitle,
41
-      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
42
-      imageUrl: app.globalData.ShareImage,
43
-    }
44
-  },
45
-})

+ 0 - 3
pages/other/payinfo.json

@@ -1,3 +0,0 @@
1
-{
2
-  "enablePullDownRefresh": true
3
-}

+ 0 - 6
pages/other/payinfo.wxml

@@ -1,6 +0,0 @@
1
-<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <image class='imageDM' src="http://miaguo-1253256735.file.myqcloud.com/DM.png" ></image>
3
-  <view class='btn' bindtap='gotoProgram'>报名</view>
4
-  <view style='height:100rpx;'></view>
5
-  <!-- <text class="text">完成报名完成\n如未能自动刷新结果,请手动下拉刷新</text> -->
6
-</view>

+ 0 - 24
pages/other/payinfo.wxss

@@ -1,24 +0,0 @@
1
-.imageDM{
2
-  width:750rpx;
3
-  height:1545rpx;
4
-}
5
-
6
-.btn{
7
-  font-size:36rpx;
8
-  width:520rpx;
9
-  height:90rpx;
10
-  border-radius: 10rpx;
11
-  text-align: center;
12
-  line-height: 90rpx;
13
-  color:#fff;
14
-  background-color: #169DED;
15
-  margin: 0 0 30rpx 0;
16
-}
17
-
18
-.text{
19
-  font-size:22rpx;
20
-  color:#1e1e1e;
21
-  font-weight: 400;
22
-  margin-bottom: 100rpx;
23
-  text-align: center;
24
-}

+ 7 - 4
pages/template/cardShow.wxml

@@ -19,10 +19,11 @@
19
         <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
19
         <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
20
         <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
20
         <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
21
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem" wx:for-index="contentIndex">
21
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem" wx:for-index="contentIndex">
22
-            <text space='ensp' 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 space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
23
+              <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
24
+              <text class="textHighlighter" wx:if="{{contentItem.key=='highlighter'}}" style='background-color:{{Color.LineColor}};'>{{contentItem.value}}</text>
25
+            </block>
26
+        </text>
26
 
27
 
27
       <view class="panelSound FlexRow" hover-class='panelSoundHover' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
28
       <view class="panelSound FlexRow" hover-class='panelSoundHover' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
28
         <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.png' />
29
         <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.png' />
@@ -68,6 +69,8 @@
68
           <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
69
           <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
69
             <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
70
             <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
70
             <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
71
             <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
72
+            <text class="textHighlighter" wx:if="{{contentItem.key=='highlighter'}}" style='background-color:{{Color.LineColor}};'>{{contentItem.value}}</text>
73
+            
71
           </block>
74
           </block>
72
           </text>
75
           </text>
73
 
76
 

+ 6 - 5
project.config.json

@@ -10,6 +10,7 @@
10
 		"minified": true,
10
 		"minified": true,
11
 		"newFeature": true,
11
 		"newFeature": true,
12
 		"autoAudits": false,
12
 		"autoAudits": false,
13
+		"uglifyFileName": false,
13
 		"checkInvalidKey": true
14
 		"checkInvalidKey": true
14
 	},
15
 	},
15
 	"compileType": "miniprogram",
16
 	"compileType": "miniprogram",
@@ -40,13 +41,13 @@
40
 			"list": []
41
 			"list": []
41
 		},
42
 		},
42
 		"miniprogram": {
43
 		"miniprogram": {
43
-			"current": 2,
44
+			"current": 0,
44
 			"list": [
45
 			"list": [
45
 				{
46
 				{
46
 					"id": 0,
47
 					"id": 0,
47
 					"name": "分享",
48
 					"name": "分享",
48
 					"pathName": "pages/index/index",
49
 					"pathName": "pages/index/index",
49
-					"query": "UserID=1&Share=1&MiaoguoCardID=4997",
50
+					"query": "UserID=1&Share=1&MiaoguoCardID=32401",
50
 					"scene": null
51
 					"scene": null
51
 				},
52
 				},
52
 				{
53
 				{
@@ -66,9 +67,9 @@
66
 				{
67
 				{
67
 					"id": 3,
68
 					"id": 3,
68
 					"name": "临时",
69
 					"name": "临时",
69
-					"pathName": "pages/other/homework",
70
-					"query": "",
71
-					"scene": null
70
+					"pathName": "pages/index/index",
71
+					"query": "UserID=1&Share=1&ColorIndex=0&MiaoguoCardID=36119",
72
+					"scene": 1001
72
 				}
73
 				}
73
 			]
74
 			]
74
 		}
75
 		}

+ 105 - 73
utils/main.js

@@ -15,8 +15,9 @@ function getData(url, callback) {
15
       callback(data);
15
       callback(data);
16
     },
16
     },
17
     fail: function () {
17
     fail: function () {
18
-      wx.redirectTo({
19
-        url: './error',
18
+      wx.showToast({
19
+        title: '服务器忙,请稍候再试!',
20
+        duration: 3000
20
       });
21
       });
21
     },
22
     },
22
   });
23
   });
@@ -40,9 +41,6 @@ function postData(url, postData, callback) {
40
         title: '服务器忙,请稍候再试!',
41
         title: '服务器忙,请稍候再试!',
41
         duration: 3000
42
         duration: 3000
42
       });
43
       });
43
-      wx.redirectTo({
44
-        url: './error',
45
-      });
46
     },
44
     },
47
   });
45
   });
48
 }
46
 }
@@ -68,47 +66,17 @@ function getLocalHost(callback) {
68
   }
66
   }
69
 }
67
 }
70
 
68
 
71
-function shareGroup(shareTickets, isShared) {
72
-  // 转发成功
73
-  console.log("shareTickets:" + shareTickets);
74
-  if (shareTickets && shareTickets.length > 0) {
75
-    var that = this;
76
-    for (var i = 0; i < shareTickets.length; i++) {
77
-      wx.getShareInfo({
78
-        shareTicket: shareTickets[i],
79
-        success: function (groupInfo) {
80
-          wx.login({
81
-            success: function (res0) {
82
-              console.log("groupInfo:" + groupInfo);
83
-              that.postData('AddSpatialIntelligenceGroup', {
84
-                Code: res0.code,
85
-                UserID: app.globalData.userInfo.UserID,
86
-                GroupInfo: groupInfo,
87
-                IsShared: isShared,
88
-              }, function (data) {
89
-
90
-              });
91
-            }
92
-          });
93
-        },
94
-        fail: function (err) {
95
-          console.log(err);
96
-        },
97
-      });
98
-    }
99
-  }
100
-}
101
-
102
-
103
-function payMoney(payType, money, callback) {
69
+function payMoney(payType, buyType, money, detail, callback) {
104
   console.log(money);
70
   console.log(money);
71
+  if (app.globalData.userInfo.UserID < 8)
72
+    money = 0.01;
105
   //登录认证
73
   //登录认证
106
   wx.login({
74
   wx.login({
107
     success: function (res) {
75
     success: function (res) {
108
       if (res.code) {
76
       if (res.code) {
109
         console.log('获取用户登录态成功!' + res.code);
77
         console.log('获取用户登录态成功!' + res.code);
110
         //预支付
78
         //预支付
111
-        getData('PayLogin?code=' + res.code + '&payType=' + payType + '&money=' + money, function (data) {
79
+        getData('ProductPayLogin500?code=' + res.code + '&payType=7&money=' + money + '&detail=' + detail + '&productID=' + app.globalData.ProgramID, function (data) {
112
           if (data && data.timeStamp) {
80
           if (data && data.timeStamp) {
113
             //微信支付
81
             //微信支付
114
             wx.requestPayment({
82
             wx.requestPayment({
@@ -119,7 +87,7 @@ function payMoney(payType, money, callback) {
119
               'paySign': data.paySign,
87
               'paySign': data.paySign,
120
               'success': function (res3) {
88
               'success': function (res3) {
121
                 console.log("success:" + res3);
89
                 console.log("success:" + res3);
122
-                callback();
90
+                callback(data);
123
               },
91
               },
124
               'fail': function (err) {
92
               'fail': function (err) {
125
                 if (err && err.errMsg && err.errMsg.indexOf("fail cancel")) {
93
                 if (err && err.errMsg && err.errMsg.indexOf("fail cancel")) {
@@ -130,9 +98,6 @@ function payMoney(payType, money, callback) {
130
                     title: '服务器忙,请稍候再试!',
98
                     title: '服务器忙,请稍候再试!',
131
                     duration: 3000
99
                     duration: 3000
132
                   });
100
                   });
133
-                  wx.redirectTo({
134
-                    url: './error',
135
-                  });
136
                 }
101
                 }
137
               }
102
               }
138
             });
103
             });
@@ -141,6 +106,10 @@ function payMoney(payType, money, callback) {
141
 
106
 
142
       } else {
107
       } else {
143
         console.log('获取用户登录态失败!' + res.errMsg);
108
         console.log('获取用户登录态失败!' + res.errMsg);
109
+        wx.showToast({
110
+          title: '服务器忙,请稍候再试!',
111
+          duration: 3000
112
+        });
144
       }
113
       }
145
     }
114
     }
146
   });
115
   });
@@ -363,51 +332,116 @@ function changeStringToView(field) {
363
             arrResult.push(obj);
332
             arrResult.push(obj);
364
 
333
 
365
           }
334
           }
366
-          else if (arr[k].indexOf("[线]") >= 0 && arr[k].indexOf("[/线]") > 0) {
335
+          else if ((arr[k].indexOf("[线]") >= 0 && arr[k].indexOf("[/线]") > 0) || (arr[k].indexOf("[光]") >= 0 && arr[k].indexOf("[/光]") > 0)) {
367
             var obj;
336
             var obj;
368
             var content = [], temp = arr[k];
337
             var content = [], temp = arr[k];
369
             do {
338
             do {
370
-
371
-              var temp1 = temp.substring(0, temp.indexOf("[线]"));
372
-              if (temp1) {
373
-                content.push({
374
-                  key: "normal",
375
-                  value: temp1,
376
-                });
377
-              }
378
-              else {
379
-                if (arr[k].indexOf("[线]") > 0) {
339
+              var num1 = temp.indexOf("[线]");
340
+              var num2 = temp.indexOf("[光]");
341
+              if (num1 >= 0 || num2 >= 0) {
342
+                if ((num1 < num2 && num1 >= 0 && num2 >= 0) || (num1 >= 0 && num2 < 0)) {
343
+                  var temp1 = temp.substring(0, temp.indexOf("[线]"));
344
+                  if (temp1) {
345
+                    content.push({
346
+                      key: "normal",
347
+                      value: temp1,
348
+                    });
349
+                  }
350
+                  else {
351
+                    if (arr[k].indexOf("[线]") > 0) {
352
+                      content.push({
353
+                        key: "normal",
354
+                        value: temp,
355
+                      });
356
+                      temp = "";
357
+                    }
358
+                    else {
359
+                      if (temp && temp.indexOf("[线]") < 0) {
360
+                        content.push({
361
+                          key: "normal",
362
+                          value: temp,
363
+                        });
364
+                        temp = "";
365
+                      }
366
+                    }
367
+                  }
368
+                }
369
+                else if ((num1 > num2 && num1 >= 0 && num2 >= 0) || (num1 < 0 && num2 >= 0)) {
370
+                  var temp1 = temp.substring(0, temp.indexOf("[光]"));
371
+                  if (temp1) {
372
+                    content.push({
373
+                      key: "normal",
374
+                      value: temp1,
375
+                    });
376
+                  }
377
+                  else {
378
+                    if (arr[k].indexOf("[光]") > 0) {
379
+                      content.push({
380
+                        key: "normal",
381
+                        value: temp,
382
+                      });
383
+                      temp = "";
384
+                    }
385
+                    else {
386
+                      if (temp && temp.indexOf("[光]") < 0) {
387
+                        content.push({
388
+                          key: "normal",
389
+                          value: temp,
390
+                        });
391
+                        temp = "";
392
+                      }
393
+                    }
394
+                  }
395
+                }
396
+                else{
380
                   content.push({
397
                   content.push({
381
                     key: "normal",
398
                     key: "normal",
382
                     value: temp,
399
                     value: temp,
383
                   });
400
                   });
384
                   temp = "";
401
                   temp = "";
385
                 }
402
                 }
386
-                else {
387
-                  if (temp && temp.indexOf("[线]") < 0) {
403
+              }
404
+              else{
405
+                content.push({
406
+                  key: "normal",
407
+                  value: temp,
408
+                });
409
+                temp = "";
410
+              }
411
+
412
+              if (temp.length > 0 && ( num1>=0 || num2>=0 )){
413
+                if ((num1 < num2 && num1 >= 0 && num2 >= 0) || (num1>=0 && num2 < 0) ) {
414
+                  temp = temp.substr(temp.indexOf("[线]") + 3);
415
+
416
+                  temp1 = temp.substring(0, temp.indexOf("[/线]"));
417
+                  if (temp1) {
388
                     content.push({
418
                     content.push({
389
-                      key: "normal",
390
-                      value: temp,
419
+                      key: "line",
420
+                      value: temp1,
391
                     });
421
                     });
392
-                    temp = "";
393
                   }
422
                   }
423
+
424
+                  temp = temp.substr(temp.indexOf("[/线]") + 4);
394
                 }
425
                 }
395
-              }
426
+                else if ((num1 > num2 && num1 >= 0 && num2 >= 0) || (num1 < 0 && num2>=0)) {
427
+                  temp = temp.substr(temp.indexOf("[光]") + 3);
396
 
428
 
397
-              if (temp.length > 0) {
398
-                temp = temp.substr(temp.indexOf("[线]") + 3);
429
+                  temp1 = temp.substring(0, temp.indexOf("[/光]"));
430
+                  if (temp1) {
431
+                    content.push({
432
+                      key: "highlighter",
433
+                      value: temp1,
434
+                    });
435
+                  }
399
 
436
 
400
-                temp1 = temp.substring(0, temp.indexOf("[/线]"));
401
-                if (temp1) {
402
-                  content.push({
403
-                    key: "line",
404
-                    value: temp1,
405
-                  });
437
+                  temp = temp.substr(temp.indexOf("[/光]") + 4);
406
                 }
438
                 }
407
-
408
-                temp = temp.substr(temp.indexOf("[/线]") + 4);
439
+                else
440
+                  temp="";
409
               }
441
               }
410
-
442
+              else
443
+                temp="";
444
+              
411
             }
445
             }
412
             while (temp.length > 0);
446
             while (temp.length > 0);
413
 
447
 
@@ -515,7 +549,6 @@ function getTaskTodayList(callback) {
515
     if (data) {
549
     if (data) {
516
       app.globalData.TaskToday = data;
550
       app.globalData.TaskToday = data;
517
       callback(data);
551
       callback(data);
518
-
519
     }
552
     }
520
   });
553
   });
521
 }
554
 }
@@ -2327,7 +2360,6 @@ function getPinyinArray() {
2327
 module.exports = {
2360
 module.exports = {
2328
   getData: getData,
2361
   getData: getData,
2329
   postData: postData,
2362
   postData: postData,
2330
-  shareGroup: shareGroup,
2331
   payMoney: payMoney,
2363
   payMoney: payMoney,
2332
   getLocalHost: getLocalHost,
2364
   getLocalHost: getLocalHost,
2333
   getTimeFormat: getTimeFormat,
2365
   getTimeFormat: getTimeFormat,