addressManager.ttml 3.67 KB

<view class="container">
    <view class="my-address-page">
      <view class="page-wrap clearfix">
            <block tt:if="{{showContainer}}">
              <view tt:if="{{showContainer}}" class="address-container">
                <radio-group class="radio-group" bindchange="">
                    <label class="radio" tt:for="{{items}}" tt:key="{{address_id}}" tt:for-index="index">
                        <view class="address-item" bindtap="selectAddress" data-index='{{index}}'>
                          <block tt:if="{{currentMode != modeEdit && currentSelectedIndex == index}}" >
                            <image src='../../../images/current-select@3x.png' class='current-select-image'></image>
                          </block>
                            
                            <view class='name-container'>
                              <view class="name">{{item.consignee}}</view>
                              <view class="tel">{{item.mobile}}</view>
                            </view>
                            <view class="address-info">{{item.area + ' ' + item.address}}</view>
                            <view class='separator'></view>
                            <view class="action">
                              <view class='left' catchtap="setDefaultButtonTapped" data-id="{{item.address_id}}">
                                <image src='../../../{{item.is_default=="Y"?"images/default-select@3x.png":"images/default-normal@3x.png"}}' class='select-image'></image>
                                <text class='opt-text'>设为默认</text>
                              </view>
                              <view class='right'>
                                <view catchtap="editButtonTapped" class="edit" data-id="{{item.address_id}}" data-consignee="{{item.consignee}}" data-mobile="{{item.mobile}}" data-area_code="{{item.area_code}}" data-address="{{item.area}}" data-detail_address="{{item.address}}">
                                <image src='../../../images/edit@3x.png' class='select-image'></image>
                                <text class='opt-text'>编辑</text>
                              </view>
                              <view catchtap="deleteButtonTapped" class="delete" data-id="{{item.address_id}}" data-index="{{index}}">
                                <image src='../../../images/delete@3x.png' class='select-image'></image>
                                <text class='opt-text'>删除</text>
                              </view>
                              </view>
                            </view>
                        </view>
                        <view class="view-splite">
                        </view>
                    </label>
                </radio-group>
              </view>
            </block>
            <block tt:else>
              <view class='emptyClass' style='width:100%;height:100%;margin-top:200rpx'>
                <image src="../../../images/noad@3x.png" style="width:143rpx;height:190rpx;margin-top:80rpx"></image>
                <view style="font-size:30rpx;text-align:center;margin-top:30rpx;color:#444444;">尚无地址,点击底部新增</view>
              </view>
            </block>
          <view class="add-address" >
            <view class='separator'></view>   
            <view catchtap="addButtonTapped" class='add-addressButton'><image src="../../../images/add-normal@3x.png" ></image></view>
            <!-- <view class='separator'></view>   -->
            <!-- <view catchtap="addFromWechatButtonTapped" class='add-addressButton right'><image src="../../../images/add-wechat@3x.png" ></image></view>
            <view class='separator'></view>   -->
          </view>
      </view>        
    </view>

</view>