kefu.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2021 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, { noAuth : true,kefu:true });
  17. }
  18. /**
  19. * 获取左侧客服聊天用户列表
  20. * @constructor
  21. */
  22. export function record (data) {
  23. return request.get("user/record", data, { noAuth : true,kefu:true });
  24. }
  25. /**
  26. * 客服话术
  27. * @constructor
  28. */
  29. export function speeChcraft (data) {
  30. return request.get("service/speechcraft", data, { noAuth : true,kefu:true });
  31. }
  32. /**
  33. * 客服转接列表
  34. * @constructor
  35. */
  36. export function transferList (data) {
  37. return request.get("service/transfer_list", data, { noAuth : true,kefu:true });
  38. }
  39. /**
  40. * 商品购买记录
  41. * @constructor
  42. */
  43. export function productCart (id,data) {
  44. return request.get("product/cart/"+id,data, { noAuth : true,kefu:true });
  45. }
  46. /**
  47. * 热销商品
  48. * @constructor
  49. */
  50. export function productHot (id,data) {
  51. return request.get("product/hot/"+id,data, { noAuth : true,kefu:true });
  52. }
  53. /**
  54. * 商品足记
  55. * @constructor
  56. */
  57. export function productVisit (id,data) {
  58. return request.get("product/visit/"+id,data, { noAuth : true,kefu:true });
  59. }
  60. /**
  61. * 客服用户聊天列表
  62. * @constructor
  63. */
  64. export function serviceList (data) {
  65. return request.get("service/list",data, { noAuth : true,kefu:true });
  66. }
  67. /**
  68. * 客服转接
  69. * @constructor
  70. */
  71. export function serviceTransfer (data) {
  72. return request.post("service/transfer",data, { noAuth : true,kefu:true });
  73. }
  74. /**
  75. * 客服详细信息
  76. * @constructor
  77. */
  78. export function serviceInfo (data) {
  79. return request.get("service/info",data, { noAuth : true,kefu:true });
  80. }
  81. /**
  82. * 客服反馈头部信息
  83. * @constructor
  84. */
  85. export function serviceFeedBack () {
  86. return request.get("user/service/feedback");
  87. }
  88. /**
  89. * 客服反馈
  90. * @constructor
  91. */
  92. export function feedBackPost (data) {
  93. return request.post("user/service/feedback", data);
  94. }
  95. /**
  96. * 检测登录code
  97. * @constructor
  98. */
  99. export function codeStauts (data) {
  100. return request.get("user/code",data);
  101. }
  102. /**
  103. * 客服扫码登录code
  104. * @constructor
  105. */
  106. export function kefuScanLogin (data) {
  107. return request.post("user/code",data);
  108. }