You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

130 lines
3.9 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
<title>CP-ACC 设置Table</title>
<!-- Google font file. If you want you can change. -->
<link href="https://fonts.googleapis.com/css?family=Nunito:400,600,700,900" rel="stylesheet">
<!-- Fontawesome font file css -->
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<!-- Template global css file. Requared all pages -->
<link rel="stylesheet" type="text/css" href="css/global.style.css">
<script>var block_aplayer = true;</script>
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script>
<script type="text/javascript">page.auth = ['email', 'nickname'];</script>
</head>
<body>
<div class="wrapper">
<div class="wrapper-inline">
<!-- Header area start -->
<header> <!-- extra class no-background -->
<a class="go-back-link" href="javascript:history.back();"><i class="fa fa-arrow-left"></i></a>
<h1 class="page-title">设置公共账户信息</h1>
</header>
<!-- Header area end -->
<!-- Page content start -->
<main>
<div class="container">
<div class="form-divider"></div>
<p>请输入公共账户名字:</p>
<div class="form-row-group with-icons">
<div class="form-row no-padding">
<i class="fa "></i>
<input type="text" id="name" name="name" class="form-element" value="default">
</div>
</div>
<br/>
<p>请输入最大不平衡度: (请使用整数,比如20)</p>
<div class="form-row-group with-icons">
<div class="form-row no-padding">
<i class="fa "></i>
<input type="text" id="threshold" name="threshold" class="form-element" placeholder="" value="20">
</div>
</div>
<div class="form-divider"></div>
<div class="form-row">
<a href="#" id="ok" class="button circle block orange">完成设置</a>
</div>
<br/><br/>
<div id="qr" align="center" style="display: none;">
<p>请让成员点击链接或扫描二维码加入账户:</p>
<input type="text" id="url">
<div id="qrcode"></div>
</div>
</div>
</main>
<!-- Page content end -->
</div>
</div>
<!--Page loader DOM Elements. Requared all pages-->
<div class="sweet-loader">
<div class="box">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
</div>
</div>
<!-- JQuery library file. requared all pages -->
<script src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script>
<!-- Template global script file. requared all pages -->
<script src="js/global.script.js"></script>
<script src="js/qrcode.min.js"></script>
<script type="text/javascript">
var qrcode = new QRCode("qrcode", {
text: '',
width: 150,
height: 150,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.M
});
session.onload(function(){
if(page.params.hasOwnProperty('tableId')){
$('#qr').show();
$('#url').val('https://cp-acc.yimian.xyz/?type=join&tableId='+page.params.tableId);
qrcode.makeCode('https://cp-acc.yimian.xyz/?type=join&tableId='+page.params.tableId);
$('#ok').click(function(){
$.get('./api/updateTable.php?tableId='+page.params.tableId+'&name='+$('#name').val() + "&threshold="+$('#threshold').val(), (res)=>{
tips.success({
message: '更新成功!'
});
});
});
}else{
$('#ok').click(function(){
$.get('./api/createTable.php?hash='+session.get('hash')+'&name='+$('#name').val() + "&threshold="+$('#threshold').val(), (res) => {
$('#qr').show();
qrcode.makeCode('https://cp-acc.yimian.xyz/?type=join&tableId='+res.tableId);
$('#url').val('https://cp-acc.yimian.xyz/?type=join&tableId='+res.tableId);
});
});
}
});
</script>
</body>
</html>