seven 1 день назад
Родитель
Сommit
bc1478459e
2 измененных файлов с 8 добавлено и 0 удалено
  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 () {