四零语境前端代码仓库
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.

56 lines
1.1 KiB

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 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 getSignPackage(data) {
  27. return http({
  28. url: '/login/getSignPackage',
  29. method: 'POST',
  30. data,
  31. // header: {
  32. // 'Content-Type': 'application/x-www-form-urlencoded'
  33. // },
  34. })
  35. },
  36. // 获取用户信息
  37. async getUserInfo() {
  38. return http({
  39. url: '/login/getUserInfo',
  40. method: 'GET',
  41. needToken: true
  42. })
  43. },
  44. // 更新用户信息
  45. async updateUserInfo(data) {
  46. return http({
  47. url: '/login/updateUserInfo',
  48. method: 'POST',
  49. data,
  50. needToken: true
  51. })
  52. }
  53. }