|
@@ -27,7 +27,8 @@ class UserInfo extends Page { |
|
@@ -27,7 +27,8 @@ class UserInfo extends Page { |
27
|
$okBtn: $('.swiper-header .ok'),
|
27
|
$okBtn: $('.swiper-header .ok'),
|
28
|
$provinceText: $('.province-text'),
|
28
|
$provinceText: $('.province-text'),
|
29
|
$cityText: $('.city-text'),
|
29
|
$cityText: $('.city-text'),
|
30
|
- $userPic: $('.user-pic')
|
30
|
+ $userPic: $('.user-pic'),
|
|
|
31
|
+ $noDate: $('.inp.modify[type!=date]'),
|
31
|
};
|
32
|
};
|
32
|
|
33
|
|
33
|
this.view = {
|
34
|
this.view = {
|
|
@@ -59,11 +60,25 @@ class UserInfo extends Page { |
|
@@ -59,11 +60,25 @@ class UserInfo extends Page { |
59
|
|
60
|
|
60
|
bindEvents() {
|
61
|
bindEvents() {
|
61
|
this.selector.$chosenCity.on('click', this.chosenCity.bind(this));
|
62
|
this.selector.$chosenCity.on('click', this.chosenCity.bind(this));
|
62
|
- this.selector.$modifyInp.on('blur', this.modifyInp.bind(this));
|
|
|
63
|
this.selector.$cancelBtn.on('click', this.cancelFun.bind(this));
|
63
|
this.selector.$cancelBtn.on('click', this.cancelFun.bind(this));
|
64
|
this.selector.$okBtn.on('click', this.okFun.bind(this));
|
64
|
this.selector.$okBtn.on('click', this.okFun.bind(this));
|
65
|
this.selector.$chosenCity.on('DOMNodeInserted', this.modifyInp.bind(this));
|
65
|
this.selector.$chosenCity.on('DOMNodeInserted', this.modifyInp.bind(this));
|
66
|
this.selector.$userPic.on('click', this.userPic.bind(this));
|
66
|
this.selector.$userPic.on('click', this.userPic.bind(this));
|
|
|
67
|
+ this.selector.$modifyInp.on('click', this.closeCitySwiper.bind(this));
|
|
|
68
|
+ if (yoho.isApp) {
|
|
|
69
|
+ this.selector.$modifyInp.on('change', this.modifyInp.bind(this));
|
|
|
70
|
+ } else {
|
|
|
71
|
+ this.selector.$noDate.on('change', this.modifyInp.bind(this));
|
|
|
72
|
+ this.selector.$birthday.on('blur', this.modifyInp.bind(this));
|
|
|
73
|
+ }
|
|
|
74
|
+ }
|
|
|
75
|
+
|
|
|
76
|
+ closeCitySwiper(e) {
|
|
|
77
|
+ let $this = $(e.currentTarget);
|
|
|
78
|
+
|
|
|
79
|
+ if ($this.attr('id') !== 'chosen-city') {
|
|
|
80
|
+ this.selector.$citySwiper.hide();
|
|
|
81
|
+ }
|
67
|
}
|
82
|
}
|
68
|
|
83
|
|
69
|
userPic() {
|
84
|
userPic() {
|