Parcourir la source

feat(KIP-6765): vue.config.js 路径指向

John-Hong il y a 2 ans
Parent
commit
54eb27e8c4
1 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 6 2
      vue.config.js

+ 6 - 2
vue.config.js

@@ -5,7 +5,11 @@ const CDN_URL = process.env.CDN_URL || '';
 
 module.exports = {
   publicPath:
-    process.env.NODE_ENV === 'production' ? (CDN_URL ? CDN_URL : '/') : '/',
+    process.env.NODE_ENV === 'production'
+      ? CDN_URL
+        ? CDN_URL
+        : '/tparking/'
+      : '/tparking/',
   assetsDir: 'static',
   css: {
     loaderOptions: {
@@ -92,7 +96,7 @@ module.exports = {
         },
       },
       '/qaPayment': {
-          target: 'https://qa-apim.kerryplus.com/c/api/payment/v1', //代理地址,这里设置的地址会代替axios中设置的baseURL
+        target: 'https://qa-apim.kerryplus.com/c/api/payment/v1', //代理地址,这里设置的地址会代替axios中设置的baseURL
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
         //ws: true, // proxy websockets
         //pathRewrite方法重写url