auth.js 713 B

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