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

57 lines
1.1 KiB

2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
1 month ago
2 months 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. throttle : 200,
  20. // header: {
  21. // 'Content-Type': 'application/x-www-form-urlencoded'
  22. // },
  23. showLoading: true
  24. })
  25. },
  26. // 获取公众号签名
  27. async getSignPackage(data) {
  28. return http({
  29. url: '/login/getSignPackage',
  30. method: 'POST',
  31. data,
  32. // header: {
  33. // 'Content-Type': 'application/x-www-form-urlencoded'
  34. // },
  35. })
  36. },
  37. // 获取用户信息
  38. async getUserInfo() {
  39. return http({
  40. url: '/login/getUserInfo',
  41. method: 'GET',
  42. needToken: true
  43. })
  44. },
  45. // 更新用户信息
  46. async updateUserInfo(data) {
  47. return http({
  48. url: '/login/updateUserInfo',
  49. method: 'POST',
  50. data,
  51. needToken: true
  52. })
  53. }
  54. }