mirror of https://gitee.com/xiaonuobase/snowy
【更新】统一api前缀添加方法
parent
9ce672a9a6
commit
b57c9329a8
|
@ -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)
|
||||
/**
|
||||
* 登录
|
||||
*
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue