You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

74 lines
2.3 KiB

  1. var resever_succsee = getStorJson("resever_succsee");
  2. var login_data = getStorJson("login_data");
  3. console.log(resever_succsee);
  4. var intDiff = parseInt(resever_succsee.shengyu_time);//倒计时总秒数量
  5. window.onload = function(){
  6. timer(intDiff);
  7. $("#resver_station").text(resever_succsee.type);
  8. $("#resver_time").text("出发时间:"+resever_succsee.date);
  9. $("#resver_no").text("量:"+resever_succsee.desc);
  10. $("#resver_name").text("名:"+resever_succsee.name);
  11. $("#resver_phone").text("号:"+resever_succsee.phone);
  12. $("#resver_money").text("额:"+resever_succsee.price+"元");
  13. }
  14. //微信支付
  15. $("#wechat_pay").click(function(){
  16. if($("#duigou").attr("src")=="images/duigou_no.png"){
  17. alert("请选择支付方式!");
  18. }else if($('#minute_show').html() == '00分' && $('#second_show').html() == '00秒'){
  19. $('#info').addClass('ui_hide');
  20. $('#outtime').removeClass('ui_hide');
  21. }else{
  22. if(login_data.login_type==1){
  23. 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";
  24. }else{
  25. window.location.href="http://wx.zhizhuchuxing.com/wechat/WxPay/realpay/onlinePay.php?orderid="+resever_succsee.order_id+"&ifdisney="+resever_succsee.ifdisney+"&fx=11";
  26. }
  27. }
  28. })
  29. //二维码支付
  30. $("#pay_code").click(function(){
  31. window.location.href="pay_code.html";
  32. })
  33. $("#change_wechat").click(function(){
  34. if($("#duigou").attr("src")=="images/duigou_no.png"){
  35. $("#duigou").attr("src","images/duigou_yes.png");
  36. }else if($("#duigou").attr("src")=="images/duigou_yes.png"){
  37. $("#duigou").attr("src","images/duigou_no.png");
  38. }
  39. })
  40. function timer(intDiff){
  41. window.setInterval(function(){
  42. var day=0,
  43. hour=0,
  44. minute=0,
  45. second=0;//时间默认值
  46. if(intDiff > 0){
  47. day = Math.floor(intDiff / (60 * 60 * 24));
  48. hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
  49. minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
  50. second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
  51. }
  52. if (minute <= 9) minute = '0' + minute;
  53. if (second <= 9) second = '0' + second;
  54. $('#minute_show').html(minute+'分');
  55. $('#second_show').html(second+'秒');
  56. intDiff--;
  57. }, 1000);
  58. }
  59. //超时重新预订
  60. function payAgain(){
  61. window.location.href = './resever_bus.html';
  62. }