...
|
...
|
@@ -44,7 +44,7 @@ if (qs.selected && qs.selected === 'N') { |
|
|
$('.pitch').removeClass('select').html('');
|
|
|
}
|
|
|
|
|
|
if(qs.pwd) {
|
|
|
if (qs.pwd) {
|
|
|
$pwd.val(qs.pwd);
|
|
|
|
|
|
if (trim($pwd.val()) === '') {
|
...
|
...
|
@@ -64,6 +64,31 @@ $('.pitch').on('click', function() { |
|
|
}
|
|
|
});
|
|
|
|
|
|
function setPassword() {
|
|
|
return $.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/passport/reg/setpassword',
|
|
|
data: {
|
|
|
password: trim($pwd.val()),
|
|
|
phoneNum: $('#phone-num').val(),
|
|
|
areaCode: $('#area-code').val(),
|
|
|
smsCode: $('#sms-code').val(),
|
|
|
token: $('#token').val()
|
|
|
},
|
|
|
success: function(data) {
|
|
|
var res = data.data;
|
|
|
|
|
|
if (data.code === 200) {
|
|
|
showErrTip('注册成功');
|
|
|
|
|
|
location.href = res.href;
|
|
|
} else {
|
|
|
showErrTip(data.message);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$btnSure.on('touchstart', function() {
|
|
|
var pwd = trim($pwd.val());
|
|
|
|
...
|
...
|
@@ -74,30 +99,8 @@ $btnSure.on('touchstart', function() { |
|
|
if (!validatePWD(pwd)) {
|
|
|
showErrTip('密码6-20位,请重新输入');
|
|
|
} else {
|
|
|
|
|
|
if ($('.pitch').hasClass('select')) {
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/passport/reg/setpassword',
|
|
|
data: {
|
|
|
password: pwd,
|
|
|
phoneNum: $('#phone-num').val(),
|
|
|
areaCode: $('#area-code').val(),
|
|
|
smsCode: $('#sms-code').val(),
|
|
|
token: $('#token').val()
|
|
|
},
|
|
|
success: function(data) {
|
|
|
var res = data.data;
|
|
|
|
|
|
if (data.code === 200) {
|
|
|
showErrTip('注册成功');
|
|
|
|
|
|
location.href = res.href;
|
|
|
} else {
|
|
|
showErrTip(data.message);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
setPassword();
|
|
|
} else {
|
|
|
$('.prompt').show();
|
|
|
|
...
|
...
|
@@ -106,27 +109,7 @@ $btnSure.on('touchstart', function() { |
|
|
$('.pitch').addClass('select');
|
|
|
$('.pitch').html('');
|
|
|
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/passport/reg/setpassword',
|
|
|
data: {
|
|
|
password: pwd,
|
|
|
phoneNum: $('#phone-num').val(),
|
|
|
areaCode: $('#area-code').val(),
|
|
|
token: $('#token').val()
|
|
|
},
|
|
|
success: function(data) {
|
|
|
var res = data.data;
|
|
|
|
|
|
if (data.code === 200) {
|
|
|
showErrTip('注册成功');
|
|
|
|
|
|
location.href = res.href;
|
|
|
} else {
|
|
|
showErrTip(data.message);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
setPassword();
|
|
|
});
|
|
|
|
|
|
$('.deny').on('click', function() {
|
...
|
...
|
|