fix: 文档错误/ 小bug (#2833)

This commit is contained in:
sanmmmm
2019-08-12 11:14:58 +08:00
committed by DIYgod
parent f6646c31c4
commit b9ed4a9e26
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1235,7 +1235,7 @@ type 为 all 时,category 参数不支持 cost 和 free
### 字幕列表
<Route author="sanmmm" example="/zimuzu/mv" path="/zimuzu/:type?" :paramsDesc="['类型, 默认为`mv`电影']">
<Route author="sanmmm" example="/zimuku/mv" path="/zimuku/:type?" :paramsDesc="['类型, 默认为`mv`电影']">
类型
+1 -1
View File
@@ -21,7 +21,7 @@ module.exports = async (ctx) => {
const desc = $item('.gy_box_txt3').text();
return {
title,
link,
link: link.trim().replace(/^\/\//, 'https://'),
description: [`<img src="${realImgUrl}"/>`, desc].join('<br/>'),
};
})
+5 -1
View File
@@ -1,4 +1,6 @@
const cheerio = require('cheerio');
const dayJs = require('dayjs');
require('dayjs/locale/zh-cn');
const getDeadlineStr = ($, countDownNodeSelector) => {
const countDownNode = $(countDownNodeSelector);
@@ -13,7 +15,9 @@ const getDeadlineStr = ($, countDownNodeSelector) => {
const index = args[args.length - 2];
return index === 10 ? ' ' : index < 10 ? '-' : ':';
});
deadlineStr = `截至日期: ${new Date(dateStr).toUTCString()}`;
deadlineStr = `截至日期: ${dayJs(dateStr)
.locale('zh-cn')
.format('YYYY-MM-DD HH:mm:ss')}`;
}
return deadlineStr;
};