$model->HomeListTotal(),'pageSize'=>8, 'pageSizeParam' => false, 'validatePage' => false, ]); $rows = $model->HomeList([]); // p($rows); return $this->render('home',['model'=>$rows]); } public function actionHomeform() { $model = new NewsWeirdo(); $rows = $model->Mhomelist(Yii::$app->request->post()); if(!empty($rows)) { foreach ($rows as &$val) { $val['thumb'] = Yii::$app->params['httpImg']['host'].Yii::$app->params['httpImg']['weirdo'].$val['thumb']; } return Help::JsonCode(Help::SUCCESS,'成功',$rows); } return Help::JsonCode(Help::ERROR,'暂无资料'); } 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(3,[]); return $this->render('details',['model'=>$rows,'cityhouse'=>$houseRes]); } }