1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- /**
- * Created by PhpStorm.
- * User: xiaofeng
- * Date: 2018/4/19
- * Time: 下午2:52
- * 品牌
- */
- namespace mobile\controllers;
- use common\models\Developers;
- use common\models\PushmColumn;
- use common\models\PushmHouse;
- use mobile\base\CommonController;
- use mobile\server\IndexServer;
- use Yii;
- class BrandController extends CommonController{
- public function actionHome()
- {
- $input = Yii::$app->request->get();
- if(is_numeric($input['bid']))
- {
- $bid = PushmColumn::find()->select(['id','did'])->andWhere(['id'=>$input['bid']])->asArray()->one();
- $model = new PushmHouse();
- $model->type = 6;
- $model->developers_id = $bid['did'];
- $house = $model->GetHouse();
- if ($house){
- foreach ($house as &$val){
- $val['thumb'] = Yii::$app->params['httpImg']['hosts'].Yii::$app->params['httpImg']['houses'].$val['thumb'].'/'.'same';
- if(!empty($val['characteristic']))
- {
- $val['characteristic'] = \common\fm\HouseHandle::ChangeCharacteristic($val['characteristic']);
- // (new IndexServer())->Subject(json_decode($val['characteristic']),3);
- }
- // $val['tel'] = (new IndexServer())->RandTel($val['city']);
- $val['tel'] = \common\fm\HouseHandle::ChangeCityTel($val['city']);
- $val['rand'] = rand(300,800);
- //楼盘状态
- $val['state'] = Yii::$app->params['HouseSalesStatus'][$val['state']];
- }
- }
-
- $column = PushmColumn::find()->andWhere(['id'=>$input['bid']])->asArray()->one();
- if ($column){
- $column['img_a'] = Yii::$app->params['httpImg']['host'].Yii::$app->params['httpImg']['push_lb'].$column['img_a'];
- }
- $developers = Developers::find()->andWhere(['id'=>$column['did']])->andWhere(['is_del'=>1])->asArray()->one();
- return $this->render('home',['house'=>$house,'column'=>$column,'developers'=>$developers]);
- }
- return $this->goBack();
- }
- }
|