';
// 是否包含车子
// var car = httpData.if_bus;
// if (car == "1") {
// wrapper_HTML += '
';
// }
// 是否包含宾馆
// var hotel = httpData.if_hotel;
// if (hotel == "1") {
// wrapper_HTML += '
';
// }
// 是否包含景点
// var sightspot = httpData.if_sightspot;
// if (sightspot == "1") {
// wrapper_HTML += '
';
// }
// 单元格结束
wrapper.innerHTML = wrapper_HTML;
// 金额
var left_center = document.getElementById("left-center");
var centerHTML = '';
// centerHTML += '
金额:';
// centerHTML += '
¥'+httpData.price+'';
// centerHTML += '
^';
centerHTML += '
';
centerHTML += '
金额:';
centerHTML += '
¥';
centerHTML += '
' + httpData.price + '';
centerHTML += '
';
centerHTML += '
';
//
left_center.innerHTML = centerHTML;
// 支付时间
var right_time = document.getElementById("right-time");
var timeHTML = '';
// ' + second_change_min(httpData.pay_second) + '
time = httpData.pay_second;
setInterval("ShowCountDown()", 1000); //1000为1秒钟
timeHTML += '
'+second_change_min(time)+'';
right_time.innerHTML = timeHTML;
}
//var time=document.getElementById('time')
// var m=time.innerHTML;
// var tim=null;
// tim=setInterval(function(){
// m--;
// if (m==0) {
// clearInterval(tim);
// };
// time.innerHTML=second_change_min(m);
// },1000)
// 将秒的时间转变成分钟+秒
function second_change_min(times) {
var min = Math.floor(times / 60);
var second = times % 60;
var minStr = '';
if(second<=9){
minStr=min + ':0' + second;
}else{
minStr=min + ':' + second;
}
return minStr;
}
var minute = 0;
var cc = 0;
function ShowCountDown() {
time = Math.floor(time - 1);
var leftsecond = time;
minute = Math.floor((leftsecond) / 60);
var second = Math.floor(leftsecond - minute * 60);
cc = document.getElementById("time");
if (time <= 0) {
return;
}
if (second < 10) {
cc.innerHTML = ''+minute + ":0" + second;
} else {
cc.innerHTML = ''+minute + ":" + second;
}
}
// 占击支付方式最大的div--payway
function click_payway(way) {
cancel_checkbox_checked();
if(temp_httpData.second<=0){
alert("支付时间超过15分钟");
return;
}
if (way == "wxpay") {
var checkbox = document.getElementById("wxcheckbox");
checkbox.checked = true;
} else if (way == "qqpay") {
// var checkbox = document.getElementById("qqcheckbox");
// checkbox.checked=true;
}
}
// 取消两个复选框
function cancel_checkbox_checked() {
var wxcheckbox = document.getElementById("wxcheckbox");
// var qqcheckbox = document.getElementById("qqcheckbox");
wxcheckbox.checked = false;
// qqcheckbox.checked=false;
}
// 点击金额
var isUp = true;
function click_amount() {
var ticket_list = temp_ticket_list;
var rr = document.getElementById("rr");
if (isUp == true) {
rr.src = "../img/up_arrow.png";
} else {
rr.src = "../img/down_arrow.png";
}
isUp = !isUp;
// 显示订单
var order_list = document.getElementById("order-list");
var listHTML = '';
for (var i = 0; i < ticket_list.length; i++) {
listHTML += '
';
listHTML += '' + ticket_list[i].ticket_name + '';
listHTML += '× ' + ticket_list[i].ticket_count + '';
listHTML += '¥' + ticket_list[i].ticket_price + '';
listHTML += '
';
}
order_list.innerHTML = listHTML;
if (order_list.style.display == 'block') {
order_list.style.display = 'none';
} else {
order_list.style.display = 'block';
}
}
// 点击支付
function click_pay() {
// name == prod_code
// orderid == orderno
// money == price 按分计算,,传值的时候 *100
var payURL = "http://xmwx.zhizhuchuxing.cn/wechat/WxPay/realpay/onlinePay.php?orderid=" + temp_orderno;
// var payURL = "http://xmwx.zhizhuchuxing.cn/wechat/WxPay/pay/onlinePay.php?name=上海-舟山&orderid=qw111111&money=11";
// var payURL = "http://xmwx.zhizhuchuxing.cn/wechat/WxPay/pay/onlinePay.php?orderid=" + temp_orderno;
// 跳转前将URL编码
payURL = encodeURI(payURL);
window.location.href = payURL;
}
// 从上一页的链接上获取参数
function getPar(par) {
//获取当前URL
var local_url = document.location.href;
// 接收的时候将URL 解码
local_url = decodeURI(local_url);
//获取要取得的get参数位置
var get = local_url.indexOf(par + "=");
if (get == -1) {
return false;
}
//截取字符串
var get_par = local_url.slice(par.length + get + 1);
//判断截取后的字符串是否还有其他get参数
var nextPar = get_par.indexOf("&");
if (nextPar != -1) {
get_par = get_par.slice(0, nextPar);
}
return get_par;
}
/*======================网络请求的Ajax的代码=======================*/
// 创建一个Ajax对象
if (window.ActiveXObject) {
var myreq = new ActiveXObject("Microsoft.XMLHTTP");
} else {
var myreq = new XMLHttpRequest();
}
// 请求方法,传入URL
function get_virtual_user_list(myURL) {
var tnowtime = getDateTime(4);
// m_url = 接口
// var myURL = m_url + 'op=userlink&vuser=' + cvuserid + '&tt=' + tnowtime;
// var myURL = "http://xmwx.zhizhuchuxing.cn/core/area_target.asp?keyword=";
myreq.open("get", myURL, true);
// 接收的数据交给哪个函数处理
myreq.onreadystatechange = show_user_list;
myreq.send();
}
function show_user_list() {
if (myreq.readyState == 4) {
// newstr 就是接收到的数据
var newstr = myreq.responseText;
var httpData = JSON.parse(newstr);
//
reload_Info(httpData);
}
}
function getDateTime(nTypeFlag) {
var tNowTime = new Date();
var myYear = ';' + tNowTime.getFullYear() + ';';
var myMonth = ';' + (tNowTime.getMonth() + 1 - 0) + ';';
var myDay = ';' + tNowTime.getDate() + ';';
var myHour = ';' + tNowTime.getHours() + ';';
var myMinu = ';' + tNowTime.getMinutes() + ';';
var mySecond = ';' + tNowTime.getSeconds() + ';';
if (myMonth.length < 4) myMonth = '0' + myMonth;
if (myDay.length < 4) myDay = '0' + myDay;
if (myHour.length < 4) myHour = '0' + myHour;
if (myMinu.length < 4) myMinu = '0' + myMinu;
if (mySecond.length < 4) mySecond = '0' + mySecond;
var cNewTimeStr;
//alert(tNowTime);
switch (nTypeFlag + 1 - 1) {
case 0:
cNewTimeStr = myYear + '-' + myMonth + '-' + myDay;
break;
case 1:
cNewTimeStr = myYear + myMonth + myDay;
break;
case 2:
cNewTimeStr = myHour + ':' + myMinu + ':' + mySecond;
break;
case 3:
cNewTimeStr = myHour + myMinu + mySecond;
break;
case 4:
cNewTimeStr = myYear + myMonth + myDay + myHour + myMinu + mySecond;
break;
case 5:
cNewTimeStr = myYear + '年' + myMonth + '月' + myDay + '日';
break;
case 6:
cNewTimeStr = myYear;
break;
case 7:
cNewTimeStr = myYear + '-' + myMonth;
break;
default:
cNewTimeStr = myYear + '-' + myMonth + '-' + myDay + ' ' + myHour + ':' + myMinu + ':' + mySecond;
break;
}
cNewTimeStr = cNewTimeStr.replace(/;/g, "");
return cNewTimeStr;
}
//////////////////////////////////////