FlowPacs/yudao-ui-app/api/auth.js
chaining 7664b8a3d6
fix:修复令牌过期无法刷新令牌的bug
Signed-off-by: chaining <ning.chai@qq.com>
2023-01-09 02:59:27 +00:00

16 lines
715 B
JavaScript

//请求工具参考https://ext.dcloud.net.cn/plugin?id=392
const { http } = uni.$u
//使用手机 + 密码登录
export const passwordLogin = data => http.post('/member/auth/login', data)
//发送手机验证码
export const sendSmsCode = data => http.post('/member/auth/send-sms-code', data)
//使用手机 + 验证码登录
export const smsLogin = data => http.post('/member/auth/sms-login', data)
//微信小程序的一键登录
export const weixinMiniAppLogin = data => http.post('/member/auth/weixin-mini-app-login', data)
//刷新令牌
export const refreshToken = data => http.post('/member/auth/refresh-token', {data})
//退出登录
export const logout = data => http.post('/member/auth/logout', data)