chengjie 1 anno fa
parent
commit
aca32c32c9

+ 1 - 0
app.json

@@ -61,6 +61,7 @@
61 61
     "pages/other/help",
62 62
     "pages/other/paycustom",
63 63
     "pages/other/annualreport",
64
+    "pages/other/systemrestore",
64 65
     "pages/other/pay"
65 66
     
66 67
   ],

+ 4 - 4
pages/main/mainlist.js

@@ -1357,7 +1357,7 @@ Page({
1357 1357
         else if (index==3){
1358 1358
           list[i].IsCollect=Number(mData.Param.IsCollect);
1359 1359
           
1360
-          if (source>0 && source<10 && index==source && mData.Param.IsCollect==0) {//不同类型列表删除
1360
+          if (source>0 && source<8 && index==source && mData.Param.IsCollect==0) {//不同类型列表删除
1361 1361
             list.splice(i,1);
1362 1362
             that.data.Count--;
1363 1363
           }
@@ -1366,7 +1366,7 @@ Page({
1366 1366
           list[i].CardType=-1;
1367 1367
           list[i].CardTypeStr="归档";
1368 1368
           
1369
-          if (source>0 && source<10 && index!=source){ //不同类型列表删除
1369
+          if (source>0 && source<8 && index!=source){ //不同类型列表删除
1370 1370
             list.splice(i,1);
1371 1371
             that.data.Count--;
1372 1372
           }
@@ -1374,7 +1374,7 @@ Page({
1374 1374
         else if (index==5){
1375 1375
           list[i].CardType=0;
1376 1376
           list[i].CardTypeStr="日常"; 
1377
-          if (source>0 && source<10 && index!=source){ //不同类型列表删除
1377
+          if (source>0 && source<8 && index!=source){ //不同类型列表删除
1378 1378
             list.splice(i,1);   
1379 1379
             that.data.Count--;
1380 1380
           }
@@ -1382,7 +1382,7 @@ Page({
1382 1382
         else if (index==6){
1383 1383
           list[i].CardType=1;
1384 1384
           list[i].CardTypeStr="紧急";
1385
-          if (source>0 && source<10 && index!=source){ //不同类型列表删除
1385
+          if (source>0 && source<8 && index!=source){ //不同类型列表删除
1386 1386
             list.splice(i,1); 
1387 1387
             that.data.Count--;
1388 1388
           } 

+ 0 - 5
pages/main/systemsetting.js

@@ -7,7 +7,6 @@ Page({
7 7
   data: {
8 8
     IsShow: 0,
9 9
     HasSound: true,
10
-    ShowUserID:"000000000"
11 10
   },
12 11
   onLoad: function (options) {
13 12
     var that = this;
@@ -17,7 +16,6 @@ Page({
17 16
       ProgramName: app.globalData.ProgramName,
18 17
       Version: app.globalData.Version,
19 18
       IsShow: app.globalData.userInfo.isShow,
20
-      ShowUserID:app.globalData.userInfo.ShowUserID,
21 19
       IsPromoter:app.globalData.userInfo.IsPromoter,
22 20
     });
23 21
 
@@ -58,9 +56,6 @@ Page({
58 56
     });
59 57
     wx.setStorageSync("HasSound", that.data.HasSound);
60 58
   },
61
-  resetTodayTask:function(){
62
-    main.ResetTodayTask();
63
-  },
64 59
   onShareAppMessage: function () {
65 60
     return {
66 61
       title: app.globalData.ShareTitle,

+ 4 - 7
pages/main/systemsetting.wxml

@@ -65,16 +65,13 @@
65 65
     返现推广计划(测试版)
66 66
   </view>  
67 67
   <view class='lineFooter'></view>
68
-  <view class="panelItem01 panelItem00 panelItem FlexRow" bindtap='resetTodayTask'>
69
-    重置今天的任务
70
-  </view>
71
-  <view class='lineFooter'></view>
72
-  <view class="panelItem00 panelItem FlexRow" bindtap='goto' data-url="../index/accredit">
73
-    重新获取用户信息
68
+ 
69
+  <view class="panelItem00 panelItem FlexRow" bindtap='goto' data-url="../other/systemrestore">
70
+    系统还原
74 71
   </view>
75 72
   <view class="text2">{{ShowUserID}}</view>
76 73
   <view style='width:100%;height:50rpx;'></view>
77
-  <text class='text1'> 秒过学习 {{Version}}\n©2017-2023 唱意教育小程序产品</text>
74
+  <text class='text1'> 秒过学习 {{Version}}\n©2017-2024 唱意教育小程序产品</text>
78 75
   <view style='width:100%;height:100rpx;'></view>
79 76
 
80 77
 </view>

+ 58 - 0
pages/other/systemrestore.js

@@ -0,0 +1,58 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  onLoad: function (options) {
8
+    var that = this;
9
+    
10
+    this.setData({
11
+      Containnerheight: main.getWindowHeight(),
12
+      ChildUserID: app.globalData.userInfo.ChildUserID,
13
+      CurrentUserID: app.globalData.userInfo.CurrentUserID,
14
+      UserID:app.globalData.userInfo.UserID,
15
+    });
16
+  },
17
+  resetTodayTask:function(){
18
+    main.ResetTodayTask();
19
+  },
20
+  deleteAll:function(){
21
+    wx.showModal({
22
+      title: '提醒',
23
+      content: "该操作将删除所有题卡。删除的题卡可在90天内前往回收站恢复。删除所有题卡后必须创建新题卡方可开始练习。",
24
+      confirmText:'删除所有',
25
+      complete: (res) => {
26
+        if (res.confirm) {
27
+          main.getData("DeleteAllMiaoguoCard?UserID=" + app.globalData.userInfo.UserID, function (data) {
28
+            wx.showToast({
29
+              title: "删除完成",
30
+              duration: 2000,
31
+            });            
32
+          });
33
+        }
34
+      }
35
+    });
36
+  },
37
+  goto: function (e) {
38
+    var url = e.currentTarget.dataset.url;
39
+    var gotoType = e.currentTarget.dataset.type;
40
+    if (!gotoType) {
41
+      wx.navigateTo({
42
+        url: url,
43
+      });
44
+      
45
+    } else {
46
+      wx.redirectTo({
47
+        url: url,
48
+      })
49
+    }
50
+  },
51
+  onShareAppMessage: function () {
52
+    return {
53
+      title: app.globalData.ShareTitle,
54
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
55
+      imageUrl: app.globalData.ShareImage,
56
+    }
57
+  },
58
+})

+ 3 - 0
pages/other/systemrestore.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "系统还原"
3
+}

+ 34 - 0
pages/other/systemrestore.wxml

@@ -0,0 +1,34 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  
3
+  <view class="panelItem FlexRow" bindtap='goto' data-url="../index/accredit">
4
+    <view class="panelItem1">修改头像和名字</view>
5
+    <view class="panelItem2 FlexRow">
6
+      <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
7
+    </view>
8
+  </view>
9
+  <view class='lineFooter'></view>
10
+  
11
+  <view class="text1">无法正常生成接力图片时请重新编辑头像信息。</view>
12
+
13
+  <view class="panelItem FlexRow" bindtap='resetTodayTask'>
14
+    <view class="panelItem1">重置今天的任务</view>
15
+    <view class="panelItem2 FlexRow">
16
+      <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
17
+    </view>
18
+  </view>
19
+  <view class='lineFooter'></view>
20
+  <view class="text1">从新安排今天的练习内容。如今天已有练完的题卡会恢复到未练过的状态。此操作执行后无法恢复。</view>
21
+  
22
+  <block wx:if="{{!ChildUserID && CurrentUserID==UserID}}">
23
+    <view class="panelItem FlexRow" bindtap='deleteAll'>
24
+      <view class="panelItem1">删除所有题卡</view>
25
+      <view class="panelItem2 FlexRow">
26
+        <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
27
+      </view>
28
+    </view>
29
+    <view class='lineFooter'></view>
30
+    <view class="text1">删除题卡库中所有题卡。90天内可在回收中恢复。不影响练习天数、接力等数据。</view>
31
+  </block>
32
+  
33
+
34
+</view>

+ 35 - 0
pages/other/systemrestore.wxss

@@ -0,0 +1,35 @@
1
+.container {
2
+  background-color: #F0F0F0;
3
+}
4
+
5
+.panelItem{
6
+  margin-top: 60rpx;
7
+  width:100%;
8
+  justify-content: space-between;
9
+  font-size:28rpx;
10
+  height:100rpx;
11
+  background-color: #fff;
12
+}
13
+
14
+.panelItem .panelItem1{
15
+  margin-left: 30rpx;
16
+  font-weight: 400;
17
+}
18
+.panelItem .panelItem2{
19
+  margin-right: 30rpx;
20
+  color:#787878;
21
+  font-weight: 400;
22
+}
23
+
24
+.Arrow{
25
+  width:16rpx;
26
+  height:26rpx;
27
+  margin-left: 30rpx;
28
+}
29
+
30
+.text1{
31
+  width:690rpx;
32
+  margin-top: 30rpx;
33
+  font-size:22rpx;
34
+  font-weight: 400;
35
+}