Browse Source

优化代码

廖泽华 4 years ago
parent
commit
250603e92b
2 changed files with 5 additions and 3 deletions
  1. 4 2
      frontend/controllers/ZtController.php
  2. 1 1
      mobile/server/HouseServer.php

+ 4 - 2
frontend/controllers/ZtController.php

@@ -17,6 +17,8 @@ use frontend\server\ZtServer;
17 17
 
18 18
 class ZtController extends CommonController
19 19
 {
20
+	public $enableCsrfValidation = false;
21
+	
20 22
     // 元旦专题
21 23
     public function actionNewyear()
22 24
     {
@@ -201,7 +203,7 @@ class ZtController extends CommonController
201 203
 			                                    ->limit(8)
202 204
 			                                    ->orderBy(['pfg_pushhouse_type.sort'=>SORT_DESC])->asArray()->all();
203 205
 			foreach ($data as &$value){
204
-				$value['thumb'] = Yii::$app->params['httpImg']['hosts'] . Yii::$app->params['httpImg']['housesch'] . $value['thumb'] . '/same';
206
+				$value['thumb'] = Yii::$app->params['httpImg']['hosts'] . Yii::$app->params['httpImg']['houses'] . $value['thumb'] . '/same';
205 207
 			}
206 208
 			return Help::JsonData(Help::SUCCESS,'成功',0,$data);
207 209
 		}else{
@@ -222,7 +224,7 @@ class ZtController extends CommonController
222 224
 			                                    ->limit(6)
223 225
 			                                    ->orderBy(['pfg_pushhouse_type.sort'=>SORT_DESC])->asArray()->all();
224 226
 			foreach ($data as &$value){
225
-				$value['thumb'] = Yii::$app->params['httpImg']['hosts'] . Yii::$app->params['httpImg']['housesch'] . $value['thumb'] . '/same';
227
+				$value['thumb'] = Yii::$app->params['httpImg']['hosts'] . Yii::$app->params['httpImg']['houses'] . $value['thumb'] . '/same';
226 228
 				$value['tel'] = $this->RandTel($value['city']);
227 229
 			}
228 230
 			return Help::JsonData(Help::SUCCESS,'成功',0,$data);

+ 1 - 1
mobile/server/HouseServer.php

@@ -232,7 +232,7 @@ class HouseServer
232 232
     public function GetLiveInfo($hid)
233 233
     {
234 234
         $data = \common\models\Live::find()
235
-            ->select('id,hid,video_url,img')
235
+            ->select('id,hid,video_url,img,city')
236 236
             ->andWhere(['hid' => $hid])
237 237
             ->asArray()->one();
238 238
         if ($data) {