fetch(); } public function list() { $where = Util::getMore([ ['status', ''], ['page', 1], ['limit', 20], ['auction'] ]); $data = \app\admin\model\auction\AuctionApply::list($where); return Json::successlayui($data); } public function tg($id) { if (empty($id)) return Json::fail('失败'); $data = \app\admin\model\auction\AuctionApply::where('id', '<>',1)->find($id); if (!$data){ return Json::fail('当前状态无法修改'); } $res = \app\admin\model\auction\AuctionApply::update(['status' => 2, 'id' => $id]); if ($res){ return Json::success('成功!'); }else{ return Json::fail(\app\admin\model\auction\Auction::getErrorInfo()); } } public function jj($id) { if (empty($id)) Json::fail('失败'); $data = \app\admin\model\auction\AuctionApply::where('id', '<>',1)->find($id); if (!$data){ return Json::fail('当前状态无法修改'); } $res = \app\admin\model\auction\AuctionApply::update(['status' => 0, 'id' => $id]); if ($res){ return Json::success('成功!'); }else{ return Json::fail(\app\admin\model\auction\Auction::getErrorInfo()); } } }