2021-04-30 22:40:05 +08:00

62 lines
2.1 KiB
Plaintext

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>激活与登记</title>
<meta name="keywords" content="你需要激活" />
</head>
<link rel="stylesheet" media="all" href="/static/index/input.css">
</head>
<body>
<div class="wrapper">
<form>
<h1>SmartChart</h1>
<h5 id="msg">加微信或群获取激活码,请支持一杯咖啡</h5>
<center><div id="qrcode"></div></center>
<h5><div ><img src="https://www.smartchart.cn/static/images/auth.png" height="150px"></div></h5>
<div class="group">
<input id="authkey" style="display: none" placeholder="请输入激活码" required="required" /><span class="highlight"></span><span class="bar"></span>
</div>
</form>
<div class="btn-box">
<a id='submitup' class="btn btn-submit">激活</a>
<a type="button" href="https://qm.qq.com/cgi-bin/qm/qr?k=eC34KwVvEtMvfh8Zyn1RSfYlzZvuvm7i&jump_from=webapi" class="btn btn-cancel">加Q群</a>
<a href="/echart/register/" class="btn btn-submit">登记</a>
<h5><a href="https://www.smartchart.cn">@smartchart.cn</a></h5>
</div>
</div>
<script src="/static/js/jquery-2.2.3.min.js"></script>
<script src="/static/js/qrcode.min.js"></script>
<script>
$("#submitup").click(function(){
let key = $.trim($('#authkey').val());
if(key === ''){
$('#authkey').css('display', 'initial');
$('#msg').html('在微信公众号"智晶数据"中使用扫码获取激活码');
makeCode();
return;
}
$.ajax({type: "POST",url: '/echart/auth_right/', data:{key: key} ,success: function (data)
{ $('#msg').html(data['msg']);
} });
});
var qrcode = null;
function makeCode () {
$.ajax({type: "GET",url: '/echart/get_auth_key/', success: function (data)
{ if(qrcode === null){qrcode = new QRCode(document.getElementById("qrcode"), {width : 150, height : 150})}
qrcode.makeCode(data['key']);
} });
}
$.ajax({type: "GET",url: '/echart/get_auth_key/', success: function (data){
if(data.isauth){$('#msg').html('已激活, 有效期到:'+ data.expire);}
} });
</script>
</body>
</html>