paydetails.html
6.8 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
<!DOCTYPE html>
<html>
<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" type="text/css" href="/themes/simplebootx/Portal/Template/css/swiper-3.4.2.min.css" />
<link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/init.css" />
<link rel="stylesheet" type="text/css" href="/themes/simplebootx/Portal/Template/css/myorder/paydetails.css" />
<script src="/themes/simplebootx/Portal/Template/js/base.js" type="text/javascript" charset="utf-8"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: '{$sdk.appId}', // 必填,公众号的唯一标识
timestamp: '{$sdk.timestamp}', // 必填,生成签名的时间戳
nonceStr: '{$sdk.nonceStr}', // 必填,生成签名的随机串
signature: '{$sdk.signature}',// 必填,签名
jsApiList: [
'chooseWXPay'
] // 必填,需要使用的JS接口列表
});
</script>
<title>订单详情待付款</title>
</head>
<body>
<div class="container" id="paydetail">
<!--遮罩-->
<div class="wrap_sub">
<!--弹层-->
<div class="popup_sub">
<span class="text">是否确认取消订单?</span>
<div class="btn_sub" @click="cancel()">
确定
</div>
</div>
</div>
<!--遮罩-->
<div class="wrap">
<!--弹层-->
<div class="popup">
<p>确认拨打配送点电话?</p>
<p>{{orderinfo.spot_tel}}</p>
<div class="btn">
<span>确定</span><span>取消</span>
</div>
</div>
</div>
<!--头部-->
<div class="header">
<div class="header_top">
<i class="iconfont icon-qianbao"></i><span class="pay_text">待付款</span>
<p class="num">{{orderinfo.order_sn}}</p>
<p :class="orderinfo.order_type=='1'?'nav_item_pay_btn':'nav_item_pay_btn_eat'">{{orderinfo.order_type|stoptype}}</p>
</div>
<!--产品-->
<div class="nav_item_product" v-for="item in ordergood">
<div class="nav_item_product_pic">
<!--<img src="../img/矩形6拷贝2@2x.png" />-->
<img :src="item.thumb"/>
</div>
<div class="nav_item_product_box">
<div class="nav_item_product_item">
<p>{{item.goods_name}}</p>
<span>¥{{item.goods_price}}</span>
</div>
<div class="nav_item_product_item_sub">
<p>{{item.goods_description}}</p>
<span>x{{item.goods_num}}</span>
</div>
</div>
</div>
<!--详情-->
<div class="details_list">
<div class="pay">
<span>支付方式</span><span>{{orderinfo.payment|payment}}</span>
</div>
<div class="pay">
<span>支付金额</span><span>¥{{orderinfo.order_amount}}</span>
</div>
<div class="pay">
<span>取货地点</span><span>{{orderinfo.spot_name}}</span>
</div>
<div class="pay call_num">
<span>取货电话</span><span class="active"><i class="iconfont icon-VectorSmartObject"></i>{{orderinfo.spot_tel}}</span>
</div>
<div class="pay">
<span>取货时间</span><span>{{orderinfo.pick_up_time}}</span>
</div>
<div class="pay">
<span>下单时间</span><span>{{orderinfo.add_time}}</span>
</div>
<div class="pay">
<span>取餐号</span><span>{{orderinfo.pick_up_no}}</span>
</div>
</div>
<!--备注-->
<div class="remark">
<span>订单备注</span><span class="limit">{{orderinfo.order_notes}}</span>
</div>
<!--底部按钮-->
<div class="footer">
<span class="confirm">确认付款</span><span class="cancel cancel_btn">取消订单</span>
</div>
</div>
</div>
<script src="/themes/simplebootx/Portal/Template/js/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/themes/simplebootx/Portal/Template/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/themes/simplebootx/Portal/Template/js/cookie.js" type="text/javascript" charset="utf-8"></script>
<script src="/themes/simplebootx/Portal/Template/js/swiper-3.4.2.jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/themes/simplebootx/Portal/Template/js/paydetail.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var call_num = document.getElementsByClassName('call_num')[0];
var wrap = document.getElementsByClassName('wrap')[0];
var popup = document.getElementsByClassName('popup')[0];
var confirm = document.getElementsByClassName('confirm')[0];
confirm.onclick = function(){
var oid=GetQueryString("oid");
window.event.stopPropagation();
$.ajax({
url:"{:U('Flow/goPayFromUserCenter2')}",
data:{
unique_id:localStorage.getItem('unique_id'),
oid:oid,
from:2
},
type:"POST",
dataType:"JSON",
success: function (data) {
wx.chooseWXPay({
timestamp: data.data.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
nonceStr: data.data.nonceStr, // 支付签名随机串,不长于 32 位
package: data.data.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
signType: data.data.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
paySign: data.data.paySign, // 支付签名
success: function (res) {
window.location.href=data.url;
}
});
}
})
}
call_num.onclick = function(){
wrap.style.display = 'block';
}
wrap.onclick = function(){
wrap.style.display = 'none';
}
var cancel_btn = document.getElementsByClassName('cancel_btn')[0];
var wrap_sub = document.getElementsByClassName('wrap_sub')[0];
var popup_sub = document.getElementsByClassName('popup_sub')[0];
cancel_btn.onclick = function(ev){
var oEvent = ev||event
oEvent.concelable=true;
oEvent.stopPropagation();
wrap_sub.style.display = 'block';
}
wrap_sub.onclick = function(){
wrap_sub.style.display = 'none';
}
</script>
</body>
</html>