微调
This commit is contained in:
@@ -67,15 +67,13 @@ import { initDynamicRouter } from '@/routers/modules/dynamicRouter'
|
||||
import { CircleClose, UserFilled } from '@element-plus/icons-vue'
|
||||
import { useAuthStore } from '@/stores/modules/auth'
|
||||
import type { ElForm } from 'element-plus'
|
||||
import md5 from 'md5'
|
||||
import {useDictStore} from "@/stores/modules/dict";
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
const userStore = useUserStore()
|
||||
const tabsStore = useTabsStore()
|
||||
const keepAliveStore = useKeepAliveStore()
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const dictStore = useDictStore()
|
||||
|
||||
@@ -103,9 +101,10 @@ const login = (formEl: FormInstance | undefined) => {
|
||||
// 1.执行登录接口
|
||||
const { data } = await loginApi({
|
||||
...loginForm,
|
||||
password: md5(loginForm.password),
|
||||
password: loginForm.password,
|
||||
})
|
||||
userStore.setToken(data.accessToken)
|
||||
userStore.setUserInfo(data.userInfo)
|
||||
const response = await getDictList()
|
||||
const dictData = response.data as unknown as Dict[]
|
||||
await dictStore.initDictData(dictData)
|
||||
|
||||
Reference in New Issue
Block a user