fix: 刷新 token 时也要增加天融信 token

develop
时启龙 2024-08-23 16:45:57 +08:00
parent 2553434bd3
commit 57ea72c3d7
1 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import { useStore } from 'vuex'
import { useRouter, useRoute } from 'vue-router' import { useRouter, useRoute } from 'vue-router'
import { getClientHello } from 'services/ukeyAuth.js' import { getClientHello } from 'services/ukeyAuth.js'
import { replaceToken } from 'services' import { replaceToken } from 'services'
import { getToken, getUkeyPassword } from 'utils/auth' import { getToken, getTrxToken, getUkeyPassword } from 'utils/auth'
export default function () { export default function () {
const store = useStore() const store = useStore()
@ -22,7 +22,8 @@ export default function () {
// 获取最新token // 获取最新token
async function getLastToken() { async function getLastToken() {
const token = getToken() const token = getToken()
const res = await replaceToken({ token }) const trxToken = getTrxToken()
const res = await replaceToken({ token, trxToken })
if (!res.success) { if (!res.success) {
clearTimer() clearTimer()
store.dispatch('permission/ResetRoutes') store.dispatch('permission/ResetRoutes')