chengjie 6 years ago
parent
commit
dea2b1a3c4
48 changed files with 524 additions and 261 deletions
  1. 3 2
      app.js
  2. 2 1
      app.json
  3. 5 0
      app.wxss
  4. BIN
      pages/images/music-player-play.png
  5. BIN
      pages/images/program_screenshot_l1.png
  6. BIN
      pages/images/program_screenshot_main.png
  7. BIN
      pages/images/universalpic_bell_gray_30x30.png
  8. BIN
      pages/images/universalpic_bell_white_120x120.png
  9. 0 1
      pages/index/accredit.js
  10. 10 18
      pages/index/index.js
  11. 2 1
      pages/index/index.json
  12. 0 1
      pages/index/notice.js
  13. 77 56
      pages/main/add.js
  14. 0 1
      pages/main/cardInfo.js
  15. 0 1
      pages/main/clicktype.js
  16. 0 1
      pages/main/colorplan.js
  17. 8 2
      pages/main/default.js
  18. 33 9
      pages/main/detail.js
  19. 13 0
      pages/main/detail.wxml
  20. 31 5
      pages/main/detail.wxss
  21. 0 1
      pages/main/memoryLevel.js
  22. 25 27
      pages/main/preview.js
  23. 0 1
      pages/main/recommend.js
  24. 0 1
      pages/main/searchCard.js
  25. 0 1
      pages/main/searchCard.json
  26. 0 1
      pages/main/searchCard1.js
  27. 0 1
      pages/main/searchCardList.js
  28. 0 1
      pages/main/searchWeb.js
  29. 0 1
      pages/main/searchWeb1.js
  30. 0 1
      pages/main/searchWeb2.js
  31. 14 0
      pages/main/searchWeb2.wxml
  32. 3 0
      pages/main/searchWeb2.wxss
  33. 10 1
      pages/main/setting.js
  34. 3 3
      pages/main/setting.wxml
  35. 93 0
      pages/other/lesson.js
  36. 4 0
      pages/other/lesson.json
  37. 23 0
      pages/other/lesson.wxml
  38. 54 0
      pages/other/lesson.wxss
  39. 45 0
      pages/other/payinfo.js
  40. 3 0
      pages/other/payinfo.json
  41. 5 0
      pages/other/payinfo.wxml
  42. 29 0
      pages/other/payinfo.wxss
  43. 0 77
      pages/other/test.js
  44. 0 3
      pages/other/test.json
  45. 0 9
      pages/other/test.wxml
  46. 0 6
      pages/other/test.wxss
  47. 4 4
      project.config.json
  48. 25 23
      utils/main.js

+ 3 - 2
app.js

@@ -25,11 +25,11 @@ App({
25 25
     }
26 26
   },
