51 lines
2.1 KiB
Plaintext
51 lines
2.1 KiB
Plaintext
<view class="page">
|
|
<view class="nav-placeholder" style="height: {{navBarHeight || (statusBarHeight + 44)}}px;"></view>
|
|
<view class="header safe-header-right">
|
|
<view class="nav-back" bindtap="goBack">← 返回</view>
|
|
<text class="header-title">{{isEdit ? '编辑地址' : '新增地址'}}</text>
|
|
</view>
|
|
|
|
<block wx:if="{{loading}}">
|
|
<view class="empty-wrap">
|
|
<text class="empty-desc">加载中...</text>
|
|
</view>
|
|
</block>
|
|
|
|
<block wx:else>
|
|
<view class="form">
|
|
<view class="form-item">
|
|
<text class="form-label">姓名</text>
|
|
<input class="form-input" placeholder="请输入姓名" value="{{name}}" bindinput="onNameInput" />
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="form-label">手机号</text>
|
|
<input class="form-input" type="number" maxlength="11" placeholder="请输入11位手机号" value="{{phone}}" bindinput="onPhoneInput" />
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="form-label">省份</text>
|
|
<input class="form-input" placeholder="选填" value="{{province}}" bindinput="onProvinceInput" />
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="form-label">城市</text>
|
|
<input class="form-input" placeholder="选填" value="{{city}}" bindinput="onCityInput" />
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="form-label">区/县</text>
|
|
<input class="form-input" placeholder="选填" value="{{district}}" bindinput="onDistrictInput" />
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="form-label">详细地址</text>
|
|
<textarea class="form-textarea" placeholder="街道、门牌号等" value="{{detail}}" bindinput="onDetailInput" />
|
|
</view>
|
|
<view class="form-item row">
|
|
<text class="form-label">设为默认地址</text>
|
|
<switch checked="{{isDefault}}" bindchange="onDefaultChange" color="#00CED1" />
|
|
</view>
|
|
</view>
|
|
|
|
<view class="btn-save {{saving ? 'disabled' : ''}}" bindtap="submit">
|
|
{{saving ? '保存中...' : '保存'}}
|
|
</view>
|
|
</block>
|
|
</view>
|