|
@@ -28,6 +28,9 @@ class BookTransformer
|
|
|
'book_chapter_total' => $item->book ? $item->book->chapter_count : 0,
|
|
|
'book_category_id' => $item->book ? $item->book->category_id : 0,
|
|
|
'book_end_status' => $item->book ? $item->book->status : 0,
|
|
|
+ 'last_cid' => $item->book ? $item->book->last_cid : 0,
|
|
|
+ 'last_chapter' => $item->book ? $item->book->last_chapter : 0,
|
|
|
+ 'first_cid' => $item->book ? $item->book->first_cid : 0,
|
|
|
'book_category' => $item->book && $item->book->category ? $item->book->category->category_name : '',
|
|
|
'sex_preference' => $item->book && $item->book->category ? $item->book->category->channel_name : '',
|
|
|
'category_array' => $item->book && $item->book->category ? [$item->book->category->pid, $item->book->category_id] : [],
|
|
@@ -44,9 +47,6 @@ class BookTransformer
|
|
|
'recommend_index' => $item->recommend_index,
|
|
|
'is_show_index_content' => $item->is_show_index_content,
|
|
|
'click_count' => $item->click_count,
|
|
|
- 'last_cid' => $item->last_cid,
|
|
|
- 'last_chapter' => $item->last_chapter,
|
|
|
- 'first_cid' => $item->first_cid,
|
|
|
'copyright_limit_data' => (string)$item->copyright_limit_data,
|
|
|
'promotion_domain' => $item->promotion_domain,
|
|
|
'calculate_price_type' => $item->calculate_price_type,
|
|
@@ -59,7 +59,7 @@ class BookTransformer
|
|
|
'book_roles' => $this->getBookRoles($item),
|
|
|
'unit_price' => $this->getPrice($item),
|
|
|
'shelf_time' => $item->shelf_time,
|
|
|
- 'is_split' => $this->isSplit($item),
|
|
|
+ 'is_split' => $this->isSplit($item->bid),
|
|
|
];
|
|
|
}
|
|
|
|