提交 0c903954 作者: 郁骅焌

修改

上级 71a4d1e9
......@@ -14,7 +14,7 @@ node('jenkins-jnlp') {
sh "ln -s /opt/node-v18.18.0-linux-x64-glibc-217/bin/npx /usr/bin/npx"
sh "ln -s /opt/node-v18.18.0-linux-x64-glibc-217/bin/yarn /usr/bin/yarn"
sh "yarn install"
sh "# yarn install"
sh "yarn run build:prod"
}
//dockerfile编译
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -43,7 +43,9 @@ const usePermissionStore = defineStore(
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
const defaultRoutes = filterAsyncRouter(defaultData)
const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
asyncRoutes.forEach(route => { router.addRoute(route) })
asyncRoutes.forEach(route => {
router.addRoute(route)
})
this.setRoutes(rewriteRoutes)
this.setSidebarRouters(constantRoutes.concat(sidebarRoutes))
this.setDefaultRoutes(sidebarRoutes)
......@@ -129,10 +131,17 @@ export function filterDynamicRoutes(routes) {
}
export const loadView = (view) => {
let newView = ''
if (view.includes('views/')) {
newView = view.split('views/')[1]
} else {
newView = view
}
let res;
for (const path in modules) {
const dir = path.split('views/')[1].split('.vue')[0];
if (dir === view) {
if (dir === newView) {
res = () => modules[path]();
}
}
......
......@@ -31,7 +31,7 @@ export default defineConfig(({ mode, command }) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://localhost:8080',
target: 'http://139.196.169.103:9003',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论