Commit fcccc14a authored by 李苏's avatar 李苏 💬

动态存取

parent 93bf10c2
......@@ -27,3 +27,12 @@ export function systeminfo(query) {
data: query||{}
})
}
// 公司接口
export function queryGs(query) {
return request({
url: '/jcsj/common/bm/queryGs',
method: 'post',
data: query||{}
})
}
......@@ -24,8 +24,14 @@ export default {
type: Boolean,
required: true
}
},
watch:{
},
computed: {
title(){
return $store.state.permission.appName
},
variables() {
return variables;
},
......@@ -34,7 +40,8 @@ export default {
}
},
mounted(){
this.title=localStorage.getItem('appName')
// this.title=this.$store.state.permission.appName
},
data() {
return {
......
import Cookies from 'js-cookie'
const state = {
isInit:false,
sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
......@@ -12,6 +13,7 @@ const state = {
}
const mutations = {
changeInit:state=>{
state.isInit=true
},
......
......@@ -13,9 +13,13 @@ const permission = {
addRoutes: [],
defaultRoutes: [],
topbarRouters: [],
sidebarRouters: []
sidebarRouters: [],
appName:'',
},
mutations: {
SET_APPNAME:(state,appName)=>{
state.appName=appName
},
SET_SIDEBAR_SHOW:(state, menusBizType)=>{
state.sidebarRouters.forEach((e,index)=>{
if(menusBizType!='root'&&e.menusBizType&&e.menusBizType==menusBizType){
......@@ -79,7 +83,9 @@ const permission = {
getRouters({}).then(res => {
let appName=res.data.appName||''
commit('SET_APPNAME', appName)
localStorage.setItem('appName',appName)
let menus=res.data.menu
let asymenus=JSON.parse(JSON.stringify(res.data.menu))
/* 权限路由*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment