request; if ($request->isAjax && $request->isGet) { $params = $request->get(); $res = \Yii::$app->services->validate->validate($params, [ [['page', 'limit', 'list_type', 'status'],'integer'], [['keyword', 'date_start', 'date_end', 'order_no'], 'string'], ]); if ($res === false) return $this->error(\Yii::$app->services->validate->getErrorMessage()); $ret = (new CommissionService())->page($this->mall_id, $params); $custom_text = BackendService::getCustomText($this->mall_id); foreach ($ret['list'] as &$item) { $item['desc'] = BackendService::replaceTextToCustomText($item['desc'], $custom_text); } return is_string($ret) ? $this->error($ret) : $this->success('获取成功', $ret); } return $this->render($this->action->id); } }