Authored by 李靖

生日展示修改

... ... @@ -28,6 +28,7 @@ class storeHome extends global.yoho.BaseModel {
return Promise.all([
this._userInfo(params)
]).then(result => {
result[0].data.babyInfo.gender = '';
if (_.get(result, '[0].data')) {
let coffee = result[0].data.vip_type === 1;
let green = result[0].data.vip_type === 2;
... ... @@ -45,6 +46,10 @@ class storeHome extends global.yoho.BaseModel {
if (result[0].data.babyInfo) {
let thisGender = result[0].data.babyInfo.gender;
if (!thisGender) {
result[0].data.unknow = true;
}
result[0].data.gender = (thisGender === '1' ? '男' : '女');
result[0].data.otherGender = (thisGender === '1' ? '女' : '男');
if (result[0].data.gender === '男') {
... ...
... ... @@ -19,6 +19,7 @@
<span class="iconfont">&#xe604;</span>
<div class="select-c">
<select class="s-title baby-gender modify">
{{#if unknow}}<option disabled selected></option>{{/if}}
<option value="{{genderId}}">{{gender}}</option>
<option value="{{otherGenderId}}">{{otherGender}}</option>
</select>
... ...
import $ from 'yoho-jquery';
import Page from 'yoho-page';
import tip from 'plugin/tip';
import yoho from 'yoho-app';
class Photography extends Page {
constructor() {
... ... @@ -25,8 +26,13 @@ class Photography extends Page {
}
bindEvents() {
this.selector.$noDate.on('change', this.modifyInp.bind(this));
this.selector.$birthday.on('blur', this.modifyInp.bind(this));
alert(yoho.isAndroid);
if (yoho.isAndroid) {
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));
}
}
modifyInp() {
... ...
... ... @@ -3,6 +3,11 @@ html {
background-color: #f0f0f0;
}
select {
-moz-appearance: none;
-webkit-appearance: none;
}
input {
padding: 0;
}
... ...