customer.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. import request from '@/utils/request'
  2. //* ******************** 客户管理 *********************
  3. // 添加标签
  4. export function addLabel(data) {
  5. return request({
  6. url: '/user_label/save',
  7. method: 'post',
  8. data
  9. })
  10. }
  11. // 标签管理查询
  12. export function getLabels(data) {
  13. return request({
  14. url: '/user_label/getAll',
  15. method: 'post',
  16. data
  17. })
  18. }
  19. // 修改标签
  20. export function labelUpdate(data) {
  21. return request({
  22. url: '/user_label/update',
  23. method: 'post',
  24. data
  25. })
  26. }
  27. // 删除标签
  28. export function deleteLabel(data) {
  29. return request({
  30. url: '/user_label/delete',
  31. method: 'post',
  32. data
  33. })
  34. }
  35. // 标签编辑查询
  36. export function labelEdit(data) {
  37. return request({
  38. url: '/user_label/getById',
  39. method: 'post',
  40. data
  41. })
  42. }
  43. // 商家标签列表
  44. export function getLabelData() {
  45. return request({
  46. url: '/buyer/getLabels',
  47. method: 'post'
  48. })
  49. }
  50. // 客户列表
  51. export function getCustomerList(data) {
  52. return request({
  53. url: '/buyer/getAll',
  54. method: 'post',
  55. data
  56. })
  57. }
  58. // 客户详情
  59. export function getCustomerDetail(data) {
  60. return request({
  61. url: '/buyer/getById',
  62. method: 'post',
  63. data
  64. })
  65. }
  66. // 添加客户
  67. export function addCustomer(data) {
  68. return request({
  69. url: '/buyer/save',
  70. method: 'post',
  71. data
  72. })
  73. }
  74. // 修改客户信息
  75. export function updateCustomer(data) {
  76. return request({
  77. url: '/buyer/update',
  78. method: 'post',
  79. data
  80. })
  81. }
  82. // 客户分群
  83. // 人群列表查询
  84. export function getCrowd(data) {
  85. return request({
  86. url: '/crowd/getAll',
  87. method: 'post',
  88. data
  89. })
  90. }
  91. // 添加人群
  92. export function addCrowd(data) {
  93. return request({
  94. url: '/crowd/save',
  95. method: 'post',
  96. data
  97. })
  98. }
  99. // 删除人群
  100. export function deleteCrowd(data) {
  101. return request({
  102. url: '/crowd/delete',
  103. method: 'post',
  104. data
  105. })
  106. }
  107. // 查看客户
  108. export function getUsers(data) {
  109. return request({
  110. url: '/crowd/getUsers',
  111. method: 'post',
  112. data
  113. })
  114. }
  115. // 人群详情查询
  116. export function getCrowdDetail(data) {
  117. return request({
  118. url: '/crowd/getById',
  119. method: 'post',
  120. data
  121. })
  122. }
  123. // 修改人群
  124. export function crowdUpdate(data) {
  125. return request({
  126. url: '/crowd/update',
  127. method: 'post',
  128. data
  129. })
  130. }
  131. // 添加分组
  132. export function groupSave(data) {
  133. return request({
  134. url: '/group/save',
  135. method: 'post',
  136. data
  137. })
  138. }
  139. // 选择人群查询
  140. export function selectCrowdData(data) {
  141. return request({
  142. url: '/operate/selectCrowd',
  143. method: 'post',
  144. data
  145. })
  146. }
  147. // 选择优惠券查询
  148. export function getSelectCoupon(data) {
  149. return request({
  150. url: '/operate/selectCoupon',
  151. method: 'post',
  152. data
  153. })
  154. }
  155. // 新增运营计划
  156. export function saveOperate(data) {
  157. return request({
  158. url: '/operate/saveOperate',
  159. method: 'post',
  160. data
  161. })
  162. }
  163. // 修改运营计划
  164. export function operateUpdate(data) {
  165. return request({
  166. url: '/operate/update',
  167. method: 'post',
  168. data
  169. })
  170. }
  171. // 运营计划列表查询
  172. export function getOperateList(data) {
  173. return request({
  174. url: '/operate/getAll',
  175. method: 'post',
  176. data
  177. })
  178. }
  179. // 运营计划详情查询
  180. export function getOperateDetail(data) {
  181. return request({
  182. url: '/operate/getById',
  183. method: 'post',
  184. data
  185. })
  186. }
  187. // 运营计划数据查询
  188. export function getDatasInfo(data) {
  189. return request({
  190. url: '/operate/getDatas',
  191. method: 'post',
  192. data
  193. })
  194. }
  195. // 删除运营计划
  196. export function deleteOperate(data) {
  197. return request({
  198. url: '/operate/delete',
  199. method: 'post',
  200. data
  201. })
  202. }
  203. // 加标签
  204. export function buyerSaveLabel(data) {
  205. return request({
  206. url: '/buyer/saveLabel',
  207. method: 'post',
  208. data
  209. })
  210. }
  211. // 导出
  212. export function userExport(data) {
  213. return request({
  214. url: '/buyer/export',
  215. method: 'post',
  216. data,
  217. responseType: 'blob'
  218. })
  219. }