update:rss订阅动画新增选择季度
This commit is contained in:
parent
6dfc9901ab
commit
f59069399f
@ -13,12 +13,10 @@
|
||||
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div id="header"></div>
|
||||
|
||||
<div class="layui-body body2">
|
||||
|
||||
<div id="side"></div>
|
||||
<blockquote class="layui-elem-quote"><span id="ip">番剧订阅器</span></blockquote>
|
||||
|
||||
|
||||
<blockquote class="layui-elem-quote"><span>番剧订阅器</span></blockquote>
|
||||
<button type="button" id="addType" class="layui-btn layui-btn-normal">新增分类</button>
|
||||
<div class="layui-tab" lay-filter="animType" lay-allowclose="true">
|
||||
<ul class="layui-tab-title">
|
||||
@ -28,7 +26,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote"><span id="ip">动漫花园RSS</span></blockquote>
|
||||
<blockquote class="layui-elem-quote"><span>动漫花园RSS</span></blockquote>
|
||||
<form class="layui-form" action="" lay-filter="formTest">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><a type="text" id="search"
|
||||
@ -220,10 +218,10 @@
|
||||
, cols: [[
|
||||
{field: "id", title: "id", width: 80, sort: true, fixed: 'left'}
|
||||
, {field: 'title', title: '标题', edit: 'text'}
|
||||
, {field: 'categories', title: '类型',width: 80}
|
||||
, {field: 'author', title: '字幕组',width:100}
|
||||
, {field: 'categories', title: '类型', width: 80}
|
||||
, {field: 'author', title: '字幕组', width: 100}
|
||||
, {field: 'titlekey', title: '搜索关键词', edit: 'text'}
|
||||
, {field: 'enable', title: '状态',width:80, templet: '#animState'}
|
||||
, {field: 'enable', title: '状态', width: 80, templet: '#animState'}
|
||||
, {field: "right", toolbar: '#listTools'}
|
||||
]]
|
||||
});
|
||||
@ -293,38 +291,53 @@
|
||||
layer.close(index);
|
||||
}
|
||||
})
|
||||
}else if(obj.event === 'src'){
|
||||
window.open("https://share.dmhy.org/topics/list?keyword="+encodeURI(obj.data.titlekey))
|
||||
} else if (obj.event === 'src') {
|
||||
window.open("https://share.dmhy.org/topics/list?keyword=" + encodeURI(obj.data.titlekey))
|
||||
}
|
||||
})
|
||||
table.on('tool(rssTools)', function (obj) {
|
||||
let data = obj.data;
|
||||
if (obj.event === 'addRss') {
|
||||
layer.prompt({
|
||||
formType: 2,
|
||||
let option = '';
|
||||
for (let i = 0; i < 20; i++) {
|
||||
if (i === 1) {
|
||||
option += '<option selected>' + i + '</option>'
|
||||
} else {
|
||||
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>'
|
||||
layer.open({
|
||||
type: 0,
|
||||
area: ['500px', '600px'],
|
||||
title: '订阅这个RSS结果,并加入到第' + tabid + '个分类中',
|
||||
value: data.title
|
||||
}, function (value, index, elem) {
|
||||
$.post("/anim/rss/add.do", {
|
||||
title: value
|
||||
, author: data.author
|
||||
, categories: data.categories[0]
|
||||
, titleKey: $('#title').val()
|
||||
, bid: tabid
|
||||
}, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg)
|
||||
layer.close(index)
|
||||
})
|
||||
content: html,
|
||||
success:function (){
|
||||
form.render('select');
|
||||
},
|
||||
yes: function (index, elem) {
|
||||
let value=$('#rss_value')[0].value+'/Season '+$('#rss_select')[0].value
|
||||
$.post("/anim/rss/add.do", {
|
||||
title: value
|
||||
, author: data.author
|
||||
, categories: data.categories[0]
|
||||
, titleKey: $('#title').val()
|
||||
, bid: tabid
|
||||
}, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg)
|
||||
layer.close(index)
|
||||
})
|
||||
}
|
||||
})
|
||||
}else if(obj.event === "rss_src"){
|
||||
} else if (obj.event === "rss_src") {
|
||||
window.open(obj.data.link)
|
||||
}
|
||||
})
|
||||
form.on('switch(stateCheckbox)', function (data) {
|
||||
let flag = data.elem.checked ? 1 : 0;
|
||||
let id = data.value;
|
||||
$.post('/anim/rss/edit.do',{id:id,enable:flag},function (json) {
|
||||
$.post('/anim/rss/edit.do', {id: id, enable: flag}, function (json) {
|
||||
layer.msg(json.msg)
|
||||
})
|
||||
})
|
||||
@ -339,8 +352,8 @@
|
||||
page: true,
|
||||
cols: [[
|
||||
{field: "title", title: "标题", sort: true, fixed: 'left'}
|
||||
, {field: 'author', title: '字幕组',width:100}
|
||||
, {field: 'categories', title: '类型',width:80, templet: '<div><label>{{d.categories[0]}}</label><div>'}
|
||||
, {field: 'author', title: '字幕组', width: 100}
|
||||
, {field: 'categories', title: '类型', width: 80, templet: '<div><label>{{d.categories[0]}}</label><div>'}
|
||||
, {field: 'pubDate', title: '发布时间',}
|
||||
, {field: 'thumbnail', title: '封面', templet: '<div><img src="{{d.thumbnail}}"/><div>'}
|
||||
, {field: 'title', title: 'magnet', templet: '<div><label >{{d.enclosure.link}}</label ></div>'}
|
||||
|
Loading…
Reference in New Issue
Block a user