$model->HomeListTotal(),'pageSize'=>8, 'pageSizeParam' => false, 'validatePage' => false, ]); $rows = $model->HomeList($pages); // p($rows); return $this->render('home',['model'=>$rows,'page'=>$pages]); } public function actionDetails() { $model = new NewsWeirdo(); $rows = $model->FindById(Yii::$app->request->get('qid')); //记录查看次数 $iprecord = new \common\models\AllclickRecord(); $arr['id'] = $rows->id; $arr['ip'] = Yii::$app->request->userIP;; $arr['type'] = 2; $re = $iprecord->RecordQuery($arr); if(empty($re)){ if($iprecord->addRecord($arr)) { $model->Clickadd($rows->id); } } //推荐楼盘 $house = new \common\models\House(); $house->is_push = 2; $houseRes = $house->randList(4,[]); return $this->render('details',['model'=>$rows,'cityhouse'=>$houseRes]); } }