新增页面
有登陆过滤器 正式上线1.0
This commit is contained in:
123
web/html/body/nas/bilidown.html
Normal file
123
web/html/body/nas/bilidown.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!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>
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div id="header"></div>
|
||||
<div class="layui-body" style="left: 200px;">
|
||||
<div id="side"></div>
|
||||
<blockquote class="layui-elem-quote"><span id="ip">B站直播下载器</span></blockquote>
|
||||
<table id="address" lay-filter="listTools"></table>
|
||||
<div id="footer"></div>
|
||||
</div>
|
||||
|
||||
<script src="/layui/layui.js"></script>
|
||||
<script src="/js/jquery-3.2.1.js"></script>
|
||||
<script type="text/html" id="listTools">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="set">设置</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>
|
||||
$.get("/login/check.do", function (data) {
|
||||
let json = JSON.parse(data);
|
||||
if (json.code != 0) {
|
||||
window.location.href = "/"
|
||||
}
|
||||
})
|
||||
layui.use(['layer', 'form', 'element', 'table'], function () {
|
||||
var layer = layui.layer
|
||||
, form = layui.form
|
||||
, table = layui.table;
|
||||
table.render({
|
||||
elem: "#address"
|
||||
, url: '/bili/live/get/url.do'
|
||||
, page: true
|
||||
, cols: [[
|
||||
{ field: "id", title: "id", width: 80, sort: true, fixed: 'left' }
|
||||
, { field: 'cid', title: 'cid', width: 100 }
|
||||
, { field: 'url', title: 'url', width: 400 }
|
||||
, { field: 'status', title: '状态', width: 80 }
|
||||
, { field: "right", width: 200, toolbar: '#listTools' }
|
||||
]]
|
||||
});
|
||||
table.on('tool(listTools)', function (obj) {
|
||||
let data = obj.data;
|
||||
if (obj.event === 'set') {
|
||||
layer.open({
|
||||
title: '设置'
|
||||
, content: '切换状态'
|
||||
, btn: ['启动', '关闭']
|
||||
, yes: function (index, obj) {
|
||||
$.post('/bili/live/set/update.do', { id: data.id, status: '1' }, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg);
|
||||
table.reload('address')
|
||||
})
|
||||
layer.close(index)
|
||||
},
|
||||
btn2: function (index, obj) {
|
||||
$.post('/bili/live/set/update.do', { id: data.id, status: '0' }, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg);
|
||||
table.reload('address')
|
||||
})
|
||||
table.reload('address')
|
||||
layer.close(index)
|
||||
}
|
||||
})
|
||||
} else if (obj.event === 'edit') {
|
||||
layer.prompt({
|
||||
title: "请输入链接或cid"
|
||||
}, function (value, index) {
|
||||
$.post('/bili/live/set/update.do', { id: data.id, url: value }, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg);
|
||||
table.reload('address')
|
||||
})
|
||||
table.reload('address')
|
||||
layer.close(index)
|
||||
})
|
||||
} else {
|
||||
layer.open({
|
||||
title: "删除提示"
|
||||
, content: "确认删除?"
|
||||
, btn: ['确认', '取消']
|
||||
, yes: function (index, layero) {
|
||||
$.post('bili/live/set/delete.do', { id: data.id }, function () {
|
||||
table.reload('address')
|
||||
});
|
||||
layer.close(index)
|
||||
},
|
||||
btn2: function (index, layero) {
|
||||
layer.close(index)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
$.ajax({ cache: false })
|
||||
$('#header').load("/html/header.html");
|
||||
$('#footer').load("/html/footer.html");
|
||||
$('#side').load("/html/body/nas/side.html");
|
||||
|
||||
</script>
|
||||
<style>
|
||||
#icon {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.body {
|
||||
bottom: 0;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -30,12 +30,17 @@
|
||||
$('#header').load("/html/header.html");
|
||||
$('#footer').load("/html/footer.html");
|
||||
$('#side').load("/html/body/nas/side.html");
|
||||
$.get("/login/check.do", function (data) {
|
||||
let json = JSON.parse(data);
|
||||
if (json.code != 0) {
|
||||
window.location.href = "/"
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
#icon {
|
||||
#icon {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.body {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
@@ -13,14 +13,19 @@
|
||||
<div id="header"></div>
|
||||
<div class="layui-body" style="left: 200px;">
|
||||
<div id="side"></div>
|
||||
<blockquote class="layui-elem-quote" ><span id="ip">当前IP:</span></blockquote>
|
||||
<blockquote class="layui-elem-quote"><span id="ip">当前IP:</span></blockquote>
|
||||
<div id="footer"></div>
|
||||
</div>
|
||||
|
||||
<script src="/layui/layui.js"></script>
|
||||
<script src="/js/jquery-3.2.1.js"></script>
|
||||
<script>
|
||||
|
||||
$.get("/login/check.do", function (data) {
|
||||
let json = JSON.parse(data);
|
||||
if (json.code != 0) {
|
||||
window.location.href = "/"
|
||||
}
|
||||
})
|
||||
layui.use(['layer', 'form', 'element'], function () {
|
||||
var layer = layui.layer
|
||||
, form = layui.form;
|
||||
@@ -30,20 +35,26 @@
|
||||
$('#header').load("/html/header.html");
|
||||
$('#footer').load("/html/footer.html");
|
||||
$('#side').load("/html/body/nas/side.html");
|
||||
$.post("/nas/getIp.do",function(data){
|
||||
var json=JSON.parse(data);
|
||||
if(json.code!=0){
|
||||
$.post("/nas/getIp.do", function (data) {
|
||||
try {
|
||||
var json = JSON.parse(data);
|
||||
} catch (error) {
|
||||
window.location.href = "/"
|
||||
return
|
||||
}
|
||||
|
||||
if (json.code != 0) {
|
||||
$('#ip').html(json.msg);
|
||||
}else{
|
||||
$('#ip').html("当前服务器IP:"+json.data);
|
||||
} else {
|
||||
$('#ip').html("当前服务器IP:" + json.data);
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
<style>
|
||||
#icon {
|
||||
#icon {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.body {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="layui-side layui-bg-black">
|
||||
<div class="layui-side-scroll layui-bg-blue">
|
||||
<div class="layui-side layui-bg-black" id='myside'>
|
||||
<div class="layui-side-scroll layui-bg-blue" id="myside_div">
|
||||
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
|
||||
<ul class="layui-nav layui-nav-tree layui-bg-blue" lay-filter="test">
|
||||
<ul class="layui-nav layui-nav-tree layui-bg-blue" lay-filter="test" >
|
||||
<li class="layui-nav-item">
|
||||
<a class="" href="javascript:;">本体管理</a>
|
||||
<dl class="layui-nav-child">
|
||||
@@ -9,20 +9,30 @@
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a class="" href="javascript:;">管理后台</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;">切换管理后台</a></dd>
|
||||
<dd><a href="javascript:;">管理后台</a></dd>
|
||||
<dd><a href="javascript:;">Jellyfin</a></dd>
|
||||
</dl>
|
||||
<a class="" href="/html/body/nas/switchAdmin.html">管理后台</a>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">功能管理</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;">B站直播下载器</a></dd>
|
||||
<dd><a href="/html/body/nas/bilidown.html">B站直播下载器</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
let mobile = navigator.userAgent.toLowerCase().match(/android/i) == "android" || navigator.userAgent.toLowerCase().match(/iphone os/i) == "iphone os";
|
||||
if (mobile) {
|
||||
$('#myside').removeClass('layui-side')
|
||||
$('#myside_div').removeClass('layui-side-scroll')
|
||||
$('#myside').addClass('layui-header')
|
||||
$('#myside').css('height','100%')
|
||||
|
||||
</div>
|
||||
} else {
|
||||
$('#myside').removeClass('layui-header')
|
||||
$('#myside').addClass('layui-side')
|
||||
$('#myside_div').addClass('layui-side-scroll')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -13,37 +13,138 @@
|
||||
<div id="header"></div>
|
||||
<div class="layui-body" style="left: 200px;">
|
||||
<div id="side"></div>
|
||||
<blockquote class="layui-elem-quote" ><span id="ip">当前IP:</span></blockquote>
|
||||
<blockquote class="layui-elem-quote"><span id="ip">当前状态:</span></blockquote>
|
||||
<div style="margin-left: 10px;">
|
||||
<button type="button" id='add' class="layui-btn layui-btn-normal">新增</button>
|
||||
<div style="width: 30%; margin-top: 10px; display: none;" id="adddata">
|
||||
<form class="layui-form" action="">
|
||||
<input type="text" name="title" id="title" required lay-verify="required" placeholder="请输入标题"
|
||||
autocomplete="off" class="layui-input">
|
||||
<input type="text" name="url" id="url" required lay-verify="required" placeholder="请输入URL"
|
||||
autocomplete="off" class="layui-input" style="margin-top: 10px;">
|
||||
<input type="number" name="port" id="port" required lay-verify="required" placeholder="请输入端口"
|
||||
autocomplete="off" class="layui-input" style="margin-top: 10px;">
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn" lay-submit lay-filter="formDemo"
|
||||
style="margin-top: 10px;">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary"
|
||||
style="margin-top: 10px;">重置</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<table id="address" lay-filter="listTools"></table>
|
||||
</div>
|
||||
|
||||
<div id="footer"></div>
|
||||
</div>
|
||||
|
||||
<script src="/layui/layui.js"></script>
|
||||
<script src="/js/jquery-3.2.1.js"></script>
|
||||
<script>
|
||||
|
||||
layui.use(['layer', 'form', 'element'], function () {
|
||||
<script type="text/html" id="listTools">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="set">设置</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>
|
||||
$.get("/login/check.do", function (data) {
|
||||
let json = JSON.parse(data);
|
||||
if (json.code != 0) {
|
||||
window.location.href = "/"
|
||||
}
|
||||
})
|
||||
let editModel = 'edit';
|
||||
let dataId = -1;
|
||||
layui.use(['layer', 'form', 'element', 'table'], function () {
|
||||
var layer = layui.layer
|
||||
, form = layui.form;
|
||||
, form = layui.form
|
||||
, table = layui.table;
|
||||
table.render({
|
||||
elem: "#address"
|
||||
, url: '/auth/nas/address/list.do'
|
||||
, page: true
|
||||
|
||||
, cols: [[
|
||||
{ field: "id", title: "id", width: 80, sort: true, fixed: 'left' }
|
||||
, { field: 'title', title: '标题', width: 80 }
|
||||
, { field: 'url', title: 'url', width: 400 }
|
||||
, { field: 'port', title: '端口', width: 80 }
|
||||
, { field: "right", width: 200, toolbar: '#listTools' }
|
||||
]]
|
||||
});
|
||||
table.on('tool(listTools)', function (obj) {
|
||||
let data = obj.data;
|
||||
if (obj.event === 'set') {
|
||||
$.post('/auth/nas/address/set.do', { id: data.id }, function (deta) {
|
||||
let json = JSON.parse(deta);
|
||||
layer.msg(json.msg)
|
||||
setTimeout(function () {
|
||||
table.reload('address')
|
||||
}, 2000)
|
||||
});
|
||||
|
||||
} else if (obj.event === 'edit') {
|
||||
editModel = 'update';
|
||||
dataId = data.id;
|
||||
$('#title').val(data.title)
|
||||
$('#url').val(data.url)
|
||||
$('#port').val(data.port)
|
||||
$('#adddata').css('display', '')
|
||||
} else {
|
||||
layer.open({
|
||||
title: "删除提示"
|
||||
, content: "确认删除?"
|
||||
, btn: ['确认', '取消']
|
||||
, yes: function (index, layero) {
|
||||
$.post('/auth/nas/address/remove.do', { id: data.id }, function () {
|
||||
table.reload('address')
|
||||
});
|
||||
layer.close(index)
|
||||
},
|
||||
btn2: function (index, layero) {
|
||||
layer.close(index)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
form.on('submit(formDemo)', function (data) {
|
||||
//layer.msg(JSON.stringify(data.field));
|
||||
$('#adddata').css("display", 'none')
|
||||
let url = '/auth/nas/address/add.do'
|
||||
if (editModel === 'update') {
|
||||
url = '/auth/nas/address/update.do'
|
||||
}
|
||||
$.post(url, { title: data.field.title, url: data.field.url, port: data.field.port, id: dataId }, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg)
|
||||
table.reload('address')
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
$.ajax({ cache: false })
|
||||
$('#header').load("/html/header.html");
|
||||
$('#footer').load("/html/footer.html");
|
||||
$('#side').load("/html/body/nas/side.html");
|
||||
$.post("/nas/getIp.do",function(data){
|
||||
var json=JSON.parse(data);
|
||||
if(json.code!=0){
|
||||
$.get("/auth/nas/address/get.do", function (data) {
|
||||
var json = JSON.parse(data);
|
||||
if (json.code != 0) {
|
||||
$('#ip').html(json.msg);
|
||||
} else {
|
||||
$('#ip').html(json.msg);
|
||||
}else{
|
||||
$('#ip').html("当前服务器IP:"+json.data);
|
||||
}
|
||||
})
|
||||
$('#add').click(function () {
|
||||
editModel = 'edit'
|
||||
$('#adddata').css("display", '')
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
#icon {
|
||||
#icon {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.body {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
281
web/html/body/tools/password.html
Normal file
281
web/html/body/tools/password.html
Normal file
@@ -0,0 +1,281 @@
|
||||
<!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>
|
||||
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div id="header"></div>
|
||||
<div class="layui-body" style="top: 100px; ">
|
||||
|
||||
<!-- <div id="side"></div> -->
|
||||
<blockquote class="layui-elem-quote"><span id="ip">密码管理器</span></blockquote>
|
||||
<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">
|
||||
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<iframe src="../../randompassword/index.html" style="width: 100%; height: 120%; " frameborder="0"
|
||||
scrolling="no"></iframe>
|
||||
<div id="footer"></div>
|
||||
</div>
|
||||
|
||||
<script src="/layui/layui.js"></script>
|
||||
<script src="/js/jquery-3.2.1.js"></script>
|
||||
<script type="text/html" id="topTools">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="addAddress">新增账号</a>
|
||||
</script>
|
||||
<script type="text/html" id="listTools">
|
||||
<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>
|
||||
$.get("/login/check.do", function (data) {
|
||||
let json = JSON.parse(data);
|
||||
if (json.code != 0) {
|
||||
window.location.href = "/"
|
||||
}
|
||||
})
|
||||
let tabid = -1;
|
||||
layui.use(['layer', 'form', 'element', 'table'], function () {
|
||||
var layer = layui.layer
|
||||
, form = layui.form
|
||||
, table = layui.table
|
||||
, element = layui.element;
|
||||
$.get("/tools/password/type/get/list.do", function (data) {
|
||||
let json = JSON.parse(data);
|
||||
if (json.code == 0) {
|
||||
for (let index = 0; index < json.data.length; index++) {
|
||||
const ret = json.data[index];
|
||||
element.tabAdd('type', {
|
||||
title: ret.title
|
||||
, content: '<table id="passwordlist' + ret.id + '" lay-filter="listTools"></table>'
|
||||
, id: ret.id
|
||||
})
|
||||
}
|
||||
element.tabChange('type', '1');
|
||||
}
|
||||
});
|
||||
form.render()
|
||||
element.on('tab(type)', function (data) {
|
||||
console.log(this)
|
||||
tabid = $(this).attr('lay-id')
|
||||
table.render({
|
||||
elem: "#passwordlist" + tabid
|
||||
, url: '/tools/password/get/list.do?type=' + tabid
|
||||
, toolbar: '#topTools'
|
||||
, page: true
|
||||
, cols: [[
|
||||
{ field: "id", title: "id", width: 80, sort: true, fixed: 'left' }
|
||||
, { field: 'title', title: '标题', width: 80 }
|
||||
, { field: 'username', title: '账号', width: 200 }
|
||||
, { field: 'password', title: '密码', width: 200 }
|
||||
, { field: 'url', title: '网址', width: 400, templet: '<div><a href="{{d.url}}" target="_blank">{{d.url}}</a></div>' }
|
||||
, { field: 'info', title: '备注', width: 200 }
|
||||
, { field: "right", width: 200, 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('/tools/password/type/set/remove.do', { id: id }, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg);
|
||||
})
|
||||
layer.close(index)
|
||||
}
|
||||
, btn2: function (index) {
|
||||
layer.close(index)
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
table.on('rowDouble(listTools)', function (data) {
|
||||
$.get('/tools/password/get/password.do?id=' + data.data.id, function (udata) {
|
||||
let json = JSON.parse(udata);
|
||||
data.data.password = json.data;
|
||||
data.update(data.data)
|
||||
})
|
||||
})
|
||||
table.on('tool(listTools)', function (obj) {
|
||||
|
||||
if (obj.event === 'edit') {
|
||||
$.get('/tools/password/get/password.do?id=' + obj.data.id, function (udata) {
|
||||
let json = JSON.parse(udata);
|
||||
layer.open({
|
||||
title: "添加账号",
|
||||
type: 1,
|
||||
content: $('#adduser'),
|
||||
btn: ['提交', '关闭'],
|
||||
yes: function (index) {
|
||||
$.post('/tools/password/set/update.do', {
|
||||
title: $('#title').val()
|
||||
, username: $('#username').val(), password: $('#password').val()
|
||||
, url: $('#url').val(), info: $('#info').val()
|
||||
, type: tabid
|
||||
, id: obj.data.id
|
||||
}, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg)
|
||||
table.reload('passwordlist' + obj.data.id)
|
||||
$('#title').val('')
|
||||
$('#username').val('')
|
||||
$('#password').val('')
|
||||
$('#url').val('')
|
||||
$('#info').val('')
|
||||
layer.close(index)
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
btn2: function (index) {
|
||||
layer.msg(tabid)
|
||||
layer.close(index)
|
||||
},
|
||||
success: function (layero, index) {
|
||||
$('#title').val(obj.data.title)
|
||||
$('#username').val(obj.data.username)
|
||||
$('#password').val(json.data)
|
||||
$('#url').val(obj.data.url)
|
||||
$('#info').val(obj.data.info)
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
} else if (obj.event === 'del') {
|
||||
layer.open({
|
||||
title: "警告!"
|
||||
, content: "删除操作无法回滚,是否确认删除:" + obj.data.title
|
||||
, btn: ['确认', '取消']
|
||||
, yes: function (index) {
|
||||
$.post('/tools/password/set/remove.do', { id: obj.data.id }, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg)
|
||||
})
|
||||
},
|
||||
btn2: function (index) {
|
||||
layer.close(index);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
table.on('toolbar(listTools)', function (obj) {
|
||||
if (obj.event === 'addAddress') {
|
||||
layer.open({
|
||||
title: "添加账号",
|
||||
type: 1,
|
||||
content: $('#adduser'),
|
||||
btn: ['提交', '关闭'],
|
||||
yes: function (index) {
|
||||
$.post('/tools/password/set/add.do', {
|
||||
title: $('#title').val()
|
||||
, username: $('#username').val(), password: $('#password').val()
|
||||
, url: $('#url').val(), info: $('#info').val()
|
||||
, type: tabid
|
||||
}, function (data) {
|
||||
let json = JSON.parse(data);
|
||||
layer.msg(json.msg)
|
||||
table.reload('passwordlist' + tabid)
|
||||
$('#title').val('')
|
||||
$('#username').val('')
|
||||
$('#password').val('')
|
||||
$('#url').val('')
|
||||
$('#info').val('')
|
||||
layer.close(index)
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
btn2: function (index) {
|
||||
layer.msg(tabid)
|
||||
layer.close(index)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
$('#addType').click(function () {
|
||||
layer.prompt({
|
||||
title: '新增分类'
|
||||
}, function (value, index, elem) {
|
||||
$.post('/tools/password/type/set/add.do', { type: value }, function (data) {
|
||||
window.location.reload()
|
||||
})
|
||||
layer.close(index)
|
||||
})
|
||||
})
|
||||
});
|
||||
$.ajax({ cache: false })
|
||||
$('#header').load("/html/header.html");
|
||||
$('#footer').load("/html/footer.html");
|
||||
$('#side').load("/html/body/nas/side.html");
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div style="display: none; margin: 20px;" id="adduser">
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="title" required lay-verify="required" placeholder="请输入标题"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="username" required lay-verify="required" placeholder="请输入账号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="password" required lay-verify="required" placeholder="请输入密码"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="url" required lay-verify="required" placeholder="请输入网址URL"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">备注信息</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea type="text" id="info" name="" required lay-verify="required" class="layui-textarea"
|
||||
placeholder="请输入备注信息"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
<style>
|
||||
#icon {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user