123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?php
- namespace app\index;
- class reg extends Base
- {
- function index()
- {
- if (!IN_REG_ON || !IN_LOGIN_ON) {
- redirect();
- }
- ?> <!DOCTYPE html>
- <html lang="">
- <head>
- <title>账号注册 - <?php echo IN_NAME;?>免费应用内测托管平台|iOS应用Beta测试分发|Android应用内测分发</title>
- <meta charset="utf-8"/>
- <meta name="viewport"
- content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
- <meta name="renderer" content="webkit"/>
- <meta name="keywords" content="<?php echo IN_KEYWORDS;?>"/>
- <meta property="og:url" content="https://<?php echo $_SERVER['HTTP_HOST'];?>/"/>
- <meta property="og:title" content="<?php echo IN_NAME;?>"/>
- <meta name="description"
- content="<?php echo IN_NAME;?> 为开发者提供测试应用极速发布,iOS/Android应用开发、封装打包APP、内测发布等一系列效率工具服务"/>
- <?php
- $this->static_();
- ?> <script>
- function update_seccode() {
- document.getElementById('img_seccode').src = '<?php echo IN_PATH;?>index/seccode?' + Math.random();
- }
- </script>
- <style>
- .tit {
- display: table;
- width: 100%;
- }
- .tit a {
- line-height: 35px;
- font-size: 15px;
- display: table-cell;
- width: 48%;
- text-align: center;
- border-bottom: 2px solid beige;
- }
- .tit a.active {
- font-size: 18px;
- color: #333;
- border-bottom: 2px solid #fff;
- }
- .index1 {
- display: block;
- }
- </style>
- </head>
- <body>
- <?php
- $this->header();
- ?> <div class="login-common">
- <div class="tit"><a class="active">账户注册</a></div>
- <div class="form-container">
- <div class="form-inner">
- <form action="" method="post">
- <input type="password" style="position: absolute;top: -999px">
- <div class="form-group">
- <label class="iconfont icon-user" for="a"></label>
- <input type="text" class="form-control input-lg" id="nickname" placeholder="请输入您的用户名">
- <span class="help-block">请输入正确的用户名</span>
- </div>
- <div class="form-group index index1">
- <label class="iconfont icon-tel" for="a"></label>
- <input class="form-control input-lg" placeholder="手机号码" type="text" id="mobile">
- <span class="help-block">请输入正确的手机号码</span>
- </div>
- <?php
- if (IN_SMS == 1) {
- ?> <div class="form-group index index1">
- <label class="iconfont icon-dunpai"></label>
- <div class="clearfix verification-code">
- <input type="text" class="form-control input-lg fl" id="code1"
- placeholder="请输入手机验证码">
- <button id="sendcode1" type="button" class="ms-btn ms-btn-primary input-lg fr">
- 获取验证码
- </button>
- </div>
- <span class="help-block">请输入正确的验证码</span>
- </div>
- <?php
- }
- ?> <div class="form-group">
- <label class="iconfont icon-pwd" for="c"></label>
- <input class="form-control input-lg" placeholder="请输入密码,密码长度不能少于6位" type="password"
- id="password">
- <span class="help-block">密码不正确</span>
- </div>
- <div class="form-group">
- <label class="iconfont icon-pwd" for="c"></label>
- <input class="form-control input-lg" placeholder="请再次输入你的密码" type="password"
- id="repassword">
- <span class="help-block">两次密码不一致</span>
- </div>
- <div class="form-group" style="display:none">
- <label class="iconfont icon-dunpai"></label>
- <div class="clearfix verification-code">
- <input class="form-control input-lg fl" value="1234" placeholder="请输入图形验证码" type="text" id="seccode"
- maxlength="4">
- <img id="img_seccode" onclick="update_seccode()" style="float:right"
- src="/index/seccode" height="46" width="27%">
- </div>
- </div>
-
- </div>
- <div class="checkbox">
- <input type="checkbox" checked>
- <span>我已阅读并同意<a href="/index/about/agreement" target="_blank" class="color-hover">《服务协议》</a>及<a
- href="/index/about/privacy" target="_blank" class="color-hover">《隐私政策》</a></span>
- </div>
- </div>
- <button type="button" id="submitButton" class="ms-btn ms-btn-primary input-lg mt20">注册</button>
- <div class="mt15 text-center">
- 已有账号,<a href="<?php echo IN_PATH;?>index/login" class="color-hover">点击登录</a>
- </div>
- </form>
- </div>
- <script>
- $(function () {
- function settime(countdown) {
- if (countdown == 0) {
- $('#sendcode' + regtype).attr("disabled", false);
- $('#sendcode' + regtype).html("获取验证码");
- countdown = 60;
- return;
- } else {
- $('#sendcode' + regtype).attr("disabled", true);
- $('#sendcode' + regtype).html("重新发送(" + countdown + ")");
- countdown--;
- }
- setTimeout(function () {
- settime(countdown)
- }, 1000)
- }
- var regtype = 1;
- $('.tit a').click(function () {
- $(this).addClass('active').siblings().removeClass('active');
- $('.index').hide();
- regtype = $(this).index()
- $('.index' + regtype).show();
- });
- $('#sendcode0').click(function () {
- var email = $('#email').val();
- if (email) {
- $.post('/index/ajax/send_reg', {email}, function (data) {
- if (data.code != 200) {
- alert(data.msg);
- } else {
- settime(60);
- }
- }, 'json');
- }
- });
- $('#sendcode1').click(function () {
- var mobile = $('#mobile').val();
- if (mobile) {
- $.post('/index/ajax/send_sms', {phone: mobile}, function (data) {
- if (data.code != 200) {
- alert(data.msg);
- } else {
- alert(data.msg);
- settime(60);
- }
- }, 'json');
- }
- });
- $("#submitButton").click(function () {
- var nickname = $("#nickname").val();
- var email = $("#email").val();
- var mobile = $("#mobile").val();
- var code = $("#code" + regtype).val();
- var seccode = $("#seccode").val();
- var password = $("#password").val();
- var repassword = $("#repassword").val();
- var pid = "<?php echo $this->action;?>";
- $.post("/index/ajax/reg", {
- pid, nickname, mobile, email, code, seccode, password, repassword, regtype
- },
- function (data) {
- if (data.code != 200) {
- alert(data.msg);
- } else {
- alert('注册成功', function () {
- top.location.href = '/index/apps/apps';
- });
- }
- }, 'json');
- });
- });
- </script>
- <?php
- $this->footer();
- ?> </body>
- </html>
- <?php
- }
- }
|