Browse Source

修改小红点 + 空巢老人

ssfg 4 years ago
parent
commit
91f187e47a

+ 1 - 1
pages/collectInfo/collectInfo.js

@@ -2029,7 +2029,7 @@ Page({
     let revise2 = "oldInfo[" + this.data.activeIndex + "].oldType[1].disable";
     let revise3 = "oldInfo[" + this.data.activeIndex + "].oldType[2].disable";
     let revise4 = "oldInfo[" + this.data.activeIndex + "].oldType[3].disable";
-    let revise5 = "oldInfo[" + this.data.activeIndex + "].oldType[3].checked";
+    let revise5 = "oldInfo[" + this.data.activeIndex + "].oldType[4].checked";
     this.SubmitOldmanInfo({
       id: this.data.nameArr[this.data.activeIndex]._id,
       oldType: JSON.stringify(e.detail.value)

File diff suppressed because it is too large
+ 1 - 1
pages/collectInfo/collectInfo.wxml


+ 28 - 13
pages/personInfo/personInfo.js

@@ -26,23 +26,39 @@ Page({
     })
   },
   tuichu() {
-    wx.request({
-      url: app.globalData.publicUrl + '/applet/unbind',
-      method: "GET",
-      data: {
-        appletsId: wx.getStorageSync('openId')
-      },
-      success: (res) => {
-        if (res.data.code == 0) {
-          wx.clearStorageSync();
-          wx.switchTab({
-            url: '/pages/index/index',
+    wx.showModal({
+      showCancel: true,
+      content: "您确认要退出吗?",
+      success(res) {
+        if (res.confirm) {
+          wx.showLoading({
+            mask: true,
+            title: '退出中',
+          })
+          wx.request({
+            url: app.globalData.publicUrl + '/applet/unbind',
+            method: "GET",
+            data: {
+              appletsId: wx.getStorageSync('openId')
+            },
+            success: (res) => {
+              if (res.data.code == 0) {
+                wx.hideLoading()
+                wx.clearStorageSync();
+                wx.switchTab({
+                  url: '/pages/index/index',
+                })
+              }
+            },
+            fail:()=>{
+              wx.hideLoading()
+            }
           })
         }
       }
     })
-  },
 
+  },
   onShow() {
     console.log(wx.getStorageSync('user'), "打印");
     if (wx.getStorageSync('user') == '') {
@@ -67,5 +83,4 @@ Page({
   onLoad() {
 
   }
-
 })