perf: Del profile scheduled request

This commit is contained in:
feng
2024-07-25 18:20:46 +08:00
committed by feng626
parent 7ba6b8d4e4
commit 0b813bb719
2 changed files with 0 additions and 20 deletions

View File

@@ -65,10 +65,6 @@ export function logout() {
})
}
export function refreshSessionIdAge() {
return getProfile()
}
export default {
getProfile,
getUserList

View File

@@ -3,7 +3,6 @@ import i18n from '@/i18n/i18n'
import { eventBus } from '@/utils/const'
import { getTokenFromCookie } from '@/utils/auth'
import { getErrorResponseMsg } from '@/utils/common'
import { refreshSessionIdAge } from '@/api/users'
import { MessageBox } from 'element-ui'
import { message } from '@/utils/message'
import store from '@/store'
@@ -102,20 +101,6 @@ export function flashErrorMsg({ response, error }) {
}
}
let timer = null
function refreshSessionAgeDelay(response) {
if (response.request.responseURL.indexOf('/users/profile/') !== -1) {
return
}
if (timer) {
clearTimeout(timer)
}
timer = setTimeout(function() {
refreshSessionIdAge()
}, 30 * 1000)
}
function ifConfirmRequired({ response, error }) {
if (response.status !== 412) {
return null
@@ -142,7 +127,6 @@ service.interceptors.response.use(
*/
response => {
// NProgress.done()
refreshSessionAgeDelay(response)
const res = response.data
store.dispatch('common/digestSQLQuery', response).then()