user.js 816 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { request } from '@/api/config.js'
  2. // 登录方法
  3. export function loginByWeixinApi(data) {
  4. return request({
  5. url: '/wx/account/loginByWeixin',
  6. headers: {
  7. isToken: false,
  8. },
  9. method: 'post',
  10. data: data,
  11. })
  12. }
  13. export function userInfoApi(data) {
  14. return request({
  15. url: '/wx/account/info',
  16. method: 'get',
  17. data: data,
  18. })
  19. }
  20. // 注销账号
  21. export function logOffApi(data) {
  22. return request({
  23. url: '/wx/account/logOff',
  24. method: 'post',
  25. data: data,
  26. })
  27. }
  28. // 绑定手机号
  29. export function bindPhoneApi(data) {
  30. return request({
  31. url: '/wx/account/bindPhone',
  32. method: 'post',
  33. data: data,
  34. })
  35. }
  36. // 更新用户信息
  37. export function profileApi(data) {
  38. return request({
  39. url: '/wx/account/profile',
  40. method: 'post',
  41. data: data,
  42. })
  43. }