index.wxml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <view class="address-detail">
  2. <view class="divider-line" />
  3. <!-- <t-location title="获取微信收获地址" isCustomStyle t-class="address-detail-wx-location" bind:change="getWeixinAddress">
  4. <t-icon class="address-detail-wx-arrow" name="chevron-right" color="#bbb" size="40rpx" />
  5. </t-location>
  6. <view class="divider-line" /> -->
  7. <view class="form-address">
  8. <form class="form-content">
  9. <t-cell-group>
  10. <t-cell t-class-left="t-cell-left" t-class-title="t-cell-title" title="收货人">
  11. <t-input class="t-input" slot="note" t-class="field-text" data-item="name" maxlength="20" type="text" value="{{locationState.name}}" placeholder="您的姓名" bind:change="onInputValue" />
  12. </t-cell>
  13. <t-cell t-class-left="t-cell-left" t-class-title="t-cell-title" title="手机号">
  14. <t-input slot="note" class="t-input" t-class="field-text" type="number" value="{{locationState.phone}}" maxlength="11" placeholder="联系您的手机号" bind:change="onInputValue" data-item="phone" />
  15. </t-cell>
  16. <t-cell t-class-left="t-cell-left" t-class-title="t-cell-title" title="地区">
  17. <t-input slot="note" class="t-input" t-class="field-text" placeholder="省/市/区" data-item="address" value="{{locationState.provinceName ? locationState.provinceName+'/':'' }}{{locationState.cityName ? locationState.cityName+'/':''}}{{locationState.districtName}}" catch:tap="onPickArea" disabled />
  18. <!-- <t-icon slot="right-icon" t-class="map" prefix="wr" name="location" catch:tap="onSearchAddress" /> -->
  19. </t-cell>
  20. <t-cell t-class="t-topleft" t-class-left="t-cell-left" t-class-title="t-cell-title" t-class-note="t-textarea-cell-note" title="详细地址">
  21. <t-textarea t-class="ntextinput" slot="note" class="t-input" type="text" value="{{locationState.detailAddress}}" placeholder="如:某小区10栋1001号" bind:change="onInputValue" data-item="detailAddress" style="height: 180rpx;" disableDefaultPadding="{{true}}" />
  22. </t-cell>
  23. <view class="divider-line" />
  24. <t-cell t-class-left="t-cell-left" t-class-note="t-cell-note" t-class-title="t-cell-title" title="标签">
  25. <view class="t-input address-flex-box" slot="note">
  26. <t-button wx:for="{{labels}}" wx:for-item="label" wx:key="index" t-class="label-list {{locationState.labelIndex === index ? 'active-btn':''}}" bindtap="onPickLabels" data-item="{{index}}">
  27. {{label.name}}
  28. </t-button>
  29. <t-button t-class="label-list" bindtap="addLabels">
  30. <t-icon name="add" size="40rpx" color="#bbb" />
  31. </t-button>
  32. </view>
  33. </t-cell>
  34. <view class="divider-line" />
  35. <t-cell t-class-left="t-cell-left" title="设置为默认收货地址">
  36. <t-switch value="{{locationState.isDefault}}" slot="note" colors="{{['#333', '#c6c6c6']}}" bind:change="onCheckDefaultAddress" />
  37. </t-cell>
  38. </t-cell-group>
  39. <view class="submit">
  40. <t-button t-class="btn-submit-address {{submitActive ? 'theme-wrapper-class' : 'disabled'}}" bind:tap="formSubmit">
  41. 保存
  42. </t-button>
  43. </view>
  44. </form>
  45. </view>
  46. <t-area-picker show="{{areaPickerVisible}}" value="{{locationState.districtCode}}" area-data="{{areaData}}" title="选择地区" columns="{{columns}}" bind:confirm="onInputValue" data-item="address" data-type="1" />
  47. <n-wait loading="{{wait}}" />
  48. </view>
  49. <t-dialog visible="{{visible}}" t-class-confirm="dialog__button-confirm" title="填写标签名称" confirm-btn="确定" cancel-btn="取消" bind:confirm="confirmHandle" bind:cancel="cancelHandle">
  50. <t-input slot="content" model:value="{{labelValue}}" placeholder="请输入标签名称" borderless />
  51. </t-dialog>
  52. <t-toast id="t-toast" />