Commit 6bcd9474903e9d3c04be4538a9706f6e91aff2f8

Authored by zhangyan
1 parent 289ee373

no message

<view class="pet-kind fixed left bottom top bg-white pet-kind-after">
<view class="pet-kind">
<!--<view class="gray-deep-font font30r pet-kind-select">选择宠物品种</view>-->
<block wx:for="{{petlist}}" wx:for-item="list">
<view class="pet-kind-kind flex-cm">
... ...
.pet-kind{
width:100%;
padding-top:60rpx;
box-sizing:border-box;
}
.pet-kind-after{
}
... ...
... ... @@ -4,11 +4,13 @@ Page({
sex:[
{
pet_sex:'male',
iconurl:'/pages/image/pet-male.svg'
iconurl:'/pages/image/pet-male.svg',
isactive:false
},
{
pet_sex:'female',
iconurl:'/pages/image/pet-female.svg'
iconurl:'/pages/image/pet-female.svg',
isactive:true
}
]
},
... ... @@ -18,4 +20,23 @@ Page({
onShow:function () {
},
bindDateChange:function (e) {
console.log(e.detail.value)
this.setData({
date:e.detail.value
})
},
selectsex:function (e) {
var sex=e.currentTarget.dataset.sex;
var sexlist=this.data.sex;
sexlist.forEach(function (v,i) {
v.isactive=false;
if(v.pet_sex==sex){
v.isactive=true
}
})
this.setData({
sex:sexlist
})
},
})
\ No newline at end of file
... ...
... ... @@ -5,22 +5,22 @@
</view>
<view class="pet-sex flex-lr">
<block wx:for="{{sex}}">
<view class="flex-lm">
<view class="flex-lm" bindtap="selectsex" data-sex="{{item.pet_sex}}">
<image src="{{item.iconurl}}" class="sex-icon"></image>
<view class="pet-radio flex-cm">
<view class="cirle-radio bg-orange"></view>
<view class="cirle-radio {{item.isactive==true ? 'bg-orange' : ''}}"></view>
</view>
</view>
</block>
</view>
<input type="text" placeholder="请输入宝贝名字" placeholder-class="gray-font font28r font-siny flex-cm" class="black-font font28r flex-cm" maxlength="6"/>
<input type="text" placeholder="请输入宝贝名字" placeholder-class="gray-font font28r font-siny" class="black-font font28r" maxlength="6"/>
<view class="pet-birth flex-cm">
<picker mode="date" value="{{date}}" start="2000-01-01" end="2018-09-01" bindchange="bindDateChange">
<view class="picker gray-font font28r flex-cm">
<picker mode="date" value="{{date}}" start="2000-01-01" end="2018-11-09" bindchange="bindDateChange">
<view class="picker {{date ? 'black-font' : 'gray-font'}} font28r flex-cm">
{{date ? date : '请选择宝贝生日'}}
</view>
</picker>
</view>
<input type="digit" placeholder="请输入宝贝体重" placeholder-class="gray-font font28r font-siny flex-cm" class="black-font font28r flex-cm" maxlength="3"/>
<input type="digit" placeholder="请输入宝贝体重" placeholder-class="gray-font font28r font-siny" class="black-font font28r" maxlength="3"/>
<view class="save-button white-font bg-orange font30r flex-cm">开启宠爱模式</view>
</view>
\ No newline at end of file
... ...