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