addressAdd.wxml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <view class="add-address">
  2. <view class="add-form">
  3. <view class="form-item">
  4. <view class="label">联系人</view>
  5. <view class="content">
  6. <input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus />
  7. </view>
  8. </view>
  9. <view class="form-item">
  10. <view class="label">电 话</view>
  11. <view class="content">
  12. <input class="input" bindinput="bindinputMobile" value="{{address.tel}}" type="number" placeholder="手机号码"
  13. maxlength="11" />
  14. </view>
  15. </view>
  16. <!-- bindtap="chooseRegion" -->
  17. <view class="form-item" bindtap="goMap">
  18. <view class="label">省市区</view>
  19. <view class="content">
  20. <image src="/static/images/address.png" style="width: 28rpx;height: 35rpx;margin-right: 10rpx;"></image>
  21. <input class="input" value="{{address.province + address.city + address.county}}" disabled="true"
  22. placeholder="省份、城市、区县" />
  23. <image src="/static/images/arrow.png" style="width: 12rpx;height: 20rpx;margin-right: 10rpx;"></image>
  24. </view>
  25. </view>
  26. <view class="form-item" bindtap="goMap">
  27. <view class="label">地址</view>
  28. <view class="content">
  29. <input class="input" value="{{address.addressname}}" placeholder="请选择地址" disabled />
  30. </view>
  31. </view>
  32. <view class="form-item">
  33. <view class="label">门牌号</view>
  34. <view class="content">
  35. <input class="input" bindinput="bindinputAddress" value="{{address.detail}}" placeholder="例:9号楼1505室" />
  36. </view>
  37. </view>
  38. </view>
  39. <view class="form-default">
  40. <view style="display: flex;flex-direction: column;">
  41. <text class="title">设为默认地址</text>
  42. <text class="des">提醒:每次下单会默认推荐使用该地址</text>
  43. </view>
  44. <switch style="margin-right: 10rpx;" checked="{{address.isDefault == 1}}" bindchange="bindIsDefault"/>
  45. </view>
  46. <view class="form-item" wx:if="{{address.id>0}}">
  47. <button style="background: #19B3FF;color: white;" data-address-id="{{address.id}}"
  48. bindtap="deleteAddress">删除地址</button>
  49. </view>
  50. <view class="btns">
  51. <button class="cannel" bindtap="cancelAddress">取消</button>
  52. <button class="save" bindtap="saveAddress">保存</button>
  53. </view>
  54. <view class="region-select" wx:if="{{openSelectRegion}}">
  55. <view class="hd">
  56. <view class="region-selected">
  57. <view class="item {{item.code == 0 ? 'disabled' : ''}} {{(regionType -1) === index ? 'selected' : ''}}"
  58. bindtap="selectRegionType" data-region-type-index="{{index}}" wx:for="{{selectRegionList}}" wx:key="code">
  59. {{item.name}}</view>
  60. </view>
  61. <view class="done {{selectRegionDone ? '' : 'disabled'}}" bindtap="doneSelectRegion">确定</view>
  62. </view>
  63. <view class="bd">
  64. <scroll-view scroll-y class="region-list">
  65. <view class="item {{item.selected ? 'selected' : ''}}" bindtap="selectRegion" data-region-index="{{index}}"
  66. wx:for="{{regionList}}" wx:key="code">{{item.name}}</view>
  67. </scroll-view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="bg-mask" bindtap="cancelSelectRegion" wx:if="{{openSelectRegion}}"></view>