新增BT修改标题和关键词
This commit is contained in:
parent
de0670ea88
commit
b714eebaa5
@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class ToolsApplication {
|
||||
public static final String version="1.1.1";
|
||||
public static final String version="1.1.2";
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("当前版本号:" + version);
|
||||
|
@ -144,7 +144,13 @@ public class AnimationController {
|
||||
if(!StringUtils.isEmpty(enable)){
|
||||
item.setEnable(Integer.parseInt(enable));
|
||||
}
|
||||
itemDao.updateByPrimaryKey(item);
|
||||
int i=itemDao.updateByPrimaryKey(item);
|
||||
if(i>0){
|
||||
json.put("msg","操作成功");
|
||||
}else{
|
||||
json.put("msg","操作失败");
|
||||
}
|
||||
json.put("code",1);
|
||||
return json;
|
||||
}
|
||||
@ResponseBody
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div id="header"></div>
|
||||
<div class="layui-body" style="top: 100px; ">
|
||||
<div class="layui-body" style="top: 100px;overflow:auto; ">
|
||||
|
||||
<div id="side"></div>
|
||||
<blockquote class="layui-elem-quote"><span id="ip">番剧订阅器</span></blockquote>
|
||||
@ -169,14 +169,15 @@
|
||||
</script>
|
||||
<script type="text/html" id="listTools">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="show">查看</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</script>
|
||||
<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>
|
||||
<div><input type="checkbox" name="state" lay-text="启用|关闭" lay-filter="stateCheckbox" lay-skin="switch"
|
||||
value="{{d.id}}" checked></div>
|
||||
{{# } else { }}
|
||||
<div><input type="checkbox" name="state" lay-text="启用|关闭" lay-filter="stateCheckbox" lay-skin="switch" value="{{d.roomid}}"></div>
|
||||
<div><input type="checkbox" name="state" lay-text="启用|关闭" lay-filter="stateCheckbox" lay-skin="switch"
|
||||
value="{{d.id}}"></div>
|
||||
{{# }}}
|
||||
</script>
|
||||
<script>
|
||||
@ -224,27 +225,21 @@
|
||||
]]
|
||||
});
|
||||
})
|
||||
element.tabChange('animType', '1');
|
||||
|
||||
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)
|
||||
let data = {}
|
||||
if (type === 'title') {
|
||||
data = {id: id, title: value}
|
||||
} else {
|
||||
data = {id: id, titleKey: value}
|
||||
}
|
||||
});
|
||||
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'}
|
||||
]]
|
||||
$.post('/anim/rss/edit.do', data, function (json) {
|
||||
layer.msg(json.msg)
|
||||
})
|
||||
})
|
||||
form.render()
|
||||
|
||||
element.on('tabDelete(animType)', function (data) {
|
||||
let name = $(data.elem.prevObject.prevObject[0]).text().replace("ဆ", "")
|
||||
let id = $(data.elem.prevObject.prevObject[0]).attr('lay-id')
|
||||
@ -295,17 +290,8 @@
|
||||
layer.close(index);
|
||||
}
|
||||
})
|
||||
}else if(obj.event==='edit'){
|
||||
|
||||
}
|
||||
})
|
||||
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)
|
||||
})
|
||||
|
||||
table.on('tool(rssTools)', function (obj) {
|
||||
let data = obj.data;
|
||||
if (obj.event === 'addRss') {
|
||||
@ -328,6 +314,35 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
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) {
|
||||
layer.msg(json.msg)
|
||||
})
|
||||
})
|
||||
element.tabChange('animType', '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()
|
||||
|
||||
|
||||
$('#addType').click(function () {
|
||||
layer.prompt({
|
||||
title: '新增分类'
|
||||
@ -353,7 +368,6 @@
|
||||
|
||||
}
|
||||
});
|
||||
$.ajax({cache: false})
|
||||
|
||||
//let js="" ; $('#team option').each(function() { let value=$(this).val(); let text=$(this).text(); js+='{"'+value+'":"'+text+'"},'})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user