addressManager.wxml
3.65 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
<view class="container">
<view class="my-address-page">
<view class="page-wrap clearfix">
<block wx:if="{{showContainer}}">
<view wx:if="{{showContainer}}" class="address-container">
<radio-group class="radio-group" bindchange="">
<label class="radio" wx:for="{{items}}" wx:key="{{address_id}}" wx:for-index="index">
<view class="address-item" bindtap="selectAddress" data-index='{{index}}'>
<image wx:if="{{currentMode != modeEdit && currentSelectedIndex == index}}" src='images/current-select@3x.png' class='current-select-image'></image>
<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 wx: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>
<block wx:if="{{flase}}">
<view class='separator'></view>
<view catchtap="addFromWechatButtonTapped" class='add-addressButton right'><image src="images/add-wechat@3x.png" ></image></view>
<view class='separator'></view>
</block>
</view>
</view>
</view>
</view>
<import src="../../vendors/toast/wetoast.wxml"/>
<template is="wetoast" data="{{...__wetoast__}}"/>