123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- /**
- * Created by PhpStorm.
- * User: LYY
- * Date: 2020/10/21
- * Time: 15:01
- */
- namespace backend\controllers\listhouse;
- use backend\base\CommonController;
- use backend\base\Help;
- use Yii;
- use backend\server\ListhouseServer;
- class IndexpushController extends CommonController
- {
- //数据设置
- public function actionSet()
- {
- $server = new ListhouseServer();
- $state = $server->setList();
- return Help::JsonCode($state['code'], $state['msg']);
- }
- //楼盘推荐位-------------------------------------------------------------------------------------------------
- public function actionOnepushhouse()
- {
- $list_id = Yii::$app->request->get('list_id');
- return $this->render('onepushhouse',['list_id'=>$list_id]);
- }
- //获取数据
- public function actionOnepushhouseform()
- {
- $server = new ListhouseServer();
- $state = $server->getListHouse();
- return Help::JsonData(0, $state['msg'], $state['count'], $state['data']);
- }
- //添加数据
- public function actionOnepushhouseadd()
- {
- $list_id = Yii::$app->request->get('list_id');
- return $this->render('onepushhouseadd',['list_id'=>$list_id]);
- }
- //数据
- public function actionOnepushhouseaddform()
- {
- $server = new ListhouseServer();
- //------------------数据验证----------------------
- $state = $server->varcherListInfo();
- if ($state['code'] == 200) {
- $state = $server->addListHouse();
- }
- return Help::JsonCode($state['code'], $state['msg']);
- }
- }
|