Skip to content

Commit

Permalink
fixed(http、nav): api timeout not show message & perf nav z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
orangegzx authored and ysfscream committed Sep 21, 2022
1 parent 7c09a8c commit 0cc0171
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/composables/config/useUploadTagList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export default () => {
return Promise.resolve()
} catch (error: any) {
const { data = {} } = error
handlePartialSuc(data.index, data.error)
if (data.index !== undefined && data.error !== undefined) {
handlePartialSuc(data.index, data.error)
}
return Promise.reject(error)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ label {

.header {
position: fixed;
z-index: 1;
z-index: 9;
top: 0;
left: 0;
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/forEKuiper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import store from '@/store/index'

// ❗️If you are developing and debugging ekuiper, please replace this with the address of ekuiper
const kuiperEntry = `${window.location.origin}/ekuiper/` // production
// const kuiperEntry = `http://localhost:3002/ekuiper/`// dev
// const kuiperEntry = `http://localhost:3002/ekuiper/` // dev
const defaultEnv = 'production'

export const handleEKuiper = async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ axios.interceptors.response.use(
(error) => {
// when requesting login, the interface will return 401 if the password or username is error, handle it
const isInLoginPage = router.currentRoute?.value?.name === LOGIN_ROUTE_NAME
if ((error.response.status === 401 && !isInLoginPage) || error.response.status === 403) {
if ((error?.response?.status === 401 && !isInLoginPage) || error?.response?.status === 403) {
store.commit('LOGOUT')
router.push({ name: 'Login' })
} else if (!error.config._handleErrorSelf) {
Expand Down

0 comments on commit 0cc0171

Please sign in to comment.