feat: 增加超链接跳转到视频网站

This commit is contained in:
lyz05
2025-10-17 14:51:06 +08:00
parent f3ab189cf9
commit 046a2ca4bd
2 changed files with 3 additions and 1 deletions

View File

@@ -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
});

View File

@@ -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/>