|
@@ -665,14 +665,14 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
$where = [
|
|
|
'website_id' => $data['website_id'],
|
|
|
'status' => 1,
|
|
|
- 'type' => $data['type'],
|
|
|
- ];
|
|
|
- $num = $data['num'];
|
|
|
- $result = Link::where($where)->orderBy('id')->limit($num)->get();
|
|
|
- if (!empty($result)) {
|
|
|
- return Result::success($result);
|
|
|
- } else {
|
|
|
- return Result::error("本网站暂无此类型友情链接", 0);
|
|
|
+ 'type' => $data['type']
|
|
|
+ ];
|
|
|
+ $num=$data['num'];
|
|
|
+ $result=Link::where($where)->orderBy('sort')->limit($num)->get();
|
|
|
+ if(!empty($result)){
|
|
|
+ return Result::success($result);
|
|
|
+ }else{
|
|
|
+ return Result::error("本网站暂无此类型友情链接",0);
|
|
|
}
|
|
|
}
|
|
|
|