Parcourir la source

TBtools-接口请求域名

panyong il y a 3 ans
Parent
commit
3e198c4512

+ 1 - 1
htmldev/TBTools/config/index.js

@@ -14,7 +14,7 @@ module.exports = {
     // 代理列表, 是否开启代理通过[./dev.env.js]配置
     proxyTable: devEnv.OPEN_PROXY === false ? {} : {
       '/proxyApi': {
-        target: 'http://81.68.233.51',
+        target: 'http://dev-test.common-tool.com',
         changeOrigin: true,
         pathRewrite: {
           '^/proxyApi': '/'

+ 1 - 1
htmldev/TBTools/src/utils/httpRequest.js

@@ -42,7 +42,7 @@ http.interceptors.response.use(response => {
  */
 http.adornUrl = (actionName) => {
   // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
-  return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi' : window.SITE_CONFIG.baseUrl) + actionName
+  return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi' : window.SITE_CONFIG.baseUrl) + '/site' + actionName
 }
 
 /**

+ 1 - 1
htmldev/TBTools/static/config/index-prod.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {}
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'https://api.common-tool.com'
+  window.SITE_CONFIG['baseUrl'] = ''
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain'] = './' // 域名

+ 1 - 1
htmldev/TBTools/static/config/index-qa.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {}
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'https://api.common-tool.com'
+  window.SITE_CONFIG['baseUrl'] = ''
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain'] = './' // 域名

+ 1 - 1
htmldev/TBTools/static/config/index-uat.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {}
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'https://api.common-tool.com'
+  window.SITE_CONFIG['baseUrl'] = ''
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain'] = './' // 域名

+ 1 - 1
htmldev/TBTools/static/config/index.js

@@ -5,7 +5,7 @@
   window.SITE_CONFIG = {};
 
   // api接口请求地址
-  window.SITE_CONFIG['baseUrl'] = 'http://81.68.233.51';
+  window.SITE_CONFIG['baseUrl'] = '';
 
   // cdn地址 = 域名 + 版本号
   window.SITE_CONFIG['domain']  = './'; // 域名