|
|
@@ -8,12 +8,12 @@ const path = require('path');
|
|
|
|
|
|
const isProduction = process.env.NODE_ENV === 'production';
|
|
|
|
|
|
+const proxyTarget = process.env.NODE_ENV === 'local' ? 'http://api.shop.hhb.com' : 'http://api.shop.huaml.com';
|
|
|
+
|
|
|
function resolve(dir) {
|
|
|
return path.join(__dirname, dir);
|
|
|
}
|
|
|
|
|
|
-// const hostUrl = `${window.location.protocol}//static.${getFirstHost()}.com`;
|
|
|
-// const hostUrl = `https://static.huaml.com`;
|
|
|
const hostUrl = ``;
|
|
|
|
|
|
const cdn = {
|
|
|
@@ -40,8 +40,6 @@ const cdn = {
|
|
|
`${hostUrl}/cdn/viewerjs/1.3.7/viewer.min.js`,
|
|
|
`${hostUrl}/cdn/echarts/4.4.0-rc.1/echarts.min.js`,
|
|
|
`${hostUrl}/cdn/npm/vue-echarts@4.0.2.js`
|
|
|
- // https://cdn.bootcss.com
|
|
|
- // 'https://cdn.jsdelivr.net/npm/vue-echarts@4.0.2'
|
|
|
]
|
|
|
}
|
|
|
};
|
|
|
@@ -79,20 +77,17 @@ module.exports = {
|
|
|
|
|
|
proxy: {
|
|
|
'/dev': {
|
|
|
- target: 'http://api.shop.huaml.com',
|
|
|
-
|
|
|
+ target: proxyTarget,
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: { '^/dev': '' }
|
|
|
},
|
|
|
'/s-dev': {
|
|
|
- target: 'http://api.shop.huaml.com',
|
|
|
-
|
|
|
+ target: proxyTarget,
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: { '^/s-dev': '' }
|
|
|
},
|
|
|
'/pro': {
|
|
|
- target: 'http://api.shop.huaml.com',
|
|
|
-
|
|
|
+ target: proxyTarget,
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: { '^/pro': '/api' }
|
|
|
}
|