init
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<s-pages title="账号注销">
|
||||
<view class="pages p-x-20">
|
||||
<view class="card bg24">
|
||||
<view class="card_title flex-center ju-between">
|
||||
<view class="weight700">注销提示</view>
|
||||
</view>
|
||||
<view>注销账号后,将数据清空,并无法登录该账号,且无法找回数据,是否继续注销账号?</view>
|
||||
</view>
|
||||
<view class="submit-btn bg24" @click="logout"><span>注销账号</span></view>
|
||||
</view>
|
||||
</s-pages>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
let { proxy } = getCurrentInstance();
|
||||
import AuthUtil from '@/sheep/api/member/auth';
|
||||
import sheep from '@/sheep';
|
||||
|
||||
// 注销账号
|
||||
const logout = () => {
|
||||
uni.showModal({
|
||||
title: '注销账号',
|
||||
content: '注销账号后,将数据清空,并无法登录该账号,请谨慎操作',
|
||||
confirmColor: '#FA7E31',
|
||||
success: async function (res) {
|
||||
if (!res.confirm) {
|
||||
return;
|
||||
}
|
||||
const { code } = await AuthUtil.deactivate();
|
||||
if (code !== 0) {
|
||||
return;
|
||||
}
|
||||
sheep.$store('user').logout();
|
||||
sheep.$router.go('/pages/index/user');
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 32rpx 28rpx;
|
||||
box-align: border-box;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.card_title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 34rpx;
|
||||
}
|
||||
|
||||
.card_more {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
.submit-btn {
|
||||
width: calc(100% - 40rpx);
|
||||
position: fixed;
|
||||
left: 20rpx;
|
||||
bottom: 40rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user