// +---------------------------------------------------------------------- declare (strict_types=1); namespace app\api\controller; use think\response\Json; use app\api\model\Coupon as CouponModel; use cores\exception\BaseException; /** * 优惠券中心 * Class Coupon * @package app\api\controller */ class Coupon extends Controller { /** * 优惠券列表 * @return Json * @throws BaseException * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function list(): Json { $model = new CouponModel; $list = $model->getList(); return $this->renderSuccess(compact('list')); } }