You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

226 lines
9.0 KiB
HTML

5 years ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{:C('WEB_SITE_TITLE')}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- CSS -->
<link rel="stylesheet" href="__CSS__/reset.css">
<link rel="stylesheet" href="__CSS__/supersized.css">
<link rel="stylesheet" href="__CSS__/loginnews1711.css">
<script src="__JS__/jquery-3.0.0.min.js" ></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__JS__/cloud.js" type="text/javascript"></script>
</head>
<body style="background-color:#1c77ac; background-image:url(__IMG__/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">
<div id="mainBody">
<div id="cloud1" class="cloud"></div>
<div id="cloud2" class="cloud"></div>
</div>
<div class="logintop">
<span>欢迎登录后台管理界面平台</span>
<ul>
<li><a href="http://xue.vlcms.com/" target="_blank">帮助</a></li>
<li><a href="http://www.vlcms.com/" target="_blank">关于</a></li>
</ul>
</div>
<div class="loginbody" >
<span class="systemlogo"></span>
<div class="loginbox">
<form class="inputlogin">
<div class="wrap">
<h3><span>用户登录</span><span>User Login</span></h3>
<ul>
<li>
<img src="__IMG__/login_name.png" class="icon icon-user">
<input name="username" type="text" class="login_input" value="" autocomplete="off" placeholder="管理员账号" />
</li>
<li>
<img src="__IMG__/login_password.png" class="icon icon-lock">
<input name="password" type="password" class="login_input" autocomplete="off" value="" placeholder="密码"/>
</li>
<li>
<img src="__IMG__/login_code.png" class="icon icon-code">
<input name="verify" type="text" class="login_input verify" value="" placeholder="请填写验证码"/>
<img class="verifyimg reloadverify" title="点击切换" alt="验证码" src="{:U('Public/verify')}">
</li>
<li><input name="" type="submit" class="loginbtn" value="登录" /></li>
</ul>
</div>
</form>
</div>
</div>
<!-- <div class="loginbm"><i>&copy;徐州梦创信息科技有限公司 版权所有</i>2016&nbsp;<a href="http://www.vlcms.com/" target="_blank">vlcms.com</a> &copy;版权所有</div> -->
5 years ago
<div id="tip" class="tip"><a class="tipclose hidden" ></a><div class="tipmain"><div class="tipicon"></div><div class="tipinfo">这是内容</div></div></div>
<script>
/**顶部警告栏*/
var content = $('#main');
var top_alert = $('#tip');
top_alert.find('.tipclose').on('click', function () {
top_alert.removeClass('block').slideUp(200);
});
window.updateAlert = function (text,c) {
text = text||'default';
c = c||false;
if ( text!='default' ) {
top_alert.find('.tipinfo').text(text);
if (top_alert.hasClass('block')) {
} else {
top_alert.addClass('block').slideDown(200);
}
} else {
if (top_alert.hasClass('block')) {
top_alert.removeClass('block').slideUp(200);
}
}
if ( c!=false ) {
top_alert.removeClass('tip_error tip_right').addClass(c);
}
};
</script>
<script>
$(function(){
$(".inputlogin").unbind('submit').submit(function(){
$.ajax({
type: 'POST',
async: true,
dataType: 'json',
url: "{:U('login')}",
data: $(".inputlogin").serialize(),
success: function(data) {
if(data.status!=1){
updateAlert(data.info,'tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
$('.reloadverify').click();
},1500);
}else{
updateAlert(data.msg,'tip_right');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
location.reload();
}
},
error:function(){
updateAlert("服务器故障!",'tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
}
});
return false;
});
$('.changebutton').on('click',function(){
get_openid();
setTimeout(function(){
$('.jchangebutton').click();
},120000);
var that = $(this),parent = that.closest('form');
parent.addClass('hidden').siblings('form').removeClass('hidden');
});
function QrLogin(token) {
var ws = new WebSocket('ws://{$Think.SERVER.HTTP_HOST}:1234');
ws.onopen = function () {
ws.send(token);
};
ws.onmessage = function (e) {
var res = e.data;
res = eval('(' + res + ')');
console.log(res,res.status);
if (res.status == 1) {
$.ajax({
Type: 'POST',
dataType: 'json',
data: {token: res.token},
url: "{:U('QrLogin/QrLogin')}",
success: function (data) {
// console.log(data);
if (data.status == 1) {
updateAlert('登录成功','tip_right');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
location.reload();
}else{
updateAlert(data.msg,'tip_error');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);
}
}
})
}
};
}
function get_openid(){
$.ajax({
type:"POST",
url:"{:U('get_openid')}",
dataType:"json",
success:function(res){
if(res.status){
$('.wx_qrcode').attr('src',res.data);
QrLogin(res.token);
}else{
$.ajax({
type:"POST",
url:"{:U('wite_token')}",
dataType:"json",
success:function(res){
if(res.status){
$('.wx_qrcode').attr('src',res.data);
}else{
alert("服务器故障!");
}
},
})
}
},
error:function(){
}
})
};
var verifyimg = $(".verifyimg").attr("src");
$(".reloadverify").click(function(){
if( verifyimg.indexOf('?')>0){
$(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
}else{
$(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
}
});
});
</script>
</body>
</html>