...
|
...
|
@@ -29,6 +29,7 @@ class UserInfo extends Page { |
|
|
$cityText: $('.city-text'),
|
|
|
$userPic: $('.user-pic'),
|
|
|
$noDate: $('.inp.modify[type!=date]'),
|
|
|
$bottomOut: $('.bottom-out')
|
|
|
};
|
|
|
|
|
|
this.view = {
|
...
|
...
|
@@ -82,6 +83,9 @@ class UserInfo extends Page { |
|
|
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));
|
|
|
this.selector.$bottomOut.on('focus', this.keepOut.bind(this));
|
|
|
this.selector.$bottomOut.on('blur', this.restore.bind(this));
|
|
|
|
|
|
if (yoho.isApp) {
|
|
|
this.selector.$modifyInp.on('change', this.modifyInp.bind(this));
|
|
|
} else {
|
...
|
...
|
@@ -98,6 +102,25 @@ class UserInfo extends Page { |
|
|
}
|
|
|
}
|
|
|
|
|
|
keepOut(e) {
|
|
|
let $this = $(e.currentTarget);
|
|
|
|
|
|
$('body').css({
|
|
|
height: $(window).height() + $this.offset().top * 2 / 3
|
|
|
});
|
|
|
|
|
|
$(document).scrollTop($this.offset().top * 2 / 3);
|
|
|
}
|
|
|
|
|
|
restore() {
|
|
|
|
|
|
$('body').css({
|
|
|
height: $(window).height()
|
|
|
});
|
|
|
|
|
|
$(document).scrollTop(0);
|
|
|
}
|
|
|
|
|
|
userPic() {
|
|
|
if (yoho.isApp) {
|
|
|
yoho.ready(() => {
|
...
|
...
|
|