Browse Source

修改接口:修改网站头部基础信息

15313670163 1 day ago
parent
commit
5c0e372d9c
1 changed files with 8 additions and 8 deletions
  1. 8 8
      app/JsonRpc/WebsiteService.php

+ 8 - 8
app/JsonRpc/WebsiteService.php

@@ -167,15 +167,15 @@ class WebsiteService implements WebsiteServiceInterface
             'suffix' => $data['suffix'] ?? "",
             'ad_key' => $data['ad_key'] ?? "",
         ];
-        $web_templsate = WebsiteTemplateInfo::where('website_id', $data['id'])->first();
+        // $web_templsate = WebsiteTemplateInfo::where('website_id', $data['id'])->first();
         // `status` tinyint(1) DEFAULT '0' COMMENT '0:未构建 1:未应用 2:已应用',
-        if (!empty($web_templsate) && $web_templsate['status'] == 2) {
-            return Result::error("此网站已应用,不可修改基本信息", 0);
-        }
-
-        Db::beginTransaction();
-        try {
-            if ($data['ad_key'] !=  $website['ad_key']) {
+        // if (!empty($web_templsate) && $web_templsate['status'] == 2) {
+        //     return Result::error("此网站已应用,不可修改基本信息", 0);
+        // }
+       
+       Db::beginTransaction();
+       try{
+            if($data['ad_key'] !=  $website['ad_key']){
                 $web = Website::where(function ($query) use ($data) {
                     $query->where('id', '!=', $data['id'])
                         ->where('ad_key', $data['ad_key']);