// JavaScript Document
var lang1="";
var lang2="";
function sendmsg(msgid,msgvalue){
document.getElementById(msgid).innerHTML=msgvalue;
setTimeout('sendmsg1("'+msgid+'")',8000);
}
function sendmsg1(msgid){
document.getElementById(msgid).innerHTML="";
}
function templatestyle(stylename){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax&stylename="+stylename+"&formhash=1a3b0707", {ac:"pcstyle"},function (data, textStatus){
if(data=="ok"){
location.reload();
}
}, "html");
}
function showlayer(it618type,type,title,content,width,height){
if(type==1){
content='
'+content+'
';
}
layer.open({
type: type,
title: ""+title+"
",
shadeClose: true,
scrollbar: false,
shade: [0.5, "#393D49"],
maxmin: false,
area: [width+"px",height+"px"],
content: content,
cancel: function(index, layero){
}
});
}
var layerclose = {};
function showlayerwin(it618type,type,title,content,width,height,wintype){
if(type==1){
content=''+content+'
';
}
if(wintype==0){
var maxmin=false;
var shade=0.3;
}else{
var maxmin=true;
var shade=false;
}
if(height>IT618_SALE(window).height()*0.8){
height=IT618_SALE(window).height()*0.8;
}
layerclose[it618type]=layer.open({
type: type,
title: ""+title+"
",
shadeClose: false,
scrollbar: false,
shade: shade,
maxmin: maxmin,
area: [width+"px",height+"px"],
content: content,
cancel: function(index, layero){
if(it618type=='codepay'){
clearInterval(tmptime);
}
}
});
}
IT618_SALE.ajaxSetup({cache:false});
var saleaddid;
IT618_SALE(document).ready(function() {
//1f8ea69fac450e6855c747ff0d9e2285
IT618_SALE("#mysale").click(function(){
showlayerwin('mysale',1,'我的交易','',1200,623,1);
IT618_SALE("#layer_mysale").html('');
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:mysale", {ac:"add"},function (data, textStatus){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax"+"&formhash=1a3b0707", {ac:"salelist_get",ac1:"pcmysale"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mysalesum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mysalelist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mysalepage",tmparr1[2]);
bodytmp=bodytmp.replace("it618myjfcount",tmparr1[3]);
IT618_SALE("#layer_mysale").html(bodytmp);
laydate.render({trigger: "click",
elem: '#it618_time1'
});
laydate.render({trigger: "click",
elem: '#it618_time2'
});
if(saleaddid>0)setsalekm(saleaddid);
saleaddid=0;
}, "html");
}, "html");
});
//7815f6b733fc5de6831e9e149495e997
IT618_SALE("#mymoney").click(function(){
showlayerwin('mymoney',1,'我的返利','',1200,623,1);
IT618_SALE("#layer_mymoney").html('');
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:mymoney", {ac:"add"},function (data, textStatus){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax"+"&formhash=1a3b0707", {ac:"moneylist_get",ac1:"pcmymoney"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mymoneysum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mymoneylist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mymoneypage",tmparr1[2]);
IT618_SALE("#layer_mymoney").html(bodytmp);
laydate.render({trigger: "click",
elem: '#it618_time1'
});
laydate.render({trigger: "click",
elem: '#it618_time2'
});
}, "html");
}, "html");
});
//1f8ea69fac450e6855c747ff0d9e2285
IT618_SALE("#mycollect").click(function(){
showlayerwin('mycollect',1,'我的收藏','',1200,623,1);
IT618_SALE("#layer_mycollect").html('');
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:mycollect", {ac:"add"},function (data, textStatus){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax"+"&formhash=1a3b0707", {ac:"collectlist_get",ac1:"pcmycollect"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618mycollectsum",tmparr1[0]);
bodytmp=bodytmp.replace("it618mycollectlist",tmparr1[1]);
bodytmp=bodytmp.replace("it618mycollectpage",tmparr1[2]);
IT618_SALE("#layer_mycollect").html(bodytmp);
laydate.render({trigger: "click",
elem: '#it618_time1'
});
laydate.render({trigger: "click",
elem: '#it618_time2'
});
}, "html");
}, "html");
});
});
function getmycollectlist(url){
IT618_SALE.get(url+"&formhash="+formhash, {ac:"collectlist_get",ac1:"pcmycollect"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_SALE("#mycollectsum").html(tmparr[0]);
IT618_SALE("#mycollectlist").html(tmparr[1]);
IT618_SALE("#mycollectpage").html(tmparr[2]);
}, "html");
}
function setcollect(pid,flag){
if(flag==0){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax&"+"pid="+pid+"&formhash="+formhash, {ac:"addcollect"},function (data, textStatus){
alert(data);
}, "html");
}else if(flag==1){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax&"+"pid="+pid+"&formhash="+formhash, {ac:"delcollect"},function (data, textStatus){
alert(data);
}, "html");
}else{
var chk_sel = document.getElementsByName("chk_sel");
var selids='';
for(i=0;i= 0 && charCode <= 128) realLength += 1;
else realLength += 2;
}
return realLength;
}
function getstrlenspan(str){
var strlen=getstrlen(str);
if(strlen<5){document.getElementById('strlentips').innerHTML='';return;}
if(strlen>400){document.getElementById('strlentips').innerHTML='';return;}
document.getElementById('strlentips').innerHTML=''+strlen+'';
}
var sqlurl="";
function getmysalelist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_SALE.get(url+sqlurl+"&formhash=1a3b0707", {ac:"salelist_get",ac1:"pcmysale"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_SALE("#mysalesum").html(tmparr[0]);
IT618_SALE("#mysalelist").html(tmparr[1]);
IT618_SALE("#mysalepage").html(tmparr[2]);
IT618_SALE("#myjfcount").html(tmparr[3]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
var it611128fdsf123="28818da001b8a9ef31a13f7220baf338";
function searchmysale(){
if(parseInt(document.getElementById("it618_time1").value.replace(/-/g,""))>parseInt(document.getElementById("it618_time2").value.replace(/-/g,""))){
alert("开始日期不能大于截止日期!");
return false;
}
var mysalepname=document.getElementById("mysalepname").value;
var mysalestate=document.getElementById("mysalestate").value;
var it618_time1=document.getElementById("it618_time1").value;
var it618_time2=document.getElementById("it618_time2").value;
sqlurl="&pname="+mysalepname+"&state="+mysalestate+"&it618_time1="+it618_time1+"&it618_time2="+it618_time2;
var url="https://www.gt-t8.com/plugin.php?id=it618_sale:ajax";
getmysalelist(url);
document.getElementById("mysaleurl").value=url;
}
function delsale(saleid){
if(confirm("确定要取消交易?取消交易后积分自动退还,此操作不可逆!")){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax"+"&saleid="+saleid+"&formhash="+formhash,{ac:"delsale"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
getmysalelist(document.getElementById("mysaleurl").value);
}else{
alert(data);
}
}, "html");
}
}
function tuihuo(saleid){
if(confirm("确定要申请退货?此操作不可逆!")){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax"+"&saleid="+saleid+"&formhash="+formhash,{ac:"tuihuo"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
getmysalelist(document.getElementById("mysaleurl").value);
}else{
alert(data);
}
}, "html");
}
}
function shouhuo(saleid){
if(confirm("确定要确认收货?此操作不可逆!")){
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax"+"&saleid="+saleid+"&formhash="+formhash,{ac:"shouhuo"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
getmysalelist(document.getElementById("mysaleurl").value);
}else{
alert(data);
}
}, "html");
}
}
var sqlurl="";
function getmymoneylist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mymoneylist").style.display="none";
IT618_SALE.get(url+sqlurl+"&formhash="+formhash, {ac:"moneylist_get",ac1:"pcmymoney"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_SALE("#mymoneysum").html(tmparr[0]);
IT618_SALE("#mymoneylist").html(tmparr[1]);
IT618_SALE("#mymoneypage").html(tmparr[2]);
IT618_SALE("#myjfcount").html(tmparr[3]);
document.getElementById("mymoneyurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mymoneylist").style.display="";
}, "html");
}
function searchmymoney(){
if(parseInt(document.getElementById("it618_time1").value.replace(/-/g,""))>parseInt(document.getElementById("it618_time2").value.replace(/-/g,""))){
alert("开始日期不能大于截止日期!");
return false;
}
var mymoneypname=document.getElementById("mymoneypname").value;
var it618_time1=document.getElementById("it618_time1").value;
var it618_time2=document.getElementById("it618_time2").value;
sqlurl="&pname="+mymoneypname+"&it618_time1="+it618_time1+"&it618_time2="+it618_time2;
var url="https://www.gt-t8.com/plugin.php?id=it618_sale:ajax";
getmymoneylist(url);
document.getElementById("mymoneyurl").value=url;
}
function findmoney(){
var saleid=document.getElementById("saleid").value;
if(saleid==''){
alert('抱歉,请输入订单号!');
document.getElementById("saleid").focus();
return;
}
IT618_SALE.get("https://www.gt-t8.com/plugin.php?id=it618_sale:ajax"+"&saleid="+saleid+"&formhash="+formhash,{ac:"findmoney"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
getmymoneylist(document.getElementById("mymoneyurl").value);
}else{
alert(data);
}
}, "html");
}