pull/105/head
Apex Liu 2017-11-06 13:01:19 +08:00
parent 99529630c6
commit 39ced04d25
1 changed files with 9 additions and 7 deletions

View File

@ -987,6 +987,7 @@ $app.create_dlg_reset_password = function () {
};
dlg.do_send_reset_email = function () {
dlg.dom.btn_send_reset_email.attr('disabled', 'disabled');
$tp.ajax_post_json('/user/reset-password', {
id: dlg.field_id,
mode: 1,
@ -994,15 +995,16 @@ $app.create_dlg_reset_password = function () {
password: ''
},
function (ret) {
dlg.dom.btn_send_reset_email.removeAttr('disabled');
if (ret.code === TPE_OK) {
$tp.notify_success('用户密码重置成功!');
// $app.table_users.load_data();
dlg.dom.dialog.modal('hide');
} else {
$tp.notify_error('用户密码重置失败:' + tp_error_msg(ret.code, ret.message));
}
},
function () {
dlg.dom.btn_send_reset_email.removeAttr('disabled');
$tp.notify_error('网络故障,用户密码重置失败!');
}
);