diff --git a/config/index.js b/config/index.js index 7fc9d8e..9a4e658 100644 --- a/config/index.js +++ b/config/index.js @@ -11,15 +11,16 @@ module.exports = { assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: { - '/api/': { - target: 'http://39.98.54.240:8090/', - changeOrigin: true, - pathRewrire: { - '^/api': '' + '/api':{ + target:"http://39.98.58.92:8090/",//这里设置你要访问的域名(或IP+端口) + changeOrigin:true, + pathRewrite:{ + '^/api':''//base_api是自定义用来代替http://www.baidu.com/的 } } }, + // Various Dev Server settings 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 diff --git a/src/api/parkRecord/parkRecord.js b/src/api/parkRecord/parkRecord.js index 628a111..cb6b024 100644 --- a/src/api/parkRecord/parkRecord.js +++ b/src/api/parkRecord/parkRecord.js @@ -2,7 +2,7 @@ import request from '@/utils/request' export function parkRecordList(params) { return request({ - url: '/queryParkOrder/queryParkingRecordPageByCarNumbers', + url: '/api/queryParkOrder/queryParkingRecordPageByCarNumbers', method: 'post', data: params }) diff --git a/src/components/parkRecord.vue b/src/components/parkRecord.vue index 592d41d..5079fc0 100644 --- a/src/components/parkRecord.vue +++ b/src/components/parkRecord.vue @@ -124,6 +124,7 @@