This commit is contained in:
lihaoyuan 2025-09-17 15:45:44 +08:00
commit 49dd906bca
4 changed files with 108 additions and 0 deletions

View File

@ -40,6 +40,25 @@ export function UpdataShopInfo(params) {
});
}
/**
* 账号注销
* @author Seven
* @data 2025-3-27
* @param {
* cancelReason: '', 注销原因
* }
* @returns { }
* @see https://mall.gpxscs.cn/api/mobile/account/user/cancleAccount
*/
export function DelUser(params) {
return http({
url: '/account/user/cancleAccount',
method: 'post',
params,
baseURL: config.apiMobile,
});
}
/**
* 获取商家端今日订单量
* @author Seven

View File

@ -278,6 +278,13 @@
{
"navigationBarTitleText" : "铃声设置"
}
},
{
"path" : "pages/my/delUser",
"style" :
{
"navigationBarTitleText" : "账号注销"
}
}
],
"globalStyle": {

View File

@ -0,0 +1,74 @@
<template>
<view class="del_user">
<u-textarea
v-model="text"
placeholder="请填写注销理由"
class="area"
height="150"
count
></u-textarea>
<u-button
type="error"
text="提交申请"
class="btn"
@click="handleDelUser"
></u-button>
</view>
</template>
<script>
import { DelUser } from "@/api/shop.js";
export default {
data() {
return {
text: "",
};
},
methods: {
async handleDelUser() {
if (!this.text) {
uni.showToast({
title: `请填写理由`,
});
return false;
}
uni.showModal({
title: "账户安全提示",
content: `账号注销操作不可恢复,为了确保账号资金和个人信息安全,请谨慎操作,一旦注销账号,您的手机号和个人隐私信息将会自动解绑或清空数据,确定要注销账号吗?`,
success: async (res) => {
if (res.confirm) {
await DelUser({
cancelReason: this.text,
});
uni.showToast({
title: `账号已注销`,
});
setTimeout(() => {
this.$store.dispatch("user/LoginOut", true);
}, 2000);
}
},
});
},
},
};
</script>
<style lang="scss" scoped>
.del_user {
background: #fff;
margin: 20rpx;
padding: 20rpx;
.area {
border-bottom: 1px solid rgb(238, 238, 238, 0.5);
}
.btn {
margin-top: 40rpx;
margin-bottom: 12rpx;
}
}
</style>

View File

@ -154,6 +154,14 @@
url="/pages/my/rings/rings"
icon="bell-fill"
title="铃声设置"
></u-cell>
<u-cell
iconStyle="marginRight:6px; color: #ff695b"
:border="false"
isLink
url="/pages/my/delUser"
icon="minus-people-fill"
title="账号注销"
></u-cell>
<u-cell
iconStyle="marginRight:6px; color: #026bff"