65 lines
2.1 KiB
Plaintext
65 lines
2.1 KiB
Plaintext
<page-layout id="page-layout" title="{{id?'编辑档案':'认识新朋友'}}" back="{{true}}">
|
|
<view class="screen">
|
|
<view class="photo" bindtap="choose">
|
|
<image wx:if="{{avatar_url}}" src="{{avatar_url}}" mode="aspectFill" />
|
|
<app-icon wx:else size="70" />
|
|
<view class="photo-caption">点击上传照片</view>
|
|
</view>
|
|
<view class="field">
|
|
<view class="field-label">名字 *</view>
|
|
<input
|
|
placeholder="它叫什么名字?"
|
|
value="{{name}}"
|
|
data-key="name"
|
|
bindinput="field"
|
|
/>
|
|
</view>
|
|
<view class="field">
|
|
<view class="field-label">品种</view>
|
|
<input placeholder="填写它的品种" value="{{breed}}" data-key="breed" bindinput="field" />
|
|
</view>
|
|
<view class="field">
|
|
<view class="field-label">性别</view>
|
|
<radio-group bindchange="gender">
|
|
<label>
|
|
<radio value="male" checked="{{gender==='male'}}" color="#194f42" />
|
|
男孩
|
|
</label>
|
|
<label>
|
|
<radio value="female" checked="{{gender==='female'}}" color="#194f42" />
|
|
女孩
|
|
</label>
|
|
</radio-group>
|
|
</view>
|
|
<view class="field">
|
|
<view class="field-label">生日</view>
|
|
<picker mode="date" value="{{birth_date}}" bindchange="date">
|
|
<view class="picker">{{birth_date||'选择生日'}}</view>
|
|
</picker>
|
|
</view>
|
|
<view class="field">
|
|
<view class="field-label">体重 kg</view>
|
|
<input
|
|
type="digit"
|
|
value="{{weight_kg}}"
|
|
data-key="weight_kg"
|
|
bindinput="field"
|
|
/>
|
|
</view>
|
|
<view class="field">
|
|
<view class="field-label">毛色</view>
|
|
<input value="{{coat}}" data-key="coat" bindinput="field" />
|
|
</view>
|
|
<view class="field">
|
|
<view class="field-label">过敏提醒</view>
|
|
<input value="{{allergies}}" data-key="allergies" bindinput="field" />
|
|
</view>
|
|
<view class="field">
|
|
<view class="field-label">照顾备注</view>
|
|
<textarea value="{{care_notes}}" data-key="care_notes" bindinput="field" />
|
|
</view>
|
|
<button class="primary" bindtap="save" disabled="{{saving}}">保存档案</button>
|
|
<button wx:if="{{id}}" class="archive" bindtap="archive">归档这只宠物</button>
|
|
</view>
|
|
</page-layout>
|