12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\api\controller;
- use app\common\controller\UserApi;
- /**
- * 用户端优惠券模块
- */
- class UserCouponController extends UserApi
- {
- protected $noNeedLogin = [];
- protected $noNeedRight = '*';
- /**
- * 优惠券列表
- * @ApiReturnParams (name=id,description=优惠券id)
- * @ApiReturnParams (name=type,description=优惠券类型,1代金券2满减券3折扣券4新用户下单券)
- * @ApiReturnParams (name=max,description=优惠券满多少才可用,满减券才有这个参数)
- * @ApiReturnParams (name=amount,description=金额,对于折扣券则是几折)
- * @ApiReturnParams (name=start_time,description=开始时间)
- * @ApiReturnParams (name=end_time,description=过期时间)
- * @ApiReturnParams (name=is_used,description=是否已使用)
- */
- public function list(){
- $list=$this->auth
- ->getUser()
- ->coupon()
- ->order('id','desc')
- ->use()
- ->select();
- $this->success('',$list);
- }
- }
|