select-address.wxml
4.1 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!--pages/select-address/select-address.wxml-->
<view class="container">
<view class="addressBox" wx:for="{{list}}" data-id="{{item.id}}" data-index="{{index}}">
<view class="left" catchtap="selectAdd" data-id="{{item.id}}" data-index="{{index}}">
<view class="userInfo">
<view class="name">{{item.name}}</view>
<view class="tell">{{item.phone}}</view>
<view class="lable" wx:if="{{item.delFlag==1}}">默认</view>
</view>
<view class="address">{{item.area}}{{item.address}}</view>
<!-- 默认状态 -->
<view data-select="{{defaultType}}">
<view class="selectDefault" bindtap="defaultEvent" data-delFlag="{{item.delFlag}}" data-id="{{item.id}}"
data-index="{{index}}">
<view class="defaultPic">
<image src='{{item.delFlag=="1"?"/images/04-05/default.png":"/images/04-05/undefault.png"}}'></image>
</view>
<view class='{{item.delFlag=="1"?"defaultText":"unDefaultText"}}'>{{item.delFlag=="1"?"取消默认":"设为默认"}}</view>
</view>
<!-- <view class="selectDefault" wx:if="{{item.delFlag==0}}" bindtap="defaultEvent" >
<view class="unDefaultPic">
<image src="/images/04-05/undefault.png"></image>
</view>
<view class="unDefaultText"></view>
</view> -->
</view>
</view>
<view class="right">
<view class="edit" bindtap="editEvent" data-id="{{item.id}}" data-index="{{index}}">
<view class="editIcon">
<image src="/images/04-05/edit.png"></image>
</view>
<view class="editText" data-id="{{item.id}}">编辑</view>
</view>
<view class="del" bindtap="delEvent" data-id="{{item.id}}" data-index="{{index}}">
<view class="delIcon">
<image src="/images/04-05/del.png"></image>
</view>
<view class="delText">删除</view>
</view>
</view>
</view>
<view class="noData" wx:if="{{list.length==0}}">
<view class="noDataPic">
<image src="/images/message@2x.png"></image>
</view>
<view class="noDataTop">一个地址都没有</view>
<view class="noDataBottom">快去添加收货地址,买买买吧~</view>
</view>
<!-- 超出配送范围 -->
<!-- <view class="exceedRange" wx:if="{{exceedRange}}">
<view class="exceedText">以下超出配送范围</view>
<view>
<view class="addressBox" wx:for="{{exceedArray}}">
<view class="left">
<view class="userInfo">
<view class="name">{{item.name}}</view>
<view class="tell">{{item.tell}}</view>
<view class="lable" wx:if="{{default}}">默认</view>
</view>
<view class="address">{{item.address}}</view>
默认状态
<view data-select="{{defaultType}}" data-index="index">
<view class="selectDefault" wx:if="{{item.defaultType==1}}" bindtap="defaultEvent">
<view class="defaultPic">
<image src="/images/04-05/default.png"></image>
</view>
<view class="defaultText">取消默认</view>
</view>
<view class="selectDefault" wx:if="{{item.defaultType==0}}" bindtap="defaultEvent">
<view class="unDefaultPic">
<image src="/images/04-05/undefault.png"></image>
</view>
<view class="unDefaultText">设为默认</view>
</view>
</view>
</view>
<view class="right">
<view class="edit" bindtap="editEvent">
<view class="editIcon">
<image src="/images/04-05/edit.png"></image>
</view>
<view class="editText">编辑</view>
</view>
<view class="del" bindtap="delEvent" data-id="{{item.id}}" data-index="{{index}}">
<view class="delIcon">
<image src="/images/04-05/del.png"></image>
</view>
<view class="delText">删除</view>
</view>
</view>
</view>
</view>
</view> -->
<!-- 新增地址 -->
<view class="bottom">
<view class="addAdress" bindtap="addAddress">
新增地址
</view>
</view>
</view>