Explorar o código

7天不充值弹框

laowu hai 21 horas
pai
achega
dec93c9d47
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      app/Http/Controllers/Game/WebRouteController.php

+ 12 - 0
app/Http/Controllers/Game/WebRouteController.php

@@ -257,6 +257,18 @@ class WebRouteController extends Controller
                 }
             }
         }
+        // vip 7天不充值弹框
+        $fewDaysSincePay = false;
+        if ($data['user'] && $user && $user['vip'] > 0) {
+            $lastRecharge = DB::table('agent.dbo.order')->lock('with(nolock)')
+                ->where(['user_id' => $user['UserID'], 'pay_status' => 1])
+                ->orderBy('id', 'desc')->first();
+            if ($lastRecharge && strtotime($lastRecharge->finished_at) <= strtotime('-7 days')) {
+                $fewDaysSincePay = true;
+            }
+            $data['user']['fewDaysSincePay'] = $fewDaysSincePay;
+        }
+
         $spe_key=$request->input('s_k', 0);
         $data['conf']=[
             'hall'=>env("CONFIG_24680_HALL")??GameBasicConfig::$HallServer,