Files
app-govern/pages/mine/deleteUser.vue
仲么了 89d3d78f22 t
2023-10-26 09:03:16 +08:00

69 lines
1.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<Cn-page :loading="loading">
<view slot="body">
<view class="index">
<view>成功注销后所有的账号信息将会被删除且无法找回原账号将无法登陆请谨慎操作</view>
<view class="btn-wrap">
<view class="btn-wrap-item" @click="submit"> 注销</view>
</view>
</view>
</view>
</Cn-page>
</template>
<script>
import { apiDeleteUser } from '@/common/api/user.js'
export default {
data() {
return {
loading: false,
}
},
methods: {
submit() {
uni.showModal({
title: '注销提示',
content: '确认注销账号吗?',
success: (res) => {
if (res.confirm) {
apiDeleteUser().then((res) => {
uni.showToast({
title: '注销成功',
icon: 'none',
})
setTimeout(() => {
uni.reLaunch({
url: `/pages/user/login`,
})
}, 1000)
})
}
},
})
},
},
}
</script>
<style lang="scss">
.index {
padding: 34rpx;
font-size: 28rpx;
.btn-wrap {
margin-top: 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
.btn-wrap-item {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
background: $uni-theme-color;
color: #fff;
height: 80rpx;
border-radius: 12rpx;
}
}
}
</style>