diff --git a/examples/router/axios.js b/examples/router/axios.js index 09c44703..76e20ca9 100644 --- a/examples/router/axios.js +++ b/examples/router/axios.js @@ -9,10 +9,12 @@ let baseURLs = { instance.defaults.baseURL = baseURLs[process.env.NODE_ENV] instance.interceptors.request.eject(0); instance.interceptors.request.use(config => { - if (/\/xiushan/.test(location.pathname)) { + if (config.url.startsWith("/node")) { + config.baseURL = "/ns" + } else if (/\/xiushan/.test(location.pathname)) { config.baseURL = "/xsjr" config.url = config.url.replace(/(app|auth|admin)\//, "") - }else if (/project\/oms/.test(location.pathname)) { + } else if (/project\/oms/.test(location.pathname)) { config.baseURL = "/omsapi" config.url = config.url.replace(/(app|auth|admin)\//, "") } diff --git a/project/oms/apps/AppDeploy/AppDeploy.vue b/project/oms/apps/AppDeploy/AppDeploy.vue new file mode 100644 index 00000000..cd41b706 --- /dev/null +++ b/project/oms/apps/AppDeploy/AppDeploy.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/vue.config.js b/vue.config.js index 3081d842..f365a93e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -79,6 +79,14 @@ module.exports = { '^/omsapi': '/' } }, + '/ns': { + target: 'http://localhost:12525', + changeOrigin: true, + pathRewrite: { + //地址重写 + '^/ns': '/' + } + }, '/xsjr': { target: 'http://192.168.1.87:39898', changeOrigin: true,