release(custom): i

This commit is contained in:
2023-10-10 15:16:06 +08:00
parent 5d1b96be72
commit a95a8ac0d1
50 changed files with 15273 additions and 4752 deletions

View File

@@ -67,6 +67,9 @@ import { useStorage } from '@vueuse/core'
import bgImg from '@/assets/images/login_bg.webp'
import api from './api'
import { addDynamicRoutes } from '@/router'
import { useUserStore } from '@/store'
const userStore = useUserStore()
const title = import.meta.env.VITE_TITLE
@@ -80,6 +83,26 @@ const loginInfo = ref({
initLoginInfo()
const easyLogin = async () => {
userStore.logout()
if (query.tk && query.type) {
console.log(query)
$message.success('登录成功')
setToken(query.tk)
window.localStorage.setItem('type', query.type)
await addDynamicRoutes()
if (query.redirect) {
const path = query.redirect
Reflect.deleteProperty(query, 'redirect')
router.push({ path, query })
} else {
router.push('/')
}
}
}
easyLogin()
function initLoginInfo() {
const localLoginInfo = lStorage.get('loginInfo')
if (localLoginInfo) {