2020-05-12 17:42:24 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
|
|
|
<title>NAS</title>
|
|
|
|
|
<link rel="stylesheet" href="/layui/css/layui.css">
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
<div class="layui-layout layui-layout-admin">
|
|
|
|
|
<div id="header"></div>
|
|
|
|
|
<div class="layui-body" style="top: 100px; ">
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
<div id="side"></div>
|
|
|
|
|
<blockquote class="layui-elem-quote"><span id="ip">番剧订阅器</span></blockquote>
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
<button type="button" id="addType" class="layui-btn layui-btn-normal">新增分类</button>
|
|
|
|
|
<div class="layui-tab" lay-filter="type" lay-allowclose="true">
|
|
|
|
|
<ul class="layui-tab-title">
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
</ul>
|
|
|
|
|
<div class="layui-tab-content">
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
|
|
|
|
</div>
|
2020-10-21 18:05:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
<blockquote class="layui-elem-quote"><span id="ip">动漫花园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"
|
|
|
|
|
class="layui-btn layui-btn-normal">搜索</a></label>
|
|
|
|
|
<div class="layui-input-block" style="padding-top: 8px; width: 200px;">
|
|
|
|
|
<input type="text" name="title" id="title" required lay-verify="required" placeholder="请输入标题"
|
|
|
|
|
autocomplete="off" class="layui-input" style="width: 200px;">
|
|
|
|
|
</div>
|
2020-05-12 17:42:24 +08:00
|
|
|
|
<div class="layui-form-item">
|
2020-10-21 18:05:33 +08:00
|
|
|
|
<label class="layui-form-label">类型</label>
|
|
|
|
|
<div class="layui-input-block" style="width: 200px;">
|
|
|
|
|
<select name="type" lay-verify="type" id="type">
|
|
|
|
|
<option value="0">全部</option>
|
|
|
|
|
<option value="2">動畫</option>
|
|
|
|
|
<option value="31">季度全集</option>
|
|
|
|
|
<option value="3">漫畫</option>
|
|
|
|
|
<option value="41">港台原版</option>
|
|
|
|
|
<option value="42">日文原版</option>
|
|
|
|
|
<option value="4">音樂</option>
|
|
|
|
|
<option value="43">動漫音樂</option>
|
|
|
|
|
<option value="44">同人音樂</option>
|
|
|
|
|
<option value="15">流行音樂</option>
|
|
|
|
|
<option value="6">日劇</option>
|
|
|
|
|
<option value="7">RAW</option>
|
|
|
|
|
<option value="9">遊戲</option>
|
|
|
|
|
<option value="17">電腦遊戲</option>
|
|
|
|
|
<option value="18">電視遊戲</option>
|
|
|
|
|
<option value="19">掌機遊戲</option>
|
|
|
|
|
<option value="20">網絡遊戲</option>
|
|
|
|
|
<option value="21">遊戲周邊</option>
|
|
|
|
|
<option value="12">特攝</option>
|
|
|
|
|
<option value="1">其他</option>
|
|
|
|
|
</select>
|
2020-05-12 17:42:24 +08:00
|
|
|
|
</div>
|
2020-10-21 18:05:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">字幕组</label>
|
|
|
|
|
<div class="layui-input-block" style="width: 200px;">
|
|
|
|
|
<select name="team" lay-verify="team" id='team'>
|
|
|
|
|
<option value="0">全部</option>
|
|
|
|
|
<option value="117">動漫花園</option>
|
|
|
|
|
<option value="669">喵萌奶茶屋</option>
|
|
|
|
|
<option value="648">魔星字幕团</option>
|
|
|
|
|
<option value="185">极影字幕社</option>
|
|
|
|
|
<option value="619">桜都字幕组</option>
|
|
|
|
|
<option value="604">c.c动漫</option>
|
|
|
|
|
<option value="241">幻樱字幕组</option>
|
|
|
|
|
<option value="151">悠哈C9字幕社</option>
|
|
|
|
|
<option value="657">LoliHouse</option>
|
|
|
|
|
<option value="283">千夏字幕组</option>
|
|
|
|
|
<option value="755">GMTeam</option>
|
|
|
|
|
<option value="390">天使动漫</option>
|
|
|
|
|
<option value="731">星空字幕组</option>
|
|
|
|
|
<option value="303">动漫国字幕组</option>
|
|
|
|
|
<option value="563">花園壓制組</option>
|
|
|
|
|
<option value="37">雪飄工作室(FLsnow)</option>
|
|
|
|
|
<option value="47">爱恋字幕社</option>
|
|
|
|
|
<option value="710">咪梦动漫组</option>
|
|
|
|
|
<option value="88">动音漫影</option>
|
|
|
|
|
<option value="574">梦蓝字幕组</option>
|
|
|
|
|
<option value="504">LoveEcho!</option>
|
|
|
|
|
<option value="765">爱咕字幕组</option>
|
|
|
|
|
<option value="520">豌豆字幕组</option>
|
|
|
|
|
<option value="650">SweetSub</option>
|
|
|
|
|
<option value="430">幻之字幕组</option>
|
|
|
|
|
<option value="407">DHR動研字幕組</option>
|
|
|
|
|
<option value="321">轻之国度</option>
|
|
|
|
|
<option value="581">VCB-Studio</option>
|
|
|
|
|
<option value="703">届恋字幕组</option>
|
|
|
|
|
<option value="576">银色子弹字幕组</option>
|
|
|
|
|
<option value="454">风车字幕组</option>
|
|
|
|
|
<option value="485">天空树双语字幕组</option>
|
|
|
|
|
<option value="134">漫游字幕组</option>
|
|
|
|
|
<option value="434">风之圣殿</option>
|
|
|
|
|
<option value="630">枫叶字幕组</option>
|
|
|
|
|
<option value="228">KRL字幕组</option>
|
|
|
|
|
<option value="526">东京不够热</option>
|
|
|
|
|
<option value="592">未央阁联盟</option>
|
|
|
|
|
<option value="288">诸神kamigami字幕组</option>
|
|
|
|
|
<option value="767">天月動漫&發佈組</option>
|
|
|
|
|
<option value="768">千歲字幕組</option>
|
|
|
|
|
<option value="423">漫貓字幕組</option>
|
|
|
|
|
<option value="562">129.3字幕組</option>
|
|
|
|
|
<option value="447">夢幻戀櫻</option>
|
|
|
|
|
<option value="680">Little字幕组</option>
|
|
|
|
|
<option value="641">冷番补完字幕组</option>
|
|
|
|
|
<option value="31">卡通空間</option>
|
|
|
|
|
<option value="649">云光字幕组</option>
|
|
|
|
|
<option value="701">狐狸小宮</option>
|
|
|
|
|
<option value="459">紫音動漫&發佈組</option>
|
|
|
|
|
<option value="699">小花花同盟戰線</option>
|
|
|
|
|
<option value="626">驯兽师联盟</option>
|
|
|
|
|
<option value="58">澄空学园</option>
|
|
|
|
|
<option value="769">动漫萌</option>
|
|
|
|
|
<option value="734">TD-RAWS</option>
|
|
|
|
|
<option value="225">鈴風字幕組</option>
|
|
|
|
|
<option value="673">VRAINSTORM</option>
|
|
|
|
|
<option value="741">銀月字幕組</option>
|
|
|
|
|
<option value="675">AikatsuFans</option>
|
|
|
|
|
<option value="759">红鸟窝字幕组</option>
|
|
|
|
|
<option value="764">MCE汉化组</option>
|
|
|
|
|
<option value="391">ZERO字幕组</option>
|
|
|
|
|
<option value="561">钉铛字幕组</option>
|
|
|
|
|
<option value="727">2B4B</option>
|
|
|
|
|
<option value="104">动漫先锋</option>
|
|
|
|
|
<option value="567">雪梦字幕组</option>
|
|
|
|
|
<option value="573">Centaurea-Raws</option>
|
|
|
|
|
<option value="652">SFEO-Raws</option>
|
|
|
|
|
<option value="666">中肯字幕組</option>
|
|
|
|
|
<option value="754">BYYM发布组</option>
|
|
|
|
|
<option value="613">AI-Raws</option>
|
|
|
|
|
<option value="706">K&W-RAWS</option>
|
|
|
|
|
<option value="732">肥猫压制</option>
|
|
|
|
|
<option value="424">TSDM字幕組</option>
|
|
|
|
|
<option value="739">Clarita 压制组</option>
|
|
|
|
|
<option value="432">自由字幕组</option>
|
|
|
|
|
<option value="217">AQUA工作室</option>
|
|
|
|
|
<option value="753">柠檬水字幕组</option>
|
|
|
|
|
<option value="763">光之家族字幕组</option>
|
|
|
|
|
<option value="332">CureSub</option>
|
|
|
|
|
<option value="537">NEO·QSW</option>
|
|
|
|
|
<option value="632">歐克勒亞</option>
|
|
|
|
|
<option value="548">Cornflower Studio</option>
|
|
|
|
|
<option value="638">LittleBakas!</option>
|
|
|
|
|
</select>
|
2020-05-12 17:42:24 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-10-21 18:05:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<table id="rss" lay-filter="rssTools"></table>
|
|
|
|
|
<div id="footer"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
<script src="/layui/layui.js"></script>
|
|
|
|
|
<script src="/js/jquery-3.2.1.js"></script>
|
|
|
|
|
<script type="text/html" id="rssTopTools">
|
|
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="addRss">订阅</a>
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/html" id="listTools">
|
2021-05-18 18:29:55 +08:00
|
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="show">查看</a>
|
|
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
2020-10-21 18:05:33 +08:00
|
|
|
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
|
|
|
|
</script>
|
2021-05-18 18:29:55 +08:00
|
|
|
|
<script type="text/html" id="animState">
|
|
|
|
|
{{# if(d.enable==1){}}
|
|
|
|
|
<div><input type="checkbox" name="state" lay-text="启用|关闭" lay-filter="stateCheckbox" lay-skin="switch" value="{{d.roomid}}" checked></div>
|
|
|
|
|
{{# } else { }}
|
|
|
|
|
<div><input type="checkbox" name="state" lay-text="启用|关闭" lay-filter="stateCheckbox" lay-skin="switch" value="{{d.roomid}}"></div>
|
|
|
|
|
{{# }}}
|
|
|
|
|
</script>
|
2020-10-21 18:05:33 +08:00
|
|
|
|
<script>
|
|
|
|
|
$('#header').load("/html/header.html");
|
|
|
|
|
$('#footer').load("/html/footer.html");
|
|
|
|
|
$('#side').load("/html/body/nas/side.html");
|
|
|
|
|
let tabid = -1;
|
|
|
|
|
$.get("/login/check.do", function (data) {
|
|
|
|
|
let json = JSON.parse(data);
|
2021-05-18 18:29:55 +08:00
|
|
|
|
if (json.code !== 0) {
|
2020-10-21 18:05:33 +08:00
|
|
|
|
window.location.href = "/"
|
|
|
|
|
}
|
|
|
|
|
})
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
layui.use(['layer', 'form', 'element', 'table'], function () {
|
|
|
|
|
var layer = layui.layer
|
|
|
|
|
, form = layui.form
|
|
|
|
|
, table = layui.table
|
|
|
|
|
, element = layui.element;
|
|
|
|
|
$.get("/anim/type/list.do", function (data) {
|
|
|
|
|
let json = JSON.parse(data);
|
2021-05-18 18:29:55 +08:00
|
|
|
|
if (json.code === 0) {
|
2020-10-21 18:05:33 +08:00
|
|
|
|
for (let index = 0; index < json.data.length; index++) {
|
|
|
|
|
const ret = json.data[index];
|
|
|
|
|
element.tabAdd('type', {
|
|
|
|
|
title: ret.title
|
2021-05-18 18:29:55 +08:00
|
|
|
|
, content: '<table id="passwordlist' + ret.id + '" lay-filter="adminTable"></table>'
|
2020-10-21 18:05:33 +08:00
|
|
|
|
, id: ret.id
|
2020-05-12 17:42:24 +08:00
|
|
|
|
})
|
2020-10-21 18:05:33 +08:00
|
|
|
|
}
|
|
|
|
|
element.tabChange('type', '1');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
let rssList = table.render({
|
|
|
|
|
elem: "#rss",
|
|
|
|
|
url: "/anim/rss/data.do?key=&type=" + form.val("formTest").type + "&team=" + form.val("formTest").team,
|
|
|
|
|
toolbar: true,
|
|
|
|
|
page: true,
|
|
|
|
|
cols: [[
|
|
|
|
|
{field: "title", title: "标题", sort: true, fixed: 'left'}
|
|
|
|
|
, {field: 'author', title: '字幕组',}
|
|
|
|
|
, {field: 'categories', title: '类型', 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>'}
|
|
|
|
|
, {field: "right", toolbar: '#rssTopTools'}
|
|
|
|
|
]]
|
|
|
|
|
})
|
|
|
|
|
form.render()
|
|
|
|
|
element.on('tab(type)', function (data) {
|
|
|
|
|
tabid = $(this).attr('lay-id')
|
|
|
|
|
table.render({
|
|
|
|
|
elem: "#passwordlist" + tabid
|
|
|
|
|
, url: '/anim/rss/list.do?type=' + tabid
|
|
|
|
|
, page: true
|
|
|
|
|
, cols: [[
|
|
|
|
|
{field: "id", title: "id", width: 80, sort: true, fixed: 'left'}
|
2021-05-18 18:29:55 +08:00
|
|
|
|
, {field: 'title', title: '标题',edit:'text'}
|
2020-10-21 18:05:33 +08:00
|
|
|
|
, {field: 'categories', title: '类型'}
|
|
|
|
|
, {field: 'author', title: '字幕组'}
|
2021-05-18 18:29:55 +08:00
|
|
|
|
, {field: 'titlekey', title: '搜索关键词',edit:'text'}
|
|
|
|
|
, {field: 'enable', title: '状态',templet:'#animState'}
|
2020-10-21 18:05:33 +08:00
|
|
|
|
, {field: "right", toolbar: '#listTools'}
|
|
|
|
|
]]
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
element.on('tabDelete(type)', function (data) {
|
|
|
|
|
let name = $(data.elem.prevObject.prevObject[0]).text().replace("ဆ", "")
|
|
|
|
|
let id = $(data.elem.prevObject.prevObject[0]).attr('lay-id')
|
|
|
|
|
layer.open({
|
|
|
|
|
title: "警告"
|
|
|
|
|
, content: "确认删除 " + name
|
|
|
|
|
, btn: ['确认', '取消']
|
|
|
|
|
, yes: function (index) {
|
|
|
|
|
$.post('/anim/type/del.do', {id: id}, function (data) {
|
|
|
|
|
let json = JSON.parse(data);
|
|
|
|
|
layer.msg(json.msg);
|
|
|
|
|
})
|
|
|
|
|
layer.close(index)
|
|
|
|
|
}
|
|
|
|
|
, btn2: function (index) {
|
|
|
|
|
layer.close(index)
|
|
|
|
|
}
|
|
|
|
|
})
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
});
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2021-05-18 18:29:55 +08:00
|
|
|
|
table.on('tool(adminTable)', function (obj) {
|
|
|
|
|
if (obj.event === 'show') {
|
2020-10-21 18:05:33 +08:00
|
|
|
|
$("#type").find("option:contains('" + obj.data.categories + "')").attr("selected", null);
|
|
|
|
|
$("#team").find("option:contains('" + obj.data.author + "')").attr("selected", null);
|
|
|
|
|
$("#type").find("option:contains('" + obj.data.categories + "')").attr("selected", true);
|
|
|
|
|
$("#team").find("option:contains('" + obj.data.author + "')").attr("selected", true);
|
|
|
|
|
$('#title').val(obj.data.titlekey);
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
form.render("select", 'team');
|
|
|
|
|
form.render("select", 'type');
|
|
|
|
|
searchClick();
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
} else if (obj.event === 'del') {
|
|
|
|
|
layer.open({
|
|
|
|
|
title: "警告!"
|
|
|
|
|
, content: "删除操作无法回滚,是否确认删除:" + obj.data.title
|
|
|
|
|
, btn: ['确认', '取消']
|
|
|
|
|
, yes: function (index) {
|
|
|
|
|
$.post('/anim/rss/del.do', {id: obj.data.id}, function (data) {
|
|
|
|
|
let json = JSON.parse(data);
|
|
|
|
|
layer.msg(json.msg)
|
|
|
|
|
layer.close(index)
|
2020-05-12 17:42:24 +08:00
|
|
|
|
})
|
2020-10-21 18:05:33 +08:00
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
btn2: function (index) {
|
|
|
|
|
layer.close(index);
|
2020-05-12 17:42:24 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
2021-05-18 18:29:55 +08:00
|
|
|
|
}else if(obj.event==='edit'){
|
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
2021-05-18 18:29:55 +08:00
|
|
|
|
table.on('edit(adminTable)',function (obj){
|
|
|
|
|
let type=obj.field;
|
|
|
|
|
let value=obj.value;
|
|
|
|
|
let id=obj.data.id;
|
|
|
|
|
console.log("id = "+id+" type = "+type+" value = "+value)
|
|
|
|
|
})
|
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
table.on('tool(rssTools)', function (obj) {
|
|
|
|
|
let data = obj.data;
|
|
|
|
|
if (obj.event === 'addRss') {
|
|
|
|
|
layer.prompt({
|
|
|
|
|
formType: 2,
|
|
|
|
|
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)
|
2020-05-12 17:42:24 +08:00
|
|
|
|
layer.close(index)
|
|
|
|
|
})
|
|
|
|
|
})
|
2020-10-21 18:05:33 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
$('#addType').click(function () {
|
|
|
|
|
layer.prompt({
|
|
|
|
|
title: '新增分类'
|
|
|
|
|
}, function (value, index, elem) {
|
|
|
|
|
$.post('/anim/type/add.do', {title: value}, function (data) {
|
|
|
|
|
window.location.reload()
|
2020-05-12 17:42:24 +08:00
|
|
|
|
})
|
2020-10-21 18:05:33 +08:00
|
|
|
|
layer.close(index)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
$('#search').click(function () {
|
|
|
|
|
searchClick()
|
|
|
|
|
})
|
2020-05-12 17:42:24 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
function searchClick() {
|
|
|
|
|
rssList.reload({
|
|
|
|
|
where: {
|
|
|
|
|
key: $('#title').val(),
|
|
|
|
|
type: form.val("formTest").type,
|
|
|
|
|
team: form.val("formTest").team
|
2020-05-12 17:42:24 +08:00
|
|
|
|
}
|
2020-10-21 18:05:33 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$.ajax({cache: false})
|
2020-05-13 17:39:29 +08:00
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
//let js="" ; $('#team option').each(function() { let value=$(this).val(); let text=$(this).text(); js+='{"'+value+'":"'+text+'"},'})
|
|
|
|
|
</script>
|
2020-05-12 17:42:24 +08:00
|
|
|
|
</body>
|
|
|
|
|
<style>
|
|
|
|
|
#icon {
|
|
|
|
|
float: right;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-21 18:05:33 +08:00
|
|
|
|
#rss + .layui-table-view tbody > tr > td > .layui-table-cell {
|
2020-05-12 17:42:24 +08:00
|
|
|
|
height: 100px;
|
|
|
|
|
line-height: 100px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
</html>
|