kefu.js 594 B

123456789101112131415161718192021222324252627282930
  1. import request from '@/sheep/request';
  2. const KeFuApi = {
  3. sendMessage: (data) => {
  4. return request({
  5. url: '/promotion/kefu-message/send',
  6. method: 'POST',
  7. data,
  8. custom: {
  9. auth: true,
  10. showLoading: true,
  11. loadingMsg: '发送中',
  12. showSuccess: true,
  13. successMsg: '发送成功',
  14. },
  15. });
  16. },
  17. getConversation: () => {
  18. return request({
  19. url: '/promotion/kefu-conversation/get',
  20. method: 'GET',
  21. custom: {
  22. auth: true,
  23. showLoading: false,
  24. },
  25. });
  26. },
  27. };
  28. export default KeFuApi;