diff --git a/src/assets/js/utils/get-url.js b/src/assets/js/utils/get-url.js index 3d93bca..aa9fac1 100644 --- a/src/assets/js/utils/get-url.js +++ b/src/assets/js/utils/get-url.js @@ -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 } diff --git a/src/config/index.js b/src/config/index.js index b63147b..841fc58 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,5 +1,5 @@ let envInfo = process.env -let [admin] = [envInfo.VUE_APP_ADMIN] +let [admin] = ['/api'] export default { admin, diff --git a/vue.config.js b/vue.config.js index 65da41d..f395146 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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/, ''), },