123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\admin\controller\live;
-
-
- use app\common\basics\AdminBase;
- use app\common\enum\LiveRoomEnum;
- use app\common\server\JsonServer;
- use app\admin\logic\live\LiveRoomLogic;
- use app\admin\validate\live\LiveRoomValidate;
-
-
-
- class LiveRoom extends AdminBase
- {
-
-
-
- public function lists()
- {
- if ($this->request->isAjax()) {
- $get = $this->request->get();
- $lists = LiveRoomLogic::lists($get);
- return JsonServer::success('', $lists);
- }
- return view('', [
- 'live_status' => LiveRoomEnum::getLiveStatusDesc(),
- 'shop' => LiveRoomLogic::shopLists(),
- ]);
- }
-
-
-
-
- public function audit()
- {
- if ($this->request->isAjax()) {
- $params = (new LiveRoomValidate())->goCheck('audit');
- $result = LiveRoomLogic::audit($params);
- if ($result !== true) {
- return JsonServer::error(LiveRoomLogic::getError());
- }
- return JsonServer::success('操作成功');
- }
- $id = $this->request->get('id');
- return view('', [
- 'detail' => LiveRoomLogic::detail($id),
- ]);
- }
-
-
-
-
- public function detail()
- {
- $id = $this->request->get('id');
- return view('', [
- 'detail' => LiveRoomLogic::detail($id),
- ]);
- }
-
-
-
-
- public function recommend()
- {
- if ($this->request->isAjax()) {
- $params = (new LiveRoomValidate())->goCheck('recommend');
- $result = LiveRoomLogic::recommend($params);
- if ($result) {
- return JsonServer::success('操作成功');
- }
- return JsonServer::error(LiveRoomLogic::getError());
- }
- $id = $this->request->get('id');
- return view('', [
- 'detail' => LiveRoomLogic::detail($id),
- ]);
- }
-
-
- }
|