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