66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
<view class="screen">
|
|
<page-back />
|
|
<view class="eyebrow">PET PROFILE</view>
|
|
<view class="title">{{id?'编辑档案':'认识新朋友'}} 🐶</view>
|
|
<view class="photo" bindtap="choose">
|
|
<image wx:if="{{avatar_url}}" src="{{avatar_url}}" mode="aspectFill" />
|
|
<text wx:else>🐕</text>
|
|
<view>点击上传照片</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 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>
|