自定义登录页面

支持自定义登录界面,办法是: 可以在数据库的BASKREPORT_PROPERTY表中添加一条记录,key值为application.loginpage,value设置为自己的登录页面的url 页面参考代码为:

<html>
<head>
<meta charset="utf-8">
<script src="https://www.w3school.com.cn/jquery/jquery-1.11.1.min.js"></script>
<script>
function login(){
    $.post("baskreport/user/login",
        {username:$("*[name='user']").val(), password:$("*[name='password']").val(), captcha:$("*[name='captcha']").val()},
        function(data){
            if (data.error) {
                alert(data.error);
            } else {
                window.open("baskreport/admin", "_self");
            }
        }
    );
}
</script>
<style>
.item {
    padding: 10px;
}
.itemlabel {
    font-size: 20px;
    width: 120px;
}
input {
    width: 200px;
    font-size: 20px;
}
</style>
</head>
<body>
<div style="padding:50px">
<div class="item">
<div class="itemlabel"><label>用户名:</label></div>
<input name="user"><br/>
</div>
<div class="item">
<div class="itemlabel"><label>密码:</label></div>
<input name="password"><br/>
</div>
<div class="item">
<div class="itemlabel"><label>验证码:</label></div>
<input name="captcha"><br/>
</div>
<div class="item">
<img src="/baskreport-test/baskreport/captcha?width=355&height=55&key=" style="width:200px;height:50px"/>
</div>
<div class="item">
<button onclick="login()">登录</button>
</div>
</div>
</body>
</html>

results matching ""

    No results matching ""