设备检测登录调整
This commit is contained in:
parent
52898a24ac
commit
12698a808b
@ -1,13 +1,5 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
/** 查询用户参数*/
|
|
||||||
export function getUserConfigInfo() {
|
|
||||||
return request({
|
|
||||||
url: '/api/user/config',
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获取销售列表*/
|
/** 获取销售列表*/
|
||||||
export function getSellerList() {
|
export function getSellerList() {
|
||||||
return request({
|
return request({
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import { setSessionStorage } from '@/utils/auth';
|
|
||||||
import { login, logout, getInfo, preLogout } from '@/api/login';
|
import { login, logout, getInfo, preLogout } from '@/api/login';
|
||||||
import { getToken, setToken, removeToken } from '@/utils/auth';
|
import { getToken, setToken, removeToken } from '@/utils/auth';
|
||||||
import { getUserConfigInfo } from '@/api/management/user';
|
|
||||||
import { LoginParams } from '@/utils/login';
|
import { LoginParams } from '@/utils/login';
|
||||||
import { creatSubscribe, clearSubscribe, perpetualTopic, disconnect} from '@/utils/stomp';
|
import { creatSubscribe, clearSubscribe, perpetualTopic, disconnect} from '@/utils/stomp';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
@ -115,12 +113,6 @@ const user = {
|
|||||||
setToken(tokeninfo.value);
|
setToken(tokeninfo.value);
|
||||||
commit(mutAction, mutParams);
|
commit(mutAction, mutParams);
|
||||||
commit('SUBSCRIBE', {header, type});
|
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 }) {
|
FedLogOut({ commit }) {
|
||||||
commit('SUBSCRIBE_UN');
|
commit('SUBSCRIBE_UN');
|
||||||
|
@ -306,7 +306,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
|
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();
|
this.loginRefresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user