seven há 1 dia atrás
pai
commit
bc1478459e
2 ficheiros alterados com 8 adições e 0 exclusões
  1. 7 0
      app/Http/Controllers/admin/GameplayRule.php
  2. 1 0
      routes/admin.php

+ 7 - 0
app/Http/Controllers/admin/GameplayRule.php

@@ -120,4 +120,11 @@ class GameplayRule extends Controller
         return $this->success([], '删除成功');
     }
 
+    public function info()
+    {
+        $keywords = request()->get('keywords', '');
+        $result = GameplayRuleService::getGameplayRules($keywords);
+        return $this->success($result);
+    }
+
 }

+ 1 - 0
routes/admin.php

@@ -27,6 +27,7 @@ Route::prefix('/sync')->group(function () {
 });
 
 Route::post('/gameplayRule', [GameplayRule::class, 'store']); // 游戏规则写入
+Route::get('/gameplayRule/cache', [GameplayRule::class, 'info']); // 游戏规则缓存读取
 Route::middleware(['admin.jwt'])->group(function () {