kefu.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. import request from "@/utils/request.js";
  11. /**
  12. * 客服登录
  13. * @param data object 用户账号密码
  14. */
  15. export function kefuLogin(data) {
  16. return request.post("login", data, {
  17. noAuth: true,
  18. kefu: true
  19. });
  20. }
  21. /**
  22. * 获取左侧客服聊天用户列表
  23. * @constructor
  24. */
  25. export function record(data) {
  26. return request.get("user/record", data, {
  27. noAuth: true,
  28. kefu: true
  29. });
  30. }
  31. /**
  32. * 客服话术
  33. * @constructor
  34. */
  35. export function speeChcraft(data) {
  36. return request.get("service/speechcraft", data, {
  37. noAuth: true,
  38. kefu: true
  39. });
  40. }
  41. /**
  42. * 客服转接列表
  43. * @constructor
  44. */
  45. export function transferList(data) {
  46. return request.get("service/transfer_list", data, {
  47. noAuth: true,
  48. kefu: true
  49. });
  50. }
  51. /**
  52. * 商品购买记录
  53. * @constructor
  54. */
  55. export function productCart(id, data) {
  56. return request.get("product/cart/" + id, data, {
  57. noAuth: true,
  58. kefu: true
  59. });
  60. }
  61. /**
  62. * 热销商品
  63. * @constructor
  64. */
  65. export function productHot(id, data) {
  66. return request.get("product/hot/" + id, data, {
  67. noAuth: true,
  68. kefu: true
  69. });
  70. }
  71. /**
  72. * 商品足记
  73. * @constructor
  74. */
  75. export function productVisit(id, data) {
  76. return request.get("product/visit/" + id, data, {
  77. noAuth: true,
  78. kefu: true
  79. });
  80. }
  81. /**
  82. * 客服用户聊天列表
  83. * @constructor
  84. */
  85. export function serviceList(data) {
  86. return request.get("service/list", data, {
  87. noAuth: true,
  88. kefu: true
  89. });
  90. }
  91. /**
  92. * 客服转接
  93. * @constructor
  94. */
  95. export function serviceTransfer(data) {
  96. return request.post("service/transfer", data, {
  97. noAuth: true,
  98. kefu: true
  99. });
  100. }
  101. /**
  102. * 客服详细信息
  103. * @constructor
  104. */
  105. export function serviceInfo(data) {
  106. return request.get("service/info", data, {
  107. noAuth: true,
  108. kefu: true
  109. });
  110. }
  111. /**
  112. * 客服反馈头部信息
  113. * @constructor
  114. */
  115. export function serviceFeedBack() {
  116. return request.get("user/service/feedback");
  117. }
  118. /**
  119. * 客服反馈
  120. * @constructor
  121. */
  122. export function feedBackPost(data) {
  123. return request.post("user/service/feedback", data);
  124. }
  125. /**
  126. * 检测登录code
  127. * @constructor
  128. */
  129. export function codeStauts(data) {
  130. return request.get("user/code", data);
  131. }
  132. /**
  133. * 获取客服端口
  134. * @constructor
  135. */
  136. export function getWorkermanUrl(data) {
  137. return request.get('get_workerman_url', {}, {
  138. noAuth: true
  139. })
  140. }
  141. /**
  142. * 客服扫码登录code
  143. * @constructor
  144. */
  145. export function kefuScanLogin(data) {
  146. return request.post("user/code", data);
  147. }