1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <view class="container">
- <!-- 地址列表 -->
- <view class="address-list">
- <view class="address-item" wx:for="{{addressList}}" wx:key="id">
- <view class="address-info" bindtap="selectAddress" data-id="{{item.id}}">
- <view class="user-info">
- <text class="name">{{item.name}}</text>
- <text class="phone">{{item.phone}}</text>
- <text class="tag" wx:if="{{item.isDefault}}">默认</text>
- </view>
- <view class="address">{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
- </view>
- <view class="address-actions">
- <view class="action-item" bindtap="setDefault" data-id="{{item.id}}" wx:if="{{!item.isDefault}}">
- <text class="iconfont icon-default"></text>
- <text>设为默认</text>
- </view>
- <view class="action-item" bindtap="editAddress" data-id="{{item.id}}">
- <text class="iconfont icon-edit"></text>
- <text>编辑</text>
- </view>
- <view class="action-item" bindtap="deleteAddress" data-id="{{item.id}}">
- <text class="iconfont icon-delete"></text>
- <text>删除</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 空状态 -->
- <view class="empty" wx:if="{{addressList.length === 0}}">
- <image class="empty-icon" src="/static/images/empty-address.png"></image>
- <text>暂无收货地址</text>
- </view>
- <!-- 新增地址按钮 -->
- <view class="add-btn" bindtap="addAddress">
- <text class="iconfont icon-add"></text>
- <text>新增收货地址</text>
- </view>
- </view>
|