fix下载非百度云链接

This commit is contained in:
limqhz
2022-05-16 23:17:44 +08:00
parent f6f11b4867
commit e2bd4c5084
2 changed files with 3 additions and 7 deletions

View File

@@ -30,12 +30,12 @@
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<a class="text-dark font-weight-bold text-decoration-none" th:href="@{'/source/view/'+${source.getSid()}}"> <a class="text-dark font-weight-bold text-decoration-none" th:href="@{'/source/view/'+${source.getSid()}}">
<h4 class="font-weight-normal d-inline"> <h5 class="font-weight-normal d-inline">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lightning-fill" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lightning-fill" viewBox="0 0 16 16">
<path d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641l2.5-8.5z"/> <path d="M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641l2.5-8.5z"/>
</svg> </svg>
[[${source.getSourceName()}]] [[${source.getSourceName()}]]
</h4> </h5>
<span class="badge badge-pill badge-warning"> <span class="badge badge-pill badge-warning">
[[${source.getCategoryName()}]] [[${source.getCategoryName()}]]
</span> </span>

View File

@@ -122,12 +122,8 @@
data: '', data: '',
success: function (res) { success: function (res) {
this.disabled=false; this.disabled=false;
if (res.substr(0,4)!= 'http'){
$('#downloadTrans').click();
}else {
window.open(res); window.open(res);
} }
}
}); });
} }
} }