mirror of
https://github.com/venera-app/venera-configs.git
synced 2025-09-27 16:37:23 +00:00
refactor(zaimanhua): 简化 parseJsonComic 方法中的对象创建逻辑
直接使用对象属性初始化 Comic 对象,避免不必要的中间变量
This commit is contained in:
21
zaimanhua.js
21
zaimanhua.js
@@ -70,22 +70,13 @@ class ZaiManHua extends ComicSource {
|
|||||||
* @returns {Comic}
|
* @returns {Comic}
|
||||||
*/
|
*/
|
||||||
parseJsonComic(e) {
|
parseJsonComic(e) {
|
||||||
let cover = e.cover;
|
|
||||||
let title = e.name;
|
|
||||||
let id = e.comic_py;
|
|
||||||
|
|
||||||
let subtitle = e.authors;
|
|
||||||
|
|
||||||
let classify = e.types.split("/");
|
|
||||||
let description = e.last_update_chapter_name;
|
|
||||||
|
|
||||||
return new Comic({
|
return new Comic({
|
||||||
title,
|
id: e.comic_py,
|
||||||
id,
|
title: e.name,
|
||||||
subtitle,
|
subtitle: e.authors,
|
||||||
tags: classify,
|
tags: e.types.split("/"),
|
||||||
cover,
|
cover: e.cover,
|
||||||
description,
|
description: e.last_update_chapter_name,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user