Authored by 郭成尧

import-page

require('passport/sms-login-new.page.css');
const SmsLoginNew = require('./smslogin/sms-login-new');
new SmsLoginNew();
... ...
import {Page} from 'yoho-page';
class SmsLoginNew extends Page {
constructor() {
super();
this.selector = {
clearMobile: $('#clearMobile'),
mobileInput: $('input[name=mobile]')
};
this.bindEvents();
}
bindEvents() {
this.selector.clearMobile.on('click', this.clearMobile.bind(this));
}
/**
* 清除输入的手机号
*/
clearMobile() {
this.selector.mobileInput.val('');
}
}
module.exports = SmsLoginNew;
... ...
import app from './yoho-app';
import $ from 'yoho-jquery';
import qs from 'yoho-qs';
import fastClick from 'yoho-fastclick';
class Page {
constructor() {
fastClick.attach(document.body);
this.app = app;
this.qs = qs;
this.$event = $(document);
... ... @@ -20,4 +23,6 @@ class Page {
}
}
export default Page;
export {
Page
};
... ...