This commit is contained in:
刘玉霞 2024-06-27 14:58:56 +08:00
parent 2ff56a2579
commit 56aa7d0735
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ VITE_BASE_PATH = './'
# 代理配置(开发使用),必须在一行中 # 代理配置(开发使用),必须在一行中
# VITE_APP_PROXY=[["/api","http://192.168.130.12:8080/api"]] # VITE_APP_PROXY=[["/api","http://192.168.130.12:8080/api"]]
VITE_APP_PROXY=[["/api","http://192.168.109.195:8080/api"]] VITE_APP_PROXY=[["/api","https://test.jsspisoft.com/api"]]
# 开发环境下跨域代理请输入要跨域的api地址 - 尾部无需带'/' # 开发环境下跨域代理请输入要跨域的api地址 - 尾部无需带'/'

View File

@ -358,10 +358,10 @@ function transformNode(node: any) {
type: node.parentMenuId == 0 ? 'menu_dir' : 'menu', type: node.parentMenuId == 0 ? 'menu_dir' : 'menu',
title: node.menuName, title: node.menuName,
name: node.menuName.replace(/\s+/g, ''), name: node.menuName.replace(/\s+/g, ''),
path: node.parentMenuId == 0 ? '测试菜单' : node.menuName, path: node.menuName,
icon: node.menuIcon, icon: node.menuIcon,
menu_type: node.parentMenuId == 0 ? null : 'tab', menu_type: node.parentMenuId == 0 ? null : 'tab',
component: node.parentMenuId == 0 ? '' : `/src/views/backend/测试菜单${node.funParam.replace(/\s+/g, '')}/index.vue`, component: node.parentMenuId == 0 ? '' : '/src/views/backend/' + node.funParam,
extend: 'none', extend: 'none',
children: node.children.map(transformNode), children: node.children.map(transformNode),
} }
@ -369,7 +369,7 @@ function transformNode(node: any) {
const init = () => { const init = () => {
menuTree().then((res: any) => { menuTree().then((res: any) => {
console.log('🚀 ~ menusLoginTree ~ res:', res) console.log('🚀 ~ menusLoginTree ~ res:', res)
const menu = transformNode(res.data) const menu = [transformNode(res.data)]
console.log('🚀 ~ menusLoginTree ~ menu:', menu) console.log('🚀 ~ menusLoginTree ~ menu:', menu)
handleAdminRoute(menu) handleAdminRoute(menu)
if (route.params.to) { if (route.params.to) {