| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace app\admin\controller\box;
- use app\admin\logic\BoxLogic;
- use app\common\model\BoxModel;
- use app\admin\traits\Curd;
- use app\common\controller\AdminController;
- use EasyAdmin\annotation\ControllerAnnotation;
- use EasyAdmin\annotation\NodeAnotation;
- use think\App;
- /**
- * Class Admin
- * @package app\admin\controller\system
- * @ControllerAnnotation(title="魔盒")
- */
- class Box extends AdminController
- {
- use Curd;
- public function __construct(App $app)
- {
- parent::__construct($app);
- $this->model = new BoxModel();
- }
- /**
- * @NodeAnotation(title="福袋列表")
- */
- public function index ()
- {
- if ($this->request->isAjax()) {
- if (input('selectFields')) {
- return $this->selectList();
- }
- list($page, $limit, $where) = $this->buildTableParames();
- list($count, $list) = BoxLogic::getList($page, $limit, $where, $this->sort);
- $data = [
- 'code' => 0,
- 'msg' => '',
- 'count' => $count,
- 'data' => $list,
- ];
- return json($data);
- }
- return $this->fetch();
- }
- }
|