rkljw 1 week ago
parent
commit
82941501a2
2 changed files with 5 additions and 3 deletions
  1. 4 2
      app/JsonRpc/NewsService.php
  2. 1 1
      runtime/hyperf.pid

+ 4 - 2
app/JsonRpc/NewsService.php

@@ -3191,9 +3191,11 @@ class NewsService implements NewsServiceInterface
    */
   public function checkWebsiteRoute(array $data): array
   {
-    $web = Website::where('id', $data['website_id'])->first(['id', 'website_name']);
+    $web = Website::where('id', $data['website_id'])->first(['id', 'website_name','status']);
     if (empty($web)) {
-      return Result::error("该网站不存在", 0);
+        return Result::error("该网站不存在", 0);
+    }elseif ($web['status'] != 1){
+        return Result::error("网站已经关闭", 0);
     }
     if (isset($data['other_route']) && !empty($data['other_route'])) {
       $whiteRouterInfo = WhiteRouter::whereJsonContains("website_id", $data['website_id'])->where('router_url', $data['other_route'])->first();

+ 1 - 1
runtime/hyperf.pid

@@ -1 +1 @@
-17978
+52055