From 0afc0cecb4f265872f549aa8cc3bd2761bbd055c Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 16 Jul 2024 18:00:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-screen/config/index.js | 60 ++++++++++++++++----------------- sgzb-screen/src/router/index.js | 1 + 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/sgzb-screen/config/index.js b/sgzb-screen/config/index.js index 29b3c331..17a35939 100644 --- a/sgzb-screen/config/index.js +++ b/sgzb-screen/config/index.js @@ -2,23 +2,23 @@ const path = require('path') -var proxyUrl = +var proxyUrl = -module.exports = { - dev: { - // Paths - assetsSubDirectory: 'static', - assetsPublicPath: '/', - host: 'localhost', // can be overwritten by process.env.HOST - port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined - autoOpenBrowser: false, - errorOverlay: true, - notifyOnErrors: true, - poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- - devtool: 'cheap-module-eval-source-map', - cacheBusting: true, - cssSourceMap: true, - proxyTable: { + module.exports = { + dev: { + // Paths + assetsSubDirectory: 'static', + assetsPublicPath: '/', + host: 'localhost', // can be overwritten by process.env.HOST + port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined + autoOpenBrowser: false, + errorOverlay: true, + notifyOnErrors: true, + poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- + devtool: 'cheap-module-eval-source-map', + cacheBusting: true, + cssSourceMap: true, + proxyTable: { '/screen': { // target: 'http://112.29.103.165:21626',//重庆 target: 'http://192.168.0.14:21624',//测试 @@ -26,21 +26,21 @@ module.exports = { changeOrigin: true, // secure: true, //如果是https接口,需要配置这个参数 pathRewrite: { - '^/screen': '/' + '^/screen': '/' } }, + } + }, + build: { + index: path.resolve(__dirname, '../dist/index01.html'), + // Paths + assetsRoot: path.resolve(__dirname, '../dist'), + assetsSubDirectory: 'static01', + assetsPublicPath: '/bigScrap', + productionSourceMap: false, + devtool: '#source-map', + productionGzip: false, + productionGzipExtensions: ['js', 'css'], + bundleAnalyzerReport: process.env.npm_config_report } - }, - build: { - index: path.resolve(__dirname, '../dist/index01.html'), - // Paths - assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: 'static01', - assetsPublicPath: '/', - productionSourceMap: false, - devtool: '#source-map', - productionGzip: false, - productionGzipExtensions: ['js', 'css'], - bundleAnalyzerReport: process.env.npm_config_report } -} diff --git a/sgzb-screen/src/router/index.js b/sgzb-screen/src/router/index.js index c798fca5..8a1a6f2e 100644 --- a/sgzb-screen/src/router/index.js +++ b/sgzb-screen/src/router/index.js @@ -63,6 +63,7 @@ const routes = [ const router = new Router({ mode: 'history', routes, + base: '/bigScrap' }) router.beforeEach(async (to, from, next) => {