t
This commit is contained in:
68
pages/mine/deleteUser.vue
Normal file
68
pages/mine/deleteUser.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<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>
|
||||
@@ -5,10 +5,14 @@
|
||||
<view class="mine-nav-label">更换手机号</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('changePwd')" style="border-bottom: none">
|
||||
<view class="mine-nav" @click="jump('changePwd')" >
|
||||
<view class="mine-nav-label">修改密码</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('deleteUser')" style="border-bottom: none">
|
||||
<view class="mine-nav-label">账号注销</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="mine-nav" @click="jump('setupMessage')" style="margin-top:20rpx;border-bottom: none; ">
|
||||
<view class="mine-nav-label">消息配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
@@ -46,7 +50,7 @@
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('layout')" style="margin-top: 20rpx; border-bottom: none">
|
||||
<view class="mine-nav-label" style="text-align: center">账号注销</view>
|
||||
<view class="mine-nav-label" style="text-align: center">退出登录</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -77,7 +81,7 @@ export default {
|
||||
case 'layout':
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认账号注销?',
|
||||
content: '是否确认退出登录?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
|
||||
Reference in New Issue
Block a user