add:新增手动下载动画选项(吸附于已注册动画)
This commit is contained in:
@@ -171,6 +171,7 @@
|
||||
<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="src">原地址</a>
|
||||
<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="bgm_src">番剧计划</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="show">查看</a>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="down">手动下载</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</script>
|
||||
<script type="text/html" id="RsslistTools">
|
||||
@@ -384,10 +385,36 @@
|
||||
window.open('https://mikanani.me/Home/Bangumi/'+getParamToUrl('bangumiId',obj.data.title)+'#'+getParamToUrl('subgroupid',obj.data.title))
|
||||
} else if (obj.event==='tmp_rss_show'){
|
||||
window.open(obj.data.title)
|
||||
} else if (obj.event==='tmp_rss_del'){
|
||||
$.post('/anim/rss/del.do', {id: obj.data.title}, function (json) {
|
||||
} else if (obj.event === 'tmp_rss_del'){
|
||||
$.post('/anim/rss/del.do', {id: JSON.stringify(obj.data)}, function (json) {
|
||||
layer.msg(json.msg)
|
||||
})
|
||||
} else if(obj.event === 'down'){
|
||||
let index=layer.load()
|
||||
$.post('/anim/rssdata.do',{id:obj.data.id},function (json) {
|
||||
layer.close(index)
|
||||
if(json.code!==0){
|
||||
layer.msg(json.msg)
|
||||
return;
|
||||
}
|
||||
let html = '<table class="layui-table"> <colgroup> <col width="150" /> <col width="200" /> <col /> </colgroup> <thead> <tr> <th width="200">标题</th> <th>更新时间</th> <th>图片</th> <th>地址</th> </tr> </thead> <tbody> </tbody>'
|
||||
json.data.forEach((item) => {
|
||||
let name = item.title
|
||||
let img='#'
|
||||
if(item.thumbnail!=null){
|
||||
img=item.thumbnail
|
||||
}
|
||||
html += '<tr><td>' + name + '</td><td>' + item.pubDate + '</td><td><img src="' + img + '"></td><td><a href="javascript:sendDownload('+obj.data.id+',\''+item.enclosure.link+'\')">下载这个</a></td></tr>'
|
||||
})
|
||||
html += "</table>"
|
||||
layer.open({
|
||||
title: '手动下载',
|
||||
area: ['800px', '600px'],
|
||||
content: html,
|
||||
shade: 0
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
table.on('tool(rssTools)', function (obj) {
|
||||
@@ -492,7 +519,6 @@
|
||||
function showToDayAnim() {
|
||||
$.get("/anim/getToDay.do", function (json) {
|
||||
let items = json.items;
|
||||
let _tab = []
|
||||
let html = '<table class="layui-table"> <colgroup> <col width="150" /> <col width="200" /> <col /> </colgroup> <thead> <tr> <th>标题</th> <th>首更时间</th> <th>图片</th> <th>地址</th> </tr> </thead> <tbody> </tbody>'
|
||||
items.forEach((item) => {
|
||||
let name = item.name_cn
|
||||
@@ -504,7 +530,6 @@
|
||||
img=item.images.small
|
||||
}
|
||||
html += '<tr><td>' + name + '</td><td>' + item.air_date + '</td><td><img src="' + img + '"></td><td><a href="' + item.url + '" target="_blank">前往番剧计划</a></td></tr>'
|
||||
_tab.push({title: item.name, url: '<a href="' + item.url + '">前往番剧计划</a>'})
|
||||
})
|
||||
html += "</table>"
|
||||
layer.open({
|
||||
@@ -524,6 +549,12 @@
|
||||
let url = "https://bgm.tv/subject_search/" + encodeURIComponent(_this.value) + "?cat=2"
|
||||
$('#bgmUrl')[0].href = url;
|
||||
}
|
||||
function sendDownload(id, url) {
|
||||
console.log("id = "+id +" url = "+url);
|
||||
$.post("/anim/setDownload.do",{id:id,url:url},function (json) {
|
||||
layer.msg(json.msg)
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user