index.html
5.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
<!DOCTYPE html>
<html>
<head>
<title>微信订单支付</title>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="max-age=0" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="Description" content="思埠V币商城" />
<meta name="Keywords" content="思埠V币商城" />
<meta name="renderer" content="webkit">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="./css/index.css">
<script type="text/javascript" src='./js/jquery.js'></script>
<script src="./js/flexible.js"></script>
</head>
<body>
<div class="main-container">
<header class="header ng-scope">
<h1 class="title">订单详情</h1>
</header>
</div>
<div class="container order-container">
<div class="address address-border-image">
<div class="detail">
<p>姓名: 白胡子</p>
<p>手机: 13520058858</p>
<p>地址: 北京市@市辖区@西城区@啦啦啦啦啦啦啦啊</p>
</div>
</div>
<div class="shop-list">
<div class="shop-title-name ng-scope" style="margin-top: 0">
<i class="icon-money left"></i> <span style="padding: 3px 0 0 3px;">待支付产品</span>
</div>
<div class="shop-item clearfix">
<div class="image left">
<img
ng-src="http://resources.sibu.cn/resource/load?path=resources/20150911/20150911143508644_750x750.jpg"
alt=""
src="http://resources.sibu.cn/resource/load?path=resources/20150911/20150911143508644_750x750.jpg">
</div>
<div class="details detail-titles">
<p class="name ng-binding">黛莱美焕彩水润无瑕BB霜</p>
<p class="integ">
<i class="icon-money left"></i> <span class="ng-binding">169</span>元
</p>
<p class="old ng-binding">
市场参考价:199 <span class="right ng-binding"> x2 </span>
</p>
</div>
</div>
<div class="shop-item clearfix">
<div class="image left">
<img
ng-src="http://resources.sibu.cn/resource/load?path=resources/20150911/20150911143508644_750x750.jpg"
alt=""
src="http://resources.sibu.cn/resource/load?path=resources/20150911/20150911143508644_750x750.jpg">
</div>
<div class="details detail-titles">
<p class="name ng-binding">黛莱美焕彩水润无瑕BB霜</p>
<p class="integ">
<i class="icon-money left"></i> <span class="ng-binding">169</span>元
</p>
<p class="old ng-binding">
市场参考价:199 <span class="right ng-binding"> x2 </span>
</p>
</div>
</div>
<div class="order-state clearfix">
<span class="right status big"> 总计: <span class="ng-binding">338</span>元
</span>
</div>
</div>
<div class="order-details">
<p class="text">
<span>订单单号:</span>0411463788727936
</p>
<p class="text">
<span>下单时间:</span>2016-05-18 04:49:11
</p>
<p class="text">
<span>运 费:</span>0.00
</p>
<p class="text">
<span>买家备注:</span>
</p>
</div>
</div>
<div class="detail-bottom"
style="border-top: .02rem solid rgb(233, 233, 233);">
<div class="right" style="font-size: 12px;">
<div class="shop-btn btn btn-cancel left">取消订单</div>
<div class="shop-btn btn right">立即支付</div>
</div>
</div>
<script>
var jsapiParameter = null;
var openid = '<{$openid}>', oId = '<{$orderId}>';
//调用微信JS api 支付
function jsApiCall() {
WeixinJSBridge
.invoke(
'getBrandWCPayRequest',
{
"appId" : "<{$jsApiParameters.appId}>",
"timeStamp" : "<{$jsApiParameters.timeStamp}>",
"nonceStr" : "<{$jsApiParameters.nonceStr}>",
"package" : "<{$jsApiParameters.package}>",
"signType" : "<{$jsApiParameters.signType}>",
"paySign" : "<{$jsApiParameters.paySign}>"
},
function(res) {
$("#loading").hide();
if (res.err_msg == 'get_brand_wcpay_request:cancel') {
alert("您已经成功取消订单支付");
} else if (res.err_msg == 'get_brand_wcpay_request:ok') {
//alert("您已经成功支付改订单,可以去商城订单中查看");
window.location.href = '../app/index.html#orderinfo/<{$orderId}>/<{$openid}>/<{$fromId}>';
} else {
alert("支付异常,提示:" + res.err_msg);
}
});
}
function callpay() {
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', jsApiCall,
false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', jsApiCall);
document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
}
} else {
jsApiCall();
}
}
//取消订单
function cancelOrder() {
if (confirm("您确认要取消该订单吗?")) {
$
.ajax({
type : "GET",
url : "../controller/order.php?a=cancel_order&oid=<{$orderId}>&pay_ref=<{$pay_ref}>",
timeout : 30000,
dataType : "json",
async : false,
success : function(res) {
if (res.code == 0) {
window.location.href = '../app/index.html#order/<{$openid}>/<{$fromId}>';
} else {
alert(res.message);
}
}
});
}
}
$(function() {
setTimeout(callpay, 3000);
});
</script>
</body>
</html>