update:动画rss界面新增【番剧计划】入口,以及是否今日更新提示
This commit is contained in:
@@ -24,16 +24,16 @@
|
||||
$('#header').load("/html/header.html");
|
||||
$('#footer').load("/html/footer.html");
|
||||
|
||||
var loadId = layer.load();
|
||||
let loadId = layer.load();
|
||||
$.get('/anim/meta/get.do', function (json) {
|
||||
layer.close(loadId)
|
||||
layui.use('tree', function () {
|
||||
var tree = layui.tree;
|
||||
let tree = layui.tree;
|
||||
tree.render({
|
||||
elem: '#animmeta',
|
||||
data: json,
|
||||
click: function (obj) {
|
||||
var url="https://bgm.tv/subject_search/"+encodeURIComponent(obj.data.title)+"?cat=2"
|
||||
let url="https://bgm.tv/subject_search/"+encodeURIComponent(obj.data.title)+"?cat=2"
|
||||
layer.prompt({
|
||||
title: "设置元数据:"+'<a href='+url+' target="_blank">查询</a>',
|
||||
value: ''
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="zh">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
@@ -169,6 +169,7 @@
|
||||
</script>
|
||||
<script type="text/html" id="listTools">
|
||||
<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-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</script>
|
||||
@@ -181,6 +182,15 @@
|
||||
value="{{d.id}}"></div>
|
||||
{{# }}}
|
||||
</script>
|
||||
<script type="text/html" id="animUpdateState">
|
||||
{{# if(d.update==1){}}
|
||||
<div><input type="checkbox" name="update" lay-text="今天更新|不更新" lay-filter="stateCheckbox" lay-skin="switch"
|
||||
value="{{d.id}}" checked disabled></div>
|
||||
{{# } else { }}
|
||||
<div><input type="checkbox" name="update" lay-text="今天更新|不更新" lay-filter="stateCheckbox" lay-skin="switch"
|
||||
value="{{d.id}}" disabled></div>
|
||||
{{# }}}
|
||||
</script>
|
||||
<script>
|
||||
$('#header').load("/html/header.html");
|
||||
$('#footer').load("/html/footer.html");
|
||||
@@ -216,12 +226,14 @@
|
||||
, url: '/anim/rss/list.do?type=' + tabid
|
||||
, page: true
|
||||
, cols: [[
|
||||
{field: "id", title: "id", width: 80, sort: true, fixed: 'left'}
|
||||
{field: "id", title: "id", width: 60, sort: true, fixed: 'left'}
|
||||
, {field: 'bgmid', title: 'bgmId', width: 80, edit: 'text'}
|
||||
, {field: 'title', title: '标题', edit: 'text'}
|
||||
, {field: 'categories', title: '类型', width: 80}
|
||||
, {field: 'author', title: '字幕组', width: 100}
|
||||
, {field: 'titlekey', title: '搜索关键词', edit: 'text'}
|
||||
, {field: 'titlekey', title: '搜索关键词', width: 200, edit: 'text'}
|
||||
, {field: 'enable', title: '状态', width: 80, templet: '#animState'}
|
||||
, {field: 'update', title: '更新', width: 110, templet: '#animUpdateState'}
|
||||
, {field: "right", toolbar: '#listTools'}
|
||||
]]
|
||||
});
|
||||
@@ -234,6 +246,8 @@
|
||||
let data = {}
|
||||
if (type === 'title') {
|
||||
data = {id: id, title: value}
|
||||
} else if (type === 'bgmid') {
|
||||
data = {id: id, bgmId: value}
|
||||
} else {
|
||||
data = {id: id, titleKey: value}
|
||||
}
|
||||
@@ -293,6 +307,8 @@
|
||||
})
|
||||
} else if (obj.event === 'src') {
|
||||
window.open("https://share.dmhy.org/topics/list?keyword=" + encodeURI(obj.data.titlekey))
|
||||
} else if (obj.event === 'bgm_src') {
|
||||
window.open("https://bgm.tv/subject/" + obj.data.bgmid)
|
||||
}
|
||||
})
|
||||
table.on('tool(rssTools)', function (obj) {
|
||||
@@ -306,19 +322,22 @@
|
||||
option += '<option>' + i + '</option>'
|
||||
}
|
||||
}
|
||||
let html = '<form class="layui-form">名字:<div class="layui-form-item"><textarea class="layui-textarea" id="rss_value">'+data.title+'</textarea> 季度:<select lay-search lay-verify="required" id="rss_select">'+option+'</select></div></form>'
|
||||
let html = '<form class="layui-form">名字:<div class="layui-form-item"><textarea class="layui-textarea" id="rss_value" onblur="setTitle(this)">' + data.title + '</textarea> 季度:<select lay-search lay-verify="required" id="rss_select">' + option + '</select> <a id="bgmUrl" href="javascript:;" target="_blank">bgmId:</a><input class="layui-input" id="bgmId"/></div></form>'
|
||||
layer.open({
|
||||
type: 0,
|
||||
area: ['500px', '600px'],
|
||||
title: '订阅这个RSS结果,并加入到第' + tabid + '个分类中',
|
||||
content: html,
|
||||
success:function (){
|
||||
success: function () {
|
||||
|
||||
form.render('select');
|
||||
},
|
||||
yes: function (index, elem) {
|
||||
let value=$('#rss_value')[0].value+'/Season '+$('#rss_select')[0].value
|
||||
let value = $('#rss_value')[0].value + '/Season ' + $('#rss_select')[0].value
|
||||
let bgmId = $('#bgmId')[0].value
|
||||
$.post("/anim/rss/add.do", {
|
||||
title: value
|
||||
, bgmId: bgmId
|
||||
, author: data.author
|
||||
, categories: data.categories[0]
|
||||
, titleKey: $('#title').val()
|
||||
@@ -376,6 +395,10 @@
|
||||
$('#search').click(function () {
|
||||
searchClick()
|
||||
})
|
||||
$('#searchBgmId').click(function () {
|
||||
let url = "https://bgm.tv/subject_search/" + encodeURIComponent($('#title')[0].value) + "?cat=2"
|
||||
window.open(url)
|
||||
})
|
||||
|
||||
function searchClick() {
|
||||
rssList.reload({
|
||||
@@ -387,8 +410,16 @@
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
function setTitle(_this) {
|
||||
let url = "https://bgm.tv/subject_search/" + encodeURIComponent(_this.value) + "?cat=2"
|
||||
console.log(url)
|
||||
$('#bgmUrl')[0].href = url;
|
||||
}
|
||||
|
||||
//let js="" ; $('#team option').each(function() { let value=$(this).val(); let text=$(this).text(); js+='{"'+value+'":"'+text+'"},'})
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user