mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-30 00:00:05 +08:00
fix: 修改请求接口 token 名称
This commit is contained in:
@@ -119,7 +119,7 @@ import { reactive, ref, onMounted } from 'vue'
|
||||
import shuffle from 'lodash/shuffle'
|
||||
import { carouselInterval } from '@/settings/designSetting'
|
||||
import { useSystemStore } from '@/store/modules/systemStore/systemStore'
|
||||
import { SystemStoreEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
import { SystemStoreUserInfoEnum, SystemStoreEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
import { GoThemeSelect } from '@/components/GoThemeSelect'
|
||||
import { GoLangSelect } from '@/components/GoLangSelect'
|
||||
import { LayoutHeader } from '@/layout/components/LayoutHeader'
|
||||
@@ -209,15 +209,17 @@ const handleSubmit = async (e: Event) => {
|
||||
password
|
||||
}) as unknown as MyResponseType
|
||||
if(res.data) {
|
||||
const { tokenValue } = res.data.token
|
||||
const { tokenValue, tokenName } = res.data.token
|
||||
const { nickname, username, id } = res.data.userinfo
|
||||
|
||||
// 存储到 pinia
|
||||
systemStore.setItem(SystemStoreEnum.USER_INFO, {
|
||||
userToken: tokenValue,
|
||||
userId: id,
|
||||
userName: username,
|
||||
nickName: nickname,
|
||||
[SystemStoreUserInfoEnum.USER_TOKEN]: tokenValue,
|
||||
[SystemStoreUserInfoEnum.TOKEN_NAME]: tokenName,
|
||||
[SystemStoreUserInfoEnum.USER_ID]: id,
|
||||
[SystemStoreUserInfoEnum.USER_NAME]: username,
|
||||
[SystemStoreUserInfoEnum.NICK_NAME]: nickname,
|
||||
t
|
||||
})
|
||||
|
||||
window['$message'].success(t('login.login_success'))
|
||||
|
||||
Reference in New Issue
Block a user