123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?php
- namespace backend\controllers\listnav;
- use Yii;
- use backend\base\CommonController;
- use backend\base\Help;
- use backend\server\ListnavServer;
- class IndexpushController extends CommonController
- {
-
- public function actionSet()
- {
- $server = new ListnavServer();
- $state = $server->setList();
- return Help::JsonCode($state['code'], $state['msg']);
- }
-
-
- public function actionPushcity()
- {
- $list_id = Yii::$app->request->get('list_id');
- return $this->render('pushcity', ['list_id' => $list_id]);
- }
- public function actionPushcityform()
- {
- $server = new ListnavServer();
- $state = $server->getListCity();
- return Help::JsonData(0, $state['msg'], $state['count'], $state['data']);
- }
-
- public function actionAddpushcity()
- {
- $list_id = Yii::$app->request->get('list_id');
- return $this->render('pushcityadd', ['list_id' => $list_id]);
- }
- public function actionAddpushcityform()
- {
- $server = new ListnavServer();
- $state = $server->addListCity();
- return Help::JsonCode($state['code'], $state['msg']);
- }
-
- public function actionPushnews()
- {
- $list_id = Yii::$app->request->get('list_id');
- return $this->render('pushnews', ['list_id' => $list_id]);
- }
- public function actionPushnewsform()
- {
- $server = new ListnavServer();
- $state = $server->getListNews();
- return Help::JsonData(0, $state['msg'], $state['count'], $state['data']);
- }
- public function actionPushnewsadd()
- {
- $list_id = Yii::$app->request->get('list_id');
- $newlist = (new ListnavServer())->getNewsList();
- return $this->render('pushnewsadd', ['list_id' => $list_id, 'new_list' => $newlist]);
- }
- public function actionPushnewsaddform()
- {
- $server = new ListnavServer();
- $state = $server->addListNews();
- return Help::JsonCode($state['code'], $state['msg']);
- }
-
- public function actionPushtitle()
- {
- $list_id = Yii::$app->request->get('list_id');
- return $this->render('pushtitle', ['list_id' => $list_id]);
- }
- public function actionPushtitleform()
- {
- $server = new ListnavServer();
- $state = $server->getListTitle();
- return Help::JsonData(0, $state['msg'], $state['count'], $state['data']);
- }
- public function actionPushtitleadd()
- {
- $list_id = Yii::$app->request->get('list_id');
- return $this->render('pushtitleadd', ['list_id' => $list_id]);
- }
- public function actionPushtitleaddform()
- {
- $server = new ListnavServer();
- $state = $server->addListTitle();
- return Help::JsonCode($state['code'], $state['msg']);
- }
- }
|