layout
This commit is contained in:
@@ -51,7 +51,7 @@ onBeforeMount(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
await Promise.all([getAreaList(), dictDataCache(),getUserById()]).then(res => {
|
await Promise.all([getAreaList(), dictDataCache(), getUserById()]).then(res => {
|
||||||
dictData.state.area = res[0].data
|
dictData.state.area = res[0].data
|
||||||
dictData.state.basic = res[1].data
|
dictData.state.basic = res[1].data
|
||||||
adminInfo.dataFill(res[2].data)
|
adminInfo.dataFill(res[2].data)
|
||||||
@@ -66,7 +66,7 @@ const init = async () => {
|
|||||||
item.path = item.routePath
|
item.path = item.routePath
|
||||||
item.name = item.routePath
|
item.name = item.routePath
|
||||||
item.keepalive = item.routePath
|
item.keepalive = item.routePath
|
||||||
item.component = item.routeName.indexOf('/src/views/') > -1 ? item.routeName : `/src/views/${item.routeName}/index.vue`
|
item.component = item.routeName ? item.routeName.indexOf('/src/views/') > -1 ? item.routeName : `/src/views/${item.routeName}/index.vue` : ''
|
||||||
item.type = item.children && item.children.length > 0 ? 'menu_dir' : 'menu'
|
item.type = item.children && item.children.length > 0 ? 'menu_dir' : 'menu'
|
||||||
item.menu_type = item.children && item.children.length > 0 ? null : 'tab'
|
item.menu_type = item.children && item.children.length > 0 ? null : 'tab'
|
||||||
if (item.children) {
|
if (item.children) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export default defineConfig({
|
|||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://192.168.1.125:10215', //数据中心
|
target: 'http://192.168.1.81:10215', //数据中心
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''
|
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user