addressAdd.wxml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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}}" 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>
  19. <view class="btns">
  20. <button class="cannel" bindtap="cancelAddress">取消</button>
  21. <button class="save" bindtap="saveAddress">保存</button>
  22. </view>
  23. <view class="region-select" wx:if="{{openSelectRegion}}">
  24. <view class="hd">
  25. <view class="region-selected">
  26. <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>
  27. </view>
  28. <view class="done {{selectRegionDone ? '' : 'disabled'}}" bindtap="doneSelectRegion">确定</view>
  29. </view>
  30. <view class="bd">
  31. <scroll-view scroll-y class="region-list">
  32. <view class="item {{item.selected ? 'selected' : ''}}" bindtap="selectRegion" data-region-index="{{index}}" wx:for="{{regionList}}" wx:key="code">{{item.name}}</view>
  33. </scroll-view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="bg-mask" bindtap="cancelSelectRegion" wx:if="{{openSelectRegion}}"></view>