go_add_address.html
5.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>学考无忧-收获地址</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<style>
.haha{
}
</style>
</head>
<body style="background-color:white;">
<div class="address_box">
<!-- 顶部 -->
<div class="ad_top">
<a href="javascript:history.back(-1)">
<img class="ad_topImg" src="__TMPL__/public/assets/images/left.png" alt="">
</a>
<h1>收货地址</h1>
<a href="{:url('Personalcenter/add_shop_address')}">
<p>新增地址</p>
</a>
</div>
<!-- 内容 -->
<div class="ad_content">
<ul id="ad_contentUl">
<!--<volist name="data" id="vo">
<li ontouchstart="fors()">
<div class="ad_conBox">
<div class="ad_con1">
<p class="ad_conName">{$vo.name}</p>
<if condition="$vo.default_address eq 1">
<p class="ad_conMo" style="display:block;">默认</p>
<else/>
<p class="ad_conMo">默认</p>
</if>
<p class="ad_conPhone">{$vo.phone}</p>
<img class="ad_conImg" src="__TMPL__/public/assets/images/35.png" ontouchstart="address_edit({$vo.id})" alt="">
</div>
</div>
<p class="ad_conAddress">收货地址:{$vo.region}{$vo.detailed}</p>
<div class="ad_MoRemove">
<div class="ad_mo" ontouchstart="set_default({$vo.id})">设为默认</div>
<div class="ad_move" ontouchstart="address_del({$vo.id})">删除</div>
</div>
</li>
</volist>-->
<volist name="data" id="vo">
<li>
<div class="" style="display: flex;justify-content: flex-start;align-items: center;">
<div style="width: 0.4rem;height: 0.4rem;margin-right: 0.25rem;" class="select_img" data-id="{$vo.id}">
<img src="__TMPL__/public/assets/images/39_0.png" style="width:100%;height: 100%;" />
</div>
<div class="contant" style="width: 6rem;">
<div class="ad_conBox">
<div class="ad_con1">
<p class="ad_conName">{$vo.name}</p>
<if condition="$vo.default_address eq 1">
<p class="ad_conMo" style="display:block;">默认</p>
<else/>
<p class="ad_conMo">默认</p>
</if>
<p class="ad_conPhone">{$vo.phone}</p>
<img class="ad_conImg" src="__TMPL__/public/assets/images/35.png" alt="">
</div>
</div>
<p class="ad_conAddress">收货地址:{$vo.region}{$vo.detailed}</p>
<div class="ad_MoRemove">
<div class="ad_mo" ontouchstart="set_default({$vo.id})">设为默认</div>
<div class="ad_move" ontouchstart="address_del({$vo.id})">删除</div>
</div>
</div>
</div>
</li>
</volist>
</ul>
</div>
<div onclick="deter_sub()" style="width: 1.5rem;height: 0.8rem;background:linear-gradient(344deg,rgba(255,78,0,1) 0%,rgba(255,157,45,1) 100%);border-radius: 0.025rem;text-align: center;line-height: 0.8rem;font-size: 0.3rem;color: #fff;margin: 0.5rem 0.5rem 0 auto;">确定</div>
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/address.js"></script>
<script src="__TMPL__/public/assets/js/address(1).js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
/**
*点击确认
*/
function deter_sub(){
id = $('.haha').attr('data-id');
if(typeof(id) == 'undefined'){
window.location.href = "{:url('Orderpage/order_page',array('indet_id'=>$indent_id))}";
}else{
window.location.href = "{:url('Orderpage/order_page',array('indet_id'=>$indent_id))}?address_id="+id;
}
}
</script>
<script>
$("#btn").click(function(){
console.log("确定成功")
})
</script>
<script>
function fors() {
console.log(111)
}
/**
*点击设置默认
*/
function set_default(id){
$.post("{:url('Personalcenter/set_default_address')}",{id:id},function(data){
if(data){
}else{
alert('设置失败!');
}
});
}
/**
* 点击删除地址
*/
function address_del(id){
$.post("{:url('Personalcenter/address_del')}",{id:id},function(data){
if($data){
}else{
alert('删除失败!');
}
});
}
/**
*编辑地址
*/
function address_edit(id){
window.location.href = "{:url('Personalcenter/address_edit')}?id="+id;
}
</script>
</body>
</html>