| xqd
@@ -307,6 +307,7 @@ class ApiController extends Controller
|
|
|
$article_list = Content::where('type', 4)->orderBy('sort')->offset($article_offset)->limit(15)->get();
|
|
|
foreach($article_list as $item) {
|
|
|
$item->publish_date = substr($item->updated_at, 0, 10);
|
|
|
+ $item->pic_url = empty($item->pic_url) ? null : url($item->pic_url);
|
|
|
}
|
|
|
return response()->json(['status' => 'success', 'video_list' => $video_list, 'article_list' => $article_list, 'type' => $request->input('type')]);
|
|
|
} else if($request->input('type') == 'video') {
|
| xqd
@@ -323,6 +324,7 @@ class ApiController extends Controller
|
|
|
$list = Content::where('type', 4)->orderBy('sort')->offset($article_offset)->limit(15)->get();
|
|
|
foreach($list as $item) {
|
|
|
$item->publish_date = substr($item->updated_at, 0, 10);
|
|
|
+ $item->pic_url = empty($item->pic_url) ? null : url($item->pic_url);
|
|
|
}
|
|
|
}
|
|
|
|