api按模块单独配置文件

This commit is contained in:
sfmind
2022-05-01 22:39:16 +08:00
parent 083daa657d
commit f7d384e55d
10 changed files with 55 additions and 40 deletions

12
yudao-ui-app/api/auth.js Normal file
View File

@ -0,0 +1,12 @@
//请求工具参考https://ext.dcloud.net.cn/plugin?id=392
const { http } = uni.$u
//使用手机 + 密码登录
export const passwordLogin = data => http.post('/app-api/member/login', data)
//退出登录
export const logout = data => http.post('/app-api/member/logout', data)
//发送手机验证码
export const sendSmsCode = data => http.post('/app-api/member/send-sms-code', data)
//使用手机 + 验证码登录
export const smsLogin = data => http.post('/app-api/member/sms-login', data)