address_list.html
6.24 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>收货地址-{$tpshop_config['shop_info_store_title']}</title>
<meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
<meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
<link rel="stylesheet" href="__STATIC__/css/index.css" type="text/css">
<script src="__STATIC__/js/jquery-1.10.2.min.js"></script>
<script src="__STATIC__/js/slider.js"></script>
</head>
<body>
<!--------头部开始-------------->
<include file="public/header" />
<!--------头部结束-------------->
<script src="__PUBLIC__/js/layer/layer.js"></script><!-- 弹窗js 参考文档 http://layer.layui.com/-->
<div class="layout ov-hi">
<div class="breadcrumb-area">
<foreach name="navigate_user" key="k" item="v">
<if condition="$k neq '首页'"> > </if>
<a href="{$v}">{$k}</a>
</foreach>
</div>
</div>
<div class="layout pa-to-10 fo-fa-ar">
<!--菜单-->
<include file="user/menu" />
<!--菜单-->
<div class="fr wi940">
<div class="he50 wddd">
<div class="fl ddd-h2">
<h2><span>收货地址管理</span></h2>
</div>
<div class="fr ddd-h2">
<h2><a class="co-red" onClick="address_edit({$list['address_id']})"><span>+添加地址</span></a></h2>
</div>
</div>
<div class="wddd-js ov-in">
<div class="list-group-title">
<table class="merge-tab" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="col-pro wi137">收货人</th>
<th class="">收货地址</th>
<th class="wi118">邮编</th>
<th class="wi172">手机/电话</th>
<th class="col-operate wi199">操作</th>
</tr>
</thead>
</table>
</div>
<div class="merge-list">
<if condition="empty($lists)"><!--没查询到数据-->
<p style="text-align:center"><img src="__STATIC__/images/null_data.jpg" width="400" /></p>
</if>
<div class="ma-0--1">
<div class="o-pro">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<volist name="lists" id="list">
<tr>
<td class="col-pro wi137">{$list.consignee}</td>
<td class="">
<span>
{$region_list[$list['province']]['name']},{$region_list[$list['city']]['name']},{$region_list[$list['district']]['name']},{$region_list[$list['twon']]['name']} {$list.address}
</span>
</td>
<td class="wi118">{$list.zipcode}</td>
<td rowspan="1" class="wi172"><span>{$list.mobile}</span></td>
<td rowspan="1" class="col-operate wi199">
<p class="p-link pfc"><a href="javascript:address_edit({$list['address_id']})">编辑</a></p>
<p class="p-link pfc"><a href="{:U('Home/User/del_address',array('id'=>$list['address_id']))}">删除</a></p>
<p class="p-link pfc"><a class="red" href="{:U('Home/User/set_default',array('id'=>$list['address_id']))}">默认地址</a></p>
</td>
</tr>
</volist>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="he80"></div>
<!--------footer-开始-------------->
<include file="public/footer2" />
<!--------footer-结束-------------->
</body>
<script>
/*$(function () {
$("#h-s").click(function () {
$('.ec-ta-x').css('left','124px');
$('.ec-ta-x').css('width','110px');
$(this).addClass("cullent");
$('#q-s').removeClass("cullent");
});
});
*/
</script>
<script>
$(function () {
$(function () {
$("#q-s").mouseover(function () {
$('.ec-ta-x').css('left','0px');
$(this).addClass("cullent");
});
$("#q-s").mouseout(function () {
$('.ec-ta-x').css('left','0px');
});
});
$("#h-s").mouseover(function () {
$('.ec-ta-x').css('left','82px');
$(this).addClass("cullent");
});
$("#h-s").mouseout(function () {
$('.ec-ta-x').css('left','0px');
$(this).removeClass("cullent");
});
});
$(function () {
$("#j-s").mouseover(function () {
$('.ec-ta-x').css('left','164px');
$(this).addClass("cullent");
});
$("#j-s").mouseout(function () {
$('.ec-ta-x').css('left','0px');
$(this).removeClass("cullent");
});
});
/**
* 新增修改收货地址
* id 为零 则为新增, 否则是修改
* 使用 公共的 layer 弹窗插件 参考官方手册 http://layer.layui.com/
*/
function address_edit(id)
{
if(id > 0)
var url = "/index.php?m=Home&c=User&a=edit_address&scene=1&call_back=call_back_fun&id="+id; // 修改地址 '/index.php/Home/User/add_address/scene/1/call_back/call_back_fun/id/id' //iframe的url /index.php/Home/User/add_address
else
var url = "/index.php?m=Home&c=User&a=add_address&scene=1&call_back=call_back_fun"; // 新增地址
layer.open({
type: 2,
title: '添加收货地址',
shadeClose: true,
shade: 0.8,
area: ['880px', '580px'],
content: url,
});
}
// 添加修改收货地址回调函数
function call_back_fun(v){
layer.closeAll(); // 关闭窗口
location.href = location.href;
}
</script>
</html>