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.

419 lines
18 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 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>
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"/>
<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">
<img src="__IMG__/ssg/login/kf.png">
<div class="chatqq">
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">
5 years ago
<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">
5 years ago
<input id="regaccount" type="text" placeholder="请输入账号(6-12位字母数字组合)" value="">
5 years ago
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
5 years ago
<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>
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 type="text/javascript">
5 years ago
var mySwiper = new Swiper('.swiper-container', {
// autoplay: true,//可选选项,自动滑动
// initialSlide :2,
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(){
5 years ago
window.location.href='{:U("home")}';
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';
})
5 years ago
//获取验证码
5 years ago
//登陆
$("#loginbtn").on("click",function(){
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,
'Password': (loginPass),
'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 {
window.location.href = "mobile.php?s=/Ssg/index.html"
5 years ago
}
}
});
5 years ago
})
//倒计时
var codeflag = true;
5 years ago
//手机注册按钮
$("#phonereg").on("click",function(){
var phone = $('#phoneval').val();
var phonepassword = $('#phonepassword').val();
var phonecode = $('#phonecode').val();
var promoteId = $("#promote_id").val();
if(!checkPhone(phone)){
return false;
}
if(phonepassword.length < 6 || phonepassword.length > 15){
alert('密码长度6-15个字符');
5 years ago
return false;
}
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z]).{8,30}');
if (!pwdRegex.test(phonepassword)) {
alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
return false;
}
5 years ago
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
},
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
// alert("注册成功,三秒后将自动登陆");
// window.location.href = "mobile.php?s=/Ssg/index.html"
5 years ago
}
}
})
})
5 years ago
//弹框确认
function hideAndLogin(){
$("#alert_box").hide();
window.location.href = "mobile.php?s=/Ssg/index.html"
}
5 years ago
//获取手机验证码
$("#getPhoneCode").on("click",function(){
//获取手机
var phone = $('#phoneval').val();
if(codeflag){
if(checkPhone(phone)){
//获取验证码
$.ajax({
type: 'GET',
url: 'mobile.php?s=/Ssg/sendPhoneCode.html&phone='+phone,
dataType: 'JSON',
success: function (result) {
console.log(result)
if (result.status != 1) {
alert(result.msg);
} else {
countDown();
}
}
})
}
}
})
var i = 60;
function countDown() {
codeflag = false;
i = i - 1;
5 years ago
$("#getPhoneCode").html(i+"秒后重发").css("backgroundColor","#f5f5f5").css("color","#A9A9A9");
5 years ago
if (i == 0) {
5 years ago
$("#getPhoneCode").html("重新发送").css("backgroundColor","#21B1EB").css("color","#fff");
5 years ago
codeflag = true;
i = 60;
return;
}
setTimeout('countDown()',1000);
}
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])');
5 years ago
if(account.length < 6 || account.length > 12){
5 years ago
alert('账号长度必须是6-12位');
5 years ago
return false;
}
5 years ago
if (!pwdRegex.test(account)) {
alert("账号必须是6-12位字母数字组合");
return false;
}
5 years ago
if(regpassword.length < 6 || regpassword.length > 15){
alert('密码长度6-15个字符');
return false;
}
5 years ago
if (!pwdRegex.test(regpassword)) {
alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
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
}
}
})
})
5 years ago
//验证手机
function checkPhone(phone){
if(!(/^1[3456789]\d{9}$/.test(phone))){
alert("手机号码有误,请重填");
return false;
} else{
return true;
}
5 years ago
}
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>