Tree 17 jam lalu
induk
melakukan
92ae4e6355

+ 2 - 6
app/Http/Controllers/Admin/BannerController.php

@@ -48,9 +48,7 @@ class BannerController
             }
 
             $data = $request->only(['img', 'img_pt', 'img_es', 'alt', 'link', 'state', 'link_game', 'link_module', 'theme_key']);
-            // state: 127 启用, 0 禁用
-            $state = isset($data['state']) && $data['state'] !== '' ? intval($data['state']) : 127;
-            $data['state'] = in_array($state, [0, 127]) ? $state : 127;
+            $data['state'] = (isset($data['state']) && $data['state'] !== '') ? (int) $data['state'] : 0;
             Banner::create($data);
 
             return apiReturnSuc();
@@ -80,9 +78,7 @@ class BannerController
             }
 
             $data = $request->only(['img', 'img_pt', 'img_es', 'alt', 'link', 'state', 'link_game', 'link_module', 'theme_key']);
-            // state: 127 启用, 0 禁用
-            $state = isset($data['state']) && $data['state'] !== '' ? intval($data['state']) : 127;
-            $data['state'] = in_array($state, [0, 127]) ? $state : 127;
+            $data['state'] = (isset($data['state']) && $data['state'] !== '') ? (int) $data['state'] : 0;
             $info->update($data);
 
             return apiReturnSuc();

+ 2 - 2
app/Http/Controllers/Game/LoginController.php

@@ -1164,7 +1164,7 @@ class LoginController extends Controller
             $guser['password'] = $password;
         }
 
-        $defaultGameId = 931;
+        $defaultGameId = 958;
         $recommendGame = '/game/' . $defaultGameId;
         // 如果用户信息存在,根据GameID的最后一位数字查询映射关系
         if ($guser && isset($guser['GameID'])) {
@@ -1390,7 +1390,7 @@ class LoginController extends Controller
         $guser['reg'] = 1;
 
 
-        $defaultGameId = 931;
+        $defaultGameId = 958;
         $recommendGame = '/game/' . $defaultGameId;
         $guser['recommendGame'] = $recommendGame;
         // 如果用户信息存在,根据GameID的最后一位数字查询映射关系

+ 1 - 1
app/Http/Controllers/Game/WebRouteController.php

@@ -160,7 +160,7 @@ class WebRouteController extends Controller
 
 //        $chat = "https://m.me/930365713484502";
         // 默认推荐游戏
-        $defaultGameId = 931;
+        $defaultGameId = 958;
         $recommendGame = '/game/' . $defaultGameId;
         $popPwaBonus=$user?(Redis::get('pwa_bonus:'.$user['UserID'])??0):0;
         $ChannelPackageName = DB::table('QPPlatformDB.dbo.ChannelPackageName')->where('Channel',$config->Channel??100)

+ 1 - 1
resources/views/admin/banner/add.blade.php

@@ -37,7 +37,7 @@
                                 </div>
                                 <div class="form-group">
                                     <label>State</label>
-                                    <input type="text" class="form-control" name="state" value="127">
+                                    <input type="text" class="form-control" name="state" value="0" placeholder="不填默认0">
                                 </div>
                                 <div class="form-group">
                                     <label>Link Game ID</label>

+ 1 - 1
resources/views/admin/banner/edit.blade.php

@@ -37,7 +37,7 @@
                                 </div>
                                 <div class="form-group">
                                     <label>State</label>
-                                    <input type="text" class="form-control" name="state" value="{{$info->state}}">
+                                    <input type="text" class="form-control" name="state" value="{{$info->state}}" placeholder="不填默认0">
                                 </div>
                                 <div class="form-group">
                                     <label>Link Game ID</label>