mirror of
https://github.com/venera-app/venera-configs.git
synced 2025-09-27 08:27:24 +00:00
[komiic] Add update time
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
"name": "Komiic",
|
"name": "Komiic",
|
||||||
"fileName": "komiic.js",
|
"fileName": "komiic.js",
|
||||||
"key": "Komiic",
|
"key": "Komiic",
|
||||||
"version": "1.0.0"
|
"version": "1.0.1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "包子漫画",
|
"name": "包子漫画",
|
||||||
|
12
komiic.js
12
komiic.js
@@ -6,7 +6,7 @@ class Komiic extends ComicSource {
|
|||||||
// 唯一标识符
|
// 唯一标识符
|
||||||
key = "Komiic"
|
key = "Komiic"
|
||||||
|
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
|
|
||||||
minAppVersion = "1.0.0"
|
minAppVersion = "1.0.0"
|
||||||
|
|
||||||
@@ -85,6 +85,7 @@ class Komiic extends ComicSource {
|
|||||||
|
|
||||||
let updateTime = new Date(comic.dateUpdated)
|
let updateTime = new Date(comic.dateUpdated)
|
||||||
let description = getTimeDifference(updateTime)
|
let description = getTimeDifference(updateTime)
|
||||||
|
let formatedTime = `${updateTime.getFullYear()}-${updateTime.getMonth() + 1}-${updateTime.getDate()}`
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: comic.id,
|
id: comic.id,
|
||||||
@@ -92,7 +93,8 @@ class Komiic extends ComicSource {
|
|||||||
subTitle: author,
|
subTitle: author,
|
||||||
cover: comic.imageUrl,
|
cover: comic.imageUrl,
|
||||||
tags: tags,
|
tags: tags,
|
||||||
description: description
|
description: description,
|
||||||
|
updateTime: formatedTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,7 +344,7 @@ class Komiic extends ComicSource {
|
|||||||
let all = json.data.chaptersByComicId
|
let all = json.data.chaptersByComicId
|
||||||
let books = [], chapters = []
|
let books = [], chapters = []
|
||||||
all.forEach((c) => {
|
all.forEach((c) => {
|
||||||
if(c.type == 'book') {
|
if(c.type === 'book') {
|
||||||
books.push(c)
|
books.push(c)
|
||||||
} else {
|
} else {
|
||||||
chapters.push(c)
|
chapters.push(c)
|
||||||
@@ -375,12 +377,12 @@ class Komiic extends ComicSource {
|
|||||||
// map<string, string[]> 标签
|
// map<string, string[]> 标签
|
||||||
tags: {
|
tags: {
|
||||||
"作者": [info.subTitle],
|
"作者": [info.subTitle],
|
||||||
"更新": [info.description],
|
|
||||||
"标签": info.tags
|
"标签": info.tags
|
||||||
},
|
},
|
||||||
// map<string, string>?, key为章节id, value为章节名称
|
// map<string, string>?, key为章节id, value为章节名称
|
||||||
chapters: results[1],
|
chapters: results[1],
|
||||||
recommend: results[0].comics
|
recommend: results[0].comics,
|
||||||
|
updateTime: info.updateTime,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取章节图片
|
// 获取章节图片
|
||||||
|
Reference in New Issue
Block a user