123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- /**
- * Created by PhpStorm.
- * User: xiaofeng
- * Date: 2018/3/8
- * Time: 上午10:33
- */
- namespace backend\controllers;
- use backend\base\CommonController;
- use backend\base\Help;
- use backend\server\Vrserver;
- use Yii;
- class VrController extends CommonController
- {
- public function actionVrindex()
- {
- $type = Yii::$app->request->get('type');
- return $this->render('vrindex', ['type' => $type]);
- }
- //获取VR新版列表数据
- public function actionVrindexform()
- {
- $server = new Vrserver();
- $data = $server->getList();
- return Help::JsonData(0, '成功', $data['count'], $data['data']);
- }
- public function actionVrset()
- {
- $server = new Vrserver();
- $state = $server->vrSet();
- if ($state === true) return Help::JsonCode(Help::SUCCESS, '执行成功');
- return Help::JsonCode(Help::ERROR, '执行失败');
- }
- }
|