diff --git a/app/Admin/Forms/CouponTieForm.php b/app/Admin/Forms/CouponTieForm.php index e37082e..7d27d13 100644 --- a/app/Admin/Forms/CouponTieForm.php +++ b/app/Admin/Forms/CouponTieForm.php @@ -44,7 +44,13 @@ class CouponTieForm extends Form { $this->ssdb = new SsdbClient(); $coupon = $this->ssdb->client()->hgetall('coupon_rebate_activity'); - + if(empty($coupon)){ + $coupon = [ + 'activity'=> 0, + 'forward'=> '', + 'repay' => '' + ]; + } $this->text('activity')->required()->value($coupon['activity']); $this->text('forward')->required()->value($coupon['forward']); $this->text('repay')->required()->value($coupon['repay']);