浏览代码

优化代码

廖泽华 4 年之前
父节点
当前提交
250603e92b
共有 2 个文件被更改,包括 5 次插入3 次删除
  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
 class ZtController extends CommonController
18
 class ZtController extends CommonController
19
 {
19
 {
20
+	public $enableCsrfValidation = false;
21
+	
20
     // 元旦专题
22
     // 元旦专题
21
     public function actionNewyear()
23
     public function actionNewyear()
22
     {
24
     {
@@ -201,7 +203,7 @@ class ZtController extends CommonController
201
 			                                    ->limit(8)
203
 			                                    ->limit(8)
202
 			                                    ->orderBy(['pfg_pushhouse_type.sort'=>SORT_DESC])->asArray()->all();
204
 			                                    ->orderBy(['pfg_pushhouse_type.sort'=>SORT_DESC])->asArray()->all();
203
 			foreach ($data as &$value){
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
 			return Help::JsonData(Help::SUCCESS,'成功',0,$data);
208
 			return Help::JsonData(Help::SUCCESS,'成功',0,$data);
207
 		}else{
209
 		}else{
@@ -222,7 +224,7 @@ class ZtController extends CommonController
222
 			                                    ->limit(6)
224
 			                                    ->limit(6)
223
 			                                    ->orderBy(['pfg_pushhouse_type.sort'=>SORT_DESC])->asArray()->all();
225
 			                                    ->orderBy(['pfg_pushhouse_type.sort'=>SORT_DESC])->asArray()->all();
224
 			foreach ($data as &$value){
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
 				$value['tel'] = $this->RandTel($value['city']);
228
 				$value['tel'] = $this->RandTel($value['city']);
227
 			}
229
 			}
228
 			return Help::JsonData(Help::SUCCESS,'成功',0,$data);
230
 			return Help::JsonData(Help::SUCCESS,'成功',0,$data);

+ 1 - 1
mobile/server/HouseServer.php

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