wupengfei 2 năm trước cách đây
mục cha
commit
07d7ec92c0
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      application/api/controller/Coupon.php

+ 4 - 2
application/api/controller/Coupon.php

@@ -38,6 +38,7 @@ class Coupon extends Base
      * @return name:amount type:int default:-- desc:抵扣金额(coupon_type=1时用)
      * @return name:create_at type:string default:-- desc:领取时间
      * @return name:past_at type:string default:-- desc:过期时间
+     * @return name:cover type:string default:-- desc:图片
      * @return name:status type:int default:-- desc:状态码(1未使用2已使用3已过期)
      */
     public function autoGetActivityCoupon()
@@ -76,7 +77,7 @@ class Coupon extends Base
         if(empty($get_ids)) $this->error('没有优惠活动或已获得');
         $list = UserCouponList::where([['l.user_id','=',$this->user_id],['l.id','in',$get_ids]])
             ->alias('l')
-            ->field('l.*,c.title,c.module,c.coupon_type,c.is_new')
+            ->field('l.*,c.title,c.module,c.coupon_type,c.is_new,c.cover')
             ->leftJoin('CouponConfig c','c.id = l.coupon_id')
             ->limit($this->off_set,$this->page_num)
             ->order('l.id desc')
@@ -104,6 +105,7 @@ class Coupon extends Base
      * @return name:amount type:int default:-- desc:抵扣金额(coupon_type=1时用)
      * @return name:create_at type:string default:-- desc:领取时间
      * @return name:past_at type:string default:-- desc:过期时间
+     * @return name:cover type:string default:-- desc:图片
      * @return name:status type:int default:-- desc:状态码(1未使用2已使用3已过期)
      *
      */
@@ -113,7 +115,7 @@ class Coupon extends Base
         $module = input('get.module',1);
         $list = UserCouponList::where(['l.user_id'=>$this->user_id,'l.status'=>$status])
             ->alias('l')
-            ->field('l.*,c.title,c.module,c.coupon_type,c.is_new')
+            ->field('l.*,c.title,c.module,c.coupon_type,c.is_new,c.cover')
             ->when($module,function ($query)use ($module){
                 if($module > 1 )  $query->where('module','in','1,'. $module);
             })->leftJoin('CouponConfig c','c.id = l.coupon_id')