网络请求双斜杠处理

This commit is contained in:
GYJ 2024-12-03 15:51:48 +08:00
parent c53ad0bb47
commit f4860d90e8
2 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,7 @@ module.exports = {
},
build: {
// publicPath: '/admin/',
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),

View File

@ -45,6 +45,7 @@ http.adornUrl = (actionName) => {
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
// return 'http://192.168.0.132:8100/sqx_fast/' + actionName
// return 'https://duanjuadmin.xianmxkj.com/sqx_fast/' + actionName
actionName = actionName.replace(/^\//, "");
return 'https://video.hnsiyao.cn/sqx_fast/' + actionName
}
@ -53,12 +54,14 @@ http.adornUrlUp = (actionName) => {
// 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://duanjuadmin.xianmxkj.com/sqx_fast/' + actionName
actionName = actionName.replace(/^\//, "");
return 'https://video.hnsiyao.cn/sqx_fast/' + actionName
}
http.adornUrlWX = (actionName) => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
actionName = actionName.replace(/^\//, "");
return '/weixin/' + actionName
// return 'https://api.weixin.qq.com/' + actionName
// return 'https://video.hnsiyao.cn/sqx_fast/' + actionName