addressManager.ttml
3.22 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
<view tt="container">
<view tt="my-address-page">
<view tt="page-wrap clearfix">
<block tt:if="{{showContainer}}">
<view tt:if="{{showContainer}}" tt="address-container">
<radio-group tt="radio-group" bindchange="">
<label tt="radio" tt:for="{{items}}" tt:key="{{address_id}}" tt:for-index="index">
<view tt="address-item" bindtap="selectAddress" data-index='{{index}}'>
<image tt:if="{{currentMode != modeEdit && currentSelectedIndex == index}}" src='../../../images/current-select@3x.png' tt='current-select-image'></image>
<view tt='name-container'>
<view tt="name">{{item.consignee}}</view>
<view tt="tel">{{item.mobile}}</view>
</view>
<view tt="address-info">{{item.area + ' ' + item.address}}</view>
<view tt='separator'></view>
<view tt="action">
<view tt='left' catchtap="setDefaultButtonTapped" data-id="{{item.address_id}}">
<image src='{{item.is_default=="Y"?"images/default-select@3x.png":"images/default-normal@3x.png"}}' tt='select-image'></image>
<text tt='opt-text'>设为默认</text>
</view>
<view tt='right'>
<view catchtap="editButtonTapped" tt="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' tt='select-image'></image>
<text tt='opt-text'>编辑</text>
</view>
<view catchtap="deleteButtonTapped" tt="delete" data-id="{{item.address_id}}" data-index="{{index}}">
<image src='../../../images/delete@3x.png' tt='select-image'></image>
<text tt='opt-text'>删除</text>
</view>
</view>
</view>
</view>
<view tt="view-splite">
</view>
</label>
</radio-group>
</view>
</block>
<block tt:else>
<view tt='emptytt' 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 tt="add-address" >
<view tt='separator'></view>
<view catchtap="addButtonTapped" tt='add-addressButton'><image src="../../../images/add-normal@3x.png" ></image></view>
<view tt='separator'></view>
<view catchtap="addFromWechatButtonTapped" tt='add-addressButton right'><image src="../../../images/add-wechat@3x.png" ></image></view>
<view tt='separator'></view>
</view>
</view>
</view>
</view>