wujingjing
2024-07-30 f89c8e6a8941a4d074b3f098f5253246abf1bb75
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!--pages/address/list/index.wxml-->
 
<view class="container address-list" bindtap="onSwipeCellPage">
  <view class="list-warpper" wx:if="{{ addressList.length }}">
    <view wx:for="{{ addressList }}" wx:key="id" class="list-item">
      <van-swipe-cell
        id="swipe-cell-{{ item.id }}"
        bind:open="swipeCellOpen"
        bind:click="onSwipeCellClick"
        right-width="{{ 65 }}"
      >
        <van-cell-group border="{{ false }}">
          <view class="list-item-box">
            <view class="info" bindtap="changeAddress" data-id="{{ item.id }}">
              <view class="user-info">
                <text>{{ item.name }}</text>
                <text>{{ item.phone }}</text>
                <text wx:if="{{ item.isDefault === 1 }}" class="default-tag">默认</text>
              </view>
 
              <view class="address-info"> {{ item.fullAddress }} </view>
            </view>
 
            <view class="editBtn" bindtap="toEdit" data-id="{{ item.id }}">
              <van-icon name="edit" size="22px" color="#999" />
            </view>
          </view>
        </van-cell-group>
 
        <view
          slot="right"
          class="van-swipe-cell__right"
          bindtap="delAddress"
          data-id="{{ item.id }}"
        >
          <text>删除</text>
        </view>
      </van-swipe-cell>
    </view>
  </view>
 
  <van-empty wx:else description="还没有收货地址,快去添加吧~" />
 
  <view class="footer">
    <view class="btn">
      <navigator url="/modules/settingModule/pages/address/add/index">
        新增地址
      </navigator>
    </view>
  </view>
</view>