|
@@ -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);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|