调整接口走代理
This commit is contained in:
@@ -2,7 +2,7 @@ import config from '@/config'
|
||||
// import urlMap from '@/config/urlMap'
|
||||
|
||||
export default function getUrl(url, domainType = 'admin') {
|
||||
let domain = process.env.VUE_APP_ADMIN || ''
|
||||
let domain = config[domainType] || ''
|
||||
return domain + url
|
||||
// return 'https://ecotest.happyinsurance.com.cn:4443/api' + url
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
let envInfo = process.env
|
||||
let [admin] = [envInfo.VUE_APP_ADMIN]
|
||||
let [admin] = ['/api']
|
||||
|
||||
export default {
|
||||
admin,
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = {
|
||||
https: false,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:7100',
|
||||
target: 'https://ecotest.happyinsurance.com.cn:4443/api',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user