From 7a3f46a3a663b3963e9e68146abb255764b1d271 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 18 Mar 2021 10:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=A3=80=E6=B5=8B=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/management/user.js | 8 -------- src/store/modules/user.js | 19 ------------------- src/views/login/index.vue | 2 +- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/api/management/user.js b/src/api/management/user.js index 9d6334f93..1155ce85a 100644 --- a/src/api/management/user.js +++ b/src/api/management/user.js @@ -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({ diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 10e7cf012..cfbf3a86e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -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'); diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 3ae87dd27..0f1e605f9 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -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(); } },