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

5 years ago
<!DOCTYPE html>
<html>
5 years ago
5 years ago
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
5 years ago
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
5 years ago
<title>登陆页</title>
<link href="__CSS__/ssg/common.css" rel="stylesheet" type="text/css">
5 years ago
<link href="__CSS__/swiper.min.css" rel="stylesheet" type="text/css">
<script src="__JS__/ssg/flexible.min.js" type="text/javascript"></script>
5 years ago
</head>
5 years ago
5 years ago
<body>
5 years ago
<div class="login-page" style="background: url('__IMG__/ssg/login/bg.png') no-repeat top center/100% 100%;">
5 years ago
<!---登陆弹框-->
5 years ago
<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;">
5 years ago
注册成功,三秒后将自动登陆。
</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>
5 years ago
<div class="header-img">
<img src="__IMG__/ssg/home/hader.png">
5 years ago
</div>
5 years ago
<input type="hidden" value="{$promote_id}" id="promote_id" name="promote_id"/>
<input type="hidden" value="{$game_id}" id="game_id" name="game_id"/>
5 years ago
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide swiper-no-swiping">
<!--登陆-->
<div class="loginbox">
<div class="title">
5 years ago
<img class="back" src="__IMG__/ssg/login/back.png" >
5 years ago
<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>
5 years ago
<div class="formitem verify-item">
<div class="formitem">
5 years ago
<img src="__IMG__/ssg/login/code.png">
5 years ago
<input id="userCode" type="text" placeholder="请输入验证码" value="">
5 years ago
</div>
5 years ago
<!-- <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> -->
5 years ago
<img class="verify-img" id="verifyCode" onclick="GetVerityCode()" src="/mobile.php?s=/Ssg/verify.html">
5 years ago
</div>
<!---按钮-->
5 years ago
<div class="login-btn-group">
<div id="loginbtn" style="background: url('__IMG__/ssg/login/bottonbg.png') no-repeat top center/cover;">
5 years ago
登陆
</div>
5 years ago
<div class="gophonreg" style="background: url('__IMG__/ssg/login/bottonbg.png') no-repeat top center/cover;">
5 years ago
注册
</div>
</div>
5 years ago
<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>
5 years ago
</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="">
5 years ago
</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">
5 years ago
<input id="phonecode" type="text" placeholder="请输入短信验证码" value="" style="width:2.5rem;">
5 years ago
</div>
5 years ago
<div id="getPhoneCode" class="phonecodebtn">
5 years ago
获取验证码
</div>
</div>
<!---按钮-->
5 years ago
<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;">
5 years ago
立即注册
</div>
</div>
5 years ago
<div class="reg-footer">
5 years ago
<div>注册即表示同意<a href="{:U('News/protocol')}" style="color:#3CC2EF">《用户协议》</a></div>
5 years ago
<div class="reg-change">
<img src="__IMG__/ssg/login/change.png">
<div class="gouserreg">
5 years ago
切换普通注册
</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="">
5 years ago
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="regpassword" type="password" placeholder="请输入6-12位密码" value="">
5 years ago
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
5 years ago
<input id="regpassword2" type="password" placeholder="请再次确认输入密码" value="">
5 years ago
</div>
<!---按钮-->
5 years ago
<div class="login-btn-group">
5 years ago
<div id="userreg" class="login-btn-big"
style="background: url('__IMG__/ssg/login/bigbuttonbg.png') no-repeat top center/cover;">
5 years ago
立即注册
</div>
</div>
5 years ago
<div class="reg-footer">
5 years ago
<div>注册即表示同意 <a href="{:U('News/protocol')}" style="color:#3CC2EF">《用户协议》</a></div>
5 years ago
<div class="reg-change">
<img src="__IMG__/ssg/login/change.png">
<div class="gophonreg">
5 years ago
切换手机注册
</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>
5 years ago
</div>
5 years ago
</div>
</div>
</body>
<script src="__JS__/jquery-1.11.1.min.js" type="text/javascript"></script>
5 years ago
<script src="__JS__/swiper.min.js" type="text/javascript"></script>
5 years ago
<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+"秒后再试")
}
5 years ago
},
checkPassword(password){
console.log(password);
if(password.length < 6 || password.length > 12){
alert('密码长度6-12个字符');
5 years ago
return false;
}
// var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
// if (!pwdRegex.test(password)) {
// alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
// return false;
// }
5 years ago
var chinaRex = new RegExp("[\\u4E00-\\u9FFF]+","g");;
if (chinaRex.test(password)) {
alert("密码不允许含有中文字符!");
return false;
}
return true;
}
}
</script>
5 years ago
<script type="text/javascript">
5 years ago
var mySwiper = new Swiper('.swiper-container', {
// autoplay: true,//可选选项,自动滑动
5 years ago
// initialSlide :3,
// effect : 'fade',
5 years ago
noSwiping : true,
})
5 years ago
checkSafari()
5 years ago
var loginLock = false;
function GetVerityCode() {
//刷新验证码
$("#verifyCode").attr("src", "/mobile.php?s=/Ssg/verify.html&id=" + Math.random());
5 years ago
}
5 years ago
$(".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}';
5 years ago
})
$(".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);
})
5 years ago
//获取验证码
5 years ago
//登陆
$("#loginbtn").on("click",function(){
var gameId = $("#game_id").val();
5 years ago
var loginName = $("#userAccount").val();
var loginPass = $("#password").val();
var userCode = $("#userCode").val();
var promoteId = $("#promote_id").val();
5 years ago
if (loginName == "") {
alert("账号不能为空");
return false;
}
if (loginPass == "") {
alert("密码不能为空");
return false;
}
if (userCode == "") {
alert("验证码不能为空");
return false;
}
if (promoteId == "") {
alert("推广员ID不能为空");
return false;
}
5 years ago
jQuery.ajax({
type: 'POST',
5 years ago
url: 'mobile.php?s=/Ssg/do_login.html',
5 years ago
data: {
5 years ago
'Account': loginName,
5 years ago
'Password': window.btoa(loginPass),
5 years ago
'VerifyCode': userCode,
'promote_id': promoteId,
5 years ago
},
dataType: 'JSON',
5 years ago
xhrFields: {
withCredentials: true
},
async: false,
5 years ago
cache: false,
success: function (result) {
5 years ago
if (result.ErrorCode != 0) {
5 years ago
alert(result.ResultMsg);
GetVerityCode();
5 years ago
} else {
if (gameId) {
window.location.href = "/mobile.php?s=/Ssg/pay/game_id/"+gameId+".html"
} else {
window.location.href = "/mobile.php?s=/Ssg/index.html"
}
5 years ago
}
}
});
5 years ago
})
5 years ago
//手机注册按钮
$("#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)){
5 years ago
return false;
}
5 years ago
if(!PhoneObj.checkPassword(phonepassword)){
5 years ago
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,
5 years ago
},
success: function (result) {
console.log(result)
if (result.return_code == 'fail') {
alert(result.return_msg);
} else {
5 years ago
$("#alert_box").show();
setTimeout(hideAndLogin,2500)
5 years ago
}
}
})
})
5 years ago
//弹框确认
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"
}
5 years ago
}
5 years ago
//获取手机验证码
$("#getPhoneCode").on("click",function(){
//获取手机
var dom = $(this);
5 years ago
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);
});
})
5 years ago
//普通注册
$("#userreg").on("click",function(){
var account = $('#regaccount').val();
var regpassword = $('#regpassword').val();
var regpassword2 = $("#regpassword2").val();
var promoteId = $("#promote_id").val();
5 years ago
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
if(account.length < 6 || account.length > 15){
alert('账号长度必须是6-15位');
5 years ago
return false;
}
5 years ago
if (!pwdRegex.test(account)) {
alert("账号必须是6-15位字母数字组合");
5 years ago
return false;
}
5 years ago
if(regpassword.length < 6 || regpassword.length > 12){
alert('密码长度6-12个字符');
return false;
}
5 years ago
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 {
//成功
5 years ago
$("#alert_box").show();
setTimeout(hideAndLogin,2500)
// alert("注册并登陆成功");
// window.location.href = "mobile.php?s=/Ssg/index.html"
5 years ago
}
}
})
})
//忘记密码
$("#forgetBtn").on("click",function(){
var phone = $('#forgetPhoneval').val();
var phonepassword = $('#forgetPhonepassword').val();
var phonecode = $('#forgetPhonecode').val();
if(!PhoneObj.checkPhone(phone)){
return false;
5 years ago
}
5 years ago
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)
}
}
})
})
5 years ago
function checkSafari() {
5 years ago
var promoteId = $("#promote_id").val();
5 years ago
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浏览器打开本页面");
5 years ago
window.location.href = 'mobile.php?s=/Ssg/home.html&promote_id='+promoteId;
5 years ago
}
}
5 years ago
</script>
5 years ago
5 years ago
</html>