// 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("ts_area2_id").value==0){ alert("请选择商家地区!"); return false; } if(document.getElementById("ts_name").value==""){ alert("请填写商家名称!"); document.getElementById("ts_name").focus(); return false; } if(document.getElementById("ts_tel").value==""){ alert("请填写联系电话!"); document.getElementById("ts_tel").focus(); return false; } if(document.getElementById("ts_addr").value==""){ alert("请填写商家地址!"); document.getElementById("ts_addr").focus(); return false; } YAOYI.post("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&ac=renzheng&formhash=79706280",YAOYI("#ts_renzheng").serialize(),function (data, textStatus){ var tmparr=data.split("ts_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); YAOYI(".aboutbody").html(data); } }, "html"); } function getarea(ts_area1_id){ YAOYI("#ts_area2_id").html(''); if(ts_area1_id>0){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&ts_area1_id="+ts_area1_id+"&formhash=79706280", {ac:"getarea"},function (data, textStatus){ YAOYI("#ts_area2_id").html(data); }, "html"); } } var layerclose = {}; function showlayerwin(tstype,type,title,content,width,height){ if(type==1){ content='
'+content+'
'; } if(tstype=='renzheng'||tstype=='pay'||tstype=='orderbuy'||tstype=='showgoods'){ var maxmin=false; var shade=0.3; }else{ var maxmin=true; var shade=false; } layerclose[tstype]=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){ } }); } YAOYI.ajaxSetup({cache:false}); var saleaddid; $(document).ready(function() { $(".renzheng").click(function(){ if(confirm('抱歉,请先登录!也可以点确定直接跳转到登录页面!')){ location.href="member.php?mod=logging&action=login"; return; }else{ return; } YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:showrenzheng", {ac:"add"},function (data, textStatus){ var tmparr=data.split("ts_split"); showlayerwin('renzheng',1,tmparr[0],tmparr[1],1100,550); }, "html"); }); //33848f05b39ff98e65bbebd916c90e6d $("#mysale").click(function(){ showlayerwin('mysale',1,'我的交易','',1200,610); $("#layer_mysale").html(''); YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:mysale", {ac:"add"},function (data, textStatus){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&formhash=79706280", {ac:"salelist_get",ac1:"pcmysale"},function (data1, textStatus){ var tmparr1=data1.split("ts_split"); var bodytmp=data; bodytmp=bodytmp.replace("tsmysalesum",tmparr1[0]); bodytmp=bodytmp.replace("tsmysalelist",tmparr1[1]); bodytmp=bodytmp.replace("tsmysalepage",tmparr1[2]); bodytmp=bodytmp.replace("tsmyjfcount",tmparr1[3]); $("#layer_mysale").html(bodytmp); laydate.render({ elem: '#ts_time1' }); laydate.render({ elem: '#ts_time2' }); if(saleaddid>0)setsalekm(saleaddid); saleaddid=0; }, "html"); }, "html"); }); //99adbb7b3160d78a500c4188aa7cbdb9 $("#myorder").click(function(){ showlayerwin('myorder',1,'我的订购','',1200,610); $("#layer_myorder").html(''); YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:myorder", {ac:"add"},function (data, textStatus){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&formhash=79706280", {ac:"orderlist_get",ac1:"pcmyorder"},function (data1, textStatus){ var tmparr1=data1.split("ts_split"); var bodytmp=data; bodytmp=bodytmp.replace("tsmyordersum",tmparr1[0]); bodytmp=bodytmp.replace("tsmyorderlist",tmparr1[1]); bodytmp=bodytmp.replace("tsmyorderpage",tmparr1[2]); bodytmp=bodytmp.replace("tsmyjfcount",tmparr1[3]); $("#layer_myorder").html(bodytmp); laydate.render({ elem: '#ts_time1' }); laydate.render({ elem: '#ts_time2' }); }, "html"); }, "html"); }); }); var it611128123="956021c387215e80937b0a9a6788dfae"; var dialog_salepj,dialog_hfsalepj,salepjid=0; KindEditor.ready(function(K) {K('#salepj').click(function() { getsalepj(K); });}); KindEditor.ready(function(K) {K('#hfsalepj').click(function() { gethfsalepj(K); });}); var dialog_saletui,saletuiid=0; KindEditor.ready(function(K) {K('#saletui').click(function() { getsaletui(K); });}); var dialog_salekm,salekmid=0; KindEditor.ready(function(K) {K('#salekm').click(function() { getsalekm(K); });}); var dialog_salekd,salekdid=0; KindEditor.ready(function(K) {K('#salekd').click(function() { getsalekd(K); });}); var pjtype; function setsalesdpj(saleid){ if(salepjid==0){ salepjid=saleid; pjtype='salesdpj'; YAOYI("#salepj").click(); } } function setsalepj(saleid){ if(salepjid==0){ salepjid=saleid; pjtype='salepj'; YAOYI("#salepj").click(); } } var it61dsd1128123="5f0fa7689e37cf1cc5c944e8e7b5fa98"; function hfsalepj(saleid){ if(salepjid==0){ salepjid=saleid; YAOYI("#hfsalepj").click(); } } function setsaletui(saleid){ if(saletuiid==0){ saletuiid=saleid; YAOYI("#saletui").click(); } } function setsalekm(saleid){ if(salekmid==0){ salekmid=saleid; YAOYI("#salekm").click(); } } function ts_getkd(kdid){ if(salekdid==0){ salekdid=kdid; YAOYI("#salekd").click(); } } function starh(spans,ia){ var _span=YAOYI(spans); var _star=_span.find('a'); var _ias=YAOYI(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'); } YAOYI(this).addClass('ns-sider-starc'); YAOYI(this).prevAll().addClass('ns-sider-starc'); YAOYI(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'); YAOYI(this).addClass('ns-sider-star'); YAOYI(this).prevAll().addClass('ns-sider-star'); YAOYI(this).nextAll().removeClass('ns-sider-star'); YAOYI(this).parents('li').removeClass('doo'); var sb=YAOYI(this).parents('li').find('span'); var sa=sb.eq(2).hide(); }) } var ispjpicdel=0; function getsalepj(K){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:salepj"+"&saleid="+salepjid, {ac:"ts"},function (data, textStatus){ var tmparr=data.split("ts_split"); dialog_salepj = K.dialog({ width : 520, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_salepj.remove(); salepjid=0; } } }); var editor = K.editor({ uploadJson : 'source/plugin/yaoyi/kindeditor/php/upload_json.php?uid='+tmparr[4]+'&imgwidth=680', fileManagerJson : 'source/plugin/yaoyi/kindeditor/php/file_manager_json.php?uid='+tmparr[4], allowFileManager : true }); K('#pjpic_addbtn').click(function() { if(document.getElementById("pjpiccount").value>=5){ return; } editor.loadPlugin('image', function() { editor.plugin.imageDialog({ showRemote : false, clickFn : function(url, title, width, height, border, align) { YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&ac="+pjtype+"&saleid="+salepjid+"&picurl="+url+"&formhash=79706280",{ac1:"addpjpic"},function (data, textStatus){ getpjpic(salepjid); }, "html"); editor.hideDialog(); } }); }); }); getpjpic(salepjid); starh('.sp_a','.ias'); starh('.sp_b','.ibs'); starh('.sp_c','.ics'); starh('.sp_d','.ids'); if(tmparr[3]!='')window.eval(tmparr[3]); YAOYI('.ns-sub-a').click(function(){ if (YAOYI('.doo').find('span').hasClass('mag')){ YAOYI('.doo .mag').show(); }else{ var ts_content=document.getElementById("pjvalue").value; if(getstrlen(ts_content)<5){ alert("评价内容字数至少5个!"); return false; } if(getstrlen(ts_content)>400){ alert("评价内容字数最多400个!"); return false; } if(confirm(tmparr[2])){ var score1 = YAOYI('.sp_a').find('a').filter('.ns-sider-star').length; var score2 = YAOYI('.sp_b').find('a').filter('.ns-sider-star').length; var score3 = YAOYI('.sp_c').find('a').filter('.ns-sider-star').length; var score4 = YAOYI('.sp_d').find('a').filter('.ns-sider-star').length; var score=score1+'@'+score2+'@'+score3+'@'+score4; document.getElementById("pjvalue").value=ts_content.replace(/\n/g,"[br]"); YAOYI.post("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&ac="+pjtype+"&saleid="+salepjid+"&score="+score+"&formhash=79706280",YAOYI("#ts_salepj").serialize(),function (data, textStatus){ var tmparr=data.split("ts_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); dialog_salepj.remove(); if(pjtype=='salepj'){ getmysalelist(document.getElementById("mysaleurl").value); }else{ if(ispj==1){ getsalelist(salelisturl); getpjlist(pjlisturl); }else{ location.reload(); } } salepjid=0; }else if(tmparr[0]=="editok"){ alert(tmparr[1]); dialog_salepj.remove(); getpjlist(pjurl); salepjid=0; }else{ alert(data); } }, "html"); } } }) YAOYI('.ns-sub-b').click(function(){ dialog_salepj.remove(); salepjid=0; }) }, "html"); } function getbigpjpic(saleid,bigpjpic){ YAOYI("#bigpjpic"+saleid).html(""); YAOYI("#bigpjpic"+saleid).show(); } function hidebigpjpic(obj){ obj.style.display='none'; } function delpjpic(saleid,pjpicid){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&ac="+pjtype+"&saleid="+saleid+"&pjpicid="+pjpicid+"&formhash=79706280",{ac1:"delpjpic"},function (data, textStatus){ getpjpic(saleid); }, "html"); } function getpjpic(saleid){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&saleid="+saleid+"&formhash=79706280", {ac:"getpjpic"},function (data, textStatus){ YAOYI("#divpjpic").html(data); }, "html"); } function gethfsalepj(K){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:hfsalepj"+"&saleid="+salepjid, {ac:"ts"},function (data, textStatus){ var tmparr=data.split("ts_split"); dialog_hfsalepj = K.dialog({ width : 520, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_hfsalepj.remove(); salepjid=0; } } }); YAOYI('.ns-sub-a').click(function(){ var ts_content=document.getElementById("hfvalue").value; if(ts_content==''){ alert("抱歉,请输入评价回复内容!"); return; } if(confirm("确定要提交评价回复内容?")){ document.getElementById("hfvalue").value=ts_content.replace(/\n/g,"[br]"); YAOYI.post("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&ac=hfsalepj&saleid="+salepjid+"&formhash=79706280",YAOYI("#ts_hfsalepj").serialize(),function (data, textStatus){ var tmparr=data.split("ts_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); dialog_hfsalepj.remove(); getpjlist(pjurl); salepjid=0; }else{ alert(data); } }, "html"); } }) YAOYI('.ns-sub-b').click(function(){ dialog_hfsalepj.remove(); salepjid=0; }) }, "html"); } var it611dsd128123="addb8eb04f3211774b84aa27c09cb8ad"; function getsaletui(K){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:saletui"+"&saleid="+saletuiid, {ac:"ts"},function (data, textStatus){ var tmparr=data.split("ts_split"); dialog_saletui = K.dialog({ width : 520, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_saletui.remove(); saletuiid=0; } } }); YAOYI('.ns-sub-a').click(function(){ if(ts_content=document.getElementById("tuivalue").value==''){ alert("抱歉,请输入申请退款原因!"); return; } if(confirm("确定要申请退款?")){ YAOYI.post("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&ac=saletui&saleid="+saletuiid+"&formhash=79706280",YAOYI("#ts_saletui").serialize(),function (data, textStatus){ var tmparr=data.split("ts_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); dialog_saletui.remove(); getmysalelist(document.getElementById("mysaleurl").value); saletuiid=0; }else{ alert(data); } }, "html"); } }) YAOYI('.ns-sub-b').click(function(){ dialog_saletui.remove(); saletuiid=0; }) }, "html"); } function getsalekm(K){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:salekm"+"&saleid="+salekmid, {ac:"ts"},function (data, textStatus){ var tmparr=data.split("ts_split"); dialog_salekm = K.dialog({ width : 620, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_salekm.remove(); salekmid=0; } } }); }, "html"); } function getsalekd(K){} 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"; YAOYI.get(url+sqlurl1+"&formhash=79706280", {ac:"orderlist_get",ac1:"pcmyorder"},function (data, textStatus){ var tmparr=data.split("ts_split"); YAOYI("#mysalesum").html(tmparr[0]); YAOYI("#mysalelist").html(tmparr[1]); YAOYI("#mysalepage").html(tmparr[2]); YAOYI("#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("ts_time1").value.replace(/-/g,""))>parseInt(document.getElementById("ts_time2").value.replace(/-/g,""))){ alert("开始日期不能大于截止日期!"); return false; } var mysalepname=document.getElementById("mysalepname").value; var mysalestate=document.getElementById("mysalestate").value; var ts_time1=document.getElementById("ts_time1").value; var ts_time2=document.getElementById("ts_time2").value; sqlurl1="&pname="+mysalepname+"&state="+mysalestate+"&ts_time1="+ts_time1+"&ts_time2="+ts_time2; url="https://zyt.ouryao.com/plugin.php?id=yaoyi: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"; YAOYI.get(url+sqlurl+"&formhash=79706280", {ac:"salelist_get",ac1:"pcmysale"},function (data, textStatus){ var tmparr=data.split("ts_split"); YAOYI("#mysalesum").html(tmparr[0]); YAOYI("#mysalelist").html(tmparr[1]); YAOYI("#mysalepage").html(tmparr[2]); YAOYI("#myjfcount").html(tmparr[3]); document.getElementById("mysaleurl").value=url; document.getElementById("img_loading").style.display="none"; document.getElementById("mysalelist").style.display=""; }, "html"); } var it611128fdsf123="b3718d67c77b1cefdd987420a83cfba5"; function searchmysale(){ if(parseInt(document.getElementById("ts_time1").value.replace(/-/g,""))>parseInt(document.getElementById("ts_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 ts_time1=document.getElementById("ts_time1").value; var ts_time2=document.getElementById("ts_time2").value; sqlurl="&pname="+mysalepname+"&state="+mysalestate+"&saletype="+mysaletype+"&ts_time1="+ts_time1+"&ts_time2="+ts_time2; url="https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"; getmysalelist(url); document.getElementById("mysaleurl").value=url; } function delorder(orderid){ if(confirm("确定要取消订单?此操作不可逆!")){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&orderid="+orderid+"&formhash=79706280", {ac:"delorder"},function (data, textStatus){ var tmparr=data.split("ts_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); getmyorderlist(document.getElementById("myorderurl").value); }else{ alert(data); } }, "html"); } } function tuikuan(saleid){ if(confirm("确定要申请随时退款?此操作不可逆。")){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&saleid="+saleid+"&formhash=79706280", {ac:"tuikuan"},function (data, textStatus){ var tmparr=data.split("ts_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); getmysalelist(document.getElementById("mysaleurl").value); }else{ alert(data); } }, "html"); } } function shouhuo(saleid){ if(confirm("确定要确认收货?此操作不可逆。")){ YAOYI.get("https://zyt.ouryao.com/plugin.php?id=yaoyi:ajax"+"&saleid="+saleid+"&formhash=79706280", {ac:"shouhuo"},function (data, textStatus){ var tmparr=data.split("ts_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); getmysalelist(document.getElementById("mysaleurl").value); }else{ alert(data); } }, "html"); } }