chengjie il y a 2 ans
Parent
commit
516cb61a8c

+ 3 - 3
app.js

@@ -1,8 +1,8 @@
1 1
 App({
2 2
   globalData: {
3
-    Version: "2.3.64",
4
-    //IsProduction: true,
5
-    IsProduction: false,
3
+    Version: "2.3.70",
4
+    IsProduction: true,
5
+    //IsProduction: false,
6 6
     ShareTitle: "高效学习从秒过开始",
7 7
     SharePath: "pages/index/index",
8 8
     ShareImage: '../images/program_screenshot_main.png',

+ 1 - 1
pages/index/index.js

@@ -67,7 +67,7 @@ Page({
67 67
       else if (options.type == "family") {
68 68
         var url="../other/family";
69 69
         if (options.PanelType==1)
70
-          url="../other/family?PanelType=1&Time="+options.Time+"&MainUserID="+options.MainUserID+ "&NickName=" + options.NickName + "&AvatarUrl=" + options.AvatarUrl;
70
+          url="../other/family?PanelType=1&Time="+options.Time+"&CurrentUserID="+options.CurrentUserID+ "&NickName=" + options.NickName + "&AvatarUrl=" + options.AvatarUrl;
71 71
         this.setData({
72 72
           gotoType: "other",
73 73
           gotoUrl: url,

+ 12 - 15
pages/main/addInfomationDetail.js

@@ -31,11 +31,10 @@ Page({
31 31
       that.setData({
32 32
         IsShowHelp: true,
33 33
       });
34
-      main.ShowHelp(that, "#helpTianKong0", "down", "选择拼音作为问题,点一下","Left");
35
-    }
36
-    else{
34
+      main.ShowHelp(that, "#helpTianKong0", "down", "选择拼音作为问题,点一下", "Left");
35
+    } else {
37 36
       that.setData({
38
-        IsShowHelp:false,
37
+        IsShowHelp: false,
39 38
       });
40 39
     }
41 40
   },
@@ -164,11 +163,11 @@ Page({
164 163
         IsShowHelp: true,
165 164
       });
166 165
       if (this.data.CSS[css].Number == 0)
167
-        main.ShowHelp(that, "#HelpHanZi", "down", "选择文字作为答案,\n点两下,注意是点两下","Left");
166
+        main.ShowHelp(that, "#HelpHanZi", "down", "选择文字作为答案,\n点两下,注意是点两下", "Left");
168 167
       else if (this.data.CSS[css].Number == 1)
169
-        main.ShowHelp(that, "#HelpHanZi", "down", "选择文字作为答案,\n点两下,注意是点两下\n让左侧数字成为2","Left");
168
+        main.ShowHelp(that, "#HelpHanZi", "down", "选择文字作为答案,\n点两下,注意是点两下\n让左侧数字成为2", "Left");
170 169
       else if (this.data.CSS[css].Number == 2)
171
-        main.ShowHelp(that, "#btnAdd", "down", "请点“添加”按钮","Left");
170
+        main.ShowHelp(that, "#btnAdd", "down", "请点“添加”按钮", "Left");
172 171
     }
173 172
   },
174 173
   addData: function () {
@@ -257,17 +256,15 @@ Page({
257 256
                   }
258 257
                   str = arr2.join("\n");
259 258
                 }
260
-              } 
261
-              else if (item.Tag == "释义"){
262
-                if (item.Content.indexOf("[读 src=")>=0){
263
-                  var sound=item.Content.substring(item.Content.indexOf("[读"));
264
-                  sound=sound.substring(sound.indexOf("src='")+5,sound.indexOf("']"));
259
+              } else if (item.Tag == "释义") {
260
+                if (item.Content.indexOf("[读 src=") >= 0) {
261
+                  var sound = item.Content.substring(item.Content.indexOf("[读"));
262
+                  sound = sound.substring(sound.indexOf("src='") + 5, sound.indexOf("']"));
265 263
                   var sound2 = main.GetSoundError(sound);
266
-                  item.Content=item.Content.replace(sound,sound2);
264
+                  item.Content = item.Content.replace(sound, sound2);
267 265
                 }
268 266
                 str = item.Content;
269
-              }
270
-              else
267
+              } else
271 268
                 str = item.Content;
272 269
             }
273 270
 

+ 9 - 3
pages/main/default.js

@@ -59,11 +59,17 @@ Page({
59 59
     //debugger;
60 60
 
61 61
     if (app.globalData.userInfo.IsNewUser && app.globalData.userInfo.IsNewUser == 1 && app.globalData.userInfo.isShow == 1) {
62
-      if (app.globalData.userInfo.Subscribe == 0) {
62
+      if (app.globalData.userInfo.Subscribe == 0 && app.globalData.userInfo.IsApply==0) {
63 63
         wx.navigateTo({
64 64
           url: '../other/newuser',
65 65
         });
66 66
       }
67
+      else{
68
+        wx.navigateTo({
69
+          url: '../other/userbook',
70
+        });
71
+        app.globalData.GotoUrl = "";
72
+      }
67 73
     } else {
68 74
       wx.getSetting({
69 75
         success(res) {
@@ -73,7 +79,7 @@ Page({
73 79
             });
74 80
           } else {
75 81
             if (!app.globalData.userInfo.IsTryOut && app.globalData.userInfo.isShow == 1) {
76
-              if (app.globalData.userInfo.Subscribe == 1) {
82
+              if (app.globalData.userInfo.IsApply==1) {
77 83
                 wx.navigateTo({
78 84
                   url: '../other/userbook',
79 85
                 });
@@ -82,7 +88,7 @@ Page({
82 88
                 wx.redirectTo({
83 89
                   url: '../other/newuser',
84 90
                 });
85
-              }
91
+              }                
86 92
             } else if (app.globalData.userInfo.IsTryOut && app.globalData.userInfo.isShow == 1) {
87 93
               if (app.globalData.GotoUrl.indexOf("../other/pay?PayType=6") >= 0) {
88 94
                 wx.navigateTo({

+ 65 - 3
pages/main/detail.js

@@ -20,6 +20,9 @@ var intervalSound = 0,
20 20
 var isCollecting = false;
21 21
 var isExit = true;
22 22
 
23
+var unableNum=0; //练习中的不会的数量
24
+var pigeonholeNum=0; //练习中的归档数量
25
+
23 26
 var isPlaying = false;
24 27
 
25 28
 var currentFolderID = -1; //当前练习卡单ID,没有时为-1
@@ -84,6 +87,9 @@ Page({
84 87
       });
85 88
     }
86 89
 
90
+    pigeonholeNum=0;//归档数为0
91
+    unableNum=0;//不会题卡数的数量
92
+
87 93
     that.setData({
88 94
       Containnerheight: height,
89 95
       Containnerheight2: height - height2,
@@ -168,7 +174,12 @@ Page({
168 174
   },
169 175
   startTask: function () {
170 176
     var that=this;
171
-    var url = 'StartMiaoguoTask?UserID=' + app.globalData.userInfo.UserID;
177
+
178
+    var url2="";
179
+    if (app.globalData.userInfo.CurrentUserID)
180
+      url2='&CurrentUserID='+app.globalData.userInfo.CurrentUserID;
181
+
182
+    var url = 'StartMiaoguoTask?UserID=' + app.globalData.userInfo.UserID+url2;
172 183
     main.getData(url, function (data,err) {
173 184
       //console.log(err);
174 185
       if (err && err.errCode==100){
@@ -510,7 +521,7 @@ Page({
510 521
     if (dayNum.indexOf("d")>0){
511 522
       dayNum=dayNum.replace("d","");
512 523
       dayNum=Number(dayNum);
513
-      if (dayNum<183)
524
+      if (dayNum<366)
514 525
         return false;
515 526
       else
516 527
         return true;
@@ -966,6 +977,7 @@ Page({
966 977
         }
967 978
         
968 979
         app.globalData.TaskToday.DayNumber = data.DayNumber;
980
+
969 981
         that.setData({
970 982
           TodayTime: duration,
971 983
           Title: "报告",
@@ -982,6 +994,24 @@ Page({
982 994
             content: "也许您已经发现「报告」上的数据有些异样。这可能是由于本次练习从昨天开始到今天结束,发生了「跨天」的情况,也可能是其他异常情况。虽然报告内容不够正确,但练习数据不会受到影响,这个问题将在日后得到改善。请不用担心。"
983 995
           });
984 996
         }
997
+
998
+        if (pigeonholeNum>0 || unableNum>0){
999
+          var str="今天的练习中,您有:";
1000
+          if (unableNum>0)
1001
+            str+=unableNum+"张题卡选择不会,";
1002
+          if (pigeonholeNum>0)
1003
+            str+=pigeonholeNum+"张题卡选择归档,";
1004
+          str+="系统已补充"+(pigeonholeNum+unableNum)+"张题卡填补空缺。请回到首页继续完成练习。";
1005
+          wx.showModal({
1006
+            title: '提醒',
1007
+            showCancel: false,
1008
+            confirmText: '知道了',
1009
+            content: str,
1010
+            complete:function(){
1011
+              that.onClose();
1012
+            }
1013
+          });
1014
+        }
985 1015
       }
986 1016
     });
987 1017
   },
@@ -1187,6 +1217,21 @@ Page({
1187 1217
       MemoryLevel: index,
1188 1218
     });
1189 1219
   },
1220
+  saveCardType2:function(event){
1221
+    var that = this;
1222
+    wx.showModal({
1223
+      title: '提醒',
1224
+      content: '要归档这张题卡吗?归档后可在「题卡」栏目的归档分类里找回。',
1225
+      showCancel: true,
1226
+      cancelText:"取消",
1227
+      confirmText: "确认归档",
1228
+      confirmColor:"#ff0000",
1229
+      success(res) {
1230
+        if (res.confirm)
1231
+          that.saveCardType(event);
1232
+      },
1233
+    });
1234
+  },
1190 1235
   saveCardType: function (event) {
1191 1236
     var that = this;
1192 1237
     var foldertype = event.currentTarget.dataset.foldertype;
@@ -1196,6 +1241,11 @@ Page({
1196 1241
     url += "&ID=" + TaskList[0].MiaoguoCardID;
1197 1242
     main.getData(url, function (data) {
1198 1243
 
1244
+      if (foldertype==1)
1245
+        unableNum++;
1246
+      else
1247
+        pigeonholeNum++;
1248
+
1199 1249
       //归档后要修改上方的数字
1200 1250
       if (that.data.TaskInfo.IsNew){
1201 1251
         that.setData({
@@ -1465,7 +1515,19 @@ Page({
1465 1515
     timeoutEveryCard=[];
1466 1516
   },
1467 1517
   resetTodayTask:function(){
1468
-    main.ResetTodayTask();
1518
+    var that=this;
1519
+    wx.showModal({
1520
+      title: '提醒',
1521
+      content: '本功能将清除今天的练习数据,可用于重做今天的练习任务。此功能执行后无法撤销,请谨慎使用。前往重置将帮您打开「设置」界面,请自行点击「重置今天的任务」按键。',
1522
+      showCancel: true,
1523
+      cancelText:"取消",
1524
+      confirmText: "前往重置",
1525
+      confirmColor:"#ff0000",
1526
+      success(res) {
1527
+        if (res.confirm)
1528
+          that.goto({currentTarget:{dataset:{url:"./systemsetting"}}});
1529
+      },
1530
+    });
1469 1531
   },
1470 1532
   //获取导航栏高度
1471 1533
   getBarInfo(e) {

+ 3 - 3
pages/main/detail.wxml

@@ -125,7 +125,7 @@
125 125
               <view class="Answer0 btnColor"></view>
126 126
             </view>
127 127
             <view class="Answer FlexColumn" hover-class='AnswerHover' catchtap='gotoNext'
128
-              data-time="{{TaskInfo.Number1}}" data-btnnumber="3" wx:if="{{TaskInfo.Number1 && !IsShowPigeonhole}}">
128
+              data-time="{{TaskInfo.Number1}}" data-btnnumber="3" wx:if="{{TaskInfo.Number1}}">
129 129
               <view class="btnTime">
130 130
                 {{TaskInfo.Number1Str}}
131 131
               </view>
@@ -142,7 +142,7 @@
142 142
 
143 143
             </view>
144 144
             <view class="Answer FlexColumn" hover-class='AnswerHover' catchtap='gotoNext'
145
-              data-time="{{TaskInfo.Number3}}" data-btnnumber="5" wx:if="{{TaskInfo.Number3 && MemoryLevel==1}}">
145
+              data-time="{{TaskInfo.Number3}}" data-btnnumber="5" wx:if="{{TaskInfo.Number3 && !IsShowPigeonhole && MemoryLevel==1}}">
146 146
               <view class="btnTime">
147 147
                 {{TaskInfo.Number3Str}}
148 148
               </view>
@@ -156,7 +156,7 @@
156 156
             
157 157
             <block wx:if="{{IsShowPigeonhole}}">
158 158
               <view class="line4"></view>
159
-              <view class="AnswerRight1 FlexRow" catchtap='saveCardType' data-foldertype="0">
159
+              <view class="AnswerRight1 FlexRow" catchtap='saveCardType2' data-foldertype="0" data-type="1">
160 160
                 <image src="../images/mg4_iconTools_4.png" class='mg4_iconTools_4' />
161 161
                 <view class="text4">归档</view>
162 162
               </view>

+ 4 - 4
pages/other/family.js

@@ -60,7 +60,7 @@ Page({
60 60
 
61 61
     if (panelType==1){
62 62
       that.setData({
63
-        MainUserID:options.MainUserID,
63
+        CurrentUserID:options.CurrentUserID,
64 64
         NickName:options.NickName,
65 65
         HelpList:constant.arrFamilyHelpListAccept,
66 66
         Time:options.Time,
@@ -188,7 +188,7 @@ Page({
188 188
         success(res) {},
189 189
       });
190 190
     }
191
-    else if (that.data.MainUserID==app.globalData.userInfo.UserID){
191
+    else if (that.data.CurrentUserID==app.globalData.userInfo.UserID){
192 192
       wx.showModal({
193 193
         title: '接受失败',
194 194
         content: '不能自己和自己建立家庭帐号,请发给另外一个微信号。',
@@ -205,7 +205,7 @@ Page({
205 205
         confirmText: "接受",
206 206
         success(res) {
207 207
           if (res.confirm) {
208
-            main.getData("updateMiaoguoFamily?UpdateType=add&Time="+that.data.Time+"&UserID=" + that.data.MainUserID+"&NewUserID=" + app.globalData.userInfo.UserID, function (data) {
208
+            main.getData("updateMiaoguoFamily?UpdateType=add&Time="+that.data.Time+"&UserID=" + that.data.CurrentUserID+"&NewUserID=" + app.globalData.userInfo.UserID, function (data) {
209 209
               if (data==0){
210 210
                 app.globalData.FamilyUsers=[];
211 211
                 wx.reLaunch({
@@ -245,7 +245,7 @@ Page({
245 245
   },
246 246
   onShareAppMessage: function () {
247 247
     if (this.data.PanelType==0 && this.data.FamilyUsers.length<2 && this.data.IsMember==1) {
248
-      var path=app.globalData.SharePath + '?type=family&PanelType=1&MainUserID=' + app.globalData.userInfo.UserID;
248
+      var path=app.globalData.SharePath + '?type=family&PanelType=1&CurrentUserID=' + app.globalData.userInfo.UserID;
249 249
       path += "&Time=" + common.formatTime(new Date(),"-");
250 250
       path += "&NickName=" + app.globalData.userInfo.NickName;
251 251
       path += "&AvatarUrl=" + app.globalData.userInfo.AvatarUrl;

+ 3 - 3
pages/other/userbook.js

@@ -79,7 +79,7 @@ Page({
79 79
       IsLoseEfficacy: app.globalData.userInfo.IsLoseEfficacy,
80 80
       ClassTotalDayNumber: app.globalData.userInfo.ClassTotalDayNumber,
81 81
       ChildUserID: app.globalData.userInfo.ChildUserID,
82
-      MainUserID: app.globalData.userInfo.MainUserID,
82
+      CurrentUserID: app.globalData.userInfo.CurrentUserID,
83 83
       UserID:app.globalData.userInfo.UserID,
84 84
       ShowUserID:app.globalData.userInfo.ShowUserID,
85 85
     });
@@ -139,7 +139,7 @@ Page({
139 139
       });
140 140
     }
141 141
 
142
-    if (that.data.IsLoseEfficacy==1 && that.data.MainUserID!=that.data.UserID){
142
+    if (that.data.IsLoseEfficacy==1 && that.data.CurrentUserID!=that.data.UserID){
143 143
       wx.showModal({
144 144
         title: '帐号过期',
145 145
         content: '该帐号已过期,重启微信可回到您原本的秒过,「家庭用户」已自动解除。如想为该帐号续费,请使用该帐号原本对应的微信打开秒过就能续费了(其它微信不能代付)。',
@@ -173,7 +173,7 @@ Page({
173 173
     });
174 174
   },
175 175
   updateMember: function () {
176
-    if (!this.data.ChildUserID && this.data.UserID==this.data.MainUserID){
176
+    if (!this.data.ChildUserID && this.data.UserID==this.data.CurrentUserID){
177 177
       wx.navigateTo({
178 178
         url: '../index/accredit',
179 179
       });

+ 4 - 4
pages/other/userbook.wxml

@@ -34,17 +34,17 @@
34 34
     </view>
35 35
     <view class="panel2 FlexRow" wx:if="{{IsShow==1 && (IsPay==1 || (PanelShow>=2 && ClassDayNumber<ClassTotalDayNumber) )}}">
36 36
       
37
-      <view class="panel21 FlexColumn" bindtap="goto" data-url="../other/coupon" wx:if="{{IsPay==1 && MainUserID==UserID}}">
37
+      <view class="panel21 FlexColumn" bindtap="goto" data-url="../other/coupon" wx:if="{{IsPay==1 && CurrentUserID==UserID}}">
38 38
         <image class="usermanual_index_handshake" src='../images/usermanual_index_coupon.png' />
39 39
         <view>优惠券</view>
40 40
       </view>
41 41
 
42
-      <view class="panel21 FlexColumn" bindtap="goto" data-url="../other/pay?PayUserID={{UserID}}&PayType=6" wx:if="{{ClassDayNumber>=ClassTotalDayNumber && (IsPay==0 || IsLoseEfficacy==1) && !ChildUserID && MainUserID==UserID }}">
42
+      <view class="panel21 FlexColumn" bindtap="goto" data-url="../other/pay?PayUserID={{UserID}}&PayType=6" wx:if="{{ClassDayNumber>=ClassTotalDayNumber && (IsPay==0 || IsLoseEfficacy==1) && !ChildUserID && CurrentUserID==UserID }}">
43 43
         <image class="usermanual_index_handshake" src='../images/usermanual_index_wallet.png' />
44 44
         <view>去续费</view>
45 45
       </view>
46 46
       
47
-      <view class="panel21 FlexColumn" bindtap="goto" data-url="../other/pay?PayUserID={{UserID}}&PayType=6&EndDate={{EndDate}}" wx:if="{{ClassDayNumber>=ClassTotalDayNumber && (IsPay==1 && !IsLoseEfficacy) && !ChildUserID && MainUserID==UserID }}">
47
+      <view class="panel21 FlexColumn" bindtap="goto" data-url="../other/pay?PayUserID={{UserID}}&PayType=6&EndDate={{EndDate}}" wx:if="{{ClassDayNumber>=ClassTotalDayNumber && (IsPay==1 && !IsLoseEfficacy) && !ChildUserID && CurrentUserID==UserID }}">
48 48
         <image class="usermanual_index_handshake" src='../images/usermanual_index_wallet.png' />
49 49
         <view>去续费</view>
50 50
       </view>
@@ -59,7 +59,7 @@
59 59
         <view>推广计划</view>
60 60
       </view>
61 61
 
62
-      <view class="panel21 FlexColumn" bindtap="goto" data-url="./binding"  wx:if="{{!ChildUserID && MainUserID==UserID}}">
62
+      <view class="panel21 FlexColumn" bindtap="goto" data-url="./binding"  wx:if="{{!ChildUserID && CurrentUserID==UserID}}">
63 63
         <image class="usermanual_index_handshake" src='../images/usermanual_index_link.png' />
64 64
         <view>帐号绑定</view>
65 65
       </view>

+ 5 - 1
pages/plan/taskBasic.js

@@ -120,7 +120,11 @@ Page({
120 120
   },
121 121
   saveUserConfig:function(e){
122 122
     var that = this;
123
-    main.getData("UpdateUserConfigBasicCardLimit?UserID=" + app.globalData.userInfo.UserID + "&BasicCardLimit=" + that.data.BasicCardLimit, function (data) {
123
+    var url2="";
124
+    if (app.globalData.userInfo.CurrentUserID)
125
+      url2='&CurrentUserID='+app.globalData.userInfo.CurrentUserID;
126
+
127
+    main.getData("UpdateUserConfigBasicCardLimit?UserID=" + app.globalData.userInfo.UserID + "&BasicCardLimit=" + that.data.BasicCardLimit+url2, function (data) {
124 128
       wx.navigateBack({
125 129
         delta: 1,
126 130
       });

+ 2 - 1
project.config.json

@@ -37,7 +37,8 @@
37 37
     "showES6CompileOption": false,
38 38
     "useCompilerPlugins": false,
39 39
     "ignoreUploadUnusedFiles": true,
40
-    "useStaticServer": true
40
+    "useStaticServer": true,
41
+    "condition": false
41 42
   },
42 43
   "compileType": "miniprogram",
43 44
   "libVersion": "2.18.0",

+ 7 - 5
utils/main.js

@@ -1328,7 +1328,11 @@ function UploadUserConfig(callback) {
1328 1328
   if (folderOrder)
1329 1329
     param1.FolderOrder = folderOrder;
1330 1330
 
1331
+  if (app.globalData.userInfo.CurrentUserID)
1332
+    param1.CurrentUserID=app.globalData.userInfo.CurrentUserID;
1333
+
1331 1334
   //console.log(param1);
1335
+  //debugger;
1332 1336
   that.postData('UploadUserConfig?Type=update&UserID=' + app.globalData.userInfo.UserID, param1, function (data) {
1333 1337
     if (callback) {
1334 1338
       callback();
@@ -1803,13 +1807,11 @@ function resetTodayTask(){
1803 1807
     title: '提醒',
1804 1808
     content: '此操作无法撤销。确认重置今天的任务量吗?',
1805 1809
     showCancel:true,
1806
-    cancelText:"确定",
1807
-    confirmColor:"#000000",
1808
-    confirmText:"取消",
1810
+    cancelText:"取消",
1811
+    confirmColor:"#ff0000",
1812
+    confirmText:"确定",
1809 1813
     success (res) {
1810 1814
       if (res.confirm) {
1811
-        //console.log('用户点击取消');
1812
-      } else if (res.cancel) {
1813 1815
         //console.log('用户点击确定')
1814 1816
         var url = "ResetMiaoguoCardTask?UserID=" + app.globalData.userInfo.UserID;
1815 1817
         getData(url, function (data) {