Browse Source

Fix #106 前台邀请码显示问题 & 订单列表[是否使用优惠券]过滤开关无效的问题

兔姬桑 4 years ago
parent
commit
a323e2baff

+ 2 - 2
app/Http/Controllers/Admin/LogsController.php

@@ -45,9 +45,9 @@ class LogsController extends Controller
 
         if (isset($is_coupon)) {
             if ($is_coupon) {
-                $query->where('coupon_id', '<>', 0);
+                $query->where('coupon_id', '<>', null);
             } else {
-                $query->whereCouponId(0);
+                $query->whereCouponId(null);
             }
         }
 

+ 2 - 2
app/Http/Controllers/AuthController.php

@@ -711,7 +711,7 @@ class AuthController extends Controller
         }
 
         // 是否开启注册发送验证码
-        if (sysConfig('is_activate_account') != 1) {
+        if ((int) sysConfig('is_activate_account') !== 1) {
             return Response::json(['status' => 'fail', 'message' => trans('auth.captcha_close')]);
         }
 
@@ -744,7 +744,7 @@ class AuthController extends Controller
     // 公开的邀请码列表
     public function free()
     {
-        $view['inviteList'] = Invite::whereInviterId(0)->whereStatus(0)->paginate();
+        $view['inviteList'] = Invite::whereInviterId(null)->whereStatus(0)->paginate();
 
         return view('auth.free', $view);
     }