From 3cadafe2cae47c39ce4aa0d4576435245205858e Mon Sep 17 00:00:00 2001 From: wangpeng Date: Mon, 17 Jun 2024 18:03:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 15 +++++++++++++-- package.json | 2 +- .../classManage/components/StudentList.vue | 6 +++--- .../components/AllStrengthenDetailsList.vue | 2 +- .../components/ClassStrengthenDetailsList.vue | 2 +- .../components/StudentStrengthenDetailsList.vue | 2 +- .../all_corp_effect/components/list.vue | 2 +- .../studyResource/examdraft/components/edit.vue | 2 +- src/views/studyResource/paper/components/edit.vue | 2 +- .../studyResource/paper/components/inherit.vue | 2 +- src/views/studyResource/question/index.vue | 2 +- src/views/system/corpinfo/components/corpEdit.vue | 2 +- static/config.js | 9 +++------ 13 files changed, 29 insertions(+), 21 deletions(-) diff --git a/config/index.js b/config/index.js index f6ea675..82b8418 100644 --- a/config/index.js +++ b/config/index.js @@ -9,10 +9,21 @@ module.exports = { // Paths assetsSubDirectory: 'static', assetsPublicPath: '/', - proxyTable: {}, + // proxyTable: {}, + proxyTable: { + '/api': { + target: 'http://192.168.0.106:7080', + // target: 'http://39.101.166.211:8071/integrated_traffic_admin', + secure: true, // 如果是 https ,需要开启这个选项 + changeOrigin: true, // 是否是跨域请求?肯定是啊,不跨域就没有必要配置这个proxyTable了. + pathRewrite: { + '^/api': '' // 和下边两种写法,因人而异根据需求。 + } + } + }, // Various Dev Server settings - host: 'localhost', // can be overwritten by process.env.HOST + host: '0.0.0.0', // 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, diff --git a/package.json b/package.json index 87d8c01..0922689 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "", "private": true, "scripts": { - "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.0.69 --open", + "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.0.106 --open", "start": "npm run dev", "unit": "jest --config test/unit/jest.conf.js --coverage", "e2e": "node test/e2e/runner.js", diff --git a/src/views/classManage/classManage/components/StudentList.vue b/src/views/classManage/classManage/components/StudentList.vue index 12245a6..a2d1c89 100644 --- a/src/views/classManage/classManage/components/StudentList.vue +++ b/src/views/classManage/classManage/components/StudentList.vue @@ -129,11 +129,11 @@ - +