get_one.html
11.3 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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<!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"/>
<link rel="stylesheet" href="__TMPL__/public/assets/css/log.css"/>
<style>
.pay_banner {
width: 100%;
height: 1.3rem;
background-size: cover;
background-image: url("__TMPL__/public/assets/images/54.png");
}
.order_address {
padding: 0.28rem 0 0.42rem;
box-sizing: border-box;
background-repeat: no-repeat;
background-image: url("__TMPL__/public/assets/images/32.png");
background-position: bottom;
background-size: 100% 0.06rem;
}
.tx_maskCon2 {
padding: 0;
}
.delete_school {
background: linear-gradient(338deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
border-radius: 0.08rem;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
height: 1rem;
}
.dianhua {
background: ;
padding: 0.5rem 0;
font-size: 0.32rem;
color: #333;
text-align: center;
}
</style>
</head>
<body>
<div class="Dpayment">
<!--售后咨询弹框开始-->
<div class="tx_mask" onclick="$(this).hide()" style="display: none">
<div class="tx_maskCon" onclick="zZFun(this)">
<div class="tx_maskCon2" style="border-radius: 0.1rem;">
<div class="delete_school">
</div>
<div class="dianhua">售后电话:{$phone.phone}</div>
</div>
</div>
</div>
<!--售后咨询弹框结束-->
<!-- 顶部 -->
<div class="order_top">
<a href="javascript:history.back();">
<img src="__TMPL__/public/assets/images/left.png" alt=""/>
</a>
<p>我的订单</p>
</div>
<!-- 顶部banner -->
<div class="pay_banner">
<div class="pay_bannerLeft">
<div class="pay_bannerImg">
<img src="__TMPL__/public/assets/images/53.png" alt=""/>
</div>
<p>
<if condition="$data.state eq 4">
待付款
<elseif condition="$data.state eq 2"/>
待发货
<elseif condition="$data.state eq 5"/>
已发货
<elseif condition="$data.state eq 3"/>
已完成
</if>
</p>
</div>
<if condition="$data.state eq 4">
<div class="pay_bannerRight">
<p class="timespan"></p>
<p>订单自动关闭</p>
</div>
</if>
</div>
<!-- 地址 -->
<div class="order_address">
<!-- 有地址 -->
<if condition="$data.is_courier eq 1">
<if condition="$data.state eq 4">
<a href="{:url('orderpage/go_add_address',array('indet_id'=>$data['id']))}">
<div class="order_addressYes">
<div class="or_addressYesImg1">
<img src="__TMPL__/public/assets/images/38.png" alt=""/>
</div>
<div class="or_addressYesTxt1">
<div class="or_addressYesTxt2">
<div class="or_addressName">{$data.name}</div>
<p class="or_addressPhone">{$data.phone}</p>
</div>
<p class="or_address_detailed">
{$data.region}{$data.school}{$data.grade}{$data.class}
</p>
</div>
<div class="or_addressYesImg2">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
</a>
<else/>
<a href="">
<div class="order_addressYes">
<div class="or_addressYesImg1">
<img src="__TMPL__/public/assets/images/38.png" alt=""/>
</div>
<div class="or_addressYesTxt1">
<div class="or_addressYesTxt2">
<div class="or_addressName">{$data.name}</div>
<p class="or_addressPhone">{$data.phone}</p>
</div>
<p class="or_address_detailed">
{$data.region}{$data.school}{$data.grade}{$data.class}
</p>
</div>
<div class="or_addressYesImg2">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
</a>
</if>
<else />
<a href="">
<div class="order_addressYes">
<div class="or_addressYesImg1">
<img src="__TMPL__/public/assets/images/38.png" alt=""/>
</div>
<div class="or_addressYesTxt1">
<div class="or_addressYesTxt2">
<div class="or_addressName">{$data.address.name}</div>
<p class="or_addressPhone">{$data.address.phone}</p>
</div>
<p class="or_address_detailed">
{$data.address.region}{$data.address.detailed}
</p>
</div>
<div class="or_addressYesImg2">
<img src="__TMPL__/public/assets/images/29.png" alt=""/>
</div>
</div>
</a>
</if>
</div>
<!-- 订单信息 -->
<div class="order_news">
<h1 class="order_newsTit">订单信息</h1>
<ul class="order_newsUl">
<foreach name="$data.indent_goods" item="i_g">
<li>
<div class="order_newsImg">
<img src="{:cmf_get_image_url($i_g['thumbnail'])}" alt=""/>
</div>
<div class="order_newsCon">
<div class="order_newsTxt1 txt-cut">
{$i_g.book_name}
</div>
<div class="order_newsTxt2">×<span>{$i_g.number}</span></div>
<div class="order_newsTxt3">
<p class="de_topTxt1_1">¥<span>{$i_g.price}</span></p>
<p class="de_topTxt1_2">¥<span>{$i_g.pricing}</span></p>
</div>
</div>
</li>
<php>$sum[] = $i_g['price']*$i_g['number'];</php>
</foreach>
</ul>
</div>
<!-- 支付方式/配送方式 -->
<div class="order_Etc">
<div class="order_Etc1 ypayTxt">
<p>订单编号:</p>
<p>{$data.order_number}</p>
</div>
<div class="order_Etc1 ypayTxt">
<p>下单时间:</p>
<p>{:date('Y-m-d H:i:s',$data.create_time)}</p>
</div>
<div class="order_Etc1 ypayTxt">
<p>配送方式:</p>
<if condition="$data.is_courier eq 1">
<p>统一配送</p>
<elseif condition="$data.is_courier eq 2"/>
<p>快递({$data.money-array_sum($sum)}元)</p>
</if>
</div>
</div>
<!-- 实付金额: -->
<div class="ypay_price">
<p class="ypay_price1">实付金额:</p>
<p class="de_topTxt1_1">¥<span>{$data.money}</span></p>
</div>
<!-- 底部 -->
<div class="pay_bottom">
<div class="pay_bottom2">
<if condition="$data.state eq 5">
<if condition="$data.is_courier eq 2">
<a href="{:url('logistics/index',array('indent_id'=>$data['id']))}">
<div class="pay_bottom2_1">物流信息</div>
</a>
</if>
<elseif condition="$data.state eq 5 || $data.state eq 3 || $data.state eq 2"/>
<div class="pay_bottom2_2">售后咨询</div>
<elseif condition="$data.state eq 4"/>
<div class="myorder_bottom2_1 cancel_order" data-id="{$data.id}">取消订单</div>
<a href="{:url('portal/pay/index',array('id'=>$data['id']))}">
<div class="myorder_bottom2_2">去支付</div>
</a>
</if>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
</body>
<script>
<!--售后咨询弹窗-->
$(".pay_bottom2_2").click(function() {
console.log(123)
$(".tx_mask").css("display","block")
})
function zZFun(e) {
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
}
$(function () {
$('.cancel_order').click(function () {
var indent_id = $(this).attr('data-id');
$.ajax({
url: "{:url('portal/order/cancel_order')}",
type: "POST",
data: {'id': indent_id},
success: function (data) {
if(data.code==1){
alert('取消成功!')
window.location.href = "{:url('portal/order/get_all')}";
}else{
alert('出错啦,请稍后再试!')
}
},
error: function (data) {
alert('与服务器断开连接');
}
})
})
})
</script>
<script>
var lastTime = {$data.create_time} + 86400; //最后时间时间戳(秒)
var currentTime = Date.parse(new Date()) / 1000; //当前时间时间戳(秒)
console.log(currentTime);
var intDiff = parseInt(lastTime - currentTime); //倒计时总秒数量
function timer(intDiff) {
window.setInterval(function() {
var day = 0,
hour = 0,
minute = 0,
second = 0; //时间默认值
if(intDiff > 0) {
day = Math.floor(intDiff / (60 * 60 * 24));
hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
}
if(minute <= 9) minute = '0' + minute;
if(second <= 9) second = '0' + second;
var time = hour + '时' + minute + '分' + second + '秒'
console.log(time);
$('.timespan').html(time)
intDiff--;
}, 1000);
}
timer(intDiff);
</script>
</html>