jh-admin/addon/servicer/shop/controller/Query.php

56 lines
1.3 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* SaaSMall商城系统 - 团队十年电商经验汇集巨献!
* =========================================================
* Copy right 2019-2029 成都SAAS云科技有限公司, 保留所有权利。
* ----------------------------------------------
* 官方网址: https://www.gobuysaas.com
* =========================================================
*/
declare(strict_types=1);
namespace addon\servicer\shop\controller;
use addon\servicer\model\Dialogue;
use app\shop\controller\BaseShop;
/**
* 聊天记录查询
*/
class Query extends BaseShop
{
/**
* 聊天记录查询页面
*
* @return mixed
*/
public function index()
{
return $this->fetch('query/index');
}
/**
* 获取聊天记录
*
* @return mixed
*/
public function getChatlogs()
{
// 当前请求为Ajax获取数据请求执行获取数据逻辑
if (request()->isAjax()) {
$memberId = input('member_id', 0);
$page = input('member_id', 0);
$limit = input('member_id', 0);
$dialogueList = (new Dialogue())->getDialogueList($memberId, $page, $limit);
return success(0, '请求成功', $dialogueList);
}
return error();
}
}