utools_adb/sign_dialog.html
2022-08-24 21:12:13 +08:00

76 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-3.2.1.js"></script>
<script src="layui/layui.all.js"></script>
<link rel="stylesheet" href="layui/css/layui.css">
<link rel="stylesheet" href="layui/css/modules/layer/default/layer.css">
<link rel="stylesheet" href="layui/css/layui.css" media="all">
</head>
<body>
<form class="layui-form" style="height: 300px;width: 330px;">
<div class="layui-form-item">
<label class="layui-form-label">别名</label>
<div class="layui-input-block">
<input type="text" id="alias" required lay-verify="required" placeholder="请输入别名(Alias)" 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="aliasPassword" required lay-verify="required" placeholder="请输入别名密码(AliasPassword)"
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="请输入签名密码(Password)"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item" style="margin-left: 10px;">
<button id="select" type="button" class="layui-btn">选择签名</button>
<button id="sub" type="button" class="layui-btn">保存</button>
</div>
</form>
</body>
<script>
layui.use('upload', function () {
let upload = layui.upload;
let signFile
let uploadInst = upload.render({
elem: '#select' //绑定元素
, url: '/' //上传接口
, accept: 'file'
, auto: false
, choose: function (res) {
//上传完毕回调
let files = res.pushFile();
res.preview(function (index, file, result) {
path = file.path;
signFile=path
window.parent.showWindows()
});
}
, error: function () {
//请求异常回调
}
});
$('#sub').click(function(){
let alias=$('#alias').val()
let aliasPassword=$('#aliasPassword').val()
let password=$('#password').val()
window.parent.uploadSign(alias,aliasPassword,password,signFile)
layer.msg('保存成功,正常关闭对话框即可')
})
})
</script>
</html>