将按钮的缓存从登录逻辑挪到登录之后的界面
This commit is contained in:
@@ -16,6 +16,7 @@ const registerUser = (params)=>postAction("/user/registerUser",params);
|
||||
const addUser = (params)=>postAction("/user/addUser",params);
|
||||
const editUser = (params)=>putAction("/user/updateUser",params);
|
||||
const getUserList = (params)=>getAction("/user/getUserList",params);
|
||||
const getUserBtnByCurrentUser = (params)=>getAction("/user/getUserBtnByCurrentUser",params);
|
||||
const queryPermissionsByUser = (params)=>postAction("/function/findMenuByPNumber",params);
|
||||
//机构管理
|
||||
const queryOrganizationTreeList = (params)=>getAction("/organization/getOrganizationTree",params);
|
||||
@@ -121,6 +122,7 @@ export {
|
||||
addUser,
|
||||
editUser,
|
||||
getUserList,
|
||||
getUserBtnByCurrentUser,
|
||||
queryPermissionsByUser,
|
||||
queryOrganizationTreeList,
|
||||
queryOrganizationById,
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
import UserMenu from '../tools/UserMenu'
|
||||
import SMenu from '../menu/'
|
||||
import Logo from '../tools/Logo'
|
||||
import { getCurrentSystemConfig } from '@/api/api'
|
||||
|
||||
import { getCurrentSystemConfig, getUserBtnByCurrentUser } from '@/api/api'
|
||||
import { mixin } from '@/utils/mixin.js'
|
||||
import Vue from 'vue'
|
||||
|
||||
export default {
|
||||
name: 'GlobalHeader',
|
||||
@@ -166,6 +166,11 @@
|
||||
this.companyName = res.data.companyName
|
||||
}
|
||||
})
|
||||
getUserBtnByCurrentUser().then((res) => {
|
||||
if(res.code === 200 && res.data){
|
||||
Vue.ls.set('winBtnStrList', res.data.userBtn, 7 * 24 * 60 * 60 * 1000)
|
||||
}
|
||||
})
|
||||
},
|
||||
//update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
|
||||
}
|
||||
|
||||
@@ -247,7 +247,6 @@
|
||||
if(res.code==200){
|
||||
let err = {};
|
||||
if(res.data.msgTip == 'user can login'){
|
||||
Vue.ls.set('winBtnStrList', res.data.userBtn, 7 * 24 * 60 * 60 * 1000);
|
||||
this.loginSuccess(res)
|
||||
} else if(res.data.msgTip == 'user is not exist'){
|
||||
err.message = '用户不存在';
|
||||
|
||||
Reference in New Issue
Block a user