Authored by 李靖

时间输入框兼容

@@ -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() {
@@ -47,9 +47,10 @@ input::-webkit-calendar-picker-indicator { @@ -47,9 +47,10 @@ input::-webkit-calendar-picker-indicator {
47 .ewm { 47 .ewm {
48 width: 43px; 48 width: 43px;
49 height: 43px; 49 height: 43px;
50 - background-image: url("/home/family/person-ewm.png"); 50 + background-image: resolve("home/family/person-ewm.png");
51 float: right; 51 float: right;
52 margin-top: 12px; 52 margin-top: 12px;
  53 + background-size: 100% 100%;
53 } 54 }
54 } 55 }
55 56
@@ -103,7 +104,7 @@ input::-webkit-calendar-picker-indicator { @@ -103,7 +104,7 @@ input::-webkit-calendar-picker-indicator {
103 position: absolute; 104 position: absolute;
104 top: 10px; 105 top: 10px;
105 right: 20px; 106 right: 20px;
106 - width: 40px; 107 + width: 70px;
107 white-space: nowrap; 108 white-space: nowrap;
108 overflow: hidden; 109 overflow: hidden;
109 direction: rtl; 110 direction: rtl;