【更新】统一api前缀添加方法

pull/235/head
lihui 2024-09-23 17:52:59 +08:00
parent 9ce672a9a6
commit b57c9329a8
2 changed files with 2 additions and 9 deletions

View File

@ -8,9 +8,9 @@
* 5.不可二次分发开源参与同类竞品如有想法可联系团队xiaonuobase@qq.com商议合作
* 6.若您的项目无法满足以上几点需要更多功能代码获取Snowy商业授权许可请在官网购买授权地址为 https://www.xiaonuo.vip
*/
import { moduleRequest } from '@/utils/request'
import { baseRequest } from '@/utils/request'
const request = moduleRequest(`/auth/b/`)
const request = (url, ...arg) => baseRequest(`/auth/b/` + url, ...arg)
/**
* 登录
*

View File

@ -175,11 +175,4 @@ export const baseRequest = (url, value = {}, method = 'post', options = {}) => {
}
}
// 模块内的请求, 会自动加上模块的前缀
export const moduleRequest =
(moduleUrl) =>
(url, ...arg) => {
return baseRequest(moduleUrl + url, ...arg)
}
export default service