Преглед изворни кода

Merge branch '0307_linkbug_fr' into dev

15313670163 пре 2 месеци
родитељ
комит
680f77440a
1 измењених фајлова са 14 додато и 0 уклоњено
  1. 14 0
      app/JsonRpc/LinkService.php

+ 14 - 0
app/JsonRpc/LinkService.php

@@ -105,5 +105,19 @@ class LinkService implements LinkServiceInterface
         }
     }
 
+    /**
+     * 获取友情链接详情
+     * @param array $data
+     * @return array
+     */
+    public function getLinkInfo(array $data): array
+    {
+        $result = Link::where('id', $data['id'])->first();
+        if (empty($result)) {
+            return Result::error("获取友情链接详情失败", 0);
+        } else {
+            return Result::success($result);
+        }
+    }
 
 }