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.

150 lines
5.7 KiB
HTML

<!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>
<script src="__JS__/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__JS__/getRem.js"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
<link rel="stylesheet" type="text/css" href="__CSS__/foot_tabbar.css">
<link rel="stylesheet" type="text/css" href="__CSS__/my.css">
<link href="__CSS__/common-cz.css" rel="stylesheet" >
</head>
<body>
<div class="my">
<div class="register">
<div class="logo"><img src="__IMG__/user/logo2.png" alt=""></div>
<div class="account">
<img class="img-one" src="__IMG__/user/people.png" alt="">
<input id="mobile" type="text" placeholder="请输入账号/手机号" value=''>
<img class="img-close empty" style="padding: 0px;" src="__IMG__/user/close.png" alt="">
</div>
<div class="passsword">
<img class="img-one" src="__IMG__/user/suo.png" alt="">
<input type="password" id="password" placeholder="请输入密码">
<img class="img-close create_img" src="__IMG__/user/show.png" alt="">
</div>
<div class="forget"><a href="{:U('User/forget')}">忘记密码?</a></div>
<button class="enter submit">登录</button>
<if condition="I('get.pid') gt 0">
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="<?='mobile.php?s=/User/step1/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 账号注册 </a>|<a href="<?='mobile.php?s=/User/step/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 手机注册 </a></div>
<else/>
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="{:U('User/step1')}"> 账号注册 </a>|<a href="{:U('User/step')}"> 手机注册 </a></div>
</if>
</div>
</div>
<div class="pop pop-window">
<div class="pop-box pop-sign">
<div class="pop-wrap"></div>
</div>
</div>
<div class="popmsg pop-dialog" style="font-size: .28rem"></div>
</body>
<script src="__JS__/pop.lwx.min.js"></script>
<script src="__JS__/lwx.js"></script>
<script src="__JS__/common.js"></script>
<script>
$(document).ready(function(){
$('.foot_tabbar').hide()
});
$(document).keyup(function(event){
if(event.keyCode == 13){
$('.submit').click();
}
});
$('.empty').click(function(){
$('.account>input').val("");
});
$('.create_img').click(function(){
if($(this).attr('src')=='__IMG__/user/show.png'){
$(this).attr('src','__IMG__/user/hide.png');
$(this).siblings("input").attr('type','text');
}else{
$(this).attr('src','__IMG__/user/show.png');
$(this).siblings("input").attr('type','password');
}
});
var pmsg = $('.popmsg').pop();
$('.submit').click(function(event) {
var mobile = $.trim($('#mobile').val());
var password = $.trim($('#password').val());
var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0;
var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0;
if (mobile) {
if (password) {
$.ajax({
type:'POST',
url:'{:U("login")}',
data:{'phone':mobile,'password':password,'promote_id':promoteId,'game_id':gameId},
dataType:"Json",
success:function(data){
if(data.status == 1 || data.status == 2){
var username = lwx.getItem('username');
if(username) {
var arr = username.split(',');
if(arr.length>=5) {arr = arr.splice(0,5);}
for(var i=0,len=arr.length;i<len;i++) {
if((!arr[i] && typeof(arr[i]) != 0) || arr[i] == mobile) {arr.splice(i,1);}
}
arr.unshift(mobile);
mobile = arr.join(',');
}
lwx.setItem('username',mobile);
pmsg.msg(data.msg);
var url = $.trim($('#login_form').attr('data-url'));
setTimeout(function(){
if (data.status == 2) {
window.location.href = 'http://' + "{$_SERVER['HTTP_HOST']}" + "/index.php?s=/Home/Home/promitionofregestion/gid/" + gameId + "/pid/" + promoteId + "/status/" + "1" + ".html";
return false;
} else {
if (url) {
window.location.href = url;
} else {
window.location.href = "{:U('index')}";
}
return false;
}
},1500);
}else{
pmsg.msg(data.msg);
return false;
}
}
});
} else{
pmsg.msg('请输入密码');event.preventDefault();
}
} else {
pmsg.msg('请输入手机号码');event.preventDefault();
}
});
$(".jsdel").click(function(){
var input = $(this).siblings('.jsinput');
input.val('').focus();
if($.trim(input.val())) {
$(this).show();
} else {
$(this).hide();
}
return false;
})
</script>
</block>