Showing
4 changed files
with
19 additions
and
2 deletions
@@ -28,6 +28,7 @@ class storeHome extends global.yoho.BaseModel { | @@ -28,6 +28,7 @@ class storeHome extends global.yoho.BaseModel { | ||
28 | return Promise.all([ | 28 | return Promise.all([ |
29 | this._userInfo(params) | 29 | this._userInfo(params) |
30 | ]).then(result => { | 30 | ]).then(result => { |
31 | + result[0].data.babyInfo.gender = ''; | ||
31 | if (_.get(result, '[0].data')) { | 32 | if (_.get(result, '[0].data')) { |
32 | let coffee = result[0].data.vip_type === 1; | 33 | let coffee = result[0].data.vip_type === 1; |
33 | let green = result[0].data.vip_type === 2; | 34 | let green = result[0].data.vip_type === 2; |
@@ -45,6 +46,10 @@ class storeHome extends global.yoho.BaseModel { | @@ -45,6 +46,10 @@ class storeHome extends global.yoho.BaseModel { | ||
45 | if (result[0].data.babyInfo) { | 46 | if (result[0].data.babyInfo) { |
46 | let thisGender = result[0].data.babyInfo.gender; | 47 | let thisGender = result[0].data.babyInfo.gender; |
47 | 48 | ||
49 | + if (!thisGender) { | ||
50 | + result[0].data.unknow = true; | ||
51 | + } | ||
52 | + | ||
48 | result[0].data.gender = (thisGender === '1' ? '男' : '女'); | 53 | result[0].data.gender = (thisGender === '1' ? '男' : '女'); |
49 | result[0].data.otherGender = (thisGender === '1' ? '女' : '男'); | 54 | result[0].data.otherGender = (thisGender === '1' ? '女' : '男'); |
50 | if (result[0].data.gender === '男') { | 55 | if (result[0].data.gender === '男') { |
@@ -19,6 +19,7 @@ | @@ -19,6 +19,7 @@ | ||
19 | <span class="iconfont"></span> | 19 | <span class="iconfont"></span> |
20 | <div class="select-c"> | 20 | <div class="select-c"> |
21 | <select class="s-title baby-gender modify"> | 21 | <select class="s-title baby-gender modify"> |
22 | + {{#if unknow}}<option disabled selected></option>{{/if}} | ||
22 | <option value="{{genderId}}">{{gender}}</option> | 23 | <option value="{{genderId}}">{{gender}}</option> |
23 | <option value="{{otherGenderId}}">{{otherGender}}</option> | 24 | <option value="{{otherGenderId}}">{{otherGender}}</option> |
24 | </select> | 25 | </select> |
1 | import $ from 'yoho-jquery'; | 1 | import $ from 'yoho-jquery'; |
2 | import Page from 'yoho-page'; | 2 | import Page from 'yoho-page'; |
3 | import tip from 'plugin/tip'; | 3 | import tip from 'plugin/tip'; |
4 | +import yoho from 'yoho-app'; | ||
4 | 5 | ||
5 | class Photography extends Page { | 6 | class Photography extends Page { |
6 | constructor() { | 7 | constructor() { |
@@ -25,8 +26,13 @@ class Photography extends Page { | @@ -25,8 +26,13 @@ class Photography extends Page { | ||
25 | } | 26 | } |
26 | 27 | ||
27 | bindEvents() { | 28 | bindEvents() { |
28 | - this.selector.$noDate.on('change', this.modifyInp.bind(this)); | ||
29 | - this.selector.$birthday.on('blur', this.modifyInp.bind(this)); | 29 | + alert(yoho.isAndroid); |
30 | + if (yoho.isAndroid) { | ||
31 | + this.selector.$modifyInp.on('change', this.modifyInp.bind(this)); | ||
32 | + } else { | ||
33 | + this.selector.$noDate.on('change', this.modifyInp.bind(this)); | ||
34 | + this.selector.$birthday.on('blur', this.modifyInp.bind(this)); | ||
35 | + } | ||
30 | } | 36 | } |
31 | 37 | ||
32 | modifyInp() { | 38 | modifyInp() { |
-
Please register or login to post a comment