email-success-new.js
740 Bytes
import $ from 'yoho-jquery';
import Page from 'yoho-page';
import tip from '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;