123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace app\admin\controller;
- use app\admin\model\LiveRoomGoodsModel;
- use app\common\model\UserModel;
- use App\Utils\AppResult;
- use think\Request;
- class LiveRoomGoods extends VueModule
- {
- public function callAction($method, $parameters = [])
- {
-
- $params = $this->params;
- $this->model = new LiveRoomGoodsModel();
-
- switch ($method) {
- case 'index':
-
- if ($this->isPost) {
-
- if (!empty($params['keyword'])) {
- $this->model->where('nickname|mobile', 'like', "%{$params['keyword']}%");
- }
- if (!empty($params['gender'])) $this->model->where('gender', $params['gender']);
- $this->model->with(['room','goods']);
- $this->model->order('is_top','desc');
- $this->model->order('goods_no','asc');
- }
- break;
- default:
- break;
- }
- return parent::callAction($method, $parameters);
- }
- public function __construct(Request $request = null)
- {
- parent::__construct($request);
- }
- }
|