123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\admin\controller\activity_area;
-
- use app\common\basics\AdminBase;
- use app\common\server\JsonServer;
- use think\facade\View;
- use app\admin\logic\activity_area\AreaLogic;
- use app\admin\logic\activity_area\GoodsLogic;
- use app\admin\validate\activity_area\ActivityGoods;
-
-
- class Goods extends AdminBase
- {
-
-
-
- public function lists()
- {
-
- if ($this->request->isAjax()) {
- $get = $this->request->get();
- $list = GoodsLogic::lists($get);
- return JsonServer::success('获取成功', $list);
- }
- $activity_area = AreaLogic::getActivityAreaAll();
- $num = GoodsLogic::getNum();
- View::assign('num', $num);
- View::assign('activity_area', $activity_area);
- return View();
- }
-
-
-
- public function audit()
- {
-
- if ($this->request->isAjax()) {
- $post = $this->request->post();
- (new ActivityGoods())->goCheck('audit', $post);
- $result = GoodsLogic::audit($post);
- if ($result) {
- return JsonServer::success('操作成功');
- }
- return JsonServer::error('操作失败');
- }
- $id = $this->request->get('id');
- $detail = GoodsLogic::getActivityAreaGoods($id);
- View::assign('detail', $detail);
- View::assign('id', $id);
- return View();
- }
-
-
-
- public function violation()
- {
-
- if ($this->request->isAjax()) {
- $post = $this->request->post();
- $id = $post['id'];
- (new ActivityGoods())->goCheck('violation', $post);
- $result = GoodsLogic::violation($post);
- if ($result) {
- return JsonServer::success('操作成功');
- }
- return JsonServer::error('操作失败');
- }
- $id = $this->request->get('id');
- $detail = GoodsLogic::getActivityAreaGoods($id);
- View::assign('detail', $detail);
- View::assign('id', $id);
- return View();
- }
-
-
-
- public function detail()
- {
-
- $get = $this->request->get();
- $detail = GoodsLogic::detail($get);
- View::assign('detail', $detail);
- return View();
- }
- }
|