...
|
...
|
@@ -27,7 +27,8 @@ class UserInfo extends Page { |
|
|
$okBtn: $('.swiper-header .ok'),
|
|
|
$provinceText: $('.province-text'),
|
|
|
$cityText: $('.city-text'),
|
|
|
$userPic: $('.user-pic')
|
|
|
$userPic: $('.user-pic'),
|
|
|
$noDate: $('.inp.modify[type!=date]'),
|
|
|
};
|
|
|
|
|
|
this.view = {
|
...
|
...
|
@@ -59,11 +60,25 @@ class UserInfo extends Page { |
|
|
|
|
|
bindEvents() {
|
|
|
this.selector.$chosenCity.on('click', this.chosenCity.bind(this));
|
|
|
this.selector.$modifyInp.on('blur', this.modifyInp.bind(this));
|
|
|
this.selector.$cancelBtn.on('click', this.cancelFun.bind(this));
|
|
|
this.selector.$okBtn.on('click', this.okFun.bind(this));
|
|
|
this.selector.$chosenCity.on('DOMNodeInserted', this.modifyInp.bind(this));
|
|
|
this.selector.$userPic.on('click', this.userPic.bind(this));
|
|
|
this.selector.$modifyInp.on('click', this.closeCitySwiper.bind(this));
|
|
|
if (yoho.isApp) {
|
|
|
this.selector.$modifyInp.on('change', this.modifyInp.bind(this));
|
|
|
} else {
|
|
|
this.selector.$noDate.on('change', this.modifyInp.bind(this));
|
|
|
this.selector.$birthday.on('blur', this.modifyInp.bind(this));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
closeCitySwiper(e) {
|
|
|
let $this = $(e.currentTarget);
|
|
|
|
|
|
if ($this.attr('id') !== 'chosen-city') {
|
|
|
this.selector.$citySwiper.hide();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
userPic() {
|
...
|
...
|
|