123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
- <link rel="stylesheet" type="text/css" href="/Public/Static/css/base.css" />
- <link rel="stylesheet" type="text/css" href="/Public/Static/css/nologed.css" />
- <title><?php echo ($webname); ?></title>
- <style>
- ::-webkit-input-placeholder { /* WebKit browsers */
- color: #b5b5b5;
- font-size: 18px;
- }
- ::-moz-placeholder { /* Mozilla Firefox 19+ */
- color: #b5b5b5;
- font-size: 18px;
- }
- input:focus{background:#F5F5F5;outline: 1px solid #F5F5F5;}
- a:hover,a:link,a:visited,a:active{color:#FCD535;text-decoration:none;}
- .boxh{height: 90px}
- .smsbtn{width:35%;float:right;height:50px;line-height:50px;border-radius:5px;background: #F5F5F5;text-align: center;}
- </style>
- <style>
- .button {
- background-color: #4CAF50; /* Green */
- border: none;
- color: white;
- padding: 16px 32px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 16px;
- margin: 4px 2px;
- -webkit-transition-duration: 0.4s; /* Safari */
- transition-duration: 0.4s;
- cursor: pointer;
- }
- .button4{
- background-color: white;
- color: black;
- border: 2px solid #e7e7e7;
- }
- .button4:hover {
- background-color: #e7e7e7;
- }
- </style>
- </head>
- <body>
- <div class="container-fluid ctbox">
- <div class="no_header">
- <div class="fl bhalf allhg txtl" style="line-height:50px;">
- <i class="bi bi-x fcc fw" onclick="goindex()" style="font-size:36px;"></i>
- </div>
- <div class="fr bhalf allhg txtr" style="line-height:50px;">
- <a href="<?php echo U('Login/index');?>" class="fzmmm fcy"><?php echo L('登录');?></a>
- </div>
- </div>
- <div class="no_content">
- <div class="no_title">
- <span class="title_txt fch"><?php echo L('注册');?></span>
- </div>
- <!-- <button class="button button4" onclick="shou()" id="shou">手机号</button>-->
- <!-- <button class="button button4" onclick="you()" id="you">邮箱</button>-->
- <div class="no_inbox">
- <div class="inputbox boxh" id="yx">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('邮箱');?></span>
- </div>
- <div class="input_div">
- <input type="text" style="height:45px;" class="cinput" name="email" id="email" placeholder="<?php echo L('请输入邮箱');?>" />
- </div>
- </div>
- <input type="hidden" value="2" style="height:45px;" id="yincang" />
- <div class="inputbox boxh" id="sj">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('手机');?></span>
- </div>
- <div class="input_div">
- <input type="tel" pattern="^(0|86|17951)?1[0-9]{10}" maxlength="11" required="required" style="height:45px;" id="phone" class="cinput" name="phone" placeholder="<?php echo L('请输入手机号');?>" />
- </div>
- </div>
- <div class="inputbox boxh" hidden>
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('图形验证码');?></span>
- </div>
- <div class="input_div" style="width:60%;float:left;" >
- <input type="text" style="height:45px;" class="cinput" name="vcode" id="vcode" placeholder="<?php echo L('请输入图形验证码');?>" />
- </div>
- <div style="width:35%;float:right;padding:0px;" >
- <img style="width:100%;height:50px;border-radius:5px;" src="<?php echo U('Verify/code');?>" onclick="this.src=this.src+'?t='+Math.random()" title="<?php echo L('换一张');?>" id="verifycode">
- </div>
- </div>
- <div class="inputbox boxh">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('邮箱验证码');?></span>
- </div>
- <div class="input_div" style="width:60%;float:left;" >
- <input type="text" style="height:45px;" class="cinput" name="ecode" id="ecode" placeholder="<?php echo L('请输入邮箱验证码');?>" />
- </div>
- <div class="smsbtn" onclick="emailsend();" id="sendsms">
- <span class="fzmm fcy" id="smsstr"><?php echo L('获取验证码');?></span>
- </div>
- </div>
- <div class="inputbox boxh">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('密码');?></span>
- </div>
- <div class="input_div">
- <input type="password" style="height:45px;" class="cinput" name="lpwd" id="lpwd" placeholder="<?php echo L('请输入密码');?>" />
- </div>
- </div>
- <div class="inputbox boxh">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('确认密码');?></span>
- </div>
- <div class="input_div">
- <input type="password" style="height:45px;" class="cinput" name="lpwds" id="lpwds" placeholder="<?php echo L('请确认密码');?>" />
- </div>
- </div>
- <div class="inputbox boxh">
- <div class="input_title txtl">
- <span class="fzmm fcc"><?php echo L('邀请码');?></span>
- </div>
- <div class="input_div">
- <input type="text" style="height:45px;" class="cinput" value="<?php echo ($qrcode); ?>" id="invit" name="invit" placeholder="<?php echo L('请输入邀请码');?>(<?php echo L('选填');?>)" />
- </div>
- </div>
- </div>
- </div>
- <div class="no_button_box">
- <div class="regxybox" style="line-height: 25px;">
- <span><?php echo L('注册即表示同意');?> </span>
- <a href="##" class="fzmm fcy"><?php echo L('用户服务协议');?></a>
- </div>
- <div class="small_hs_btn" onclick="upreg();">
- <i class="bi bi-arrow-right bi_right"></i>
- </div>
- </div>
- </div>
- </body>
- <body>
- <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
- <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
- <script type="text/javascript">
- $("#sj").hide();
- function you(){
- $("#sj").hide();//隐藏div
- $("#yx").show();//隐藏div
- $("#yincang").val(1);
- }
- function shou(){
- $("#yx").hide();//隐藏div
- $("#sj").show();//隐藏div
- $("#yincang").val(2);
- }
- function upreg(){
- var yincang = $("#yincang").val();
- var email = $("#email").val();
- if(yincang != 2 ){
- var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
- if(email=='' || email == null){
- layer.msg("<?php echo L('请输入邮箱');?>");return false;
- }
- if(!reg.test(email)){
- layer.msg("<?php echo L('邮箱格式不正确');?>");return false;
- }
- }
- var ecode = $("#ecode").val();
- if(ecode == ''){
- layer.msg("<?php echo L('请输入邮箱验证码');?>");return false;
- }
- var lpwd = $("#lpwd").val();
- if(lpwd == ''){
- layer.msg("<?php echo L('请输入密码');?>");return false;
- }
- var invit = $("#invit").val();
- var phone = $("#phone").val();
- /*if( invit == ''){
- layer.msg("<?php echo L('请输入邀请码');?>");return false;
- }*/
- var lpwds = $("#lpwds").val();
- if(lpwd != lpwds){
- layer.msg("<?php echo L('两次输入密码不一致');?>");return false;
- }
- $.post("<?php echo U('Login/upregister');?>",
- {'email' : email, 'lpwd' : lpwd, 'invit' : invit ,'phone' : phone,'yincang':1, 'ecode': ecode},
- function(data){
- if(data.code == 1){
- layer.msg(data.info);
- setTimeout(function(){
- window.location.href="<?php echo U('Login/index');?>";
- },2000);
- }else{
- layer.msg(data.info);return false;
- }
- }
- );
- }
- </script>
- <script type="text/javascript">
- function emailsend(){
- var email = $("#email").val();
- var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
- if(email=='' || email == null){
- layer.msg("<?php echo L('请输入邮箱');?>");return false;
- }
- if(!reg.test(email)){
- layer.msg("<?php echo L('邮箱格式不正确');?>");return false;
- }
- var vcode = $("#vcode").val();
- // if(vcode == ''){
- // layer.msg("<?php echo L('请输入图形验证码');?>");return false;
- // }
- $.post("<?php echo U('Login/sendcode');?>",
- {'email':email,'vcode':vcode},
- function(data){
- if(data.code == 1){
- layer.msg(data.info);
- var obj = $("#sendsms");
- var strobj = $("#smsstr");
- var t = 60;
- var interval = setInterval(function() {
- obj.removeAttr('onclick');
- strobj.text(t + "<?php echo L('秒后再发送');?>");
- t--;
- if(t < 1){
- obj.attr("onclick","emailsend();");
- clearInterval(interval);
- strobj.text("<?php echo L('获取验证码');?>");
- }
- },1000);
- }else{
- layer.msg(data.info);
- $("#sendsms").attr("onclick","emailsend();");
- $("#smsstr").text("<?php echo L('获取验证码');?>");
- $("#verifycode").click();
- }
- }
- )}
- </script>
- <script type="text/javascript">
- function goindex(){
- window.location.href="<?php echo U('Index/index');?>";
- }
- </script>
- </html>
|