update:rss订阅动画新增选择季度

This commit is contained in:
Yutousama 2022-07-09 16:30:46 +08:00
parent 6dfc9901ab
commit f59069399f

View File

@ -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"
@ -300,11 +298,25 @@
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) {
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
@ -316,6 +328,7 @@
layer.msg(json.msg)
layer.close(index)
})
}
})
} else if (obj.event === "rss_src") {
window.open(obj.data.link)