123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?php
- /**
- * @author Lyy
- * @version v3改版 推送类型数据控制器
- */
- namespace backend\controllers;
- use backend\base\CommonController;
- use backend\server\Listclassnevserver;
- use backend\base\Help;
- use Yii;
- class ListpushpcController extends CommonController
- {
- //定义操作类
- protected $Listclassnevserver = null;
- /**
- * 初始化方法
- * */
- public function beforeAction($action)
- {
- $this->Listclassnevserver = new Listclassnevserver();
- return parent::beforeAction($action);
- }
- /**
- * 自定义类目获取数据统一接口
- * @access public
- * @param type 获取类目数据的类别
- * @return array []
- * */
- public function actionNevlistdataget()
- {
- $input = Yii::$app->request->post();
- $data = $this->Listclassnevserver->getTypeListData($input);
- return Help::JsonData(0, $data['msg'], $data['count'], $data['data']);
- }
- /********************************************品质新房 begin*******************************************************/
- /**
- *品质新房 character new house
- * @access public
- * @return file 加载列表数据页面
- * 品质新房后台列表页面加载
- * */
- public function actionNevlistcharacter()
- {
- $type_id = Yii::$app->request->get('type_id');
- return $this->render('character', ['type_id' => $type_id]);
- }
- /**
- *数据添加
- * */
- public function actionNevlistcharacteradd()
- {
- $type_id = Yii::$app->request->get('type_id');
- return $this->render('characteradd', ['type_id' => $type_id]);
- }
- /**
- *数据编辑
- * */
- public function actionNevlistcharacteredit()
- {
- $id = Yii::$app->request->get('id');
- $row = $this->Listclassnevserver->GetListHouseOne($id);
- return $this->render('characteredit', ['row' => $row]);
- }
- /**
- *执行数据添加
- */
- public function actionNevlistcharacteraddform()
- {
- $input = Yii::$app->request->post();
- $state = $this->Listclassnevserver->addListData($input);
- if ($state === true) return Help::JsonCode(Help::SUCCESS, '添加完成');
- return Help::JsonCode(Help::SUCCESS, $state);
- }
- /**
- *执行数据编辑
- */
- public function actionNevlistcharactereditform()
- {
- $input = Yii::$app->request->post();
- $state = $this->Listclassnevserver->editListData($input);
- if ($state) return Help::JsonCode(Help::SUCCESS, '编辑完成');
- return Help::JsonCode(Help::SUCCESS, '编辑失败');
- }
- /**
- * 数据设置
- * */
- public function actionNevlistcharacterset()
- {
- $input = Yii::$app->request->post();
- $state = $this->Listclassnevserver->setListData($input);
- if ($state) return Help::JsonCode(Help::SUCCESS, '设置完成');
- return Help::JsonCode(Help::SUCCESS, '设置失败');
- }
- /********************************************品质新房 end*******************************************************/
- }
|