Files
frontend-app/pages/rwa_package/accountOut/accountOut.vue
T

173 lines
3.9 KiB
Vue
Raw Normal View History

2025-11-20 23:28:28 +08:00
<template>
<view class="content">
<TopSafe></TopSafe>
<Header title="注销账号" />
<view class="setting-view">
<view class="name-box">
<view class="top-view">
<u-icon name="error-circle-fill" color="#e88900" size="54"></u-icon>
<text class="text-36 text-zu text-bold mt-12">注销信任桥账号</text>
</view>
<view class="mid-view">
<text class="text-fu text-28">账号注销后不可恢复,请您谨慎操作。注销成功后,您将无法登录或使用原账号,账号内的信息和权益将均无法找回:</text>
<text class="text-fu text-28 mt-48">1.账号将无法登录 </text>
<text class="text-fu text-28">2.历史订单将无法查询 </text>
<text class="text-fu text-28">3.放弃会员等级权益和会员积分 </text>
<text class="text-fu text-28">4.放弃钱包余额、优惠券等资产 </text>
</view>
<text class="text-fu text-28 mt-32">*详细注销信息可阅读
<text class="text-zi" @click="onJump">《信任桥账号注销协议》</text>
</text>
</view>
2026-09-02 09:14:01 +08:00
2025-11-20 23:28:28 +08:00
</view>
<view class="bottom-btn">
<MyBtn text="已清楚风险,确定注销" @ok="onZhu"></MyBtn>
</view>
2026-09-02 09:14:01 +08:00
<u-modal :show="tipsShow" title="提示" showCancelButton @cancel="onCancel" @confirm="onConfirm"
:content='content'></u-modal>
2025-11-20 23:28:28 +08:00
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
<script>
2026-09-02 09:14:01 +08:00
import { getUserInfo, updateName, deleteAccount } from '@/api/auth.js';
2025-11-20 23:28:28 +08:00
import Header from '@/components/common/header.vue';
import { clear } from '@/utils/auth.js';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import func from '@/utils/func.js';
export default {
2026-09-02 09:14:01 +08:00
components: { Header, TopSafe, MyBtn },
2025-11-20 23:28:28 +08:00
data() {
return {
userInfo: null,
2026-09-02 09:14:01 +08:00
inputText: '',
tipsShow: false,
content: '是否确定注销账号?'
2025-11-20 23:28:28 +08:00
};
},
onShow() {
},
onLoad() {
this.init();
// this.userinfo();
},
methods: {
init() {
this.userinfo()
},
2026-09-02 09:14:01 +08:00
onJump() {
2025-11-20 23:28:28 +08:00
uni.navigateTo({
2026-09-02 09:14:01 +08:00
url: '/pages/rwa_package/outAgreement/outAgreement'
2025-11-20 23:28:28 +08:00
})
},
2026-09-02 09:14:01 +08:00
onZhu() {
2025-11-20 23:28:28 +08:00
this.tipsShow = true;
},
2026-09-02 09:14:01 +08:00
onConfirm() {
2025-11-20 23:28:28 +08:00
// uni.navigateTo({
// url:'/pages/rwa_package/outCode/outCode'
// })
this.onCancel();
2026-09-02 09:14:01 +08:00
deleteAccount().then(res => {
2025-11-20 23:28:28 +08:00
if (res.bizcode == 100) {
clear()
this.$refs.uToastRef.show({
type: 'success',
message: "注销成功",
});
2026-09-02 09:14:01 +08:00
setTimeout(() => {
2025-11-20 23:28:28 +08:00
uni.redirectTo({
2026-09-02 09:14:01 +08:00
url: '/pages/login_package/login/login'
2025-11-20 23:28:28 +08:00
})
2026-09-02 09:14:01 +08:00
}, 1000)
2025-11-20 23:28:28 +08:00
}
})
},
2026-09-02 09:14:01 +08:00
onCancel() {
2025-11-20 23:28:28 +08:00
this.tipsShow = false;
},
userinfo() {
getUserInfo().then(res => {
if (res.bizcode == 100) {
this.userInfo = res.data;
this.inputText = this.userInfo.nickname;
}
})
}
}
}
</script>
<style lang="scss" scoped>
2026-09-02 09:14:01 +08:00
.bottom-btn {
2025-11-20 23:28:28 +08:00
width: 100%;
2026-09-02 09:14:01 +08:00
margin-bottom: 92rpx;
2025-11-20 23:28:28 +08:00
display: flex;
flex-direction: column;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
2026-09-02 09:14:01 +08:00
2025-11-20 23:28:28 +08:00
}
2026-09-02 09:14:01 +08:00
2025-11-20 23:28:28 +08:00
.setting-view {
width: 100%;
height: calc(100% - 88rpx - 92rpx - 88rpx - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
padding: 0 32rpx;
box-sizing: border-box;
position: relative;
2026-09-02 09:14:01 +08:00
.name-box {
width: 100%;
2025-11-20 23:28:28 +08:00
border-radius: 16rpx;
display: flex;
flex-direction: column;
background-color: #fff;
padding: 64rpx 32rpx;
box-sizing: border-box;
2026-09-02 09:14:01 +08:00
margin-top: 24rpx;
.mid-view {
width: 100%;
2025-11-20 23:28:28 +08:00
padding: 40rpx 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
2026-09-02 09:14:01 +08:00
border: 2rpx solid #eaeaea;
2025-11-20 23:28:28 +08:00
border-radius: 16rpx;
2026-09-02 09:14:01 +08:00
margin-top: 48rpx;
2025-11-20 23:28:28 +08:00
}
2026-09-02 09:14:01 +08:00
.top-view {
width: 100%;
2025-11-20 23:28:28 +08:00
display: flex;
flex-direction: column;
align-items: center;
}
2026-09-02 09:14:01 +08:00
.input-view {
2025-11-20 23:28:28 +08:00
border-radius: 20rpx;
2026-09-02 09:14:01 +08:00
margin-top: 52rpx;
width: 100%;
2025-11-20 23:28:28 +08:00
padding: 0 32rpx;
2026-09-02 09:14:01 +08:00
min-height: 104rpx;
2025-11-20 23:28:28 +08:00
display: flex;
flex-direction: row;
align-items: center;
background-color: #f5f5f5;
box-sizing: border-box;
2026-09-02 09:14:01 +08:00
2025-11-20 23:28:28 +08:00
}
}
2026-09-02 09:14:01 +08:00
2025-11-20 23:28:28 +08:00
}
</style>