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.

543 lines
23 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>登陆页</title>
<link href="__CSS__/ssg/common.css" rel="stylesheet" type="text/css">
<link href="__CSS__/swiper.min.css" rel="stylesheet" type="text/css">
<script src="__JS__/ssg/flexible.min.js" type="text/javascript"></script>
</head>
<body>
<div class="login-page" style="background: url('__IMG__/ssg/login/bg.png') no-repeat top center/100% 100%;">
<!---登陆弹框-->
<div id="alert_box" style="height: 100vh;background:rgba(41,41,41,.8);position:fixed;z-index:9999;top: 0px;width: 100%;display: none;">
<div style="top:50%;margin-top: -1.5rem;position: fixed;width: 6.3rem;left: 50%;margin-left: -3.2rem;background-color: #fff;border-radius:.2rem;">
<div id="alert_content" style="line-height:1.4rem;font-size:.32rem;text-align: center;">
注册成功,三秒后将自动登陆。
</div>
<a onclick="hideAndLogin()" href="javascript:" style="line-height:1rem;font-size:.32rem;text-align: center;color: #21B1EB;width: 100%;display: block;border-top: 1px solid #f5f5f5;">
确定
</a>
<!-- <a href="javascript:" style="line-height:1rem;font-size:.28rem;text-align: center;color: #A9A9A9;width: 100%;display: block;" onclick="javascript;location.reload();">
支付遇到问题,重新支付
</a> -->
</div>
</div>
<div class="header-img">
<img src="__IMG__/ssg/home/hader.png">
</div>
<input type="hidden" value="{$promote_id}" id="promote_id" name="promote_id"/>
<input type="hidden" value="{$game_id}" id="game_id" name="game_id"/>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide swiper-no-swiping">
<!--登陆-->
<div class="loginbox">
<div class="title">
<img class="back" src="__IMG__/ssg/login/back.png" >
<div>登陆</div>
<div class="titleright"></div>
</div>
<div class="formitem" style="margin-top: 0px;">
<img src="__IMG__/ssg/login/user.png">
<input id="userAccount" type="text" placeholder="请输入用户名" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="password" type="password" placeholder="请输入密码" value="">
</div>
<div class="formitem verify-item">
<div class="formitem">
<img src="__IMG__/ssg/login/code.png">
<input id="userCode" type="text" placeholder="请输入验证码" value="">
</div>
<!-- <div id="verifyCode" class="verify-code" onclick="GetVerityCode()" style="color:green;width: 1.5rem;height: .7rem;line-height: .7rem;text-align:center;font-size: .40rem;border:1px solid green;letter-spacing:3px;"></div> -->
<img class="verify-img" id="verifyCode" onclick="GetVerityCode()" src="/mobile.php?s=/Ssg/verify.html">
</div>
<!---按钮-->
<div class="login-btn-group">
<div id="loginbtn" style="background: url('__IMG__/ssg/login/bottonbg.png') no-repeat top center/cover;">
登陆
</div>
<div class="gophonreg" style="background: url('__IMG__/ssg/login/bottonbg.png') no-repeat top center/cover;">
注册
</div>
</div>
<div class="login-footer">
<div class="login-footer">
<img src="__IMG__/ssg/login/forget.png">
<div class="forget content">
忘记密码
</div>
</div>
<div class="login-footer">
<img src="__IMG__/ssg/login/kf.png">
<div class="chatqq content">
联系客服
</div>
</div>
</div>
</div>
</div>
<div class="swiper-slide swiper-no-swiping">
<!--手机注册-->
<div class="loginbox">
<div class="title">
<img class="gologin" src="__IMG__/ssg/login/back.png">
<div>手机注册</div>
<div class="titleright"></div>
</div>
<div class="formitem" style="margin-top: 0px;">
<img src="__IMG__/ssg/login/phone.png">
<input id="phoneval" type="text" placeholder="请输入手机号" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="phonepassword" type="password" placeholder="请输入6-12位密码" value="">
</div>
<div class="formitem" style="border: 0px;">
<div class="formitem" style="margin-right: .2rem;margin-top: 0px;width: 3.5rem;">
<img src="__IMG__/ssg/login/code.png">
<input id="phonecode" type="text" placeholder="请输入短信验证码" value="" style="width:2.5rem;">
</div>
<div id="getPhoneCode" class="phonecodebtn">
获取验证码
</div>
</div>
<!---按钮-->
<div id="phonereg" class="login-btn-group">
<div class="login-btn-big" style="background: url('__IMG__/ssg/login/bigbuttonbg.png') no-repeat top center/cover;">
立即注册
</div>
</div>
<div class="reg-footer">
<div>注册即表示同意<a href="{:U('News/protocol')}" style="color:#3CC2EF">《用户协议》</a></div>
<div class="reg-change">
<img src="__IMG__/ssg/login/change.png">
<div class="gouserreg">
切换普通注册
</div>
</div>
</div>
</div>
</div>
<div class="swiper-slide swiper-no-swiping">
<!--普通注册-->
<div class="loginbox">
<div class="title">
<img class="gologin" src="__IMG__/ssg/login/back.png">
<div>普通注册</div>
<div class="titleright"></div>
</div>
<div class="formitem" style="margin-top: 0px;">
<img src="__IMG__/ssg/login/user.png">
<input id="regaccount" type="text" placeholder="请输入账号(6-15位字母数字组合)" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="regpassword" type="password" placeholder="请输入6-12位密码" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="regpassword2" type="password" placeholder="请再次确认输入密码" value="">
</div>
<!---按钮-->
<div class="login-btn-group">
<div id="userreg" class="login-btn-big"
style="background: url('__IMG__/ssg/login/bigbuttonbg.png') no-repeat top center/cover;">
立即注册
</div>
</div>
<div class="reg-footer">
<div>注册即表示同意 <a href="{:U('News/protocol')}" style="color:#3CC2EF">《用户协议》</a></div>
<div class="reg-change">
<img src="__IMG__/ssg/login/change.png">
<div class="gophonreg">
切换手机注册
</div>
</div>
</div>
</div>
</div>
<div class="swiper-slide swiper-no-swiping">
<!--忘记密码-->
<div class="loginbox">
<div class="title">
<img class="gologin" src="__IMG__/ssg/login/back.png">
<div>忘记密码</div>
<div class="titleright"></div>
</div>
<div class="formitem" style="margin-top: 0px;">
<img src="__IMG__/ssg/login/phone.png">
<input id="forgetPhoneval" type="text" placeholder="请输入手机号" value="">
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="forgetPhonepassword" type="password" placeholder="请输入新密码" value="">
</div>
<div class="formitem" style="border: 0px;">
<div class="formitem" style="margin-right: .2rem;margin-top: 0px;width: 3.5rem;">
<img src="__IMG__/ssg/login/code.png">
<input id="forgetPhonecode" type="text" placeholder="请输入短信验证码" value="" style="width:2.5rem;">
</div>
<div id="forgetGetPhoneCode" class="phonecodebtn">
获取验证码
</div>
</div>
<!---按钮-->
<div id="forgetBtn" class="login-btn-group">
<div class="login-btn-big" style="background: url('__IMG__/ssg/login/bigbuttonbg.png') no-repeat top center/cover;">
确定
</div>
</div>
<div class="reg-footer">
<div style="max-width:3.2rem;font-size: .20rem;"><i style="color: red;margin-right: 5px;">*</i>未绑定手机号的用户请联系客服:<br/><span style="margin-left: 10px;">在线客服:{$app_qq}</span></div>
<div class="reg-change">
<img src="__IMG__/ssg/login/kf.png">
<div class="chatqq">
联系客服
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="__JS__/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="__JS__/swiper.min.js" type="text/javascript"></script>
<script src="__JS__/ssg/base64.min.js" type="text/javascript"></script>
<script>
var PhoneObj = {
i:60,
codeflag:true,
//验证手机
checkPhone:function(phone){
if(!(/^1[3456789]\d{9}$/.test(phone))){
alert("手机号码有误,请重填");
return false;
} else{
return true;
}
},
//倒计时
countDown:function(dom){
PhoneObj.codeflag = false;
PhoneObj.i = PhoneObj.i - 1;
$("#getPhoneCode").html(PhoneObj.i+"秒后重发").css("backgroundColor","#f5f5f5").css("color","#A9A9A9");
$("#forgetGetPhoneCode").html(PhoneObj.i+"秒后重发").css("backgroundColor","#f5f5f5").css("color","#A9A9A9");
if (PhoneObj.i == 0) {
$("#getPhoneCode").html("重新发送").css("backgroundColor","#21B1EB").css("color","#fff");
$("#forgetGetPhoneCode").html("重新发送").css("backgroundColor","#21B1EB").css("color","#fff");
PhoneObj.codeflag = true;
PhoneObj.i = 60;
return;
}
setTimeout(function(){
PhoneObj.countDown(dom)
},1000);
},
//获取验证码
sendPhoneCode:function(phone,fun){
if(PhoneObj.codeflag){
if(PhoneObj.checkPhone(phone)){
//无需等待网络响应直接倒计时
fun()
//获取验证码
$.ajax({
type: 'GET',
url: 'mobile.php?s=/Ssg/sendPhoneCode.html&phone='+phone,
dataType: 'JSON',
success: function (result) {
if (result.status != 1) {
alert(result.msg);
}
}
})
}
}else{
// alert("发送验证码频率过高,请等待"+PhoneObj.i+"秒后再试")
}
},
checkPassword(password){
console.log(password);
if(password.length < 6 || password.length > 12){
alert('密码长度6-12个字符');
return false;
}
// var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
// if (!pwdRegex.test(password)) {
// alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
// return false;
// }
var chinaRex = new RegExp("[\\u4E00-\\u9FFF]+","g");;
if (chinaRex.test(password)) {
alert("密码不允许含有中文字符!");
return false;
}
return true;
}
}
</script>
<script type="text/javascript">
var mySwiper = new Swiper('.swiper-container', {
// autoplay: true,//可选选项,自动滑动
// initialSlide :3,
// effect : 'fade',
noSwiping : true,
})
checkSafari()
var loginLock = false;
function GetVerityCode() {
//刷新验证码
$("#verifyCode").attr("src", "/mobile.php?s=/Ssg/verify.html&id=" + Math.random());
}
$(".gophonreg").on("click",function() {
//去手机注册页
mySwiper.slideTo(1, 350, false);
})
$(".gouserreg").on("click",function() {
//去手机注册页
mySwiper.slideTo(2, 350, false);
})
$(".gologin").on("click",function(){
mySwiper.slideTo(0, 350, false);
})
$(".back").on("click",function(){
window.location.href='{:U("home"),"&promote_id=".$promote_id}';
})
$(".chatqq").on("click",function(){
window.location.href = 'mqqwpa://im/chat?chat_type=wpa&uin={$app_qq}&version=1&src_type=web&web_src=oicqzone.com';
})
$(".forget").on("click",function(){
mySwiper.slideTo(3, 500, false);
})
//获取验证码
//登陆
$("#loginbtn").on("click",function(){
var gameId = $("#game_id").val();
var loginName = $("#userAccount").val();
var loginPass = $("#password").val();
var userCode = $("#userCode").val();
var promoteId = $("#promote_id").val();
if (loginName == "") {
alert("账号不能为空");
return false;
}
if (loginPass == "") {
alert("密码不能为空");
return false;
}
if (userCode == "") {
alert("验证码不能为空");
return false;
}
if (promoteId == "") {
alert("推广员ID不能为空");
return false;
}
jQuery.ajax({
type: 'POST',
url: 'mobile.php?s=/Ssg/do_login.html',
data: {
'Account': loginName,
'Password': window.btoa(loginPass),
'VerifyCode': userCode,
'promote_id': promoteId,
},
dataType: 'JSON',
xhrFields: {
withCredentials: true
},
async: false,
cache: false,
success: function (result) {
if (result.ErrorCode != 0) {
alert(result.ResultMsg);
GetVerityCode();
} else {
if (gameId>0) {
window.location.href = "/mobile.php?s=/Ssg/pay/game_id/"+gameId+".html"
} else {
window.location.href = "/mobile.php?s=/Ssg/index.html"
}
}
}
});
})
//手机注册按钮
$("#phonereg").on("click",function(){
var phone = $('#phoneval').val();
var phonepassword = $('#phonepassword').val();
var phonecode = $('#phonecode').val();
var promoteId = $("#promote_id").val();
var gameId = $("#game_id").val();
if(!PhoneObj.checkPhone(phone)){
return false;
}
if(!PhoneObj.checkPassword(phonepassword)){
return false;
}
if(phonecode == ''){
alert('请输入验证码');
return false;
}
$.ajax({
type: 'POST',
url: 'mobile.php?s=/Ssg/phoneRegister.html',
dataType: 'JSON',
data:{
account:phone,
password:phonepassword,
code:phonecode,
promote_id:promoteId,
game_id:gameId,
},
success: function (result) {
console.log(result)
if (result.return_code == 'fail') {
alert(result.return_msg);
} else {
$("#alert_box").show();
setTimeout(hideAndLogin,2500)
}
}
})
})
//弹框确认
function hideAndLogin(){
$("#alert_box").hide();
var gameId = $("#game_id").val();
if (gameId) {
window.location.href = "/mobile.php?s=/Ssg/pay/game_id/"+gameId+".html"
} else {
window.location.href = "mobile.php?s=/Ssg/index.html"
}
}
//获取手机验证码
$("#getPhoneCode").on("click",function(){
//获取手机
var dom = $(this);
var phone = $('#phoneval').val();
PhoneObj.sendPhoneCode(phone,function(){
PhoneObj.countDown(dom);
});
})
$("#forgetGetPhoneCode").on("click",function(){
//获取手机
var dom = $(this);
var phone = $('#forgetPhoneval').val();
PhoneObj.sendPhoneCode(phone,function(){
PhoneObj.countDown(dom);
});
})
//普通注册
$("#userreg").on("click",function(){
var account = $('#regaccount').val();
var regpassword = $('#regpassword').val();
var regpassword2 = $("#regpassword2").val();
var promoteId = $("#promote_id").val();
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
if(account.length < 6 || account.length > 15){
alert('账号长度必须是6-15位');
return false;
}
if (!pwdRegex.test(account)) {
alert("账号必须是6-15位字母数字组合");
return false;
}
if(regpassword.length < 6 || regpassword.length > 12){
alert('密码长度6-12个字符');
return false;
}
if(regpassword != regpassword2){
alert('两次密码不一样');
return false;
}
$.ajax({
type: 'POST',
url: 'mobile.php?s=/Ssg/userRegister.html',
dataType: 'JSON',
data:{
account:account,
password:regpassword,
promote_id:promoteId
},
success: function (result) {
console.log(result)
if (result.return_code == 'fail') {
alert(result.return_msg);
} else {
//成功
$("#alert_box").show();
setTimeout(hideAndLogin,2500)
// alert("注册并登陆成功");
// window.location.href = "mobile.php?s=/Ssg/index.html"
}
}
})
})
//忘记密码
$("#forgetBtn").on("click",function(){
var phone = $('#forgetPhoneval').val();
var phonepassword = $('#forgetPhonepassword').val();
var phonecode = $('#forgetPhonecode').val();
if(!PhoneObj.checkPhone(phone)){
return false;
}
if(!PhoneObj.checkPassword(phonepassword)){
return false;
}
if(phonecode == ''){
alert('请输入验证码');
return false;
}
$.ajax({
type: 'POST',
url: 'mobile.php?s=/Ssg/forgetPassword.html',
dataType: 'JSON',
data:{
account:phone,
password:phonepassword,
code:phonecode
},
success: function (result) {
console.log(result)
if (result.return_code == 'fail') {
alert(result.return_msg);
} else {
$("#alert_content").html("密码修改成功,系统将在三秒后自动登录");
$("#alert_box").show();
setTimeout(hideAndLogin,2500)
}
}
})
})
function checkSafari() {
var promoteId = $("#promote_id").val();
var ua = navigator.userAgent.toLowerCase();
//判断是不是在iPhone的Safair浏览器打开的本页面
if (ua.indexOf('applewebkit') > -1 && ua.indexOf('mobile') > -1 && ua.indexOf('safari') > -1 &&
ua.indexOf('linux') === -1 && ua.indexOf('android') === -1 && ua.indexOf('chrome') === -1 &&
ua.indexOf('ios') === -1 && ua.indexOf('browser') === -1) {
return true;
}
else {
alert("请使用iPhone中的Safari浏览器打开本页面");
window.location.href = 'mobile.php?s=/Ssg/home.html&promote_id='+promoteId;
}
}
</script>
</html>