This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/api/controller/Coupon.php

29 lines
644 B
PHP
Raw Normal View History

2020-04-25 22:20:29 +08:00
<?php
namespace app\api\controller;
use app\api\model\Coupon as CouponModel;
/**
* 优惠券中心
* Class Coupon
* @package app\api\controller
*/
class Coupon extends Controller
{
/**
* 优惠券列表
* @return array
* @throws \app\common\exception\BaseException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function lists()
{
$model = new CouponModel;
$list = $model->getList($this->getUser(false));
return $this->renderSuccess(compact('list'));
}
}