|
- var resever_succsee = getStorJson("resever_succsee");
- var login_data = getStorJson("login_data");
- console.log(resever_succsee);
- var intDiff = parseInt(resever_succsee.shengyu_time);//倒计时总秒数量
-
- window.onload = function(){
- timer(intDiff);
- $("#resver_station").text(resever_succsee.type);
- $("#resver_time").text("出发时间:"+resever_succsee.date);
- $("#resver_no").text("量:"+resever_succsee.desc);
- $("#resver_name").text("名:"+resever_succsee.name);
- $("#resver_phone").text("号:"+resever_succsee.phone);
- $("#resver_money").text("额:"+resever_succsee.price+"元");
- }
- //微信支付
- $("#wechat_pay").click(function(){
- if($("#duigou").attr("src")=="images/duigou_no.png"){
- alert("请选择支付方式!");
- }else if($('#minute_show').html() == '00分' && $('#second_show').html() == '00秒'){
- $('#info').addClass('ui_hide');
- $('#outtime').removeClass('ui_hide');
- }else{
- if(login_data.login_type==1){
- window.location.href="http://wx.zhizhuchuxing.com/wechat/WxPay/realpay/onlinePay.php?orderid="+resever_succsee.order_id+"&ifdisney="+resever_succsee.ifdisney+"&fx=11&code2=11";
- }else{
- window.location.href="http://wx.zhizhuchuxing.com/wechat/WxPay/realpay/onlinePay.php?orderid="+resever_succsee.order_id+"&ifdisney="+resever_succsee.ifdisney+"&fx=11";
- }
-
- }
-
- })
- //二维码支付
- $("#pay_code").click(function(){
-
- window.location.href="pay_code.html";
-
- })
- $("#change_wechat").click(function(){
- if($("#duigou").attr("src")=="images/duigou_no.png"){
- $("#duigou").attr("src","images/duigou_yes.png");
- }else if($("#duigou").attr("src")=="images/duigou_yes.png"){
- $("#duigou").attr("src","images/duigou_no.png");
- }
- })
-
-
- function timer(intDiff){
- window.setInterval(function(){
- var day=0,
- hour=0,
- minute=0,
- second=0;//时间默认值
- if(intDiff > 0){
- day = Math.floor(intDiff / (60 * 60 * 24));
- hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
- minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
- second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
- }
- if (minute <= 9) minute = '0' + minute;
- if (second <= 9) second = '0' + second;
- $('#minute_show').html(minute+'分');
- $('#second_show').html(second+'秒');
- intDiff--;
- }, 1000);
- }
-
-
- //超时重新预订
- function payAgain(){
- window.location.href = './resever_bus.html';
- }
-
|