增加退出登录提示

This commit is contained in:
xuli3099
2025-08-20 10:14:22 +08:00
parent 6635ceb0d8
commit 08ca660b87

View File

@@ -103,6 +103,7 @@ import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
import { getNavBarPaddingTop } from '@/utils/system.js' import { getNavBarPaddingTop } from '@/utils/system.js'
import { getUserInfo,versionCheck } from '@/api/auth.js' import { getUserInfo,versionCheck } from '@/api/auth.js'
import { formatIOS } from '@/utils/status.js' import { formatIOS } from '@/utils/status.js'
import { showAlert } from '@/utils/message.js'
import { useUserStore } from '@/stores/user'; import { useUserStore } from '@/stores/user';
const userStore = useUserStore() const userStore = useUserStore()
@@ -193,10 +194,14 @@ const getVersion = async ()=>{
// 3.退出登录 // 3.退出登录
const handleLoginOut = async ()=>{ const handleLoginOut = async ()=>{
userStore.logout();
uni.reLaunch({ showAlert('是否确认退出?','提示',true,()=>{
url: '/pages/login/login', userStore.logout();
}); uni.reLaunch({
url: '/pages/login/login',
});
})
} }
// 4.跳转到版本 // 4.跳转到版本