mirror of
https://github.com/lyz05/danmaku.git
synced 2026-05-05 08:04:33 +08:00
feat: 增加超链接跳转到视频网站
This commit is contained in:
@@ -92,6 +92,7 @@ async function resolve(req, res) {
|
||||
async function index(req, res) {
|
||||
const urls = list.map(item => item.example_urls[0]);
|
||||
const names = list.map(item => item.name);
|
||||
const domains = list.map(item => item.domain);
|
||||
const path = req.protocol + "://" + req.headers.host + req.originalUrl;
|
||||
const resolve_info = await db.accessCountQuery()
|
||||
const hotlist = await db.hotlistQuery()
|
||||
@@ -99,6 +100,7 @@ async function index(req, res) {
|
||||
path,
|
||||
urls,
|
||||
names,
|
||||
domains,
|
||||
resolve_info,
|
||||
hotlist
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
使用方法:在当前页面添加一个查询字符串url<br/>
|
||||
目前支持
|
||||
<% names.forEach(function(name, idx) { %>
|
||||
<%= name %><% if(idx !== names.length - 1) { %>,<% } %>
|
||||
<a href="https://<%= domains[idx] %>"><%= name %></a><% if (idx !== names.length - 1) { %>,<% } %>
|
||||
<% }); %>。
|
||||
<br/>
|
||||
注意:目前只支持单个视频的解析,不支持专辑的解析。<br/>
|
||||
|
||||
Reference in New Issue
Block a user