email-success-new.js
746 Bytes
import $ from 'yoho-jquery';
import Page from 'js/yoho-page';
import tip from 'js/plugin/tip';
class EmailSuccessNew extends Page {
constructor() {
super();
this.selector = {
resendUrlInput: $('input[name=resendUrl]'),
resendEmailBtn: $('#resendEmailBtn')
};
this.selector.resendEmailBtn.on('click', this.resendEmail.bind(this));
}
/**
* 重新发送验证码
*/
resendEmail() {
this.ajax({
url: this.selector.resendUrlInput.val(),
type: 'GET',
}).then(result => {
tip.show(result.message);
}).catch(error => {
console.error(error);
});
}
}
module.exports = EmailSuccessNew;