chengjie 4 jaren geleden
bovenliggende
commit
0ebbfb3f63

+ 1 - 1
app.js

@@ -1,6 +1,6 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "2.1.31",
3
+    Version: "2.1.34",
4 4
     IsProduction: false,
5 5
     ShareTitle: "高效学习从秒过开始",
6 6
     SharePath: "pages/index/index",

+ 4 - 1
pages/index/index.js

@@ -72,7 +72,10 @@ Page({
72 72
         }
73 73
         else{
74 74
           if (app.globalData.LessonID === "all") {
75
-            url = '../other/lessonlist?listtype='+options.ListType;
75
+            if (!options.ListType)
76
+              url = '../other/lessonlistselect';
77
+            else
78
+              url = '../other/lessonlist?listtype='+options.ListType;
76 79
           }
77 80
           else if (app.globalData.LessonID > 0) {
78 81
             url = '../other/lesson?LessonID=' + app.globalData.LessonID + '&LessonPage=' + app.globalData.LessonPage

+ 5 - 3
pages/main/add.js

@@ -192,9 +192,11 @@ Page({
192 192
       }
193 193
 
194 194
       var arrTagTemp=[];
195
-      for(var j=0;j<card.Tags.length;j++){
196
-        if (card.Tags[j])
197
-          arrTagTemp.push(card.Tags[j]);
195
+      if (card.Tags && card.Tags.length>0){
196
+        for(var j=0;j<card.Tags.length;j++){
197
+          if (card.Tags[j])
198
+            arrTagTemp.push(card.Tags[j]);
199
+        }
198 200
       }
199 201
       card.Tags=arrTagTemp;
200 202
 

+ 3 - 1
pages/main/addInfomationDetail.js

@@ -351,7 +351,9 @@ Page({
351 351
           obj.TypeName="D";
352 352
           if (data.ENG.Soundmark)
353 353
             obj.Remark=data.ENG.Soundmark.Eng;
354
-          obj.Content=data.ENG.Paraphrase[0].ParaphraseList;
354
+
355
+          if (data.ENG.Paraphrase && data.ENG.Paraphrase[0] && data.ENG.Paraphrase[0].ParaphraseList)
356
+            obj.Content=data.ENG.Paraphrase[0].ParaphraseList;
355 357
 
356 358
           obj.Url="&UserID="+app.globalData.userInfo.UserID+"&Word="+obj.Key;
357 359
         }

+ 4 - 3
pages/main/default.js

@@ -298,9 +298,10 @@ Page({
298 298
     if (app.globalData.userInfo.UserID == 1
299 299
       || app.globalData.userInfo.UserID == 3 
300 300
       || app.globalData.userInfo.UserID == 4) {
301
-        var userid=2;
302
-        if (app.globalData.userInfo.UserID>=3)
303
-          userid = app.globalData.userInfo.UserID;
301
+      
302
+      var userid=2;
303
+      if (app.globalData.userInfo.UserID>=3)
304
+        userid = app.globalData.userInfo.UserID;
304 305
 
305 306
       that.setData({
306 307
         IsShowUserID: true,

+ 0 - 4
pages/main/default.wxml

@@ -87,10 +87,6 @@
87 87
       <input class='input2 input' type="number"  always-embed="true"  placeholder="版本号" value="{{VersionID}}" bindinput="onKeyInput" data-type="versionid"/>
88 88
       <button class="btn2" bindtap="setVersionStart" data-versionid="{{VersionID}}" data-flag="1">开通</button>
89 89
     </view>
90
-
91
-    <view class="panel2 FlexRow">
92
-     <button class="btn2" bindtap="goto" data-url="../other/webview?url=https://mp.weixin.qq.com/s/nBQA9X-PwkdlxKaIjLOf5w">跳转公众号</button>
93
-    </view>
94 90
 </view>
95 91
 
96 92
 <view  wx:if="{{IsShowRemind}}" class="IsRemindContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>

+ 3 - 2
pages/main/mainlist.js

@@ -716,9 +716,10 @@ Page({
716 716
       });
717 717
     }
718 718
     else{
719
-      if (datatype.indexOf("7")>0)
719
+
720
+      if (datatype && datatype.indexOf("7")>0)
720 721
         dayNumber=7;
721
-      else if (datatype.indexOf("30")>0)
722
+      else if (datatype && datatype.indexOf("30")>0)
722 723
         dayNumber=30;
723 724
       
724 725
       if (datatype.indexOf("TimeShort")>=0)

+ 18 - 13
pages/main/preview.js

@@ -642,22 +642,27 @@ Page({
642 642
   },
643 643
   onShareAppMessage: function () {
644 644
     var that = this;
645
-    this.setData({
646
-      ShowType: 'sharepreview',
647
-      IsCardInfoCloseMenu: 1,
648
-    });
649
-
650
-    var url = 'ShareMiaoguoCard?UserID=' + app.globalData.userInfo.UserID;
651
-    url += "&MiaoguoCardID=" + that.data.MiaoguoCardID;
652
-    main.getData(url, function (data) { });
645
+    
653 646
 
654
-    setTimeout(function () {
647
+    if (that.data.ShowType!="share"){
655 648
       that.setData({
656
-        ShowType: 'show',
649
+        ShowType: 'sharepreview',
650
+        IsCardInfoCloseMenu: 1,
657 651
       });
658
-      common.getStorageValue(that, "IsCardInfoCloseMenu", 1, function () {});
659
-
660
-    }, 1000);
652
+      
653
+      var url = 'ShareMiaoguoCard?UserID=' + app.globalData.userInfo.UserID;
654
+      url += "&MiaoguoCardID=" + that.data.MiaoguoCardID;
655
+      main.getData(url, function (data) { });
656
+  
657
+      setTimeout(function () {
658
+        that.setData({
659
+          ShowType: 'show',
660
+        });
661
+        common.getStorageValue(that, "IsCardInfoCloseMenu", 1, function () {});
662
+  
663
+      }, 1000);
664
+    }
665
+    
661 666
     return {
662 667
       title: '我的分享',
663 668
       path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID + '&type=share&ColorIndex=' + app.globalData.ColorIndex + '&MiaoguoCardID=' + this.data.MiaoguoCardID,

+ 1 - 1
pages/other/homework.js

@@ -13,7 +13,7 @@ Page({
13 13
     var userid = app.globalData.userInfo.UserID;
14 14
     if (options.UserID)
15 15
       userid = options.UserID;
16
-      
16
+
17 17
     var EndTime = "";
18 18
     if (options.EndTime){
19 19
       EndTime = options.EndTime;

+ 73 - 43
pages/other/lessonlist.js

@@ -4,54 +4,56 @@ import main from '../../utils/main';
4 4
 const app = getApp();
5 5
 
6 6
 Page({
7
-  data: {
8
-  },
7
+  data: {},
9 8
   onLoad: function (options) {
10 9
     var that = this;
11 10
     that.setData({
12 11
       CheckListUserID: app.globalData.userInfo.UserID,
13 12
       Containnerheight: main.getWindowHeight(),
14 13
       UserID: app.globalData.userInfo.UserID,
15
-      ListType:options.listtype,
14
+      ListType: options.listtype,
16 15
     });
17 16
 
18 17
     var userid = app.globalData.userInfo.UserID;
19 18
     main.getData("GetMiaoguoLesson2?UserID=" + userid, function (data) {
20 19
       if (data) {
21
-        
22
-        var arr=[];
23
-        if (that.data.ListType=="simple"){
20
+
21
+        var arr = [];
22
+        if (that.data.ListType == "simple") {
24 23
           arr.push(data[0]);
25 24
           arr.push(data[1]);
26
-          
27
-          arr[0].Text="前言";
28
-          arr[1].Text="基本操作";
29
-          arr[1].Time="时长约10分钟";
30
-
31
-          arr[1].List[4]=data[1].List[2];
32
-          arr[1].List[3]=data[1].List[1];
33
-          arr[1].List[2]=data[1].List[0];
34
-          arr[1].List[0]=data[2].List[0];
35
-          arr[1].List[1]=data[2].List[1];
36
-          arr[1].List[4].Title="通过【检验】生成字词、古诗词、英语题卡";
37
-          arr[1].List[3].Title="通过【加资料】制作字词、古诗词、英语题卡";
38
-          arr[1].List[2].Title="制作任何知识点的普通题卡";
39
-
40
-          arr[1].List.splice(6,1);
41
-          arr[1].List.splice(5,1);
42
-          
25
+
26
+          arr[0].Text = "前言";
27
+          arr[1].Text = "基本操作";
28
+          arr[1].Time = "时长约10分钟";
29
+
30
+
31
+          arr[1].List[5] = data[2].List[4];
32
+          arr[1].List[4] = data[1].List[2];
33
+          arr[1].List[3] = data[1].List[1];
34
+          arr[1].List[2] = data[1].List[0];
35
+          arr[1].List[0] = data[2].List[0];
36
+          arr[1].List[1] = data[2].List[1];
37
+
38
+          arr[1].List.splice(6, 1);
39
+
40
+
41
+          arr[1].List[4].Title = "通过【检验】生成字词、古诗词、英语题卡";
42
+          arr[1].List[3].Title = "通过【加资料】制作字词、古诗词、英语题卡";
43
+          arr[1].List[2].Title = "制作任何知识点的普通题卡";
44
+
45
+
43 46
           wx.setNavigationBarTitle({
44 47
             title: '简要版',
45 48
           });
46
-        }
47
-        else{
49
+        } else {
48 50
           wx.setNavigationBarTitle({
49 51
             title: '完整版',
50 52
           });
51
-          for(var i=0;i<4;i++)
53
+          for (var i = 0; i < 4; i++)
52 54
             arr.push(data[i]);
53 55
         }
54
-        
56
+
55 57
         that.setData({
56 58
           List: arr,
57 59
         });
@@ -62,34 +64,62 @@ Page({
62 64
   },
63 65
   gotoLesson: function (e) {
64 66
     var id = e.currentTarget.dataset.id;
65
-    var idchild="";
66
-    if (e.currentTarget.dataset.idchild && id>1)
67
-      idchild = '&LessonPage=' +e.currentTarget.dataset.idchild;
68
-    
69
-    if (e.currentTarget.dataset.url){
67
+    var idchild = "";
68
+    if (e.currentTarget.dataset.idchild && id > 1)
69
+      idchild = '&LessonPage=' + e.currentTarget.dataset.idchild;
70
+
71
+    if (e.currentTarget.dataset.url) {
72
+      if (this.data.ListType == "simple") {
73
+        switch (e.currentTarget.dataset.idchild) {
74
+          case 1:
75
+            id = 3;
76
+            idchild = "&LessonPage=1";
77
+            break;
78
+          case 2:
79
+            id = 3;
80
+            idchild = "&LessonPage=2";
81
+            break;
82
+          case 3:
83
+            id = 2;
84
+            idchild = "&LessonPage=1";
85
+            break;
86
+          case 4:
87
+            id = 2;
88
+            idchild = "&LessonPage=2";
89
+            break;
90
+          case 5:
91
+            id = 2;
92
+            idchild = "&LessonPage=3";
93
+            break;
94
+          case 6:
95
+            id = 3;
96
+            idchild = "&LessonPage=5";
97
+            break;
98
+
99
+        }
100
+      }
70 101
       wx.navigateTo({
71
-        url: '../other/video?LessonID=' + id +idchild+"&imageurl="+e.currentTarget.dataset.imageurl+"&url="+e.currentTarget.dataset.url+"&title="+e.currentTarget.dataset.title,
102
+        url: '../other/video?LessonID=' + id + idchild +"&title=" + e.currentTarget.dataset.title+ "&imageurl=" + e.currentTarget.dataset.imageurl + "&url=" + e.currentTarget.dataset.url,
72 103
       });
73
-    }
74
-    else{
75
-      if (id!=2 && id!=3){
104
+    } else {
105
+      if (id != 2 && id != 3) {
76 106
         wx.navigateTo({
77
-          url: '../other/lesson?LessonID=' + id +idchild,
107
+          url: '../other/lesson?LessonID=' + id + idchild,
78 108
         });
79 109
       }
80 110
     }
81 111
   },
82 112
   onShareAppMessage: function () {
83
-    var title="完整版教学课程";
84
-    if (this.data.ListType=="simple"){
85
-      title="简要版教学课程";
113
+    var title = "完整版教学课程";
114
+    if (this.data.ListType == "simple") {
115
+      title = "简要版教学课程";
86 116
     }
87
-    var url=app.globalData.SharePath + '?type=lesson&LessonID=all&ListType='+this.data.ListType+'&UserID=' + app.globalData.userInfo.UserID;
117
+    var url = app.globalData.SharePath + '?type=lesson&LessonID=all&ListType=' + this.data.ListType + '&UserID=' + app.globalData.userInfo.UserID;
88 118
     console.log(url);
89 119
     return {
90 120
       title: title,
91 121
       path: url,
92
-      imageUrl: app.globalData.uploadImageUrl+"web/program_screenshot_lesson_a00.png",
122
+      imageUrl: app.globalData.uploadImageUrl + "web/program_screenshot_lesson_a00.png",
93 123
     }
94 124
   },
95
-})
125
+})

+ 3 - 3
pages/other/lessonlistselect.js

@@ -21,9 +21,9 @@ Page({
21 21
   },
22 22
   onShareAppMessage: function () {
23 23
     return {
24
-      title: app.globalData.ShareTitle,
25
-      path: app.globalData.SharePath + '?LessonID=all&UserID=' + app.globalData.userInfo.UserID,
26
-      imageUrl: app.globalData.ShareImage,
24
+      title: "课程教材",
25
+      path: app.globalData.SharePath + '?type=lesson&LessonID=all&UserID=' + app.globalData.userInfo.UserID,
26
+      imageUrl: app.globalData.uploadImageUrl+"web/program_screenshot_lesson_a00.png",
27 27
     }
28 28
   },
29 29
 })

+ 7 - 3
pages/other/userbook.js

@@ -58,9 +58,13 @@ Page({
58 58
   onLoad: function () {
59 59
     var that = this;
60 60
 
61
-    var productServiceTime = common.formatDateCHS(common.formatTime(new Date(app.globalData.userInfo.ProductServiceTime)));
62
-    var endDate=common.formatTime(common.addDate("y", 1, new Date(app.globalData.userInfo.ProductServiceTime)));
63
-    
61
+    var productServiceTime="";
62
+    var endDate="";
63
+    if (app.globalData.userInfo.ProductServiceTime){
64
+      productServiceTime = common.formatDateCHS(common.formatTime(new Date(app.globalData.userInfo.ProductServiceTime)));
65
+      endDate=common.formatTime(common.addDate("y", 1, new Date(app.globalData.userInfo.ProductServiceTime)));
66
+    }
67
+      
64 68
     var arr = [];
65 69
     for (var i = arrInformation.length - 1; i >= 1; i--) {
66 70
       arr.push(arrInformation[i]);

+ 3 - 1
pages/other/video.js

@@ -80,9 +80,11 @@ Page({
80 80
   onShareAppMessage: function () {
81 81
     var title ="课程";
82 82
     var imageUrl = app.globalData.uploadImageUrl+"web/"+this.data.ImageUrl;
83
+    var path=app.globalData.SharePath + '?type=video&LessonID=' + this.data.LessonID + '&LessonPage=' + this.data.LessonPage+'&UserID=' + app.globalData.userInfo.UserID;
84
+    console.log("path:"+path);
83 85
     return {
84 86
       title: title,
85
-      path: app.globalData.SharePath + '?type=video&LessonID=' + this.data.LessonID + '&LessonPage=' + this.data.LessonPage+'&UserID=' + app.globalData.userInfo.UserID,
87
+      path: path,
86 88
       imageUrl: imageUrl
87 89
     }
88 90
   },

+ 2 - 1
project.private.config.json

@@ -1,4 +1,5 @@
1 1
 {
2
+  "setting": {},
2 3
   "condition": {
3 4
     "plugin": {
4 5
       "list": []
@@ -70,7 +71,7 @@
70 71
         {
71 72
           "name": "pages/index/index",
72 73
           "pathName": "pages/index/index",
73
-          "query": "type=lesson&LessonID=all&ListType=simple&UserID=1",
74
+          "query": "type=video&LessonID=3&LessonPage=5&UserID=1",
74 75
           "scene": 1047
75 76
         },
76 77
         {

+ 12 - 6
utils/constant.js

@@ -1,14 +1,20 @@
1 1
 module.exports = {
2 2
   arrSoundError:[
3 3
     {
4
-        Word: "藤蔓",
5
-        Sound: "藤蔓(wan4)",
4
+      Word: "藤蔓",
5
+      Sound: "藤蔓(wan4)",
6 6
     }, {
7
-        Word: "呲牙",
8
-        Sound: "呲(ci1)牙",
7
+      Word: "呲牙",
8
+      Sound: "呲(ci1)牙",
9 9
     }, {
10
-        Word: "呢(ne)",
11
-        Sound: "呢",
10
+      Word: "呢(ne)",
11
+      Sound: "呢",
12
+    }, {
13
+      Word: "卑劣",
14
+      Sound: "卑(liè)",
15
+    }, {
16
+      Word: "刚才",
17
+      Sound: "(gāng)(cái)",
12 18
     },
13 19
   ],
14 20
   arrMenuText: [{

+ 1 - 1
utils/main.js

@@ -656,7 +656,7 @@ function updateSearchList(obj,callback) {
656 656
   if (!arr)
657 657
     arr = [];
658 658
 
659
-  if (obj.Type == "shici") {
659
+  if (obj && obj.Type && obj.Type == "shici") {
660 660
     if (obj.Value.CHN.ShiciTitle)
661 661
       obj.Key = obj.Value.CHN.ShiciTitle;
662 662
     if (obj.Key.indexOf("《") == 0)