addressAdd.wxml 3.1 KB

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