|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<title></title>
|
|
|
<meta name="keywords" content=""/>
|
|
|
<meta name="description" content="">
|
|
|
<include file="public@head"/>
|
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
<title>福牌公众号</title>
|
|
|
<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
|
|
|
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
|
|
|
<link href="__TMPL__/public/assets/css/index.css" rel="stylesheet">
|
|
|
</head>
|
|
|
|
|
|
<body class="body-white">
|
|
|
<include file="public@nav"/>
|
|
|
|
|
|
<div class="container tc-main">
|
|
|
<div class="row">
|
|
|
<div class="col-md-4 col-md-offset-4">
|
|
|
<h2 class="text-center">用户注册</h2>
|
|
|
<php>
|
|
|
$mobile_tab_active=empty($theme_vars['enable_mobile'])?'':'active';
|
|
|
$email_tab_active=empty($theme_vars['enable_mobile'])?'active':'';
|
|
|
</php>
|
|
|
<notempty name="theme_vars.enable_mobile">
|
|
|
<ul class="nav nav-tabs nav-justified" id="myTab" style="margin-bottom: 15px;">
|
|
|
<li class="active"><a href="#mobile" data-toggle="tab">手机注册</a></li>
|
|
|
<li><a href="#email" data-toggle="tab">邮箱注册</a></li>
|
|
|
</ul>
|
|
|
</notempty>
|
|
|
|
|
|
<php>
|
|
|
$is_open_registration = cmf_is_open_registration();
|
|
|
</php>
|
|
|
|
|
|
<div class="tab-content">
|
|
|
<notempty name="theme_vars.enable_mobile">
|
|
|
<div class="tab-pane {$mobile_tab_active}" id="mobile">
|
|
|
<form class="js-ajax-form" action="{:url('user/Register/doRegister')}" method="post">
|
|
|
|
|
|
<div class="form-group">
|
|
|
<input type="text" name="username" placeholder="手机号" class="form-control"
|
|
|
id="js-mobile-input">
|
|
|
</div>
|
|
|
|
|
|
<empty name="is_open_registration">
|
|
|
<div class="form-group">
|
|
|
<div style="position: relative;">
|
|
|
<input type="text" name="code" placeholder="手机验证码" style="width:170px;"
|
|
|
class="form-control">
|
|
|
<a class="btn btn-success js-get-mobile-code"
|
|
|
style="width: 163px;position: absolute;top:0;right: 0;"
|
|
|
data-wait-msg="[second]秒后才能再次获取" data-mobile-input="#js-mobile-input"
|
|
|
data-url="{:url('user/VerificationCode/send')}"
|
|
|
data-init-second-left="60">获取手机验证码</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</empty>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<input type="password" name="password" placeholder="密码" class="form-control">
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<div style="position: relative;">
|
|
|
<input type="text" name="captcha" placeholder="验证码" class="form-control"
|
|
|
style="width: 170px;float: left;margin-right: 30px">
|
|
|
<captcha height="38" width="160" font-size="20"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<button class="btn btn-primary btn-block js-ajax-submit" type="submit" data-wait="1500"
|
|
|
style="margin-left: 0px;">确定注册
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group" style="text-align: center;">
|
|
|
<p>
|
|
|
已有账号? <a href="{:cmf_url('user/Login/index')}">点击此处登录</a>
|
|
|
</p>
|
|
|
<body>
|
|
|
<div class="content">
|
|
|
<div class="input-box">
|
|
|
<div class="top-input">
|
|
|
<div class="border-line-box">
|
|
|
<image src="__TMPL__/public/images/phone_icon.png" class="phone-icon"></image>
|
|
|
<!--<form action="" onsubmit="return doValidate()" name="forma" class="form">-->
|
|
|
<input type="number" name="name" id="phone" placeholder="手机号" class="phone-input" value="">
|
|
|
<!--</form>-->
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
</notempty>
|
|
|
<div class="tab-pane {$email_tab_active}" id="email">
|
|
|
<form class="js-ajax-form" action="{:url('user/register/doRegister')}" method="post">
|
|
|
|
|
|
<div class="form-group">
|
|
|
<input type="text" name="username" placeholder="邮箱" class="form-control"
|
|
|
id="js-email-input">
|
|
|
<div class="bottom-input">
|
|
|
<div class="border-line-box2">
|
|
|
<div class="input-code-box">
|
|
|
<image src="__TMPL__/public/images/code_icon.png" class="code-icon"></image>
|
|
|
<input type="number" placeholder="验证码" class="code-input">
|
|
|
</div>
|
|
|
|
|
|
<empty name="is_open_registration">
|
|
|
<div class="form-group">
|
|
|
<div style="position: relative;">
|
|
|
<input type="text" name="code" placeholder="邮件验证码" style="width:170px;"
|
|
|
class="form-control">
|
|
|
<a class="btn btn-success js-get-email-code"
|
|
|
style="width: 163px;position: absolute;top:0;right: 0;"
|
|
|
data-wait-msg="[second]秒后才能再次获取" data-email-input="#js-email-input"
|
|
|
data-url="{:url('user/VerificationCode/send')}"
|
|
|
data-init-second-left="60">获取邮箱验证码</a>
|
|
|
<button class="getCode">获取验证码</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</empty>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<input type="password" name="password" placeholder="密码" class="form-control">
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<div style="position: relative;">
|
|
|
<input type="text" name="captcha" placeholder="验证码" class="form-control"
|
|
|
style="width: 170px;float: left;margin-right: 30px">
|
|
|
<captcha height="38" width="160" font-size="20"/>
|
|
|
</div>
|
|
|
<div class="next-btn">
|
|
|
<div class="next" onclick="goNext()">下一步</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<button class="btn btn-primary btn-block js-ajax-submit" type="submit" data-wait="1500"
|
|
|
style="margin-left: 0px;">确定注册
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group" style="text-align: center;">
|
|
|
<p>
|
|
|
已有账号? <a href="{:cmf_url('user/Login/index')}">点击此处登录</a>
|
|
|
</p>
|
|
|
</div>
|
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<!-- /container -->
|
|
|
|
|
|
<include file="public@scripts"/>
|
|
|
</body>
|
|
|
<script>
|
|
|
function goNext() {
|
|
|
var phone = document.getElementById('phone').value;
|
|
|
if (!(/(^[0-9]{3,4}\-[0-9]{7}$)|(^[0-9]{7}$)|(^[0-9]{3,4}[0-9]{7}$)|(^0{0,1}13[0-9]{9}$)/.test(phone))) {
|
|
|
alert("手机号码有误,请重填");
|
|
|
return false;
|
|
|
} else {
|
|
|
window.location.href = './personal-info.html';
|
|
|
// btnCheck()
|
|
|
}
|
|
|
}
|
|
|
// $("input[type='button']").click(doValidate);
|
|
|
/**
|
|
|
* [btnCheck 按钮倒计时常用于获取手机短信验证码]
|
|
|
*/
|
|
|
// function btnCheck() {
|
|
|
// $(this).addClass("on");
|
|
|
// var time = 60;
|
|
|
// $(this).attr("disabled", true);
|
|
|
// var timer = setInterval(function() {
|
|
|
// if (time == 0) {
|
|
|
// clearInterval(timer);
|
|
|
// $(".button").attr("disabled", false);
|
|
|
// $(".button").val("获取验证码");
|
|
|
// $(".button").removeClass("on");
|
|
|
// } else {
|
|
|
// $('.button').val(time + "秒");
|
|
|
// time--;
|
|
|
// }
|
|
|
// }, 1000);
|
|
|
// }
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
//获取短信验证码
|
|
|
var validCode = true;
|
|
|
$(".getCode").click(function () {
|
|
|
var phone = document.getElementById('phone').value;
|
|
|
if (!(/(^[0-9]{3,4}\-[0-9]{7}$)|(^[0-9]{7}$)|(^[0-9]{3,4}[0-9]{7}$)|(^0{0,1}13[0-9]{9}$)/.test(phone))) {
|
|
|
alert("手机号码有误,请重填");
|
|
|
return false;
|
|
|
} else {
|
|
|
var time = 60;
|
|
|
var $code = $(this);
|
|
|
if (validCode) {
|
|
|
validCode = false;
|
|
|
var t = setInterval(function () {
|
|
|
time--;
|
|
|
$code.html(time + "秒");
|
|
|
if (time == 0) {
|
|
|
clearInterval(t);
|
|
|
$code.html("重新获取");
|
|
|
validCode = true;
|
|
|
}
|
|
|
}, 1000)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|