User.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import { getHttp, postHttp } from "../request.js";
  2. /* 用户 */
  3. export const User = {
  4. /*
  5. 微信登录 Code
  6. */
  7. wechatLog: (params) => {
  8. return getHttp("/wechat/login", params, 0);
  9. },
  10. /* 获取手机验证码 Mobile * AreaNum */
  11. getPhoneCode: (params) => {
  12. return getHttp("/wechat/getSmsCode", params);
  13. },
  14. /* 获取邮件验证码 Email */
  15. getEmailCode: (params) => {
  16. return getHttp("/wechat/getEmailCode", params);
  17. },
  18. /*
  19. 传输uid
  20. "EncryptedData": "string",
  21. "Iv": "string",
  22. "RawData": "string",
  23. "Signature": "string"
  24. */
  25. sendInfo: (params) => {
  26. return postHttp("/wechat/getUserInfo", params, 0);
  27. },
  28. /* 获取手机号 "EncryptedData": "string","Iv": "string"*/
  29. getPhoneNum: (params) => {
  30. return postHttp("/wechat/getPhoneNumber", params);
  31. },
  32. /*
  33. 登录 绑定手机号邮箱
  34. "Email": "string",
  35. "LoginType": 0 1手机号 2邮箱,
  36. "Mobile": "string"
  37. */
  38. Bind: (params) => {
  39. return postHttp("/user/login", params);
  40. },
  41. /*
  42. 申请试用
  43. ApplyMethod:
  44. 1:已付费客户申请试用,2:非客户申请试用 3未付费
  45. BusinessCardUrl
  46. CompanyName
  47. RealName
  48. */
  49. applyTry: (params) => {
  50. return postHttp("/user/apply/try", params, 0);
  51. },
  52. //获取是否需要填写区号接口
  53. countryCcode: (params) => {
  54. return getHttp("/user/countryCcode/isNeedAdd", params, 0);
  55. },
  56. //上传用户区号接口
  57. countryCcodeAdd: (params) => {
  58. return postHttp("/user/countryCcode/Add", params, 0);
  59. },
  60. //上传页面访问统计
  61. pageHistory: (params) => {
  62. return postHttp("/config/pageHistory", params, 0);
  63. },
  64. //我的提问
  65. getAskList: (params) => {
  66. return getHttp("/user/ask/list");
  67. },
  68. //更改用户微信头像
  69. headimgurlUpdate: (params) => {
  70. return postHttp("/user/headimgurl/update", params);
  71. },
  72. //我的留言
  73. commentListMessage: (params) => {
  74. return getHttp("/user/comment/list", params);
  75. },
  76. //我的收藏-微路演
  77. getListMicroRoadshow: (params) => {
  78. return getHttp("/micro_roadshow/mycollect", params);
  79. },
  80. // 埋点
  81. getUserTracking: (params) => {
  82. return getHttp("/user/tracking", params,0);
  83. },
  84. //用户搜索记录统计-微路演
  85. userSearchKeyWordLog: (params) => {
  86. return postHttp("/config/user/search/keyWordLog", params);
  87. },
  88. // 用户的文章活动,关注/取消关注产业
  89. userIndustryFollow: (params) => {
  90. return postHttp("/industry/follow", params);
  91. },
  92. };