<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <include file="public@head_common"/> <link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/augly.css" /> <link rel="stylesheet" type="text/css" href="__TMPL__/public/mobile/css/pay/order_confirm.css" /> <title>订单确认</title> <style type="text/css"> </style> </head> <body> <div class="notice" style="position: fixed;top: 0;display: none;z-index: 1000;height: 100%;" onclick="$(this).hide()"> <img src="__TMPL__/public/mobile/images/2.png"/> </div> <div class="header"> <div class="return"> <span class="back_href"> <i class="iconfont icon-jiantou-copy"></i>返回 </span> </div> 订单确认 </div> <div class="header_place"></div> <div class="test_num"></div> <!--基本信息--> <div class="order_item"> <div class="item_tit"> <i class="iconfont icon-icon-test1"></i>基本信息 </div> <volist name="orderInfo.groupA" id="vo"> <notempty name="vo.user_choose"> <div class="item_info"> <p class="info_item">{$vo.name}</p> <p>{$vo.user_choose}</p> </div> </notempty> </volist> </div> <notempty name="orderInfo.groupB"> <!--订购人信息--> <div class="order_item"> <div class="item_tit"> <i class="iconfont icon-icon-test2"></i>订购人信息 </div> <volist name="orderInfo.groupB" id="vo"> <notempty name="vo.user_choose"> <div class="item_info"> <p class="info_item">{$vo.name}</p> <p>{$vo.user_choose}</p> </div> </notempty> </volist> </div> </notempty> <notempty name="orderInfo.groupC"> <!--收货信息--> <div class="order_item"> <div class="item_tit"> <i class="iconfont icon-shouhuodizhi"></i>收货信息 </div> <volist name="orderInfo.groupC" id="vo"> <notempty name="vo.user_choose"> <div class="item_info"> <p class="info_item">{$vo.name}</p> <p>{$vo.user_choose}</p> </div> </notempty> </volist> </div> </notempty> <notempty name="orderInfo.groupD"> <!--订购信息--> <div class="order_item"> <div class="item_tit"> <i class="iconfont icon-gouwugouwuchedinggou"></i>订购信息 </div> <volist name="orderInfo.groupD" id="vo"> <notempty name="vo.user_choose"> <div class="item_info"> <eq name="vo.type" value="8"> <p class="info_item" style="display: flex;align-items: center;">{$vo.name}</p> <p class="detail_image"><img src="{:cmf_get_asset_url($vo['user_choose'])}"/></p> <else/> <p class="info_item">{$vo.name}</p> <p>{$vo.user_choose}</p> </eq> </div> </notempty> </volist> </div> </notempty> <div class="btn"> 确定,去支付 </div> <div class="bottom_icon"> <img src="__TMPL__/public/mobile/images/biglogo@2x.png" class="bottom_img" /> <p class="bottom_text">{$site_info.site_name}</p> </div> <!--选择支付方式--> <div class="mask" style=""> <!--支付方式--> <div class="pay_style"> <i class="iconfont icon-icon-test close"></i> <p class="pay_tit">选择支付方式</p> <div class="style_item style_border"> <i class="iconfont icon-weixinzhifu"></i> <div class="style_text"> <p class="wx_pay">微信支付</p> <p class="wx_use">使用微信支付,安全便捷</p> </div> <input type="radio" name="pay" value="1" checked="checked" class="choose_style" /> </div> <div class="style_item"> <i class="iconfont icon-big-Pay"></i> <div class="style_text"> <p class="wx_pay">支付宝支付</p> <p class="wx_use">支持有支付宝的用户使用</p> </div> <input type="radio" name="pay" value="2" class="choose_style" /> </div> <div class="pay_btn"> 确 定 </div> </div> <!--订单修改--> <div class="order_change" style="display: none;"> <div class="order_change_pic"> <img src="__TMPL__/public/mobile/images/tucengf.png"/> </div> <div class="change_text"> <img src="__TMPL__/public/mobile/images/closeimg.png" class="change_close"/> <p class="change_text_o">您的订单销售人员已修改</p> <p class="change_text_t">点击确认刷新页面</p> <p class="change_btn">确认</p> </div> </div> <!--订单修改--> <div class="order_lose" style="display: none;"> <div class="order_lose_pic"> <img src="__TMPL__/public/mobile/images/tucengs.png"/> </div> <div class="lose_text"> <img src="__TMPL__/public/mobile/images/closeimg.png" class="change_close"/> <p class="change_text_o">您的订单确认码已失效</p> <p class="change_text_t">如需查看您的订单,请重新联系销售人员。</p> <p class="change_text_th">详询 400-110-7575。</p> <p class="change_btnt">确认</p> </div> </div> </div> <div style="display: none;" id="alipay"> </div> <script src="__TMPL__/public/mobile/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script> <script src="__TMPL__/public/mobile/js/swiper-4.3.5.min.js" type="text/javascript" charset="utf-8"></script> <script src="__TMPL__/public/mobile/js/common.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> var is_reload = false; $('.close').click(function(){ $('.mask').hide(); $('.pay_style').hide }); $('.btn').click(function(){ var is_change = "{$orderInfo.is_change}"; if(is_change == 1) { var data = { order_sn: "{$orderInfo.order_sn}" }; $.ajax({ url: "{:url('portal/Order/update_change')}", type: "POST", data: data, dataType: "JSON", success: function (res) { console.log(res); if (res.code == 1) { $('.mask').show(); $('.order_change').show(); is_reload = true; } else { if(res.code == 2) { $('.mask').show(); $('.order_lose').show(); } else { _error(res.msg); } } } }); } else { var data = { number: "{$orderInfo.number}" }; $.ajax({ url: "{:url('portal/Order/check_num')}", type: "POST", data: data, dataType: "JSON", success: function (res) { console.log(res); if (res.code == 1) { $('.mask').show(); $('.pay_style').show() } else { if(res.code == 2) { $('.mask').show(); $('.order_lose').show(); } else { _error(res.msg); } } } }); } // $('.pay_style').show() // $('.mask').show() }); // 选择支付方式后确定 $('.pay_btn').click(function(){ var data = { order_sn: "{$orderInfo.order_sn}", pay_type: $('input[name=pay]:checked').val() }; $.ajax({ url: "{:url('portal/Order/pay_param')}", type: "POST", data: data, dataType: "JSON", success: function (res) { console.log(res); if (res.code == 1) { location.href = res.url } else { if(res.data == 2) { $('.mask').show(); $('.order_lose').show(); } else if(res.data == 4) { $('.notice').show(); } else { _error(res.msg); } } } }); }); $('.change_close').click(function(){ if(is_reload) { window.location.reload() } else { window.history.go(-1); } // $('.order_lose').hide(); // $('.mask').hide(); // $('.order_change').hide() }); $('.change_btn').click(function(){ if(is_reload) { window.location.reload() } else { window.history.go(-1); } }); // 弹窗提示 var popup_switch = true; function _error(test) { if(popup_switch) { popup_switch = false; $('.test_num').html(test); $('.test_num').removeClass('Augly-fadeout'); $('.test_num').addClass('Augly-fadein'); $('.test_num').show(); setTimeout(function() { $('.test_num').removeClass('Augly-fadein'); $('.test_num').addClass('Augly-fadeout'); popup_switch = true }, 1500) } else { popup_switch = true } } // 判断是否支付成功 var timer = setInterval(function(){ $.ajax({ url: "{:url('portal/Order/check_order_status')}", type: 'post', //提交的方式 data: { order_sn: "{$orderInfo.order_sn}" }, dataType: 'json', //服务器返回的数据类型 success: function (res) { //提交成功后自动执行的处理函数 console.log(res); if (res.code == 1) { window.location.href = res.url; } } }) // } },1000); </script> </body> </html>