Query.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 山西牛酷信息科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. declare(strict_types=1);
  11. namespace addon\servicer\shop\controller;
  12. use addon\servicer\model\Dialogue;
  13. use app\shop\controller\BaseShop;
  14. /**
  15. * 聊天记录查询
  16. */
  17. class Query extends BaseShop
  18. {
  19. /**
  20. * 聊天记录查询页面
  21. *
  22. * @return mixed
  23. */
  24. public function index()
  25. {
  26. return $this->fetch('query/index');
  27. }
  28. /**
  29. * 获取聊天记录
  30. *
  31. * @return mixed
  32. */
  33. public function getChatlogs()
  34. {
  35. // 当前请求为Ajax获取数据请求,执行获取数据逻辑
  36. if (request()->isAjax()) {
  37. $memberId = input('member_id', 0);
  38. $page = input('member_id', 0);
  39. $limit = input('member_id', 0);
  40. $dialogueList = (new Dialogue())->getDialogueList($memberId, $page, $limit);
  41. return success(0, '请求成功', $dialogueList);
  42. }
  43. return error();
  44. }
  45. }