代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<link type="text/css" rel="stylesheet" href="css/hui.css" />
<style type="text/css">
.HUI_Wrap li{background: #ffffff;}
.HUI_Wrap li+li{margin-top: 0.2rem;}
.HUI_Wrap li::after{content: '';display: block;clear: both;}
</style>
</head>
<body style="background: #F4F5F6;">
<div id="HUI_Header" style="height: 47px;">
<h1>支付</h1>
<div id="HUI_Back" style="color: #333333;"></div>
</div>
<div class="HUI_Wrap">
<ul style="background: #CCCCCC;">
<li style="padding-top: 1rem;">
<div>
<div class="HUI_FL"">
订单号:<span id="chargeNum">21775765746465465465465</span>
</div>
</div>
<div class="HUI_FL" style="width: 60%;padding:1rem 0;">
<div>
<div class="HUI_FL" style="width: 48%;text-indent: 2rem;">
<img src="img/146770147952.png" style="width: 60%;" id="pic"/>
</div>
<div class="HUI_FL" style="width: 48%;padding-top: 0.5rem;">
<p id="goodname">Z11 miniS</p>
<p style="font-size: 1rem;color: #9E9E9E;" id="desc">畅听套装 黑金色</p>
<p style="font-size: 1rem;color: #9E9E9E;">数量<span id="num">1</span></p>
</div>
</div>
</div>
<div class="HUI_FL" style="width: 40%;line-height: 7rem;">
<span class="HUI_FR" style="color: #FF0000;margin-right: 1rem;">¥<span class="price" style="color: #FF0000;" id="price">1599.00</span></span>
</div>
</li>
<li>
<div class="HUI_FL" style="width: 20%;padding:1rem 0;line-height: 5rem;font-size: 1.2rem;">
<span>支付配送</span>
</div>
<div class="HUI_FL" style="width: 80%;">
<div style="padding: 0.8rem 0;height: 5.4rem;">
<div class="HUI_FL" style="width: 90%;text-indent: 2rem;font-size: 1.2rem;">
<div class="pay" style="height: 2.7rem;line-height: 2.7rem;text-align: right;">
在线支付
</div>
<div class="send" style="height: 2.7rem;line-height: 2.7rem;text-align: right;">
只工作日送货
</div>
</div>
</div>
</div>
</li>
<li>
<div class="HUI_FL" style="width: 90%;padding:1rem 0;">
<div>
<div class="HUI_FL" style="width: 52%;text-indent: 2rem;">
<span class="HUI_Icons HUI_Icons_my2line" style="font-size: 1.6rem;line-height: 1.8rem;" id="username">
李豪杰
</span>
</div>
<div class="HUI_FL" style="width: 48%;">
<span class="HUI_Icons HUI_Icons_phone" style="font-size: 1.6rem;line-height: 1.8rem;" id="phone">
15820635084
</span>
</div>
</div>
<div style="margin-top: 1rem;text-indent: 2rem;">
<span class="HUI_Icons HUI_Icons_loaction" style="font-size: 1.6rem;line-height: 1.8rem;" id="address">
广东省湛江市
</span>
</div>
</div>
</li>
<li>
<div style="padding: 0.5rem 1rem 0.5rem 0;">
<div style="display: inline-block;width: 60%;text-align: right;">商品金额:</div>
<div style="display: inline-block;text-align: right;width: 38%;color: #ED2D22;" id="good_price">¥1599.00</div>
</div>
<div class="product_price" style="padding: 0.5rem 1rem 0.5rem 0;">
<div style="display: inline-block;width: 60%;text-align: right;">运费:</div>
<div style="display: inline-block;text-align: right;width: 38%;color: #ED2D22;" id="yun">+0.00</div>
</div>
<div class="product_price" style="padding: 0.5rem 1rem 0.5rem 0;">
<div style="display: inline-block;width: 60%;text-align: right;">订单金额:</div>
<div style="display: inline-block;text-align: right;width: 38%;color: #ED2D22;" id="charge">¥1599.00</div>
</div>
</li>
</ul>
</div>
<div style="position: fixed;height: 4rem;width:100%;background: #EEEEEE;bottom: 0;">
<div style="width:80%;margin: 0 auto;">
<div class="submit" style="background: #FF0000;height: 3rem;width: 40%;border-radius:1.5rem ;margin-top: 0.5rem;text-align: center;line-height: 3.2rem;color: #FFFFFF;display: inline-block;" id="pay">
支付
</div>
<div style="background: #FF0000;height: 3rem;width: 40%;border-radius:1.5rem ;margin-top: 0.5rem;margin-left:18%;text-align: center;line-height: 3.2rem;color: #FFFFFF;display: inline-block;" id="qu">
取消订单
</div>
</div>
</div>
<script type="text/javascript" src="js/hui.js"></script>
<script src="js/huiSlide.js" type="text/javascript" charset="utf-8"></script>
<script>
hui.Back = function(){
jback();
}
function jback () {
var parentWebview = plus.webview.getWebviewById('order.html');
var self = plus.webview.currentWebview();
plus.webview.close(self);
plus.webview.close(parentWebview);
}
hui.plusReady(function(){
var self = plus.webview.currentWebview();
var userinfo,goodinfo,username,phone,address,price,charge;
console.log(self.good_id);
hui.postJSON(
'http://jkfree.space/index.php/app/order/pay.html',
{good_id:self.good_id,uid:self.uid,order_id:self.order_id},
function (data) {
console.log(JSON.stringify(data.data));
hui.centerLoading(true);
if (data.data.address) {
username = hui('#username').html(data.data.address.truename);
phone = hui('#phone').html(data.data.address.phone);
address = hui('#address').html(data.data.address.address);
}
if (data.data.goodinfo) {
hui('#pic').html(data.data.goodinfo.pic);
hui('#goodname').html(data.data.goodinfo.good_name);
hui('#price').html(data.data.goodinfo.price);
hui('#desc').html(data.data.goodinfo.desc);
hui('#chargeNum').html(data.data.orderinfo.order);
price = (hui('#num').html())*data.data.goodinfo.price;
hui('#good_price').html('¥'+ price);
charge = parseInt(price)+parseInt(hui('#yun').html());
hui('#charge').html('¥'+charge);
}
},
function () {
hui.toast('连接服务器失败')
}
);
hui('#pay').click(function () {
hui.postJSON(
'http://jkfree.space/index.php/app/order/orderPay.html',
{order_id:self.order_id},
function (data) {
if (data.code == 200) {
hui.toast('支付成功');
setTimeout(jback,500);
} else{
hui.toast('支付失败');
}
},
function () {
hui.toast('连接服务器失败');
}
);
})
hui('#qu').click(function () {
hui.postJSON(
'http://jkfree.space/index.php/app/order/unorder.html',
{order_id:self.order_id},
function (data) {
if (data.code == 200) {
hui.toast('订单取消成功');
setTimeout(jback,500);
} else{
hui.toast('订单取消失败');
}
},
function () {
hui.toast('连接服务器失败');
}
);
})
});
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。