aa1d56629fdef6ba310b0a8ef79949a7.php 12.4 KB
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:68:"/www/wwwroot/menhu/public/../application/index/view/login/login.html";i:1576718625;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/statis/css/base.css">
    <link rel="stylesheet" href="/statis/css/index.css">
    <script src="/statis/js/jquery.js"></script>
    <script src="/statis/js/include.js"></script>
    <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
    <title><?php echo $title; ?></title>
    <style>
        .top_bg {
            width: 100%;
            height: 202px;
            overflow: hidden;
            background-size: 100% 100%;
            background-image: url('/statis/image/bg_img.png')
        }

        .login_Con {
            width: 100%;
            height: 722px;
            position: relative;
            background-size: 100% 100%;
            background-image: url('/statis/image/icon7.png')
        }
    </style>
</head>

<body>
    <div class="loginBox">
        <div class="top_bg">
            <div class="login_topBoX">
                <div class="top_item2L clearfix">
                    <!-- logo -->
                    <div class="top_item2Img"><img src="/statis/image/logo_icon.png" alt=""></div>
                    <div class="top_item2Box">
                        <h2>中关村国联绿色产业服务创新联盟</h2>
                        <p>Zhongguancun Green Industry Alliance</p>
                    </div>
                </div>
            </div>
        </div>
        <!-- 内容 -->
        <div class="login_Con">
            <!-- 用户登陆 -->
            <div class="login_Box clearfix" style=<?php echo $style!=1?'display:none':''; ?>>
                <h1 class="login_Txt">用户登录</h1>
                <form id="formLog">
                    <input type="hidden" name="location" id="location2"/>
                    <div class="login_form">
                        <div class="login_Img"><img src="/statis/image/icon8.png" alt=""></div>
                        <input type="text" placeholder="请输入手机号" name="tel">
                    </div>
                    <div class="login_form">
                        <div class="login_Img"><img src="/statis/image/icon9.png" alt=""></div>
                        <input type="text" placeholder="请输入密码" name="user_password">
                    </div>
                    <button type="button" class="login_sub login">登录</button>
                </form>
                <div class="login_Box2">
                    <span><a href="/index/login/password">找回密码</a></span>|<span><a href="/index/login/register">立即注册</a></span>
                </div>
                <div class="login_Txt2">OR</div>
                <div class="login_Box3">
                    <p class="login_Txt3">第三方登录</p>
                    <div class="login_Box4 clearfix">
                        <div class="login_Img2">
                            <a href=""><img src="/statis/image/icon10.png" alt=""></a>
                        </div>
                        <div class="login_Img2">
                            <a href=""><img src="/statis/image/icon11.png" alt=""></a>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 用户注册 -->
            <div class="login_Box" style=<?php echo $style!=2?'display:none':''; ?>>
                <h1 class="login_Txt">用户注册</h1>
                <form id="formRes">
                    <div class="login_form login_form2">
                        <input type="text" placeholder="请输入用户名" name="user_name">
                    </div>
                    <div class="login_form login_form2">
                        <input type="text" placeholder="请输入密码" name="user_password">
                    </div>
                    <div class="login_form login_form2">
                        <input type="text" placeholder="请输入手机号" name="tel" id="phone">
                    </div>
                    <div class="login_form login_form2 clearfix">
                        <input type="text" placeholder="请输入验证码" name="code">
                        <span class="login_formCode">获取验证码</span>
                    </div>
                    <div class="registeredBox clearfix">
                        <div class="regist_Img"><img src="/statis/image/icon12.png" alt="" data-bool="false"></div>
                        <p class="regist_Txt">我已阅读并同意条款</p>
                    </div>
                    <button type="button" class="login_sub register_sub register">注册</button>
                </form>
                <a href="/index/login/login" class="regist_Txt2">已有账号?返回登录</a>
            </div>
            <!-- 找回密码 -->

                <div class="login_Box" style=<?php echo $style!=3?'display:none':''; ?>>
                    <form id="formPas">
                        <h1 class="login_Txt">忘记密码</h1>
                        <div class="login_form login_form2">
                            <input type="text" placeholder="请输入手机号" name="tel" id="tel">
                        </div>
                        <div class="login_form login_form2 clearfix">
                            <input type="text" placeholder="请输入验证码" name="code">
                            <span class="login_formCode">获取验证码</span>
                        </div>

                    </form>
                    <button class="login_sub register_sub next">下一步</button>
                </div>


                <div class="login_Box" style=<?php echo $style!=4?'display:none':''; ?>>
                    <form id="formNex">
                    <input type="hidden" name="tel" value=<?php echo (isset($tel) && ($tel !== '')?$tel:''); ?>>
                    <h1 class="login_Txt">忘记密码</h1>
                    <div class="login_form login_form2">
                        <input type="text" placeholder="请输入密码" name="password">
                    </div>
                    <div class="login_form login_form2">
                        <input type="text" placeholder="请再次输入密码" name="two_password">
                    </div>

                    </form>
                    <button class="login_sub register_sub success">完成</button>
                </div>

        </div>
        <!-- footer -->
        <footer class="footer">
            <div class="footer_top">
                <div class="footer_width">
                    <div class="footer_Txt">
                        <span>关于我们</span>|<span>政策·要闻</span>|<span>国际交流</span>|<span>招商招标</span>|<span>网上展厅</span>|<span>专家在线</span>|<span>人才服务</span>|<span>绿色价值排行榜</span>
                    </div>
                    <p class="footer_Txt2">版权所有:<span>中关村国联绿色产业服务创新联盟</span></p>
                    <p class="footer_Txt2">北京市大兴区同济中路甲7号院</p>
                    <p class="footer_Txt2">京ICP备05052419号</p>
                </div>
            </div>
            <div class="footer_bot"></div>
        </footer>
    </div>
    <script>
        $("#location2").val(returnCitySN["cname"]);
    </script>
    <script>

        // 同意条款
        $('.regist_Img').click(function() {
            if ($(this).find('img').attr('data-bool') == 'false') {
                $(this).find('img').attr('src', '/statis/image/icon13.png');
                $(this).find('img').attr('data-bool', 'true')
            } else {
                $(this).find('img').attr('src', '/statis/image/icon12.png');
                $(this).find('img').attr('data-bool', 'false')
            }
        });
        // 手机号
        var send = document.getElementsByClassName('login_formCode')[0];
        var phone = document.getElementById('phone');
        var time = 60;
        var res = /^[0-9]{11}$/;
        var Timeout;
        var isclick = true;
        send.onclick = function() {
            if (isclick) {
                time = 60;
                if (res.test(phone.value)) {
                    isclick = false;
                    var time2 = send.innerHTML = 60 + 's';
                    var data={'tel':phone.value};
                    setCode(data);
                    Timeout = setInterval(function() {
                        if (time > 0) {
                            time--;
                            send.innerHTML = time + 's';

                        } else {
                            isclick = true;
                            clearInterval(Timeout);
                            send.innerHTML = '发送验证码';
                        }
                    }, 1000)
                } else {
                    alert('请输入正确手机号')
                }
            }
        };
        // 手机号
        var send2 = document.getElementsByClassName('login_formCode')[1];
        var phone1 = document.getElementById('tel');
        var time = 60;
        var res = /^[0-9]{11}$/;
        var Timeout1;
        var isclick = true;
        send2.onclick = function() {
            console.log(send2)
            if (isclick) {
                console.log(11)
                time = 60;
                if (res.test(phone1.value)) {
                    console.log(222)
                    isclick = false;
                    var time2 = send2.innerHTML = 60 + 's';
                    var data={'tel':phone1.value};
                    setCode(data);
                    Timeout1 = setInterval(function() {
                        if (time > 0) {
                            time--;
                            send2.innerHTML = time + 's';
                        } else {
                            isclick = true;
                            clearInterval(Timeout1);
                            send2.innerHTML = '发送验证码';
                        }
                    }, 1000)
                } else {
                    alert('请输入正确手机号')
                }
            }
        };
        $(".register").on("click",function () {
            var data=$("#formRes").serialize();
            ajax("/index/login/register",data,"post",function (res) {
                w(res.msg);
                if(res.code==200){
                   setTimeout(function () {
                       location.href="/index/login/login";
                   },500)
                }
            },"false");
        })
        $(".login").on("click",function () {
            var data=$("#formLog").serialize();
            ajax("/index/login/login",data,"post",function (res) {
                w(res.msg);
                if(res.code==200){
                    setTimeout(function () {
                        location.href="/index/index/index";
                    },500)
                }
            },"false");
        })
        $(".next").on("click",function () {
            var data=$("#formPas").serialize();
            ajax("/index/login/password",data,"post",function (res) {
                if(res.code==200){
                    setTimeout(function () {
                        location.href="/index/login/next?tel="+res.msg;
                    },500)
                }else{
                    w(res.msg);
                }
            },"false");
        })
        $(".success").on("click",function () {
            var data=$("#formNex").serialize();
            ajax("/index/login/next",data,"post",function (res) {
                w(res.msg);
                if(res.code==200){
                    setTimeout(function () {
                        location.href="/index/login/login";
                    },500)
                }
            },"false");
        })
        $("#phone1").on("click",function () {
            var data=$("#formNex").serialize();
            ajax("/index/login/next",data,"post",function (res) {
                w(res.msg);
                if(res.code==200){
                    setTimeout(function () {
                        location.href="/index/login/login";
                    },500)
                }
            },"false");
        })
        function setCode(data) {
            console.log(data);
            ajax("/index/login/getCode",data,"post",function (res) {
                w(res.msg);
            },"false");
        }

    </script>
</body>