|
|
@@ -13,7 +13,6 @@ import { base64ToBlob } from "./file";
|
|
|
import { checkLogin } from "@/api";
|
|
|
import { LoginDetector } from "@/utils/starter";
|
|
|
import { $alert, $confirm } from "@/components/shared/message";
|
|
|
-import store from '@/Store'
|
|
|
|
|
|
let vue = new Vue();
|
|
|
|
|
|
@@ -55,7 +54,7 @@ export const showLoginTips = () => {
|
|
|
|
|
|
return $confirm({
|
|
|
title: "提示",
|
|
|
- content: "登录态失效,请重新登录",
|
|
|
+ content: "登录状态失效,请重新登录",
|
|
|
okText: "去登录",
|
|
|
noText: "登录完毕,继续",
|
|
|
okLink: "/",
|
|
|
@@ -66,16 +65,14 @@ export const showLoginTips = () => {
|
|
|
no: function() {
|
|
|
checkLogin().then((response) => {
|
|
|
if (response.code === statusCode.SUCCESS) {
|
|
|
- store.dispatch('refreshUserInfo')
|
|
|
postQueue.length && postQueue.forEach((item) => item());
|
|
|
postQueue = [];
|
|
|
LoginDetector.valid();
|
|
|
- let url = window.location.href
|
|
|
- window.location.href = url
|
|
|
+ location.reload()
|
|
|
} else if (response.code === statusCode.FAILURE_CODE_5001) {
|
|
|
showLoginTips();
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
showLoginTips.__is_show = false;
|
|
|
},
|
|
|
});
|
|
|
@@ -206,11 +203,6 @@ export const http = {
|
|
|
postQueue.push(function() {
|
|
|
http[method](url, data, done, fail);
|
|
|
});
|
|
|
- // if (url.indexOf('isLogin') == -1) {
|
|
|
- // postQueue.push(function() {
|
|
|
- // http[method](url, data, done, fail)
|
|
|
- // })
|
|
|
- // }
|
|
|
}
|
|
|
});
|
|
|
|