27 27
   globalData: {
28
-    Version: "1.1.11",
28
+    Version: "1.1.15",
29 29
     IsProduction: true,
30 30
     ShareTitle: "刻意学习,高效成长",
31 31
     SharePath: "pages/index/index",
32
-    ShareImage: '',
32
+    ShareImage: '../images/program_screenshot_main.png',
33 33
     ProgramID: 166,
34 34
     ProgramName:"秒过学习",
35 35
     serverUrl: "https://www.kylx365.com/apiData/",
@@ -51,6 +51,7 @@ App({
51 51
     Key: "kylx365_chengjie",
52 52
     IV: "kylx365hongliren",
53 53
     IsEnter: true,//是否是刚进来
54
+    LessonID:0,//听课ID
54 55
 
55 56
     CardList:[],//卡列表变量
56 57
     TaskToday:[],//今天任务列表

+ 2 - 1
app.json

@@ -3,7 +3,7 @@
3 3
     "pages/index/index",
4 4
     "pages/main/recommend",
5 5
     "pages/main/clicktype",
6
-    "pages/other/test",
6
+    "pages/other/lesson",
7 7
     "pages/main/colorplan",
8 8
     "pages/index/notice",
9 9
     "pages/index/accredit",
@@ -19,6 +19,7 @@
19 19
     "pages/main/searchWeb",
20 20
     "pages/main/detail",
21 21
     "pages/main/memoryLevel",
22
+    "pages/other/payinfo",
22 23
     "pages/main/setting"
23 24
   ],
24 25
   "window": {

+ 5 - 0
app.wxss

@@ -51,6 +51,11 @@
51 51
   height: 1rpx;
52 52
   background-color: #E3E3E3; 
53 53
 }
54
+.lineWidth680{
55
+  width: 680rpx;
56
+  height: 1rpx;
57
+  background-color: #E3E3E3; 
58
+}
54 59
 .lineWidth650{
55 60
   width: 650rpx;
56 61
   height: 1rpx;

BIN
pages/images/music-player-play.png


BIN
pages/images/program_screenshot_l1.png


BIN
pages/images/program_screenshot_main.png


BIN
pages/images/universalpic_bell_gray_30x30.png


BIN
pages/images/universalpic_bell_white_120x120.png


+ 0 - 1
pages/index/accredit.js

@@ -14,7 +14,6 @@ Page({
14 14
       Containnerheight: main.getWindowHeight(),
15 15
     });
16 16
 
17
-    wx.hideShareMenu();
18 17
   },
19 18
   onUnload: function () {
20 19
 

+ 10 - 18
pages/index/index.js

@@ -23,8 +23,12 @@ const arrSentence = [
23 23
 Page({
24 24
   data: {
25 25
   },
26
+  onPullDownRefresh: function () {
27
+    wx.reLaunch({
28
+      url: './index',
29
+    })
30
+  },
26 31
   onLoad: function (options) {
27
-    wx.hideShareMenu();
28 32
     if (options) {
29 33
       if (options.UserID) {
30 34
         console.log("UserID:" + options.UserID);
@@ -33,10 +37,6 @@ Page({
33 37
         if (options.QuestionTypeID)
34 38
           questionTypeID = options.QuestionTypeID;
35 39
       }
36
-      if (options.goto) {
37
-        console.log("goto:" + options.goto);
38
-        app.globalData.goto = options.goto;
39
-      }
40 40
       if (options.SourceID) {
41 41
         console.log("SourceID:" + options.SourceID);
42 42
         app.globalData.SourceID = options.SourceID;
@@ -52,24 +52,16 @@ Page({
52 52
         app.globalData.introducer = scene;
53 53
       }
54 54
 
55
-      if (options.ProductID) {
56
-        this.setData({
57
-          ProductID: options.ProductID,
58
-          ProductUserID: options.ProductUserID,
59
-        });
60
-      }
61
-
62
-      if (options.GiftID) {
63
-        this.setData({
64
-          GiftID: options.GiftID,
65
-        });
66
-      }
67
-
68 55
       if (options.Share == 1) {
69 56
         this.setData({
70 57
           MiaoguoCardID: options.MiaoguoCardID,
71 58
         });
72 59
       }
60
+
61
+      if (options.LessonID) {
62
+        console.log("Lesson:" + options.LessonID);
63
+        app.globalData.LessonID = options.LessonID;
64
+      }
73 65
     }
74 66
     this.setData({
75 67
       Containnerheight: main.getWindowHeight(),

+ 2 - 1
pages/index/index.json

@@ -1,3 +1,4 @@
1 1
 {
2
-  "navigationBarTitleText": "秒过"
2
+  "navigationBarTitleText": "秒过",
3
+  "enablePullDownRefresh": true
3 4
 }

+ 0 - 1
pages/index/notice.js

@@ -11,7 +11,6 @@ Page({
11 11
       Containnerheight: main.getWindowHeight(),
12 12
     });
13 13
 
14
-    wx.hideShareMenu();
15 14
   },
16 15
   onPullDownRefresh:function(){
17 16
     wx.reLaunch({

+ 77 - 56
pages/main/add.js

@@ -24,7 +24,6 @@ Page({
24 24
     BtnArray: ["+", "-", "×", "÷", "=", "<", ">"],
25 25
   },
26 26
   onLoad: function (options) {
27
-    wx.hideShareMenu();
28 27
     var that = this;
29 28
 
30 29
     var fieldNumber = 0;
@@ -210,71 +209,74 @@ Page({
210 209
           isSave = true;
211 210
         }, 5000);
212 211
 
213
-        that.uploadImageAll(that.data.Field, function (success,field) {
214
-          if (success){
215
-            that.data.Field = field;
216
-            var userid = app.globalData.userInfo.UserID;
217
-            var isTodayStudy = 0;
218
-            if (that.data.IsTodayStudy && that.data.UpdateType == "add2")
219
-              isTodayStudy = 1;
220
-
221
-            var tags = [];
222
-            for (var i = 0; i < that.data.Tags.length; i++) {
223
-              if (that.data.Tags[i])
224
-                tags.push(that.data.Tags[i]);
225
-            }
226
-            var param1 = {};
227
-            param1 = that.formatField(that.data.Field);
228
-            param1.Tags = tags;
229
-            param1.IsTodayStudy = isTodayStudy;
230
-            param1.ID = that.data.MiaoguoCardID;
231
-            that.saveLocalCardList(param1);
232
-
233
-
234
-            wx.hideLoading();
235
-
212
+        if (that.checkImageCount(that.data.Field)){
213
+          that.uploadImageAll(that.data.Field, function (success, field) {
214
+            if (success) {
215
+              that.data.Field = field;
216
+              var userid = app.globalData.userInfo.UserID;
217
+              var isTodayStudy = 0;
218
+              if (that.data.IsTodayStudy && that.data.UpdateType == "add2")
219
+                isTodayStudy = 1;
220
+
221
+              var tags = [];
222
+              for (var i = 0; i < that.data.Tags.length; i++) {
223
+                if (that.data.Tags[i])
224
+                  tags.push(that.data.Tags[i]);
225
+              }
226
+              var param1 = {};
227
+              param1 = that.formatField(that.data.Field);
228
+              param1.Tags = tags;
229
+              param1.IsTodayStudy = isTodayStudy;
230
+              param1.ID = that.data.MiaoguoCardID;
231
+              that.saveLocalCardList(param1);
236 232
 
237 233
 
238
-            wx.showLoading({
239
-              title: '保存数据请稍候',
240
-              mask: true,
241
-            });
242
-            timeoutUploadImage = setTimeout(function () {
243 234
               wx.hideLoading();
244
-            }, 15000);
245 235
 
246
-            main.postData('AddMiaoguoCard?Type=' + that.data.UpdateType + '&UserID=' + userid, param1, function (data) {
247
-              wx.removeStorageSync("TempCardNoSaved");
248 236
 
249
-              if (that.data.UpdateType == "edit" || that.data.UpdateType == "edit2" || that.data.UpdateType == "edit3") {
250
-                that.onClose();
251
-              }
252
-              else {
237
+
238
+              wx.showLoading({
239
+                title: '保存数据请稍候',
240
+                mask: true,
241
+              });
242
+              timeoutUploadImage = setTimeout(function () {
253 243
                 wx.hideLoading();
254
-                wx.showToast({
255
-                  title: '已保存!',
256
-                  image: "../images/universalpic_saved_white_120x120.png",
257
-                });
244
+              }, 15000);
245
+
246
+              main.postData('AddMiaoguoCard?Type=' + that.data.UpdateType + '&UserID=' + userid, param1, function (data) {
247
+                wx.removeStorageSync("TempCardNoSaved");
258 248
 
259
-                if (that.data.UpdateType == "add2") {
260
-                  that.initAddCard();
249
+                if (that.data.UpdateType == "edit" || that.data.UpdateType == "edit2" || that.data.UpdateType == "edit3") {
250
+                  that.onClose();
261 251
                 }
252
+                else {
253
+                  wx.hideLoading();
254
+                  wx.showToast({
255
+                    title: '已保存!',
256
+                    image: "../images/universalpic_saved_white_120x120.png",
257
+                  });
262 258
 
263
-                var taskToday = app.globalData.TaskToday;
264
-                taskToday.CardNumber++;
265
-                app.globalData.TaskToday = taskToday;
259
+                  if (that.data.UpdateType == "add2") {
260
+                    that.initAddCard();
261
+                  }
266 262
 
267
-              }
268
-              wx.removeStorageSync("TempCardInfo");
269
-            });
270
-          }
271
-          else{
272
-            wx.showToast({
273
-              title: '图片上传失败',
274
-              mask: true,
275
-            });
276
-          }
277
-        });
263
+                  var taskToday = app.globalData.TaskToday;
264
+                  taskToday.CardNumber++;
265
+                  app.globalData.TaskToday = taskToday;
266
+
267
+                }
268
+                wx.removeStorageSync("TempCardInfo");
269
+              });
270
+            }
271
+            else {
272
+              wx.showToast({
273
+                title: '图片上传失败1',
274
+                mask: true,
275
+              });
276
+            }
277
+          });
278
+        }
279
+        
278 280
       }
279 281
       else {
280 282
         wx.showToast({
@@ -323,6 +325,25 @@ Page({
323 325
     }
324 326
     return result;
325 327
   },
328
+  checkImageCount:function(arr){
329
+    var count=0;
330
+    for (var i = 0; i < arr.length; i++) {
331
+      for (var j = 0; j < arr[i].length; j++) {
332
+        if (arr[i][j].Type == "image" && arr[i][j].Content) {
333
+          
334
+          count++;
335
+        }
336
+      }
337
+    }
338
+    if (count>3){
339
+      wx.showToast({
340
+        title: '只能上传三张图片',
341
+      });
342
+      return false;
343
+    }
344
+    else 
345
+      return true;
346
+  },
326 347
   uploadImageAll: function (arr, callback) {
327 348
     var that = this;
328 349
     var b = false;

+ 0 - 1
pages/main/cardInfo.js

@@ -7,7 +7,6 @@ Page({
7 7
   data: {
8 8
   },
9 9
   onLoad: function (options) {
10
-    wx.hideShareMenu();
11 10
     var that = this;
12 11
     that.setData({
13 12
       Containnerheight: main.getWindowHeight(),

+ 0 - 1
pages/main/clicktype.js

@@ -27,7 +27,6 @@ Page({
27 27
     ],
28 28
   },
29 29
   onLoad: function (options) {
30
-    wx.hideShareMenu();
31 30
     var that = this;
32 31
     that.setData({
33 32
       Containnerheight: main.getWindowHeight(),

+ 0 - 1
pages/main/colorplan.js

@@ -7,7 +7,6 @@ Page({
7 7
   data: {
8 8
   },
9 9
   onLoad: function (options) {
10
-    wx.hideShareMenu();
11 10
     var that = this;
12 11
     that.setData({
13 12
       Containnerheight: main.getWindowHeight(),

+ 8 - 2
pages/main/default.js

@@ -40,9 +40,15 @@ Page({
40 40
       success(res) {
41 41
         if (res.authSetting['scope.userInfo']) {
42 42
 
43
-          if (!app.globalData.userInfo.IsMember && app.globalData.userInfo.IsShow==1){
43
+          if (!app.globalData.userInfo.IsMember && app.globalData.userInfo.IsShow == 1){
44 44
             wx.navigateTo({
45
-              url: '../index/notice',
45
+              url: '../other/payinfo',
46
+            });
47
+          }
48
+
49
+          if (app.globalData.userInfo.IsMember && app.globalData.LessonID && app.globalData.LessonID>0) {
50
+            wx.navigateTo({
51
+              url: '../other/lesson?id=' + app.globalData.LessonID,
46 52
             });
47 53
           }
48 54
 

+ 33 - 9
pages/main/detail.js

@@ -10,6 +10,19 @@ const arrFontSize = [
10 10
   { Name: "超大", Value: 108 }
11 11
 ];
12 12
 
13
+const arrDelayedTime = [
14
+  {
15
+    DayNumber: 7,
16
+    Name: "一周",
17
+  }, {
18
+    DayNumber: 30,
19
+    Name: "一个月",
20
+  }, {
21
+    DayNumber: 90,
22
+    Name: "三个月",
23
+  },
24
+]
25
+
13 26
 var innerAudioContext1;
14 27
 
15 28
 var listTaskFinished = []; //完成的任务
@@ -19,7 +32,7 @@ var arrImage = [],
19 32
   arrImage2 = [];
20 33
 var intervalSound = 0,
21 34
   intervalRefresh = 0;
22
-var isCollecting=false;
35
+var isCollecting = false;
23 36
 
24 37
 Page({
25 38
   data: {
@@ -30,11 +43,11 @@ Page({
30 43
     IsShowNumberInfo: false,
31 44
     IsMore: false,
32 45
     FontSizeArray: arrFontSize,
46
+    ArrDelayedTime: arrDelayedTime,
33 47
     TaskInfo: {},
34 48
     Color: { ID: 1 },
35 49
   },
36 50
   onLoad: function () {
37
-    wx.hideShareMenu();
38 51
     var that = this;
39 52
     var height = app.globalData.systemInfo.screenHeight * 2 - 90;
40 53
     var height2 = 750;
@@ -536,6 +549,7 @@ Page({
536 549
         NumberHistory: 0,
537 550
         CanUndo: 1,
538 551
         Recommend: 0,
552
+        IsMore: false,
539 553
       });
540 554
       that.setSoundFile(1);
541 555
       main.UpdateMiaoguoCardTodayAll(true, function () {
@@ -556,15 +570,25 @@ Page({
556 570
         NumberHistory: that.data.NumberHistory,
557 571
         CanUndo: 1,
558 572
         Recommend: 0,
573
+        IsMore: false,
559 574
       });
560 575
 
561 576
       if (btnnumber == "1") {
562 577
         that.setSoundFile(3);
563
-        wx.showToast({
564
-          title: '今天不练',
565
-          mask: true,
566
-          image: "../images/universalpic_shelve_white_120x120.png",
567
-        });
578
+        if (time == "1d") {
579
+          wx.showToast({
580
+            title: '今天不练',
581
+            mask: true,
582
+            image: "../images/universalpic_shelve_white_120x120.png",
583
+          });
584
+        }
585
+        else {
586
+          wx.showToast({
587
+            title: '已延后',
588
+            mask: true,
589
+            image: "../images/universalpic_bell_white_120x120.png",
590
+          });
591
+        }
568 592
       } else
569 593
         that.setSoundFile(0);
570 594
     }
@@ -651,7 +675,7 @@ Page({
651 675
         }
652 676
         var speed1 = Math.round(100 * data.Count / (data.Duration / 60)) / 100;
653 677
         var speed2 = common.getMinuteSecond(Math.round(data.Duration / data.Count), true);
654
-        app.globalData.TaskToday.DayNumber=data.DayNumber;
678
+        app.globalData.TaskToday.DayNumber = data.DayNumber;
655 679
         that.setData({
656 680
           TodayTime: duration,
657 681
           Speed1: speed1 + "张题卡",
@@ -677,7 +701,7 @@ Page({
677 701
   },
678 702
   showImage: function (e) {
679 703
     var name = e.currentTarget.dataset.name;
680
-    if (name && name.length>5){
704
+    if (name && name.length > 5) {
681 705
       wx.previewImage({
682 706
         current: name,
683 707
         urls: arrImage

+ 13 - 0
pages/main/detail.wxml

@@ -181,6 +181,19 @@
181 181
         <view class='numberContainerFooter111'>编辑题卡</view>
182 182
       </view>
183 183
       <view class='lineFooter'></view>
184
+      <view class='numberContainerFooter103 FlexRow' catchtap="gotoEdit">
185
+        <image src="../images/universalpic_bell_gray_30x30.png" class='universalpic_bell_gray_30x30' />
186
+        <view class='numberContainerFooter1111 numberContainerFooter111'>延后练习</view>
187
+      </view>
188
+      <block wx:for="{{ArrDelayedTime}}" wx:key="index">
189
+        <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
190
+          <view class="lineWidth670"></view>
191
+        </view>
192
+        <view class='numberContainerFooter104 FlexRow' catchtap='gotoNext' data-time="{{item.DayNumber}}d" data-btnnumber="1">
193
+          <view class='numberContainerFooter113'>{{item.Name}}</view>
194
+        </view>
195
+      </block>
196
+      <view class='lineFooter'></view>
184 197
       <view class='numberContainerFooter101 FlexRow'>
185 198
         <image src="../images/universalpic_typesize_gray_30x18.png" class='universalpic_typesize_gray_30x18' />
186 199
         <view class='numberContainerFooter11 FlexColumn'>

+ 31 - 5
pages/main/detail.wxss

@@ -401,8 +401,6 @@
401 401
   background-color: #0a60be;
402 402
 }
403 403
 
404
-
405
-
406 404
 .footer0 {
407 405
   height: 180rpx;
408 406
   width: 100%;
@@ -487,7 +485,6 @@
487 485
   margin: 0 20rpx 0 30rpx;
488 486
 }
489 487
 
490
-
491 488
 .numberContainer {
492 489
   width: 100%;
493 490
   justify-content: flex-start;
@@ -551,6 +548,12 @@
551 548
   background-color:rgba(0, 0, 0, 0.2);
552 549
 }
553 550
 
551
+.lineWidth670{
552
+  width: 670rpx;
553
+  height: 1rpx;
554
+  background-color:rgba(0, 0, 0, 0.2);
555
+}
556
+
554 557
 .practice_introduction_marks_a {
555 558
   width: 22rpx;
556 559
   height: 16rpx;
@@ -597,6 +600,16 @@
597 600
   height: 132rpx;
598 601
   justify-content: flex-start;
599 602
 }
603
+.numberContainerFooter103{
604
+  width:100%;
605
+  height: 111rpx;
606
+  justify-content: flex-start;
607
+}
608
+.numberContainerFooter104{
609
+  width:100%;
610
+  height: 100rpx;
611
+  justify-content: flex-start;
612
+}
600 613
 .numberContainerFooter101{
601 614
   width:100%;
602 615
   height: 234rpx;
@@ -609,6 +622,12 @@
609 622
   height: 25rpx;
610 623
   margin: 0 30rpx 0 30rpx;
611 624
 }
625
+
626
+.universalpic_bell_gray_30x30{
627
+  width:30rpx;
628
+  height:30rpx;
629
+  margin: 40rpx 20rpx 0 30rpx;
630
+}
612 631
 .universalpic_typesize_gray_30x18{
613 632
   width: 30rpx; 
614 633
   height: 18rpx;
@@ -624,7 +643,14 @@
624 643
   font-size:36rpx;
625 644
   font-weight: 400;
626 645
 }
627
-
646
+.numberContainerFooter1111{
647
+  margin-top: 40rpx;
648
+}
649
+.numberContainerFooter113{
650
+  font-size:28rpx;
651
+  font-weight: 400;
652
+  margin-left: 80rpx;
653
+}
628 654
 
629 655
 .numberContainerFooter112{
630 656
   justify-content: flex-start;
@@ -643,4 +669,4 @@
643 669
 .numberContainerFooter1121Select{
644 670
   border:3rpx solid #F1AB1E;
645 671
   color:#F1AB1E
646
-}
672
+}

+ 0 - 1
pages/main/memoryLevel.js

@@ -7,7 +7,6 @@ Page({
7 7
   data: {
8 8
   },
9 9
   onLoad: function () {
10
-    wx.hideShareMenu();
11 10
     var that = this;
12 11
     that.setData({
13 12
       Containnerheight: main.getWindowHeight(),

+ 25 - 27
pages/main/preview.js

@@ -14,7 +14,6 @@ Page({
14 14
     IsExistCard: false,
15 15
   },
16 16
   onLoad: function (options) {
17
-    wx.hideShareMenu();
18 17
 
19 18
     var that = this;
20 19
     isCopying = false;
@@ -220,12 +219,18 @@ Page({
220 219
       content: '这张题卡今天必须练习',
221 220
       success(res) {
222 221
         if (res.confirm) {
223
-          var obj = {
224
-            ID: that.data.ID,
225
-            BtnNumber: -1,
226
-            LearningType: 2,
227
-          }
228
-          that.saveCard(obj, function () {
222
+
223
+          var arr=[];
224
+          var obj = {};
225
+          obj.Card={};
226
+          obj.Card.MiaoguoCardID = that.data.ID;
227
+          obj.BtnNumber = -1;
228
+          obj.LearningType = 2;
229
+          arr.push(obj);
230
+
231
+          wx.setStorageSync("ListTaskFinished", arr);
232
+
233
+          main.UpdateMiaoguoCardTodayAll(false, function () {
229 234
             var time = common.formatTime(new Date());
230 235
             that.setData({
231 236
               LimitTimeStr: common.formatDateCHS(time),
@@ -260,15 +265,19 @@ Page({
260 265
       content: '这张题卡今天不练习',
261 266
       success(res) {
262 267
         if (res.confirm) {
263
-          var url = "UpdateMiaoguoCardToday?";
264
-          url += "ID=" + that.data.MiaoguoCardID;
265
-          url += "&UserID=" + app.globalData.userInfo.UserID;
266
-          url += "&IntervalTime=1d";
267
-          url += "&BtnNumber=1";
268
-          url += "&LearningType=3";
269
-          url += "&Duration=0";
270
-          url += "&IsUndo=0";
271
-          main.getData(url, function (data) {
268
+
269
+          var arr = [];
270
+          var obj = {};
271
+          obj.Card = {};
272
+          obj.Card.MiaoguoCardID = that.data.MiaoguoCardID;
273
+          obj.IntervalTime = "1d";
274
+          obj.BtnNumber = 1;
275
+          obj.Duration = 0;
276
+          obj.LearningType = 3;
277
+          arr.push(obj);
278
+
279
+          wx.setStorageSync("ListTaskFinished", arr);
280
+          main.UpdateMiaoguoCardTodayAll(false, function () {
272 281
             var time = common.formatTime(common.addDate("d", 1, new Date()));
273 282
             that.setData({
274 283
               LimitTimeStr: common.formatDateCHS(time),
@@ -295,17 +304,6 @@ Page({
295 304
       }
296 305
     })
297 306
   },
298
-  saveCard: function (obj, callback) {
299
-    var url = "UpdateMiaoguoCardToday?";
300
-    url += "ID=" + obj.ID;
301
-    url += "&UserID=" + app.globalData.userInfo.UserID;
302
-    url += "&BtnNumber=" + obj.BtnNumber;
303
-    url += "&LearningType=" + obj.LearningType;
304
-
305
-    main.getData(url, function (data) {
306
-      callback();
307
-    });
308
-  },
309 307
   copyCard: function () {
310 308
     if (!isCopying) {
311 309
       isCopying = true;

+ 0 - 1
pages/main/recommend.js

@@ -17,7 +17,6 @@ Page({
17 17
     ]
18 18
   },
19 19
   onLoad: function (options) {
20
-    wx.hideShareMenu();
21 20
     var that = this;
22 21
     
23 22
     that.init();

+ 0 - 1
pages/main/searchCard.js

@@ -7,7 +7,6 @@ Page({
7 7
   data: {
8 8
   },
9 9
   onLoad: function () {
10
-    wx.hideShareMenu();
11 10
     var that = this;
12 11
     that.setData({
13 12
       Containnerheight: main.getWindowHeight(),

+ 0 - 1
pages/main/searchCard.json

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

+ 0 - 1
pages/main/searchCard1.js

@@ -7,7 +7,6 @@ Page({
7 7
   data: {
8 8
   },
9 9
   onLoad: function () {
10
-    wx.hideShareMenu();
11 10
     var that = this;
12 11
     that.setData({
13 12
       Containnerheight: main.getWindowHeight(),

+ 0 - 1
pages/main/searchCardList.js

@@ -9,7 +9,6 @@ Page({
9 9
     HasPage:false,
10 10
   },
11 11
   onLoad: function (options) {
12
-    wx.hideShareMenu();
13 12
     var that = this;
14 13
 
15 14
     var Search = "", IsToday = 0, IsCollect = 0;

+ 0 - 1
pages/main/searchWeb.js

@@ -7,7 +7,6 @@ Page({
7 7
   data: {
8 8
   },
9 9
   onLoad: function () {
10
-    wx.hideShareMenu();
11 10
     var that = this;
12 11
 
13 12
     that.setData({

+ 0 - 1
pages/main/searchWeb1.js

@@ -23,7 +23,6 @@ Page({
23 23
     ]
24 24
   },
25 25
   onLoad: function () {
26
-    wx.hideShareMenu();
27 26
     var that = this;
28 27
     that.setData({
29 28
       Containnerheight: main.getWindowHeight(),

+ 0 - 1
pages/main/searchWeb2.js

@@ -10,7 +10,6 @@ Page({
10 10
     CSS: {},
11 11
   },
12 12
   onLoad: function (options) {
13
-    wx.hideShareMenu();
14 13
     var that = this;
15 14
     that.setData({
16 15
       Containnerheight: main.getWindowHeight(),

+ 14 - 0
pages/main/searchWeb2.wxml

@@ -35,6 +35,20 @@
35 35
     <view class='lineFooter'></view>
36 36
   </block>
37 37
 
38
+  <!-- 笔顺数组 -->
39
+  <block wx:if="{{Result.CHN.BiShunArr && Result.CHN.BiShunArr.length>0}}">
40
+    <view class="panelTitle FlexRow">
41
+      <view class="panelTitle1">书写</view>
42
+    </view>
43
+    <view class="panelItem FlexRow">
44
+      <view class="{{CSS['CHN_BiShunArr_'+index].Css1}} panelItemFrame1 panelItemFrame FlexRow" wx:for="{{Result.CHN.BiShunArr}}" wx:key="index" bindtap='getInputData' data-type="image" data-content="{{item}}" data-css="CHN_BiShunArr_{{index}}" data-tag="书写">
45
+        <view class="{{CSS['CHN_BiShunArr_'+index].Css2}} panelSelect0">{{CSS['CHN_BiShunArr_'+index].Number}}</view>
46
+        <image class="image1" src="{{item}}" />
47
+      </view>
48
+    </view>
49
+    <view class='lineFooter'></view>
50
+  </block>
51
+
38 52
   <!-- 读写 -->
39 53
   <block wx:if="{{Result.CHN.TianKong && Result.CHN.TianKong.length>0}}">
40 54
     <view class="panelTitle FlexRow">

+ 3 - 0
pages/main/searchWeb2.wxss

@@ -46,6 +46,9 @@
46 46
   margin: 30rpx 0  0 30rpx;
47 47
   min-height: 100rpx;
48 48
 }
49
+.panelItemFrame1 {
50
+  margin: 30rpx 10rpx 0 30rpx;
51
+}
49 52
 
50 53
 .Select1 {
51 54
   border:1rpx solid #0071EF;

+ 10 - 1
pages/main/setting.js

@@ -17,7 +17,6 @@ Page({
17 17
     RecommendName:"启用",
18 18
   },
19 19
   onLoad: function () {
20
-    wx.hideShareMenu();
21 20
     var that = this;
22 21
 
23 22
     for (var i = 5; i <= 200; i++) {
@@ -194,6 +193,16 @@ Page({
194 193
       url: './recommend',
195 194
     })
196 195
   },
196
+  gotoPay: function () {
197
+    wx.navigateTo({
198
+      url: '../other/payinfo',
199
+    })
200
+  },
201
+  gotoLesson: function () {
202
+    wx.navigateTo({
203
+      url: '../other/lesson',
204
+    })
205
+  },
197 206
   onShareAppMessage: function () {
198 207
     return {
199 208
       title: app.globalData.ShareTitle,

+ 3 - 3
pages/main/setting.wxml

@@ -116,7 +116,7 @@
116 116
     <view class='lineFooter'></view>
117 117
   </block>
118 118
 
119
-  <view style='height:100rpx'></view>
120
-  <text class='text1' bindtap='updateMember'>©2019 {{ProgramName}}\n微信小程序 版本 {{Version}}</text>
121
-  <view style='height:100rpx;'></view>
119
+  <view style='width:100%;height:100rpx;' bindtap='updateMember'></view>
120
+  <text class='text1' bindtap='gotoPay'>©2019 {{ProgramName}}\n微信小程序 版本 {{Version}}</text>
121
+  <view style='width:100%;height:100rpx;' bindtap='gotoLesson'></view>
122 122
 </view>

+ 93 - 0
pages/other/lesson.js

@@ -0,0 +1,93 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+var imageUrlPrefix;
6
+var currentContent;
7
+
8
+Page({
9
+  data: {
10
+    LessonID: 1,
11
+    ArrTirtle: [],
12
+  },
13
+  onReady: function (e) {
14
+    this.audioCtx = wx.createAudioContext('myAudio')
15
+  },
16
+  onLoad: function (options) {
17
+    var that = this;
18
+    var id = 1;
19
+    if (options && options.id)
20
+      id = options.id;
21
+    imageUrlPrefix = app.globalData.uploadImageUrl + "lesson/lesson" + id + "/";
22
+    main.getData("GetMiaoguoLesson?Lesson=" + id + "&time=" + new Date().getTime(), function (data) {
23
+      that.setData({
24
+        LessonID: data.LessonID,
25
+        ArrTirtle: data.List,
26
+        IsPause: true,
27
+        PlayIndex: 0,
28
+        Containnerheight: main.getWindowHeight(),
29
+        AudioSrc: imageUrlPrefix + "sounds/1.m4a",
30
+        ImageUrl: imageUrlPrefix + "%E5%B9%BB%E7%81%AF%E7%89%8701.jpg",
31
+      });
32
+    });
33
+    currentContent = [];
34
+    app.globalData.LessonID = 0;
35
+  },
36
+  onUnload: function () {
37
+    this.InsertMiaoguoUserLesson();
38
+  },
39
+  onHide: function () {
40
+    this.InsertMiaoguoUserLesson();
41
+  },
42
+  InsertMiaoguoUserLesson: function () {
43
+    if (currentContent.length > 0) {
44
+      var url = "InsertMiaoguoUserLesson?UserID=" + app.globalData.userInfo.UserID;
45
+      url += "&LessonID=" + this.data.LessonID;
46
+      url += "&Content=" + currentContent.join(",");
47
+
48
+      main.getData(url, function (data) {
49
+        currentContent = [];
50
+      });
51
+    }
52
+  },
53
+  playAudio: function (e) {
54
+    var that = this;
55
+    var id = e.currentTarget.dataset.id + 1;
56
+    if (id < 10)
57
+      id = "0" + id;
58
+    this.setData({
59
+      IsPause: false,
60
+      PlayIndex: e.currentTarget.dataset.id,
61
+      AudioSrc: imageUrlPrefix + "sounds/" + Number(id) + ".m4a",
62
+      ImageUrl: imageUrlPrefix + "%E5%B9%BB%E7%81%AF%E7%89%87" + id + ".jpg",
63
+    });
64
+    setTimeout(function () {
65
+      that.audioCtx.play();
66
+    }, 1000);
67
+  },
68
+  bindEnded: function () {
69
+    var id = this.data.PlayIndex + 1;
70
+    currentContent.push(id);
71
+    if (id < this.data.ArrTirtle.length)
72
+      this.playAudio({ currentTarget: { dataset: { id: id } } });
73
+  },
74
+  audioPlay: function () {
75
+    this.audioCtx.play();
76
+    this.setData({
77
+      IsPause: false,
78
+    });
79
+  },
80
+  audioPause: function () {
81
+    this.audioCtx.pause();
82
+    this.setData({
83
+      IsPause: true,
84
+    });
85
+  },
86
+  onShareAppMessage: function () {
87
+    return {
88
+      title: "秒过学习法",
89
+      path: app.globalData.SharePath + '?LessonID=' + this.data.LessonID + '&UserID=' + app.globalData.userInfo.UserID,
90
+      imageUrl: '../images/program_screenshot_l1.png',
91
+    }
92
+  },
93
+});

+ 4 - 0
pages/other/lesson.json

@@ -0,0 +1,4 @@
1
+{
2
+  "navigationBarTitleText": "秒过学习法",
3
+  "backgroundColorBottom":"#f0f0f0"
4
+}

+ 23 - 0
pages/other/lesson.wxml

@@ -0,0 +1,23 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class='top FlexColumn'>
3
+    <image class="img" src='{{ImageUrl}}' bindtap='audioPause'></image>
4
+    <view class='pause img FlexRow' catchtap='audioPlay' hidden="{{!IsPause}}">
5
+      <image class="music-player-play" src='../images/music-player-play.png'></image>
6
+    </view>
7
+  </view>
8
+  <audio class='audio' src="{{AudioSrc}}" id="myAudio" bindended="bindEnded"></audio>
9
+  <view class="main FlexColumn">
10
+    <block wx:for="{{ArrTirtle}}" wx:key="index">
11
+      <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
12
+        <view class="lineWidth680"></view>
13
+      </view>
14
+
15
+      <view class='item FlexRow' bindtap='playAudio' data-id="{{index}}">
16
+        <image src="../images/universalpic_read_begin_gray_20x20.png" class='universalpic_read_begin_gray_20x20' wx:if="{{PlayIndex==index}}" />
17
+        <view class='universalpic_read_begin_gray_20x20' wx:if="{{PlayIndex!=index}}"></view>
18
+        <view>{{item.Title}}</view>
19
+      </view>
20
+    </block>
21
+  </view>
22
+  <view style='height:100rpx;'></view>
23
+</view>

+ 54 - 0
pages/other/lesson.wxss

@@ -0,0 +1,54 @@
1
+.container {
2
+  background-color: #f0f0f0;
3
+  color:#1e1e1e;
4
+  font-weight: 500;
5
+  justify-content: flex-start;
6
+}
7
+
8
+.top {
9
+  width:100%;
10
+  height:495rpx;
11
+  position: fixed;
12
+  z-index: 10;
13
+  background-color: #f0f0f0;
14
+}
15
+
16
+.img {
17
+  width:720rpx;
18
+  height:405rpx;
19
+  border-radius: 10rpx;
20
+}
21
+
22
+.pause{
23
+  background-color: rgba(0,0,0,0.2);
24
+  position: absolute;
25
+  z-index: 20;
26
+}
27
+
28
+.music-player-play{
29
+  width:102rpx;
30
+  height:120rpx;
31
+}
32
+
33
+.main{
34
+  margin-top: 495rpx;
35
+  width:100%;
36
+  align-items: flex-start;
37
+  background-color: #fff;
38
+}
39
+
40
+.item{
41
+  width:720rpx;
42
+  height:100rpx;
43
+  margin-left: 30rpx;
44
+  color:#1e1e1e;
45
+  font-size:28rpx;
46
+  font-weight: 400;
47
+  justify-content: flex-start;
48
+}
49
+
50
+.universalpic_read_begin_gray_20x20{
51
+  width:21rpx;
52
+  height:20rpx;
53
+  margin-right: 20rpx;
54
+}

+ 45 - 0
pages/other/payinfo.js

@@ -0,0 +1,45 @@
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
+})

+ 3 - 0
pages/other/payinfo.json

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

+ 5 - 0
pages/other/payinfo.wxml

@@ -0,0 +1,5 @@
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
+  <text class="text">完成报名完成\n如未能自动刷新结果,请手动下拉刷新</text>
5
+</view>

+ 29 - 0
pages/other/payinfo.wxss

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

+ 0 - 77
pages/other/test.js

@@ -1,77 +0,0 @@
1
-// pages/other/test.js
2
-Page({
3
-
4
-  /**
5
-   * 页面的初始数据
6
-   */
7
-  data: {
8
-
9
-  },
10
-
11
-  /**
12
-   * 生命周期函数--监听页面加载
13
-   */
14
-  onLoad: function (options) {
15
-
16
-  },
17
-  takePhoto() {
18
-    const ctx = wx.createCameraContext()
19
-    ctx.takePhoto({
20
-      quality: 'high',
21
-      success: (res) => {
22
-        this.setData({
23
-          src: res.tempImagePath
24
-        })
25
-      }
26
-    })
27
-  },
28
-
29
-  /**
30
-   * 生命周期函数--监听页面初次渲染完成
31
-   */
32
-  onReady: function () {
33
-
34
-  },
35
-
36
-  /**
37
-   * 生命周期函数--监听页面显示
38
-   */
39
-  onShow: function () {
40
-
41
-  },
42
-
43
-  /**
44
-   * 生命周期函数--监听页面隐藏
45
-   */
46
-  onHide: function () {
47
-
48
-  },
49
-
50
-  /**
51
-   * 生命周期函数--监听页面卸载
52
-   */
53
-  onUnload: function () {
54
-
55
-  },
56
-
57
-  /**
58
-   * 页面相关事件处理函数--监听用户下拉动作
59
-   */
60
-  onPullDownRefresh: function () {
61
-
62
-  },
63
-
64
-  /**
65
-   * 页面上拉触底事件的处理函数
66
-   */
67
-  onReachBottom: function () {
68
-
69
-  },
70
-
71
-  /**
72
-   * 用户点击右上角分享
73
-   */
74
-  onShareAppMessage: function () {
75
-
76
-  }
77
-})

+ 0 - 3
pages/other/test.json

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

+ 0 - 9
pages/other/test.wxml

@@ -1,9 +0,0 @@
1
-<camera
2
-  device-position="back"
3
-  flash="off"
4
-  binderror="error"
5
-  style="width: 100%; height: 300px;"
6
-></camera>
7
-<button type="primary" bindtap="takePhoto">拍照</button>
8
-<view>预览</view>
9
-<image mode="widthFix" src="{{src}}"></image>

+ 0 - 6
pages/other/test.wxss

@@ -1,6 +0,0 @@
1
-/* pages/other/test.wxss */
2
-.textPinyin {
3
-  border-bottom: 1px solid;
4
-  margin-right: 10rpx;
5
-  line-height:66rpx;
6
-}

+ 4 - 4
project.config.json

@@ -59,15 +59,15 @@
59 59
 				{
60 60
 					"id": 2,
61 61
 					"name": "临时",
62
-					"pathName": "pages/main/recommend",
62
+					"pathName": "pages/other/lesson",
63 63
 					"query": "",
64 64
 					"scene": null
65 65
 				},
66 66
 				{
67
-					"id": -1,
67
+					"id": 3,
68 68
 					"name": "临时",
69
-					"pathName": "pages/other/test",
70
-					"query": "",
69
+					"pathName": "pages/index/index",
70
+					"query": "LessonID=1",
71 71
 					"scene": null
72 72
 				}
73 73
 			]

+ 25 - 23
utils/main.js

@@ -481,9 +481,9 @@ function getTaskTodayList(callback) {
481 481
         title: '请稍候',
482 482
         mask: true,
483 483
       });
484
-      setTimeout(function(){
484
+      setTimeout(function () {
485 485
         wx.hideLoading();
486
-      },5000);
486
+      }, 5000);
487 487
     }
488 488
   }, 2000);
489 489
 
@@ -537,35 +537,37 @@ function getTempImage(serverUrl) {
537 537
 }
538 538
 
539 539
 function saveTempImage(serverUrl, tempUrl) {
540
-  var list = wx.getStorageSync("TempImageList");
541
-  if (!list)
542
-    list = [];
543
-  var b = false;
544
-  for (var i = 0; i < list.length; i++) {
545
-    if (list[i].ServerUrl == serverUrl) {
546
-      list[i].TempUrl = tempUrl;
547
-      b = true;
548
-      break;
540
+  if (tempUrl.indexOf("http") < 0) {
541
+    var list = wx.getStorageSync("TempImageList");
542
+    if (!list)
543
+      list = [];
544
+    var b = false;
545
+    for (var i = 0; i < list.length; i++) {
546
+      if (list[i].ServerUrl == serverUrl) {
547
+        list[i].TempUrl = tempUrl;
548
+        b = true;
549
+        break;
550
+      }
551
+    }
552
+    if (!b) {
553
+      list.push({ "ServerUrl": serverUrl, "TempUrl": tempUrl });
549 554
     }
550
-  }
551
-  if (!b) {
552
-    list.push({ "ServerUrl": serverUrl, "TempUrl": tempUrl });
553
-  }
554 555
 
555
-  if (list.length > 200) {
556
-    list.pop();
556
+    if (list.length > 200) {
557
+      list.pop();
558
+    }
559
+    wx.setStorageSync("TempImageList", list);
557 560
   }
558
-  wx.setStorageSync("TempImageList", list);
559 561
 }
560 562
 
561 563
 function UploadUserConfig() {
562
-  var that=this;
564
+  var that = this;
563 565
   var param1 = {};
564 566
   param1.CardMaxNumberNew = wx.getStorageSync("CardMaxNumberNew");
565 567
   param1.CardMaxNumberHistory = wx.getStorageSync("CardMaxNumberHistory");
566 568
   param1.SortTypeIndex = wx.getStorageSync("SortTypeIndex");
567 569
   param1.MemoryLevel = wx.getStorageSync("MemoryLevel");
568
-  
570
+
569 571
   param1.ClickType = wx.getStorageSync("ClickType");
570 572
   param1.SecondConfigArray = wx.getStorageSync("SecondConfigArray");
571 573
   param1.ColorIndexArr = wx.getStorageSync("ColorIndexArr");
@@ -669,7 +671,7 @@ function checkIsIPhoneX() {
669 671
 }
670 672
 
671 673
 //设置收藏
672
-function setCollect(id,collect,callback) {
674
+function setCollect(id, collect, callback) {
673 675
   var that = this;
674 676
   if (collect) {
675 677
     wx.showToast({
@@ -685,7 +687,7 @@ function setCollect(id,collect,callback) {
685 687
       image: "../images/universalpic_fav_white_120x110.png",
686 688
     });
687 689
   }
688
-  getData("UpdateMiaoguoCardInfo?UserID=" + app.globalData.userInfo.UserID + "&MiaoguoCardID=" + id+ "&IsCollect=" + collect, function (data) { 
690
+  getData("UpdateMiaoguoCardInfo?UserID=" + app.globalData.userInfo.UserID + "&MiaoguoCardID=" + id + "&IsCollect=" + collect, function (data) {
689 691
     if (callback)
690 692
       callback();
691 693
   });
@@ -801,7 +803,7 @@ function getShareImageBackColor() {
801 803
     "#C5326A",
802 804
     "#FF7A91",
803 805
   ];
804
-  return arr[common.random(0, arr.length-1)];
806
+  return arr[common.random(0, arr.length - 1)];
805 807
 }
806 808
 
807 809
 function getPinyin(pinyin) {