123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
- <html lang="en">
- <head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
- <meta charset="utf-8">
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
- <meta content="yes" name="apple-mobile-web-app-capable">
- <meta content="black" name="apple-mobile-web-app-status-bar-style">
- <meta content="telephone=no" name="format-detection">
- <title>新用户注册登录</title>
- </head>
- <link rel="stylesheet" type="text/css" href="/jdxf/Public/wxapp/css/bootstrap.min.css">
- <link rel="stylesheet" type="text/css" href="/jdxf/Public/wxapp/css/style.css">
- <script type="text/javascript" src="/jdxf/Public/wxapp/js/jquery-1.11.3.min.js"></script>
- <style type="text/css">
- .content > form > div > input{ border: 0px; font-size: 14px; outline:none; margin-left: 10px;}
- .content > form > div > input::-webkit-input-placeholder{ color:#DCDCDC; }
- .hqyzm{ background-color: #FF9C27; font-size: 12px; height: 28px; display: inline-block;
- line-height: 28px; color: #ffffff; width: 80px; text-align: center; float: right; border-radius: 4px;
- }
- .content div{ border-bottom: 1px solid #E5E5E5; width: 80%; margin-top: 40px; text-align: left; margin-left: 10%;}
- .content div:nth-child(3){text-align: center; border-bottom: none;}
- .yzm{width: 33%; }
- .cbotton{display: inline-block; font-size:16px;!important line-height: 40px; width: 100%; height: 40px; background-color: #02A5DE; color: #ffffff; border: 0px; border-radius: 5px; }
- .content > form > div > label{width: 80px; font-weight: 500; display: inline-block; margin-bottom: 5px;}
- .exits{
- z-index: 1000;
- text-align: center;
- position: absolute;
- top: 0;
- height: 100%;
- width: 100%;
- background-color: rgba(0,0,0,.6);
- }
- .exits-box{
- border-radius: 6px;
- margin: 0 auto;
- top: 30%;
- width: 80%;
- background-color: #fff;
- position: relative;
- }
- </style>
- <body>
- <!--头部-->
- <div class="header">新用户注册登录</div>
- <!--内容-->
- <div class="content">
- <!--/jdxf/wxapp2.php/Home/Login/add onsubmit="return toVaild()"-->
- <form id="form1" method="post" >
- <div><label >手机号码</label><input onkeyup="value=value.replace(/[^\d]/g,'') " type="text"id="telphone" name="phone" placeholder="请输入手机号码"></div>
- <div><label >验证码</label><input onkeyup="value=value.replace(/[^\d]/g,'') " type="text" class="yzm" id="verify" name="verify" placeholder="请输入验证码">
- <input class="hqyzm" style="margin: 0;!important" class="form-control" onclick="SendVerify()" type="button" id="reSendCode" value="获取验证码"></div>
- <!-- <div><label >密码</label><input type="text" name="password" placeholder="请输入密码"></div>-->
- <div><!--<button onclick="">确定</button>-->
- <input style="margin: 0px;" class="cbotton" onclick="tijiao()" type="button" value="确定">
- <!--<a href="###" onclick="tijiao()">确定</a>-->
- </div>
- </form>
- </div>
- <!--底部-->
- <div id="ResMessage" style=" position: absolute; top: 0; left: 0px; width:100%; font-size: 14px; text-align: center;"> </div>
- <div class="footer"></div>
-
- </body>
- <script type="text/javascript">
- $(function()
- {
- var dataStorage=localStorage.getItem("dataStorage");
- //console.log(dataStorage);
- if(dataStorage!=null)
- {
- $.post('/jdxf/wxapp2.php/Home/Login/checkVs', {'datav':dataStorage},function(result)
- {
- let res=JSON.parse(result);
- if(res.code=="success")
- {
- AltMessage("正在自动登录 请稍等-----!");
- window.location.href='https://qhome.usky.cn/jdxf/wxapp2.php/Home/Index/index/token/'+dataStorage;
- }
- });
- }
- });
- function SendVerify(){
- var tel =document.getElementById('telphone').value;
- if(tel=="")
- {
- return AltMessage('手机号码不能为空');
- }
- if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(tel))){
- return AltMessage("不是完整的11位手机号或者正确的手机号前七位"); ;
- }
-
- $.post('/jdxf/wxapp2.php/Home/Login/checkVerify', {'tel':tel},function(res)
- {
- if (res)
- {
- AltMessage('发送成功');
- time($('#reSendCode'));
- }
- else
- {
- AltMessage('发送失败,服务暂停使用,正在处理中');
- }
- });
- }
- var wait = 60;
- function time(o){
- if (wait == 0)
- {
- o.attr('disabled',false);
- o.css({ 'background': '#FF9C27' });
- o.val('获取验证码');
- wait = 60;
- } else {
- o.attr('disabled', 'disabled');
- o.css({ 'background': '#a7a7a7' });
- o.val(wait + '秒');
- wait--;
- setTimeout(function () {
- time(o);
- }, 1000);
- }
- }
- function AltMessage(part)
- {
- document.getElementById('ResMessage').innerHTML=`<div class="alert alert-danger alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><strong>${part}</strong></div>`;
- setTimeout(function ()
- {
- document.getElementById('ResMessage').innerHTML='';
- }, 2500);
- }
-
- function toVaild(){
- let val = document.getElementById("telphone").value;
- let verify = document.getElementById("verify").value;
- if(val =="" || verify==""){
- AltMessage("手机号码或验证码不能为空!");
- return false;
- }
- return true;
- }
-
- function tijiao(){
- let val = document.getElementById("telphone").value;
- let verify = document.getElementById("verify").value;
- if(val =="" || verify==""){
- AltMessage("手机号码或验证码不能为空!");
- return false;
- }
- //console.log($("#form1").serialize());
- $.ajax({
- url:"/jdxf/wxapp2.php/Home/Login/add",//提交地址
- data:$("#form1").serialize(),//将表单数据序列化
- type:"POST",
- dataType:"text",
- success:function(result)
- {
- let res=JSON.parse(result);
- //console.log(res);
- AltMessage(res.mesg);
- if(res.code=="success")
- {
- if(res.jdverifys!='')
- {
- //console.log('ccc');
- localStorage.setItem("dataStorage",res.jdverifys);
- localStorage.setItem("tagPhone",res.phone);
- window.location.href='https://qhome.usky.cn/jdxf/wxapp2.php/Home/Index/index/token/'+res.jdverifys;
-
- }
- else
- {
- window.location.href='https://qhome.usky.cn/jdxf/wxapp2.php/Home/Index/index';
- }
-
- }
-
- },
- error:function(result)
- {
- console.log(result);
- }
- });
- }
- </script>
- </html>
|