修改请求后缀

This commit is contained in:
2024-12-26 14:45:14 +08:00
parent 761d28de86
commit 3f7f1877ae
8 changed files with 19 additions and 19 deletions

View File

@@ -13,9 +13,9 @@ const http = axios.create({
}
})
// const requestURl = "http://localhost:8100/sqx_fast/";
const requestURl = "https://video.hnsiyao.cn/sqx_fast/";
// const requestURl = "https://dj-api.hnsiyao.cn/sqx_fast/";
// const requestURl = "http://localhost:8100/czg/";
const requestURl = "https://video.hnsiyao.cn/czg/";
// const requestURl = "https://dj-api.hnsiyao.cn/czg/";
/**
* 请求拦截
@@ -48,8 +48,8 @@ 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 'http://192.168.0.132:8184/sqx_fast/' + actionName
// return 'https://duanjudl.xianmxkj.co/sqx_fast/' + actionName
// return 'http://192.168.0.132:8184/czg/' + actionName
// return 'https://duanjudl.xianmxkj.co/czg/' + actionName
actionName = actionName.replace(/^\//, "");
return requestURl + actionName
@@ -57,8 +57,8 @@ http.adornUrl = (actionName) => {
http.adornUrlUp = (actionName) => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
// return 'http://192.168.0.132:8183/sqx_fast/' + actionName
// return 'https://duanjudl.xianmxkj.co/sqx_fast/' + actionName
// return 'http://192.168.0.132:8183/czg/' + actionName
// return 'https://duanjudl.xianmxkj.co/czg/' + actionName
actionName = actionName.replace(/^\//, "");
return requestURl + actionName