order_confirm.html
9.0 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="https://at.alicdn.com/t/font_834805_0ml90wdq5hzm.css">
<link rel="stylesheet" href="https://at.alicdn.com/t/font_834805_bx3vyrf79mj.css">
<link rel="stylesheet" href="__INDEX__/css/base.css">
<link rel="stylesheet" href="__INDEX__/css/order.css">
<link rel="stylesheet" href="__INDEX__/css/swiper.min.css">
<script type="text/javascript" src="__INDEX__/js/base.js" charset="utf-8"></script>
<title>确认订单</title>
<style>
.entermoney{
width:3rem;
border:none;
outline:none;
height:0.3rem;
line-height: 0.3rem;
vertical-align: middle;
padding-top: 0.05rem;
}
.addresswrapper{
width: 100%;
height: 100%;
/*background-color: rgba(0,0,0,0.5);*/
background: #fff;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 5;
overflow: scroll;
}
.addaddress{
display:flex;
}
.addressinfo{
font-size: 0.26rem;
color:#1A1A1A;
margin-left: 0.25rem;
}
.xuan{
color:#999999;
}
.addaddress{
padding: 0.38rem 0.23rem;
border-bottom: 1px solid #f5f5f5;
}
.addresspoup{
}
.icon-xuanze-fangkuang{
color:#FF0800;
}
.address_text{
display:flex;
}
.address_num{
margin-left: 0.27rem;
}
.address_place{
margin-top: 0.2rem;
}
</style>
</head>
<body>
<!--确认订单积分-->
<div class="wrapper" style="display:none">
<div class="pop">
<p class="weixin">微信+积分支付</p>
<div class="buy_order_money">
<p class="buyorder">订单金额:</p>
<div class="ordermoney">
<input type="text" placeholder="500" class="entermoney">
</div>
</div>
<div class="buy_order_money">
<p class="buyorder">订单积分:</p>
<div class="integrate">
2000000积分
</div>
</div>
<div class="surepay">确认支付</div>
</div>
</div>
<!--选择地址-->
<div class="addresswrapper" style="display:none">
<div class="addresspoup">
<volist name="address" id="vo">
<div class="addaddress">
<p class="iconfont icon-xuanzekuang xuan" data-id="{$vo.id}"></p>
<p class="iconfont icon-xuanze-fangkuang" style="display:none"></p>
<div class="addressinfo">
<div class="address_text">
<p class="address_name" id="name_{$vo.id}">{$vo.name}</p>
<p class="address_num" id="num_{$vo.id}">{$vo.mobile}</p>
</div>
<p class="address_place" id="place_{$vo.id}">{$vo.province}{$vo.city}{$vo.county}{$vo.place}</p>
</div>
</div>
</volist>
</div>
</div>
<!--确认支付-->
<div class="paywrapper" style="display:none">
<div class="paypop">
<p>您还剩余2000积分</p>
<p>您将扣除1000积分购买此物品</p>
<p>并无法获得平台赠送积分</p>
<div class="pay_line"></div>
<div class="paycertain">确认支付</div>
</div>
</div>
<div class="container">
<div class="people_info">
<div class="people_info_list">
<p class="people_name">{$default_name}</p>
<p class="people_phone">{$default_mobile}</p>
</div>
<p class="iconfont icon-jinru row"> </p>
<p class="people_place">{$default_address}</p>
</div>
<!--订单信息-->
<div class="order_info">
<p class="orderinfo">订单信息</p>
<volist name="data" id="vo">
<div class="orderlist">
<p class="order_img">
<img src="{$vo.thumb}" alt="">
</p>
<div class="good_list">
<p class="good_name">
{$vo.name}
</p>
<div class="good_tast">
<p class="good_kilo">{$vo.intro}</p>
<P class="good_num">x{$vo.num}</P>
</div>
<div class="people">
<p class="peoplecoupon">
{$vo.integral}
</p>
<P class="people_price">¥{$vo.price}</P>
</div>
</div>
</div>
</volist>
</div>
<!--配送方式-->
<div class=" dispatch">
<div class="dispatch_num">
<p class="buy_num">购买数量</p>
<p class="num">x{$total_num}</p>
</div>
<div class="dispatch_type">
<p class="type">配送方式</p>
<p class="type_name">快递包邮</p>
</div>
</div>
<!--选择支付方式-->
<div class="payment_type">
<p class="pay_type">支付方式</p>
<div class="pay_line"></div>
<div>
<if condition="$caid eq '1'">
<div class="pay_type_list">
<p class="pay_name">微信支付</p>
<p class="iconfont pay icon-not_Selected-copy" data-var="1"></p>
</div>
</if>
<!--<if condition="$caid eq '2'">-->
<!--<div class="pay_type_list">-->
<!--<p class="pay_name">组合支付(现金金额不少于500)</p>-->
<!--<p class="iconfont pay icon-not_Selected-copy" data-var="2"></p>-->
<!--</div>-->
<!--</if>-->
<!--<if condition="$caid eq '3'">-->
<!--<div class="pay_type_list">-->
<!--<p class="pay_name">积分(2000积分)</p>-->
<!--<p class="iconfont pay icon-not_Selected-copy" data-var="3"></p>-->
<!--</div>-->
<!--</if>-->
</div>
</div>
<!--合计-->
<div class="total">
<div class="totalcalcute">
<p class="totalsum">合计</p>
<p class="totalmoney">¥{$total_price}</p>
</div>
</div>
<!--买家留言-->
<div class="buymessage">
<p class="buysend">买家留言</p>
<div class="pay_line"></div>
<textarea name="" id="remark" cols="30" rows="10" class="message" placeholder="请填写留言"></textarea>
</div>
<div class="foot">
<div class="buytotal">
<p class="buy_total_price">合计</p>
<p class="buy_total_money">¥{$total_price}</p>
</div>
<p class="payorder">支付订单</p>
</div>
</div>
</body>
<script src="__INDEX__/js/jquery.min.js"></script>
<script>
var pay_type = '';
$(".pay").click(function(){
$(this).removeClass("icon-not_Selected-copy");
$(this).addClass("icon-xuanzhong");
$(this).parents(".pay_type_list").siblings(".pay_type_list").children(".iconfont").removeClass("icon-xuanzhong");
$(this).parents(".pay_type_list").siblings(".pay_type_list").children(".iconfont").addClass("icon-not_Selected-copy");
pay_type = $(this).attr('data-var');
})
$(".payorder").click(function(){
//$(".wrapper").css("display","block")
if(pay_type == '') {
return false;
}
$.ajax({
url:"{:url('pay/Pay/done')}",
data:{
pay_type:pay_type,
address_id:address_id,
remark:$("#remark").val()
},
type:"POST",
dataType:"JSON",
success: function (data) {
if(data.data === true) {
console.log(data.msg);
}
}
})
})
//确认支付
$(".paywrapper").click(function(){
$(this).css("display","none")
})
$(".wrapper").click(function(){
$(this).css("display","none")
})
//选择地址
$(".people_info").click(function(){
$(".addresswrapper").css("display","block")
})
var address_id = '{$default_address_id}';
$(".xuan").click(function(){
$(".addresswrapper").css("display","none")
$(this).css("display","none");
$(this).siblings(".icon-xuanze-fangkuang").css("display","block");
$(this).parents(".addaddress").siblings(".addaddress").children(".xuan").css("display","block");
$(this).parents(".addaddress").siblings(".addaddress").children(".icon-xuanze-fangkuang").css("display","none")
var id=$(this).attr('data-id');
$(".people_name").html($("#name_"+id).html());
$(".people_phone").html($("#num_"+id).html());
$(".people_place").html($("#place_"+id).html());
address_id = id;
})
</script>
</html>