廖泽华 преди 4 години
родител
ревизия
8ba32b5802
променени са 3 файла, в които са добавени 5 реда и са изтрити 4 реда
  1. 1 1
      mobile/controllers/IndexController.php
  2. 3 2
      mobile/controllers/PublicController.php
  3. 1 1
      mobile/server/HouseServer.php

+ 1 - 1
mobile/controllers/IndexController.php

@@ -55,7 +55,7 @@ class IndexController extends CommonController
55 55
 		//区域
56 56
 		$gCity = Yii::$app->request->get('city');
57 57
 		if (empty($gCity)) {
58
-			$gCity = 60;
58
+			$gCity = 68;
59 59
 			if ($gCity != 0) {
60 60
 				$cityName = CategoryCity::findOne($gCity)['city_name'];
61 61
 			} else {

+ 3 - 2
mobile/controllers/PublicController.php

@@ -220,7 +220,7 @@ class PublicController extends CommonController
220 220
 	 */
221 221
 	public function actionSearchalertwindow()
222 222
 	{
223
-		$city = CategoryCity::find()->andWhere(['del' => 1])->select(['id'])->andWhere(['pid' => 68])->column();
223
+		$city = CategoryCity::find()->andWhere(['del' => 1,'state'=>1,'abroad'=>1])->select(['id'])->column();
224 224
 		$model = new HouseServer();
225 225
 		$query = House::find();
226 226
 		$query->andWhere(['is_push' => 2]);
@@ -230,7 +230,8 @@ class PublicController extends CommonController
230 230
 		$query->select(['id', 'name']);
231 231
 		//        $query->orderBy('RAND()');
232 232
 		$query->orderBy(['pfg_house.sort'=>SORT_DESC]);
233
-		$shaixuan = $query->limit(8)->asArray()->all();
233
+		$shaixuan = $query->limit(9)->asArray()->all();
234
+
234 235
 		$price = $model->PriceList();
235 236
 		return $this->renderPartial('searchalertwindow', [
236 237
 			'shaixuan' => $shaixuan,

+ 1 - 1
mobile/server/HouseServer.php

@@ -107,7 +107,7 @@ class HouseServer
107 107
             $CityModel = new \common\models\CategoryCity();
108 108
             $CityModel->pid = 0;
109 109
             $CityModel->state = 1;
110
-            $CityModel->abroad = $input['abroad'];
110
+            $CityModel->abroad = 1;
111 111
             $mainCity = $CityModel->getList([], ['id']);
112 112
             if ($mainCity) {
113 113
                 $city_Id = $CityModel->GetAllSon(array_column($mainCity, 'id'), ['id']);