2 lines
7.5 KiB
PHP
Executable File
2 lines
7.5 KiB
PHP
Executable File
<?php /*a:1:{s:73:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/index/view/passport/register.html";i:1700552721;}*/ ?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title><?php echo htmlentities($web['name']); ?> - <?php echo htmlentities($title); ?></title>
|
|
<meta name="author" content="<?php echo htmlentities($web['name']); ?>">
|
|
<meta name="keywords" content="<?php echo !empty($keywords) ? htmlentities($keywords) : htmlentities($web['keywords']); ?>">
|
|
<meta name="description" content="<?php echo !empty($description) ? htmlentities($description) : htmlentities($web['description']); ?>">
|
|
<meta name="referrer" content="never">
|
|
<link rel="icon" href="/favicon.png" type="image/x-icon">
|
|
<link rel="stylesheet" href="/assets/plugins/amazeui/amazeui.css?v=<?php echo htmlentities($version); ?>" />
|
|
<link rel="stylesheet" href="/assets/css/hema.app.css?v=<?php echo htmlentities($version); ?>" />
|
|
<link rel="stylesheet" href="/assets/css/index.css?v=<?php echo htmlentities($version); ?>" />
|
|
<script src="/assets/plugins/jquery/jquery.min.js?v=<?php echo htmlentities($version); ?>"></script>
|
|
<script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
|
|
</head>
|
|
<body id="page-top">
|
|
<div class="section">
|
|
<div class="login-in">
|
|
<div class="form">
|
|
<div class="title">用户注册</div>
|
|
<div class="am-tabs" data-am-tabs="{noSwipe: 1}" id="doc-tab-demo-1">
|
|
<ul class="am-tabs-nav am-nav am-nav-tabs">
|
|
<?php if($web['passport']['register']['wechat'] == 1): ?>
|
|
<li><a href="javascript: void(0)">关注</a></li>
|
|
<?php endif; if($web['passport']['register']['scan'] == 1): ?>
|
|
<li><a href="javascript: void(0)">微信</a></li>
|
|
<?php endif; if($web['passport']['register']['phone'] == 1): ?>
|
|
<li><a href="javascript: void(0)">手机</a></li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
<div class="am-tabs-bd">
|
|
<?php if($web['passport']['login']['wechat'] == 1): ?>
|
|
<div class="am-tab-panel">
|
|
<div class="qr-login">
|
|
<img src="/temp/hemaphp_login_qrcode.png?time=<?php echo htmlentities($time); ?>" alt="未授权绑定公众号"/>
|
|
<div class="text">扫一扫,关注公众号注册</div>
|
|
</div>
|
|
</div>
|
|
<?php endif; if($web['passport']['login']['scan'] == 1): ?>
|
|
<div class="am-tab-panel">
|
|
<div id="login_container" class="login_container"></div>
|
|
</div>
|
|
<?php else: ?>
|
|
<div style="display:none;" id="login_container"></div>
|
|
<?php endif; if($web['passport']['login']['phone'] == 1): ?>
|
|
<div class="am-tab-panel">
|
|
<form id="my-phone">
|
|
<div class="input">
|
|
<i class="am-icon-mobile" style="font-size:18px;"></i>
|
|
<input id="tel" type="text" name="data[phone]" value="" placeholder="请输入手机号" required>
|
|
</div>
|
|
<div class="input">
|
|
<i class="am-icon-lock"></i>
|
|
<input type="password" name="data[password]" value="" placeholder="请输入密码" required>
|
|
</div>
|
|
<div style="padding:20px 0px;">
|
|
<div class="w50">
|
|
<i class="am-icon-shield"></i>
|
|
<input type="text" name="data[captcha]" value="" placeholder="请输入验证码" required>
|
|
</div>
|
|
<div class="captcha">
|
|
<button id="captcha" type="button" class="phone am-btn am-btn-default">获取验证码</button>
|
|
</div>
|
|
</div>
|
|
<div class="sub-btn">
|
|
<button class="j-submit am-btn am-btn-primary am-btn-lg am-radius" type="submit">登录</button>
|
|
</div>
|
|
</form>
|
|
<div class="login-nav">
|
|
<span class="login">
|
|
我已有账号? <a href="/index/passport/login">返回登录 ></a>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="version">V<?php echo htmlentities($version); ?></div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
|
|
$(function () {
|
|
$('#my-phone').formPost();
|
|
});
|
|
|
|
//微信扫码登录
|
|
var obj = new WxLogin({
|
|
id: "login_container",
|
|
appid: "<?php echo htmlentities($app_id); ?>",
|
|
scope: "snsapi_login",
|
|
redirect_uri: encodeURIComponent("<?php echo htmlentities($base_url); ?>index/passport/wxlogin"),
|
|
state: Math.ceil(Math.random()*1000),
|
|
style: "black",
|
|
href: "data:text/css;base64,QGNoYXJzZXQgIlVURi04IjsKLmltcG93ZXJCb3ggLnFyY29kZSB7d2lkdGg6IDI4MHB4O30KLmltcG93ZXJCb3ggLnRpdGxlIHtkaXNwbGF5OiBub25lO30KLmltcG93ZXJCb3ggLmluZm8ge3dpZHRoOiAyODBweDt9Ci5zdGF0dXNfaWNvbiB7ZGlzcGxheTogbm9uZX0KLmltcG93ZXJCb3ggLnN0YXR1cyB7dGV4dC1hbGlnbjogY2VudGVyO30g"
|
|
});
|
|
|
|
//关注公众号登录
|
|
var interval = setInterval(function(){
|
|
$.post("/index/passport/checklogin",{
|
|
ticket: "<?php echo htmlentities($ticket); ?>"
|
|
},function(result){
|
|
if(result.code == 1){
|
|
$.post("/index/passport/qrlogin",{
|
|
data:result.data
|
|
},function(){
|
|
window.location.reload();
|
|
});
|
|
}
|
|
});
|
|
},3000);
|
|
|
|
//手机验证码登录
|
|
var captcha = document.getElementById('captcha'),
|
|
tel = document.getElementById('tel'),
|
|
telReg = /^1[3456789]\d{9}$/,
|
|
num = 120;
|
|
captcha.onclick = function(){
|
|
if(telReg.test(tel.value)){
|
|
captcha.disabled = true;
|
|
//请求验证码
|
|
$.post("/index/passport/sendsms",{
|
|
phone: tel.value
|
|
},function(res){
|
|
if(res.code == 1){
|
|
settime(captcha);
|
|
}else{
|
|
captcha.disabled = false;
|
|
$.show_error(res.msg);
|
|
}
|
|
});
|
|
}else{
|
|
$.show_error('手机号码不正确');
|
|
}
|
|
};
|
|
function settime(el){
|
|
if(num == 0){
|
|
el.disabled = false;
|
|
el.innerHTML = "获取验证码";
|
|
num=120;
|
|
return true;
|
|
}else{
|
|
el.innerHTML = num+"s后重新获取";
|
|
num--;
|
|
}
|
|
setTimeout(function(){
|
|
settime(el);
|
|
},1000);
|
|
}
|
|
|
|
</script>
|
|
<script src="/assets/plugins/layer/layer.js?v=<?php echo htmlentities($version); ?>"></script>
|
|
<script src="/assets/plugins/jquery/jquery.form.min.js?v=<?php echo htmlentities($version); ?>"></script>
|
|
<script src="/assets/plugins/amazeui/amazeui.min.js?v=<?php echo htmlentities($version); ?>"></script>
|
|
<script src="/assets/js/hema.app.js?v=<?php echo htmlentities($version); ?>"></script>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|