Merge branch 'dev_zcl' into dev

master
zhengchanglong 5 years ago
commit 32595840c3

@ -19,7 +19,7 @@ class SsgController extends BaseController {
const CODE_ERROR = -97; //验证码错误
const RETURN_SUCCESS = 1;
const RETURN_FALSE = 2;
const signprice = 0.01; //充值金额
const signprice = 10; //充值金额
public function login()
@ -61,8 +61,9 @@ class SsgController extends BaseController {
public function do_login()
{
$account = I("Account");
$password = I("Password");
$password = I("Password");
$promoteId = I("promote_id", 0);
$password = base64_decode($password);
/*if (!$promoteId) {
$this->ajaxReturn(array("ErrorCode" => -97, "ResultMsg" => "参数非法"));
}*/

@ -97,7 +97,7 @@
</div>
<div class="formitem">
<img src="__IMG__/ssg/login/password.png">
<input id="phonepassword" type="password" placeholder="请输入6-12位字母组合密码" value="">
<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;">
@ -212,6 +212,7 @@
</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,
@ -257,15 +258,30 @@ var PhoneObj = {
if (result.status != 1) {
alert(result.msg);
}
// else {
// fun()
// }
}
})
}
}else{
// alert("发送验证码频率过高,请等待"+PhoneObj.i+"秒后再试")
}
},
checkPassword(password){
console.log(password);
if(password.length < 6 || password.length > 15){
alert('密码长度6-15个字符');
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;
}
}
@ -333,7 +349,7 @@ var PhoneObj = {
url: 'mobile.php?s=/Ssg/do_login.html',
data: {
'Account': loginName,
'Password': (loginPass),
'Password': window.btoa(loginPass),
'VerifyCode': userCode,
'promote_id': promoteId,
},
@ -362,17 +378,9 @@ var PhoneObj = {
if(!PhoneObj.checkPhone(phone)){
return false;
}
if(phonepassword.length < 6 || phonepassword.length > 15){
alert('密码长度6-15个字符');
if(!PhoneObj.checkPassword(phonepassword)){
return false;
}
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
if (!pwdRegex.test(phonepassword)) {
alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
return false;
}
if(phonecode == ''){
alert('请输入验证码');
return false;
@ -435,13 +443,7 @@ var PhoneObj = {
alert("账号必须是6-12位字母数字组合");
return false;
}
if(regpassword.length < 6 || regpassword.length > 15){
alert('密码长度6-15个字符');
return false;
}
if (!pwdRegex.test(regpassword)) {
alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
if(!PhoneObj.checkPassword(regpassword)){
return false;
}
if(regpassword != regpassword2){
@ -480,14 +482,7 @@ var PhoneObj = {
if(!PhoneObj.checkPhone(phone)){
return false;
}
if(phonepassword.length < 6 || phonepassword.length > 15){
alert('密码长度6-15个字符');
return false;
}
var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])');
if (!pwdRegex.test(phonepassword)) {
alert("您的密码复杂度太低(密码中必须包含字母、数字)!");
if(!PhoneObj.checkPassword(phonepassword)){
return false;
}
if(phonecode == ''){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 KiB

After

Width:  |  Height:  |  Size: 735 KiB

@ -0,0 +1 @@
!function(){var e="object"==typeof exports&&null!==exports&&"number"!=typeof exports.nodeType?exports:"undefined"!=typeof self?self:$.global,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function f(e){this.message=e}(f.prototype=new Error).name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,r,o=String(e),n=0,a=c,i="";o.charAt(0|n)||(a="=",n%1);i+=a.charAt(63&t>>8-n%1*8)){if(255<(r=o.charCodeAt(n+=.75)))throw new f("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|r}return i}),e.atob||(e.atob=function(e){var t=String(e).replace(/[=]+$/,"");if(t.length%4==1)throw new f("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,n=0,a=0,i="";o=t.charAt(a++);~o&&(r=n%4?64*r+o:o,n++%4)?i+=String.fromCharCode(255&r>>(-2*n&6)):0)o=c.indexOf(o);return i})}();
Loading…
Cancel
Save