增加退出登录提示
This commit is contained in:
@@ -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 ()=>{
|
||||||
|
|
||||||
|
showAlert('是否确认退出?','提示',true,()=>{
|
||||||
userStore.logout();
|
userStore.logout();
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login',
|
url: '/pages/login/login',
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4.跳转到版本
|
// 4.跳转到版本
|
||||||
|
|||||||
Reference in New Issue
Block a user