addressAdd.wxml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <view class="add-address">
  2. <view class="add-form">
  3. <view class="form-item">
  4. <input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus/>
  5. </view>
  6. <view class="form-item">
  7. <input class="input" bindinput="bindinputMobile" value="{{address.tel}}" type="number" placeholder="手机号码" />
  8. </view>
  9. <view class="form-item">
  10. <input class="input" value="{{address.province + address.city + address.county}}" disabled="true" bindtap="chooseRegion" placeholder="省份、城市、区县" />
  11. </view>
  12. <view class="form-item">
  13. <input class="input" bindinput="bindinputAddress" value="{{address.addressDetail}}" placeholder="详细地址, 如街道、楼盘号等" />
  14. </view>
  15. <view class="form-default">
  16. <van-checkbox value="{{ address.isDefault == 1 }}" bind:change="bindIsDefault">设为默认地址</van-checkbox>
  17. </view>
  18. <view class="form-item" wx:if="{{address.id>0}}">
  19. <button style="background: #19B3FF;color: white;" data-address-id="{{address.id}}" bindtap="deleteAddress">删除地址</button>
  20. </view>
  21. </view>
  22. <view class="btns">
  23. <button class="cannel" bindtap="cancelAddress">取消</button>
  24. <button class="save" bindtap="saveAddress">保存</button>
  25. </view>
  26. <view class="region-select" wx:if="{{openSelectRegion}}">
  27. <view class="hd">
  28. <view class="region-selected">
  29. <view class="item {{item.code == 0 ? 'disabled' : ''}} {{(regionType -1) === index ? 'selected' : ''}}" bindtap="selectRegionType" data-region-type-index="{{index}}" wx:for="{{selectRegionList}}" wx:key="code">{{item.name}}</view>
  30. </view>
  31. <view class="done {{selectRegionDone ? '' : 'disabled'}}" bindtap="doneSelectRegion">确定</view>
  32. </view>
  33. <view class="bd">
  34. <scroll-view scroll-y class="region-list">
  35. <view class="item {{item.selected ? 'selected' : ''}}" bindtap="selectRegion" data-region-index="{{index}}" wx:for="{{regionList}}" wx:key="code">{{item.name}}</view>
  36. </scroll-view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="bg-mask" bindtap="cancelSelectRegion" wx:if="{{openSelectRegion}}"></view>