request->isAjax) { if (\Yii::$app->request->isGet) { $params = \Yii::$app->request->get(); $where = []; $where[] = ['mall_id' => $this->mall_id]; if (!empty($params['date_start'])) $where[] = ['>=', 'created_at', strtotime($params['date_start'])]; if (!empty($params['date_end'])) $where[] = ['<=', 'created_at', strtotime($params['date_end'])]; $params['where'] = $where; $params['order'] = 'id desc'; $list = LuckyGroupBonusLog::listPage($params); return $this->success('success', $list); } } else { return $this->render('index'); } } }