jiuyiUniapp/jiuyi2/pages/mine/setting/safeCenter.vue

101 lines
1.9 KiB
Vue
Raw Normal View History

2024-12-27 15:03:48 +08:00
<script setup>
// 安全中心
2025-02-16 22:35:46 +08:00
import {
ref,
computed,
} from 'vue'
import {
useStore
} from 'vuex'
import {
onLoad,
} from '@dcloudio/uni-app'
// 工具库
import util from '@/common/js/util.js'
// api
import api from '@/api/index.js'
/**
* 跳转
* @param {Object} url 跳转路径
*/
function link(url) {
uni.navigateTo({
url,
})
}
// 账号注销
function accountLogout() {
util.alert({
content: '确认注销账号?',
}).then(rs => {
if(!rs.confirm) return
api.login.cancelAccount({}).then(rs => {
if (rs.code == 200) {
// 退出登录
util.logout(() => {
// #ifdef APP
plus.runtime.restart()
// #endif
})
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
})
}
2024-12-27 15:03:48 +08:00
</script>
<template>
<view class="app">
<!-- 账号挂失 账号冻结 账号注销 -->
<view class="container">
2025-02-16 22:35:46 +08:00
<view class="line" @click="link('/pages/login/lostAccount')">
2024-12-27 15:03:48 +08:00
<view class="title">账号挂失</view>
<view class="content">申诉找回九亿账号</view>
</view>
2025-02-16 22:35:46 +08:00
<view class="line" @click="link('/pages/login/freezeAccount')">
2024-12-27 15:03:48 +08:00
<view class="title">账号冻结</view>
<view class="content">主动冻结账号保护账号资产</view>
</view>
2025-02-16 22:35:46 +08:00
<view class="line" @click="link('/pages/login/unfreezeAccount')">
2025-02-21 10:03:50 +08:00
<view class="title">账号解冻</view>
2024-12-27 15:03:48 +08:00
<view class="content">风险解除后可选择解除冻结</view>
</view>
2025-02-16 22:35:46 +08:00
<view class="line" @click="accountLogout">
2024-12-27 15:03:48 +08:00
<view class="title">账号注销</view>
2024-12-29 19:06:34 +08:00
<view class="content">提交申请清空当前账号</view>
2024-12-27 15:03:48 +08:00
</view>
</view>
</view>
</template>
<style lang="scss">
//
.container {
.line {
margin: 30rpx;
padding: 30rpx 25rpx;
background-color: #fff;
border-radius: 20rpx;
.title {
color: #333;
font-size: 34rpx;
}
.content {
margin-top: 10rpx;
color: #999;
font-size: 26rpx;
}
}
}
</style>