login_show.html 1.7 KB
<!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">
    <title>會員登錄</title>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/wbase.css">
    <script src="__TMPL__/public/assets/js/base.js"></script>
</head>

<body>
<!--header-->
<header class="header">
    <img src="{:cmf_get_image_url($logo.image)}" alt="">
</header>
<!-- 内容 -->
<div class="land_box">
    <h1>會員登錄</h1>
    <form class="form">
        <ul>
            <li>
                <input type="text" name="name" placeholder="請輸入您的用戶名">
            </li>
            <li style="border:0">
                <input type="password" name="pass" placeholder="請輸入您的密碼">
            </li>
        </ul>
        <button type="button" onclick="tlogin()">登錄</button>
    </form>
</div>
</body>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
    function tlogin(){
        name = $("input[name='name']").val();
        pass = $("input[name='pass']").val();
        if(name == ''){
            alert('用户名不能为空');
        }else{
            if(pass == ''){
                alert('密码不能为空');
            }else{
                $.post("{:url('Weixin/login_to')}",{name:name,pass:pass},function(data){
                    if(data){
                        window.location.href="{:url('Weixin/jifen',array('jifen'=>"+data+"))}";
                    }else{
                        alert('用户名密码错误');
                    }
                });
            }
        }
    }
</script>
</html>