confirmorder.html
4.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>确认订单</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_ycnvxk1als.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/diseaseColumn.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/shop.css">
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
</head>
<body style="background: #F5F6FA;">
<div class="order_box">
<div class="order_info">
<div class="address_box">
<div class="address_info">
<div>
<text class="name">向昱筱</text>
<text class="tel">13252648165</text>
</div>
<div class="address_detail">天津市和平区气象台路1088号中环公寓</div>
</div>
<div class="iconfont icon-jiantou1"></div>
</div>
</div>
<!-- begin:订单信息 -->
<div class="order_info">
<h2>订单信息</h2>
<div class="order_ul">
<div class="order_item">
<div class="order_item">
<div class="info_left"><img src="{:cmf_get_image_url($good.thumbnail)}"></div>
<div class="info_right">
<p class="info_txt1">{$good.name}</p>
<p class="info_txt2"></p>
<p class="info_num"><span>{$good.fee}</span>积分</p>
</div>
</div>
<div class="info_number">X{$good.num}</div>
</div>
</div>
</div>
<!-- begin:支付方式 -->
<div class="order_info">
<ul class="order_pay order_detail">
<li class="order_item label">
<span>配送方式</span>
<div class="order_label right">包邮</div>
</li>
<li class="order_item label">
<span>支付方式</span>
<div class="order_label right">积分</div>
</li>
</ul>
</div>
<!---->
<div class="order_info">
<ul class="order_pay order_detail">
<li class="order_item label">
<span>商品金额</span>
<div class="order_label right">{$good.fee}积分</div>
</li>
<li class="order_item label">
<span>运费</span>
<div class="order_label right">¥0</div>
</li>
</ul>
</div>
<div class="order_info">
<ul class="order_pay">
<li class="total">
<span>留言</span>
<textarea class="content" placeholder="给买家留言(45字以内)"></textarea>
</li>
</ul>
</div>
</div>
<!-- begin:支付订单 -->
<div class="null_box"></div>
<div class="bottom_box">
<p class="orser_txt1">实付:<span><text class="money_icon">{$total_fee}</text>积分 </span></p>
<div class="order_btn">支付订单</div>
</div>
<script type="text/javascript" src="__TMPL__/public/assets/js/jquery-2.1.0.js "></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script type="application/javascript">
wx.config({$sdk});
$('.order_btn').click(function (res) {
var num = {$good.num};
var name = $('.name').html();
var tel = $('.tel').html();
var address_detail = $('.address_detail').html();
var id = {$good.id};
var content = $('.content').val();
$.ajax({
type: 'POST',
url: '{:url('confirmOrder')}',
data: {
num: num,
id: id,
content: content,
address: address_detail,
tel:tel,
name:name,
},
success:function (res) {
if (res.code==1){
alert(res.msg);
window.location.href='{:url('/')}'
}else {
alert(res.msg);
}
}
})
})
wx.openAddress({
success: function (res) {
alert(JSON.stringify(res));
},
fail:function (res) {
alert(JSON.stringify(res));
}
});
$('.address_info').click(function () {
wx.openAddress({
success: function (res) {
$('.name').text(res.userName);
$('.tel').text(res.telNumber);
$('.address_detail').text(res.detailInfo);
}
});
})
</script>
</body>
</html>