// JavaScript Document
var lang1="请输入商品关键词";
var lang2="抱歉,你的浏览器不支持此操作。\n请使用按键 Ctrl+D 收藏网站。";
function sendmsg(msgid,msgvalue){
document.getElementById(msgid).innerHTML=msgvalue;
setTimeout('sendmsg1("'+msgid+'")',8000);
}
function sendmsg1(msgid){
document.getElementById(msgid).innerHTML="";
}
function savarenzheng(){
if(document.getElementById("it618_area2_id").value==0){
alert("请选择商家地区!");
return false;
}
if(document.getElementById("it618_name").value==""){
alert("请填写商家名称!");
document.getElementById("it618_name").focus();
return false;
}
if(document.getElementById("it618_tel").value==""){
alert("请填写联系电话!");
document.getElementById("it618_tel").focus();
return false;
}
if(document.getElementById("it618_addr").value==""){
alert("请填写商家地址!");
document.getElementById("it618_addr").focus();
return false;
}
IT618_TUAN.post("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&ac=renzheng&formhash=ff6e4fb3",IT618_TUAN("#it618_renzheng").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[1]=="ok"){
document.getElementById("ul1").style.display="none";
document.getElementById("ul2").style.display="";
}else if(tmparr[1]=="vipok"){
alert("您是商家VIP,已为您自动审核通过!点击确定,自动进入商家后台!");
location.href=tmparr[2];
}else{
alert(data);
//IT618_TUAN(".aboutbody").html(data);
}
}, "html");
}
function getarea(it618_area1_id){
IT618_TUAN("#it618_area2_id").html('');
if(it618_area1_id>0){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&it618_area1_id="+it618_area1_id+"&formhash=ff6e4fb3", {ac:"getarea"},function (data, textStatus){
IT618_TUAN("#it618_area2_id").html(data);
}, "html");
}
}
function templatestyle(stylename){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax&stylename="+stylename+"&formhash=ff6e4fb3", {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_TUAN(window).height()*0.82){
height=IT618_TUAN(window).height()*0.82;
}
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_TUAN.ajaxSetup({cache:false});
var saleaddid;
IT618_TUAN(document).ready(function() {
//d9ae3dfd64b0093962e8b5f681cd817d
IT618_TUAN(".renzheng").click(function(){
it618_members_login();return;
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:showrenzheng", {ac:"add"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('renzheng',1,tmparr[0],tmparr[1],1100,550,1);
}, "html");
});
//937e1884765be66d20802891b9a5f078
IT618_TUAN("#mysale").click(function(){
showlayerwin('mysale',1,'我的交易','',1200,623,1);
IT618_TUAN("#layer_mysale").html('');
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:mysale", {ac:"add"},function (data, textStatus){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&formhash=ff6e4fb3", {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_TUAN("#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");
});
//1800f424cffe1dcc215974483cf441a7
IT618_TUAN("#myorder").click(function(){
showlayerwin('myorder',1,'我的订购','',1200,623,1);
IT618_TUAN("#layer_myorder").html('');
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:myorder", {ac:"add"},function (data, textStatus){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&formhash=ff6e4fb3", {ac:"orderlist_get",ac1:"pcmyorder"},function (data1, textStatus){
var tmparr1=data1.split("it618_split");
var bodytmp=data;
bodytmp=bodytmp.replace("it618myordersum",tmparr1[0]);
bodytmp=bodytmp.replace("it618myorderlist",tmparr1[1]);
bodytmp=bodytmp.replace("it618myorderpage",tmparr1[2]);
bodytmp=bodytmp.replace("it618myjfcount",tmparr1[3]);
IT618_TUAN("#layer_myorder").html(bodytmp);
laydate.render({trigger: "click",
elem: '#it618_time1'
});
laydate.render({trigger: "click",
elem: '#it618_time2'
});
}, "html");
}, "html");
});
});
var it611128123="5eb1c46b0ffa3e10f236e3377a96b57d";
var pjtype;
function setsalepj(saleid){
pjtype='salepj';
setsalepjtmp(saleid);
}
function setsalesdpj(saleid){
pjtype='salesdpj';
setsalepjtmp(saleid);
}
var K;
KindEditor.ready(function(ktmp) {
K=ktmp;
});
var ispjpicdel=0;
var ish5oss=0;
function setsalepjtmp(saleid){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:salepj"+"&saleid="+saleid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('getsalepj',1,tmparr[0],tmparr[1],523,398,0);
var editor = K.editor({
uploadJson : 'source/plugin/it618_tuan/kindeditor/php/upload_json.php?uid='+tmparr[4]+'&imgwidth=680',
fileManagerJson : 'source/plugin/it618_tuan/kindeditor/php/file_manager_json.php?uid='+tmparr[4],
allowFileManager : true
});
K('#pjpic_addbtn').click(function() {
if(document.getElementById("pjpiccount").value>=5){
return;
}
if(ish5oss==1){
getimagejs(pjtype,saleid);
}else{
editor.loadPlugin('image', function() {
editor.plugin.imageDialog({
showRemote : false,
clickFn : function(url, title, width, height, border, align) {
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&ac="+pjtype+"&saleid="+saleid+"&picurl="+url+"&formhash=ff6e4fb3",{ac1:"addpjpic"},function (data, textStatus){
getpjpic(saleid);
}, "html");
editor.hideDialog();
}
});
var dlgh=K(".ke-dialog-default").height;
var dlgw=K(".ke-dialog-default").width;
var ntop=(window.innerHeight-dlgh)/2;
var nleft=(window.innerWidth-dlgw)/2;
K(".ke-dialog-default").css({"top":ntop,"left":nleft});
});
}
});
getpjpic(saleid);
starh('.sp_a','.ias');
starh('.sp_b','.ibs');
starh('.sp_c','.ics');
starh('.sp_d','.ids');
if(tmparr[3]!='')window.eval(tmparr[3]);
IT618_TUAN('.ns-sub-a').click(function(){
if (IT618_TUAN('.doo').find('span').hasClass('mag')){
IT618_TUAN('.doo .mag').show();
}else{
var it618_content=document.getElementById("pjvalue").value;
if(getstrlen(it618_content)<5){
alert("评价内容字数至少5个!");
return false;
}
if(getstrlen(it618_content)>400){
alert("评价内容字数最多400个!");
return false;
}
if(confirm(tmparr[2])){
var score1 = IT618_TUAN('.sp_a').find('a').filter('.ns-sider-star').length;
var score2 = IT618_TUAN('.sp_b').find('a').filter('.ns-sider-star').length;
var score3 = IT618_TUAN('.sp_c').find('a').filter('.ns-sider-star').length;
var score4 = IT618_TUAN('.sp_d').find('a').filter('.ns-sider-star').length;
var score=score1+'@'+score2+'@'+score3+'@'+score4;
document.getElementById("pjvalue").value=it618_content.replace(/\n/g,"[br]");
IT618_TUAN.post("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&ac="+pjtype+"&saleid="+saleid+"&score="+score+"&formhash=ff6e4fb3",IT618_TUAN("#it618_salepj").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
layer.close(layerclose['getsalepj']);
if(pjtype=='salepj'){
getmysalelist(document.getElementById("mysaleurl").value);
}else{
if(ispj==1){
getsalelist(salelisturl);
getpjlist(pjlisturl);
}else{
location.reload();
}
}
}else if(tmparr[0]=="editok"){
alert(tmparr[1]);
layer.close(layerclose['getsalepj']);
getpjlist(pjurl);
}else{
alert(data);
}
}, "html");
}
}
})
IT618_TUAN('.ns-sub-b').click(function(){
layer.close(layerclose['getsalepj']);
})
}, "html");
}
var it61dsd1128123="e23ca9f5c9fdb6c23d4878f4ed9eae26";
function hfsalepj(saleid){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:hfsalepj"+"&saleid="+saleid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('gethfsalepj',1,tmparr[0],tmparr[1],523,398,0);
IT618_TUAN('.ns-sub-a').click(function(){
var it618_content=document.getElementById("hfvalue").value;
if(it618_content==''){
alert("抱歉,请输入评价回复内容!");
return;
}
if(confirm("确定要提交评价回复内容?")){
document.getElementById("hfvalue").value=it618_content.replace(/\n/g,"[br]");
IT618_TUAN.post("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&ac=hfsalepj&saleid="+saleid+"&formhash=ff6e4fb3",IT618_TUAN("#it618_hfsalepj").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
layer.close(layerclose['gethfsalepj']);
getpjlist(pjurl);
}else{
alert(data);
}
}, "html");
}
})
IT618_TUAN('.ns-sub-b').click(function(){
layer.close(layerclose['gethfsalepj']);
})
}, "html");
}
function setsaletui(saleid){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:saletui"+"&saleid="+saleid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('getsaletui',1,tmparr[0],tmparr[1],523,398,0);
IT618_TUAN('.ns-sub-a').click(function(){
if(it618_content=document.getElementById("tuivalue").value==''){
alert("抱歉,请输入申请退款原因!");
return;
}
if(confirm("确定要申请退款?")){
IT618_TUAN.post("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&ac=saletui&saleid="+saleid+"&formhash=ff6e4fb3",IT618_TUAN("#it618_saletui").serialize(),function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
layer.close(layerclose['getsaletui']);
getmysalelist(document.getElementById("mysaleurl").value);
}else{
alert(data);
}
}, "html");
}
})
IT618_TUAN('.ns-sub-b').click(function(){
layer.close(layerclose['getsaletui']);
})
}, "html");
}
function setsalekm(saleid){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:salekm"+"&saleid="+saleid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('getsalekm',1,tmparr[0],tmparr[1],620,390,0);
}, "html");
}
function it618_getkd(kdid){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_members:getkd"+"&kdid="+kdid, {ac:"it618"},function (data, textStatus){
var tmparr=data.split("it618_split");
showlayerwin('getsalekd',1,tmparr[0],tmparr[1],760,480,0);
}, "html");
}
function starh(spans,ia){
var _span=IT618_TUAN(spans);
var _star=_span.find('a');
var _ias=IT618_TUAN(ia);
var _i=_ias.find('i');
_star.hover(function(){
var index=_span.index(this);
var indexs=_star.index(this);
if (_i.hasClass('ns-star-tag'))
{return;}
else {
_ias.eq(index).addClass('ns-star-tags');
_i.removeClass('ns-star-tags');
_i.eq(indexs).addClass('ns-star-tags');
}
IT618_TUAN(this).addClass('ns-sider-starc');
IT618_TUAN(this).prevAll().addClass('ns-sider-starc');
IT618_TUAN(this).nextAll().removeClass('ns-sider-starc');
},function(){
_star.removeClass('ns-sider-starc');
_ias.removeClass('ns-star-tags');
_i.removeClass('ns-star-tags');
})
_star.click(function(){
var index=_span.index(this);
var indexs=_star.index(this);
_i.removeClass('ns-star-tag');
_i.eq(indexs).addClass('ns-star-tag');
_ias.eq(index).addClass('ns-star-tag');
IT618_TUAN(this).addClass('ns-sider-star');
IT618_TUAN(this).prevAll().addClass('ns-sider-star');
IT618_TUAN(this).nextAll().removeClass('ns-sider-star');
IT618_TUAN(this).parents('li').removeClass('doo');
var sb=IT618_TUAN(this).parents('li').find('span');
var sa=sb.eq(2).hide();
})
}
function getbigpjpic(saleid,bigpjpic){
IT618_TUAN("#bigpjpic"+saleid).html("");
IT618_TUAN("#bigpjpic"+saleid).show();
}
function hidebigpjpic(obj){
obj.style.display='none';
}
function delpjpic(saleid,pjpicid){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&ac="+pjtype+"&saleid="+saleid+"&pjpicid="+pjpicid+"&formhash=ff6e4fb3",{ac1:"delpjpic"},function (data, textStatus){
getpjpic(saleid);
}, "html");
}
function getpjpic(saleid){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&saleid="+saleid+"&formhash=ff6e4fb3", {ac:"getpjpic"},function (data, textStatus){
IT618_TUAN("#divpjpic").html(data);
}, "html");
}
function getstrlen(str) {
var realLength = 0, len = str.length, charCode = -1;
for (var i = 0; i < len; i++) {
charCode = str.charCodeAt(i);
if (charCode >= 0 && charCode <= 128) realLength += 1;
else realLength += 2;
}
return realLength;
}
function getstrlenspan(str){
var strlen=getstrlen(str);
if(strlen<5){document.getElementById('strlentips').innerHTML='评价内容字数至少5个!';return;}
if(strlen>400){document.getElementById('strlentips').innerHTML='评价内容字数最多400个!';return;}
document.getElementById('strlentips').innerHTML='您输入了'+strlen+'个字!';
}
var sqlurl1="";
function getmyorderlist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_TUAN.get(url+sqlurl1+"&formhash=ff6e4fb3", {ac:"orderlist_get",ac1:"pcmyorder"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_TUAN("#mysalesum").html(tmparr[0]);
IT618_TUAN("#mysalelist").html(tmparr[1]);
IT618_TUAN("#mysalepage").html(tmparr[2]);
IT618_TUAN("#myjfcount").html(tmparr[3]);
document.getElementById("myorderurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
function searchmyorder(){
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;
sqlurl1="&pname="+mysalepname+"&state="+mysalestate+"&it618_time1="+it618_time1+"&it618_time2="+it618_time2;
url="https://mahayu.vip/plugin.php?id=it618_tuan:ajax";
getmyorderlist(url);
document.getElementById("myorderurl").value=url;
}
var sqlurl="";
function getmysalelist(url){
document.getElementById("img_loading").style.display="";
document.getElementById("mysalelist").style.display="none";
IT618_TUAN.get(url+sqlurl+"&formhash=ff6e4fb3", {ac:"salelist_get",ac1:"pcmysale"},function (data, textStatus){
var tmparr=data.split("it618_split");
IT618_TUAN("#mysalesum").html(tmparr[0]);
IT618_TUAN("#mysalelist").html(tmparr[1]);
IT618_TUAN("#mysalepage").html(tmparr[2]);
IT618_TUAN("#myjfcount").html(tmparr[3]);
document.getElementById("mysaleurl").value=url;
document.getElementById("img_loading").style.display="none";
document.getElementById("mysalelist").style.display="";
}, "html");
}
var it611128fdsf123="188dd459f4b8752b9c16492faf6f9d46";
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 mysaletype=document.getElementById("mysaletype").value;
var it618_time1=document.getElementById("it618_time1").value;
var it618_time2=document.getElementById("it618_time2").value;
sqlurl="&pname="+mysalepname+"&state="+mysalestate+"&saletype="+mysaletype+"&it618_time1="+it618_time1+"&it618_time2="+it618_time2;
url="https://mahayu.vip/plugin.php?id=it618_tuan:ajax";
getmysalelist(url);
document.getElementById("mysaleurl").value=url;
}
function delorder(orderid){
if(confirm("确定要取消订单?此操作不可逆!")){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&orderid="+orderid+"&formhash=ff6e4fb3", {ac:"delorder"},function (data, textStatus){
var tmparr=data.split("it618_split");
if(tmparr[0]=="ok"){
alert(tmparr[1]);
getmyorderlist(document.getElementById("myorderurl").value);
}else{
alert(data);
}
}, "html");
}
}
function tuikuan(saleid){
if(confirm("确定要申请随时退款?此操作不可逆。")){
IT618_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&saleid="+saleid+"&formhash=ff6e4fb3", {ac:"tuikuan"},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_TUAN.get("https://mahayu.vip/plugin.php?id=it618_tuan:ajax"+"&saleid="+saleid+"&formhash=ff6e4fb3", {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");
}
}