From 3de02cea4763eedea145a579ef8e04238886abc7 Mon Sep 17 00:00:00 2001
From: zsk <710162063@qq.com>
Date: Wed, 19 Mar 2025 09:54:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=94=80=E8=B4=A6=E6=88=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/setting/index.js | 37 +++++++++++++++++++++++++++++++++++++
pages/setting/index.wxml | 9 +++++++++
2 files changed, 46 insertions(+)
diff --git a/pages/setting/index.js b/pages/setting/index.js
index 33cc0d6..b6a119d 100644
--- a/pages/setting/index.js
+++ b/pages/setting/index.js
@@ -64,6 +64,42 @@ Page({
});
});
+ // wx.navigateBack({
+ // delta: 1
+ // })
+ } else if (res.cancel) {
+ console.log("用户点击取消");
+ }
+ },
+ });
+ },
+ logOff: function () {
+ var that = this;
+ wx.showModal({
+ title: "注销账号",
+ content: "确定要注销账号吗?该操作不可逆!",
+ confirmColor: "#1890ff",
+ success(res) {
+ if (res.confirm) {
+ customRequest("/yishoudan/updatePasswordByPwd", {
+ header: 'headers', method: 'post', data: {
+ tel: app.globalData.user.tel,
+ oldPassword: 'qqqq1111',
+ password:'1111qqqq',
+ }
+ }).then(({ data }) => {
+ if (data.status == 200) {
+ app.showTips(that, "修改成功");
+ setTimeout(() => {
+ wx.reLaunch({
+ url: "/pages/login/index?type=psw",
+ success: (result) => { },
+ });
+ }, 2000);
+ } else {
+ app.showTips(that, data.msg);
+ }
+ })
// wx.navigateBack({
// delta: 1
// })
@@ -73,4 +109,5 @@ Page({
},
});
},
+
});
diff --git a/pages/setting/index.wxml b/pages/setting/index.wxml
index 35ce078..ba86eb8 100644
--- a/pages/setting/index.wxml
+++ b/pages/setting/index.wxml
@@ -41,4 +41,13 @@
退出登录
+
+
+
+
+
+ 注销账号
+
+
+