index.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. import { api } from '../config/env.js'
  2. import { request } from '../utils/request.js'
  3. // 群类型
  4. export const getGroupCate = () => request({ url: '/miniprogram/study/study-group/cate' })
  5. // 群列表
  6. export const getGroupList = ({
  7. cate,
  8. keyWord,
  9. page,
  10. limit,
  11. cityId
  12. }) => request({
  13. url: '/miniprogram/study/study-group/list',
  14. data: {
  15. cate,
  16. keyWord,
  17. page,
  18. limit,
  19. cityId
  20. }
  21. })
  22. // 新群列表(2020.07.14)
  23. export const getGroupListNew = ({
  24. page,
  25. limit,
  26. cityId,
  27. keyWord
  28. }) => request({
  29. url: '/jcgi/operation/portal/studygroup/list',
  30. data: {
  31. page,
  32. limit,
  33. cityId,
  34. keyWord
  35. }
  36. })
  37. // 群发布
  38. export const groupCreate = ({
  39. title,
  40. cate,
  41. weChat,
  42. avatar,
  43. remark,
  44. introduce,
  45. img,
  46. cityId
  47. }) => request({
  48. url: '/miniprogram/study/study-group/add',
  49. data: {
  50. title,
  51. cate,
  52. weChat,
  53. avatar,
  54. remark,
  55. introduce,
  56. img,
  57. cityId
  58. }
  59. })
  60. // 群编辑
  61. export const groupEdit = ({
  62. id,
  63. title,
  64. cate,
  65. weChat,
  66. avatar,
  67. remark,
  68. introduce,
  69. img,
  70. cityId
  71. }) => request({
  72. url: '/miniprogram/study/study-group/edit',
  73. data: {
  74. id,
  75. title,
  76. cate,
  77. weChat,
  78. avatar,
  79. remark,
  80. introduce,
  81. img,
  82. cityId
  83. }
  84. })
  85. // 群详情
  86. export const getGroupDetail = ({ id }) => request({
  87. url: '/miniprogram/study/study-group/details',
  88. data: { id }
  89. })
  90. // 新群详情(2020.07.14)
  91. export const getGroupDetailNew = ({ id }) => request({
  92. url: '/jcgi/operation/portal/studygroup/info',
  93. data: { id }
  94. })
  95. // 群删除
  96. export const groupDelete = ({ id }) => request({
  97. url: '/miniprogram/study/study-group/del',
  98. data: { id }
  99. })
  100. // 发布的群列表
  101. export const getMyGroup = ({
  102. page,
  103. limit
  104. }) => request({
  105. url: '/miniprogram/study/study-group/my-groups',
  106. data: {
  107. page,
  108. limit
  109. }
  110. })
  111. // 城市数据
  112. export const getCityData = (data) => request({
  113. url: '/miniprogram/study/study-group/city-list',
  114. data
  115. })
  116. // 新城市数据(2020.07.14)
  117. export const getCityDataNew = (data) => request({
  118. url: '/jcgi/operation/portal/studygroup/cityList',
  119. data
  120. })
  121. // 新城市数据(2020.07.24)
  122. export const getCityDataNew1 = (data) => request({
  123. url: '/jcgi/operation/portal/studygroup/address',
  124. data
  125. })
  126. // 上传
  127. export const uploadFileApi = () => api + '/common/upload/files'
  128. // 服务状态
  129. export const getAppStatus = () => request({
  130. url: '/miniprogram/study/study-group/reviewed'
  131. })