feat: 添加注销账户功能
This commit is contained in:
parent
e0f409c726
commit
2a3e8574e8
@ -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
|
* @author Seven
|
||||||
|
|||||||
@ -278,6 +278,13 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText" : "铃声设置"
|
"navigationBarTitleText" : "铃声设置"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/my/delUser",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "账号注销"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
66
java-mall-app-shop-admin/pages/my/delUser.vue
Normal file
66
java-mall-app-shop-admin/pages/my/delUser.vue
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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>
|
||||||
@ -154,6 +154,14 @@
|
|||||||
url="/pages/my/rings/rings"
|
url="/pages/my/rings/rings"
|
||||||
icon="bell-fill"
|
icon="bell-fill"
|
||||||
title="铃声设置"
|
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>
|
||||||
<u-cell
|
<u-cell
|
||||||
iconStyle="marginRight:6px; color: #026bff"
|
iconStyle="marginRight:6px; color: #026bff"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user