addressAdd.wxml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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="手机号码" maxlength="11"/>
  8. </view>
  9. <!-- bindtap="chooseRegion" -->
  10. <view class="form-item" bindtap="goMap">
  11. <input class="input" value="{{address.province + address.city + address.county}}" disabled="true" placeholder="省份、城市、区县" />
  12. </view>
  13. <view class="form-item" bindtap="goMap">
  14. <input class="input" value="{{address.addressname}}" placeholder="请选择地址" disabled/>
  15. </view>
  16. <view class="form-item" >
  17. <input class="input" bindinput="bindinputAddress" value="{{address.detail}}" placeholder="请输入门牌号" />
  18. </view>
  19. <view class="form-default">
  20. <van-checkbox value="{{ address.isDefault == 1 }}" bind:change="bindIsDefault">设为默认地址</van-checkbox>
  21. </view>
  22. <view class="form-item" wx:if="{{address.id>0}}">
  23. <button style="background: #19B3FF;color: white;" data-address-id="{{address.id}}" bindtap="deleteAddress">删除地址</button>
  24. </view>
  25. </view>
  26. <view class="btns">
  27. <button class="cannel" bindtap="cancelAddress">取消</button>
  28. <button class="save" bindtap="saveAddress">保存</button>
  29. </view>
  30. <view class="region-select" wx:if="{{openSelectRegion}}">
  31. <view class="hd">
  32. <view class="region-selected">
  33. <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>
  34. </view>
  35. <view class="done {{selectRegionDone ? '' : 'disabled'}}" bindtap="doneSelectRegion">确定</view>
  36. </view>
  37. <view class="bd">
  38. <scroll-view scroll-y class="region-list">
  39. <view class="item {{item.selected ? 'selected' : ''}}" bindtap="selectRegion" data-region-index="{{index}}" wx:for="{{regionList}}" wx:key="code">{{item.name}}</view>
  40. </scroll-view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="bg-mask" bindtap="cancelSelectRegion" wx:if="{{openSelectRegion}}"></view>