api.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. import { baseUrl } from "./config.js";
  2. import { getHttp, postHttp } from "./request.js";
  3. import { Reports } from "./modules/Reports";
  4. import { activity } from "./modules/activity";
  5. import { Home } from "./modules/Home";
  6. import { User } from "./modules/User";
  7. import { Report } from "./modules/ReportArticle";
  8. import { Research } from "./modules/Research";
  9. import { MsgTemplate } from "./modules/Msg";
  10. import { purchaserApi } from "./modules/purchaser";
  11. export { Reports, activity, Home, User, Report, Research, MsgTemplate, purchaserApi };
  12. /* 上传 */
  13. export const uploadurl = baseUrl + "/resource/image/upload";
  14. // 校验token接口
  15. export const checkToken = (params) => {
  16. return getHttp("/user/check/status", params, 0);
  17. };
  18. /* 个人中心 */
  19. export const Mine = {
  20. /* 我的收藏列表 PageSize CurrentIndex */
  21. getCollect: (params) => {
  22. return getHttp("/user/collect/list", params);
  23. },
  24. /* 用户信息 */
  25. getInfo: (params) => {
  26. return getHttp("/user/detail", params, 0);
  27. },
  28. /* 获取访谈列表 PageSize CurrentIndex*/
  29. getInterview: (params) => {
  30. return getHttp("/user/interview/apply/list", params);
  31. },
  32. /* 获取浏览历史 */
  33. getHistory: (params) => {
  34. return getHttp("/user/browse/history/list", params);
  35. },
  36. /* 优化建议 */
  37. advice: (params) => {
  38. return postHttp("/advice/add", params);
  39. },
  40. /* 活动扫码签到 */
  41. activity_signin_detail: (params) => {
  42. return getHttp("/activity_signin/detail", params);
  43. },
  44. /* 活动扫码手动签到 */
  45. activity_signin_byHand: (params) => {
  46. return postHttp("/activity_signin/byHand", params);
  47. },
  48. /* 关于我们浏览记录 */
  49. addHistory: (params) => {
  50. return postHttp("/config/aboutUs/addHistory", params);
  51. },
  52. /* 上传文章阅读时间 */
  53. report_selectionAddStopTime: (params) => {
  54. return postHttp("/report_selection/addStopTime", params);
  55. },
  56. };
  57. /* 搜索 */
  58. export const Search = {
  59. /* 获取搜索推荐词 */
  60. getKeys: (params) => {
  61. return getHttp("/config/detail", params, 0);
  62. },
  63. /* 搜索 KeyWord */
  64. getResult: (params) => {
  65. return getHttp("/search/list", params, 0);
  66. },
  67. /* 报告搜索 KeyWord */
  68. getResultReport: (params) => {
  69. return getHttp("/search/report/list", params, 0);
  70. },
  71. /* 报告 KeyWord 素材库*/
  72. getArtAndChartList: (params) => {
  73. return getHttp("/search/artAndChart/listPage", params, 0);
  74. },
  75. /* 综合搜索接口 */
  76. getComprehensiveList: (params) => {
  77. return getHttp("/search/comprehensive/list", params, 0);
  78. },
  79. };
  80. /* 图标 */
  81. export const Chart = {
  82. /*图表标签分类接口*/
  83. getChartPatg: (params) => {
  84. return getHttp("/chart/patg", params);
  85. },
  86. /*我的收藏接口*/
  87. getChartcollection: (params) => {
  88. return getHttp("/chart/my/collection", params);
  89. },
  90. /*删除我的收藏接口*/
  91. myChartCollect: (params) => {
  92. return postHttp("/chart/collect", params);
  93. },
  94. /*图表的详情*/
  95. myChartDetail: (params) => {
  96. return getHttp("/chart/detail", params);
  97. },
  98. /*图表的详情*/
  99. myChartTop: (params) => {
  100. return postHttp("/chart/top", params);
  101. },
  102. };
  103. /* 免费送月卡 */
  104. export const FreeButton = {
  105. /*获取是否展示免费试用按钮接口*/
  106. userIsShowFreeButton: (params) => {
  107. return getHttp("/user/isShow/freeButton", params, 0);
  108. },
  109. /* 隐藏当天的按钮接口 */
  110. userFreeButtonUpdate: (params) => {
  111. return postHttp("/user/freeButton/update", params, 0);
  112. },
  113. /*分享的时候判断是不是弘则的手机号*/
  114. userIsShowShare: (params) => {
  115. return getHttp("/user/isShow/share", params, 0);
  116. },
  117. /*获取权限弹窗是否展示免费月卡接口*/
  118. userIsShowAlert: (params) => {
  119. return getHttp("/user/isShow/alert", params, 0);
  120. },
  121. /*获取权限弹窗是否展示免费月卡接口*/
  122. wechatShareImage: (params) => {
  123. return postHttp("/wechat/shareImage", params, 0);
  124. },
  125. };