kefu.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. import request from "@/utils/request.js";
  2. /**
  3. * 客服登录
  4. * @param data object 用户账号密码
  5. */
  6. export function kefuLogin(data) {
  7. return request.post("login", data, {
  8. noAuth: true,
  9. kefu: true
  10. });
  11. }
  12. /**
  13. * 获取左侧客服聊天用户列表
  14. * @constructor
  15. */
  16. export function record(data) {
  17. return request.get("user/record", data, {
  18. noAuth: true,
  19. kefu: true
  20. });
  21. }
  22. /**
  23. * 客服话术
  24. * @constructor
  25. */
  26. export function speeChcraft(data) {
  27. return request.get("service/speechcraft", data, {
  28. noAuth: true,
  29. kefu: true
  30. });
  31. }
  32. /**
  33. * 客服转接列表
  34. * @constructor
  35. */
  36. export function transferList(data) {
  37. return request.get("service/transfer_list", data, {
  38. noAuth: true,
  39. kefu: true
  40. });
  41. }
  42. /**
  43. * 商品购买记录
  44. * @constructor
  45. */
  46. export function productCart(id, data) {
  47. return request.get("product/cart/" + id, data, {
  48. noAuth: true,
  49. kefu: true
  50. });
  51. }
  52. /**
  53. * 热销商品
  54. * @constructor
  55. */
  56. export function productHot(id, data) {
  57. return request.get("product/hot/" + id, data, {
  58. noAuth: true,
  59. kefu: true
  60. });
  61. }
  62. /**
  63. * 商品足记
  64. * @constructor
  65. */
  66. export function productVisit(id, data) {
  67. return request.get("product/visit/" + id, data, {
  68. noAuth: true,
  69. kefu: true
  70. });
  71. }
  72. /**
  73. * 客服用户聊天列表
  74. * @constructor
  75. */
  76. export function serviceList(data) {
  77. return request.get("service/list", data, {
  78. noAuth: true,
  79. kefu: true
  80. });
  81. }
  82. /**
  83. * 客服转接
  84. * @constructor
  85. */
  86. export function serviceTransfer(data) {
  87. return request.post("service/transfer", data, {
  88. noAuth: true,
  89. kefu: true
  90. });
  91. }
  92. /**
  93. * 客服详细信息
  94. * @constructor
  95. */
  96. export function serviceInfo(data) {
  97. return request.get("service/info", data, {
  98. noAuth: true,
  99. kefu: true
  100. });
  101. }
  102. /**
  103. * 客服反馈头部信息
  104. * @constructor
  105. */
  106. export function serviceFeedBack() {
  107. return request.get("user/service/feedback");
  108. }
  109. /**
  110. * 客服反馈
  111. * @constructor
  112. */
  113. export function feedBackPost(data) {
  114. return request.post("user/service/feedback", data);
  115. }
  116. /**
  117. * 检测登录code
  118. * @constructor
  119. */
  120. export function codeStauts(data) {
  121. return request.get("user/code", data);
  122. }
  123. /**
  124. * 获取客服端口
  125. * @constructor
  126. */
  127. export function getWorkermanUrl(data) {
  128. return request.get('get_workerman_url', {}, {
  129. noAuth: true
  130. })
  131. }
  132. /**
  133. * 客服扫码登录code
  134. * @constructor
  135. */
  136. export function kefuScanLogin(data) {
  137. return request.post("user/code", data);
  138. }