Browse Source

sync code

aiden 3 tháng trước cách đây
mục cha
commit
656ac64ae1
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 2 1
      app/middleware.php
  2. 1 1
      app/model/GameRecordModel.php

+ 2 - 1
app/middleware.php

@@ -7,7 +7,8 @@ return [
     // \think\middleware\LoadLangPack::class,
     // Session初始化
     // \think\middleware\SessionInit::class
-    
+    // 跨域
+    \think\middleware\AllowCrossDomain::class
     // 注意:AuthMiddleware 不能配置在这里,因为这里的中间件在路由分发前执行
     // 需要在路由中配置中间件
 ];

+ 1 - 1
app/model/GameRecordModel.php

@@ -60,7 +60,7 @@ class GameRecordModel extends Model
         }
         
         // 用户ID筛选
-        if (!empty($filters['user_id'])) {
+        if (!empty($filters['player_id'])) {
             $wheres[] = ['user_id', '=', $filters['user_id']];
         }