tapi/app/controller/admin/xm/ChannelController.php
2025-09-11 22:03:07 +08:00

29 lines
779 B
PHP

<?php
namespace app\controller\admin\xm;
use app\BaseController;
use app\service\CurdService;
use think\response\Json;
class ChannelController extends BaseController
{
public function page(): Json
{
try{
$model = \app\entity\XmChannel::withSearch([], [
'name' => $this->request->get('name/s', ''),
'code' => $this->request->get('code/s', ''),
'platform_id ' => $this->request->get('platform_id/d', 0),
])->append(['platform']);
$paginate = CurdService::getPaginate($this->request, $model);
}catch (\Exception $e){
return $this->writeError($e->getMessage());
}
return $this->writeSuccess('success', $paginate);
}
}