addressAdd.wxml 2.0 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.mobile}}" placeholder="手机号码"/>
  8. </view>
  9. <view class="form-item">
  10. <input class="input" value="{{address.full_region}}" disabled="true" bindtap="chooseRegion" placeholder="省份、城市、区县"/>
  11. </view>
  12. <view class="form-item">
  13. <input class="input" bindinput="bindinputAddress" value="{{address.address}}" placeholder="详细地址, 如街道、楼盘号等"/>
  14. </view>
  15. <view class="form-default">
  16. <text bindtap="bindIsDefault" class="default-input {{address.is_default == 1 ? 'selected' : ''}}">设为默认地址</text>
  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.id == 0 ? 'disabled' : ''}} {{(regionType -1) === index ? 'selected' : ''}}" bindtap="selectRegionType" data-region-type-index="{{index}}" wx:for="{{selectRegionList}}" wx:key="{{item.id}}">{{item.name}}</view>
  27. </view>
  28. <view class="done {{selectRegionDone ? '' : 'disabled'}}" bindtap="doneSelectRegion">确定</view>
  29. </view>
  30. <view class="bd">
  31. <view class="region-list">
  32. <view class="item {{item.selected ? 'selected' : ''}}" bindtap="selectRegion" data-region-index="{{index}}" wx:for="{{regionList}}" wx:key="{{item.id}}">{{item.name}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="bg-mask" bindtap="cancelSelectRegion" wx:if="{{openSelectRegion}}"></view>