From c6ccd498aa419327de7c64e03f989964eeb5d278 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Wed, 16 Jul 2025 16:26:11 +0800
Subject: [PATCH] 退出二次确认
---
src/views/my/newindex.vue | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/src/views/my/newindex.vue b/src/views/my/newindex.vue
index c67deee..bdadfab 100644
--- a/src/views/my/newindex.vue
+++ b/src/views/my/newindex.vue
@@ -67,7 +67,7 @@
import { useUserStore } from '@/store/user';
import { useI18n } from "vue-i18n";
import useClipboard from "vue-clipboard3";
-import { showToast } from "vant";
+import { showConfirmDialog } from 'vant';
import addBankIcon from '@/assets/image/userCenter/addBank.png'
import kycHighStatusIcon from '@/assets/image/userCenter/kycHighStatus.png'
import store from '@/store/store'
@@ -196,12 +196,22 @@
})
const loginOut = () => {
- _logOut({
- token: userStore.userInfo.token
- }).then(res => {
- userStore.userInfo = {}
- store.state.user.userInfo = {}
- router.push('/login')
+ showConfirmDialog({
+ title: `${t('确认退出')}`,
+ message: `${t('确定要退出登录吗?')}`
+ }).then(() => {
+ _logOut({
+ token: userStore.userInfo.token
+ }).then(res => {
+ userStore.userInfo = {}
+ store.state.user.userInfo = {}
+ router.push('/login')
+ })
+ .catch(err => {
+ // showFailToast(`${t('退出失败,请重试')}`)
+ })
+ }).catch(() => {
+ // 用户取消操作
})
}
const getIdentify = () => {
--
Gitblit v1.9.3