123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?php
- 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);
- }
-
- public function actionNevlistdataget()
- {
- $input = Yii::$app->request->post();
- $data = $this->Listclassnevserver->getTypeListData($input);
- return Help::JsonData(0, $data['msg'], $data['count'], $data['data']);
- }
-
- 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, '设置失败');
- }
-
- }
|