四零语境前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
839 B

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. // import request from "@/api/request";
  2. import http from "@/api/http";
  3. export default {
  4. // 绑定手机号码
  5. async bindPhone(data) {
  6. return http({
  7. url: '/login/getPhoneNumber',
  8. method: 'POST',
  9. data,
  10. needToken: true
  11. })
  12. },
  13. // 登录
  14. async login(data) {
  15. return http({
  16. url: '/login/wxLogin',
  17. method: 'POST',
  18. data,
  19. // header: {
  20. // 'Content-Type': 'application/x-www-form-urlencoded'
  21. // },
  22. showLoading: true
  23. })
  24. },
  25. // 获取用户信息
  26. async getUserInfo() {
  27. return http({
  28. url: '/login/getUserInfo',
  29. method: 'GET',
  30. needToken: true
  31. })
  32. },
  33. // 更新用户信息
  34. async updateUserInfo(data) {
  35. return http({
  36. url: '/login/updateUserInfo',
  37. method: 'POST',
  38. data,
  39. needToken: true
  40. })
  41. }
  42. }