|
|
$(function () {
|
|
AutoSetSubmitUrl(); //自动设置提交页面(默认为../business)
|
setTimeout(LoadData, 0); //立即获取数据
|
|
});
|
|
|
|
/*
|
加载数据方法
|
*/
|
function LoadData() {
|
//获取Json数据
|
GetJson({ '0': 'T0T' }, function (data, textStatus) {
|
try {
|
|
if (data) {
|
window.NoneData = eval('[' + data + ']')[0];
|
|
/*
|
信息过期处理
|
*/
|
var endtime = window.NoneData.EndTime;
|
var isEffective = endtime != undefined && typeof (endtime) == 'object';
|
isEffective = isEffective ? endtime > new Date() : ('' != endtime && Date.Parse(endtime) > new Date());
|
if (isEffective && parseInt(window.NoneData.SurplusOrderCount) > 0 && window.NoneData.IsMyOrder!=1)//信息有效则显示下单按钮
|
document.getElementById('btnToSeckillOnline').style.display = '';
|
else {
|
document.getElementById('btnToSeckillOnline').style.display = 'none';
|
}
|
window.NoneData.EndTime = window.NoneData.EndTime.ToString();
|
ShowData();
|
} else {
|
global.NoneDataOperate(); return;
|
}
|
|
|
} catch (ex) {
|
global.DealDataException(ex); return
|
}
|
});
|
|
|
}
|
/*
|
显示信息
|
*/
|
function ShowData() {
|
window.NoneData.PrintTypeName = window.NoneData.PrintType.PrintName;
|
window.NoneData.MemberName = window.NoneData.MemberBasic.Name;
|
window.NoneData.OrderCount = parseInt(window.NoneData.OrderCount);
|
window.NoneData.PrintCount = parseInt(window.NoneData.PrintCount);
|
window.NoneData.ContactPhone = window.NoneData.ContactPhone;
|
window.NoneData.SumPrintCount = isNaN(window.NoneData.OrderCount) || isNaN(window.NoneData.PrintCount) ? '' : window.NoneData.OrderCount * window.NoneData.PrintCount;
|
document.getElementById('link_QQ').href = 'http://wpa.qq.com/msgrd?V=1&Uin=' + window.NoneData.QQ + '&Site=ioshenmue&Menu=yes';
|
|
$("#spnMemberName").attr("value_id", window.NoneData.MemberId + "");
|
window.SetJsonToDom(window.NoneData, 'spn', "innerHTML");
|
}
|