设备检测登录调整

This commit is contained in:
fan 2021-03-18 10:25:41 +08:00
parent 076314794c
commit 7a3f46a3a6
3 changed files with 1 additions and 28 deletions

View File

@ -1,13 +1,5 @@
import request from '@/utils/request';
/** 查询用户参数*/
export function getUserConfigInfo() {
return request({
url: '/api/user/config',
method: 'get'
});
}
/** 获取销售列表*/
export function getSellerList() {
return request({

View File

@ -1,7 +1,5 @@
import { setSessionStorage } from '@/utils/auth';
import { login, logout, getInfo, preLogout } from '@/api/login';
import { getToken, setToken, removeToken } from '@/utils/auth';
import { getUserConfigInfo } from '@/api/management/user';
import { LoginParams } from '@/utils/login';
import { creatSubscribe, clearSubscribe, perpetualTopic, disconnect} from '@/utils/stomp';
import Cookies from 'js-cookie';
@ -115,12 +113,6 @@ const user = {
setToken(tokeninfo.value);
commit(mutAction, mutParams);
commit('SUBSCRIBE', {header, type});
// 获取用户参数
dispatch('GetUserConfigInfo').then(response => {
resolve(response);
}).catch(error => {
reject(error);
});
});
},
// 获取用户信息
@ -149,17 +141,6 @@ const user = {
});
});
},
// 获取用户参数
GetUserConfigInfo() {
getUserConfigInfo().then(resp => {
if (resp.data) {
resp.data.forEach(elem => {
setSessionStorage(elem.code, elem.val);
});
}
});
},
// 前端登出
FedLogOut({ commit }) {
commit('SUBSCRIBE_UN');

View File

@ -306,7 +306,7 @@ export default {
},
mounted() {
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
if (!(this.syncLogin || this.noQrcodeList.includes(this.project))) {
if (this.syncLogin || !this.noQrcodeList.includes(this.project)) {
this.loginRefresh();
}
},