Browse Source

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

pull/235/head
lihui 2 months ago
parent
commit
b57c9329a8
  1. 4
      snowy-admin-web/src/api/auth/loginApi.js
  2. 7
      snowy-admin-web/src/utils/request.js

4
snowy-admin-web/src/api/auth/loginApi.js

@ -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)
/**
* 登录
*

7
snowy-admin-web/src/utils/request.js

@ -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…
Cancel
Save