...
|
...
|
@@ -14,6 +14,8 @@ var tip = require('../../plugin/tip'); |
|
|
var trim = $.trim;
|
|
|
var showErrTip = tip.show;
|
|
|
|
|
|
var $mobile = $('#mobile');
|
|
|
|
|
|
api.bindEyesEvt();
|
|
|
|
|
|
$pwd.bind('input', function() {
|
...
|
...
|
@@ -25,19 +27,45 @@ $pwd.bind('input', function() { |
|
|
});
|
|
|
|
|
|
$btnOk.on('touchstart', function() {
|
|
|
var pwd = trim($pwd.val());
|
|
|
var pwd = trim($pwd.val()),
|
|
|
mobileBack = true,
|
|
|
setting,
|
|
|
url;
|
|
|
|
|
|
if ($btnOk.hasClass('disable')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
setting = {
|
|
|
password: pwd
|
|
|
};
|
|
|
|
|
|
if ($mobile.length === 0) {
|
|
|
mobileBack = false;
|
|
|
}
|
|
|
|
|
|
if (mobileBack) {
|
|
|
$.extend(setting, {
|
|
|
mobile: $mobile.val(),
|
|
|
areaCode: $('#areaCode').val(),
|
|
|
token: $('#token').val()
|
|
|
});
|
|
|
|
|
|
url = '/passport/back/passwordByMobile';
|
|
|
} else {
|
|
|
$.extend(setting, {
|
|
|
code: $('#email-code').val()
|
|
|
});
|
|
|
|
|
|
url = '/passport/back/passwordByEmail';
|
|
|
}
|
|
|
|
|
|
|
|
|
if (api.pwdValidate(pwd)) {
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/passport/back/update',
|
|
|
data: {
|
|
|
password: pwd
|
|
|
},
|
|
|
data: setting,
|
|
|
success: function(data) {
|
|
|
if (data.code === 200) {
|
|
|
showErrTip('密码修改成功');
|
...
|
...
|
|