|
|
@@ -2963,22 +2963,23 @@ private function fetchArticles($catId, $website, $limit, $isImageArticle = false
|
|
|
|
|
|
$pinyin = WebsiteCategory::where('website_id', $data['website_id'])
|
|
|
->where('category_id',$catid)
|
|
|
- ->select('path')
|
|
|
- ->pluck('path');
|
|
|
+ ->first('path')
|
|
|
+ ->toArray();
|
|
|
}else{
|
|
|
- if ($last_category['pid'] != 0) {
|
|
|
+ // if ($last_category['pid'] != 0) {
|
|
|
$cat_arr = json_decode($last_category['category_arr_id'], true);
|
|
|
$catid = !empty($cat_arr) ? end($cat_arr) : null;
|
|
|
$pinyin = WebsiteCategory::where('website_id', $data['website_id'])
|
|
|
->where('category_id',$catid)
|
|
|
->where('path',$data['all_route'])
|
|
|
- ->pluck('path');
|
|
|
- } else {
|
|
|
- $pinyin[0] = $last_category['aLIas_pinyin'];
|
|
|
- }
|
|
|
+ ->first('path')
|
|
|
+ ->toArray();
|
|
|
+ // } else {
|
|
|
+ // $pinyin[0] = $last_category['aLIas_pinyin'];
|
|
|
+ // }
|
|
|
}
|
|
|
// return Result::success($pinyin[0]);
|
|
|
- if (empty($pinyin) || count($pinyin)>1 || $pinyin[0] != $data['all_route']) {
|
|
|
+ if (empty($pinyin) || count($pinyin)>1 || $pinyin['path'] != $data['all_route']) {
|
|
|
return Result::error('非法路径!');
|
|
|
} else {
|
|
|
return Result::success($pinyin);
|