123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\shop\controller\live;
-
-
- use app\common\basics\ShopBase;
- use app\common\enum\LiveRoomEnum;
- use app\common\server\JsonServer;
- use app\shop\logic\live\LiveGoodsLogic;
- use app\shop\validate\live\LiveGoodsValidate;
-
-
-
- class LiveGoods extends ShopBase
- {
-
-
-
- public function lists()
- {
- if ($this->request->isAjax()) {
- $get = $this->request->get();
- $get['shop_id'] = $this->shop_id;
- $lists = LiveGoodsLogic::lists($get);
- return JsonServer::success('', $lists);
- }
- return view('', [
- 'live_status' => LiveRoomEnum::getLiveStatusDesc()
- ]);
- }
-
-
-
-
- public function add()
- {
- if ($this->request->isAjax()) {
- $params = (new LiveGoodsValidate())->goCheck('add', ['shop_id' => $this->shop_id]);
- $result = LiveGoodsLogic::add($params);
- if ($result !== true) {
- return JsonServer::error(LiveGoodsLogic::getError());
- }
- return JsonServer::success('操作成功');
- }
- return view();
- }
-
-
-
-
- public function detail()
- {
- $params = (new LiveGoodsValidate())->goCheck('detail', ['shop_id' => $this->shop_id]);
- return view('', [
- 'detail' => LiveGoodsLogic::detail($params),
- ]);
- }
-
-
-
-
-
- public function del()
- {
- if ($this->request->isAjax()) {
- $params = (new LiveGoodsValidate())->goCheck('del', ['shop_id' => $this->shop_id]);
- $result = LiveGoodsLogic::del($params);
- if ($result !== true) {
- return JsonServer::error(LiveGoodsLogic::getError());
- }
- return JsonServer::success('操作成功');
- }
- }
-
-
- }
|