丽知中台报表更新
This commit is contained in:
parent
88362bfff8
commit
c7934cde59
|
@ -65,7 +65,7 @@ const user = {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
login(login_name, password)
|
login(login_name, password)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
setToken(res.attribute['zt-token']);
|
setToken(res.attribute['token']);
|
||||||
setInfo(JSON.stringify(res.attribute.userInfo));
|
setInfo(JSON.stringify(res.attribute.userInfo));
|
||||||
commit("SET_TOKEN", res.attribute.token);
|
commit("SET_TOKEN", res.attribute.token);
|
||||||
commit("SET_INFO", res.attribute.userInfo);
|
commit("SET_INFO", res.attribute.userInfo);
|
||||||
|
|
|
@ -64,7 +64,7 @@ service.interceptors.request.use(
|
||||||
// if (window.localStorage.userToken) {
|
// if (window.localStorage.userToken) {
|
||||||
let token = getToken()
|
let token = getToken()
|
||||||
if (token) {
|
if (token) {
|
||||||
config.headers['zt-token'] = token
|
config.headers['token'] = token
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
|
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
|
||||||
|
@ -135,8 +135,8 @@ service.interceptors.response.use(
|
||||||
|
|
||||||
if (code === '500') {
|
if (code === '500') {
|
||||||
// 判断是否在处理 token 无效情况
|
// 判断是否在处理 token 无效情况
|
||||||
if (msg === 'zt-token无效' && isHandlingTokenInvalid) return
|
if (msg === 'token无效' && isHandlingTokenInvalid) return
|
||||||
if (msg === 'zt-token无效' && !isHandlingTokenInvalid) {
|
if (msg === 'token无效' && !isHandlingTokenInvalid) {
|
||||||
isHandlingTokenInvalid = true;
|
isHandlingTokenInvalid = true;
|
||||||
MessageBox.confirm('登录失效!请重新登录。', '系统提示', {
|
MessageBox.confirm('登录失效!请重新登录。', '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|
Loading…
Reference in New Issue