// JavaScript Document var BROWSER = {}; var USERAGENT = navigator.userAgent.toLowerCase(); browserVersion({'ie':'msie','firefox':'','chrome':'','opera':'','safari':'','mozilla':'','webkit':'','maxthon':'','qq':'qqbrowser'}); if(BROWSER.safari) { BROWSER.firefox = true; } BROWSER.opera = BROWSER.opera ? opera.version() : 0; HTMLNODE = document.getElementsByTagName('head')[0].parentNode; if(BROWSER.ie) { BROWSER.iemode = parseInt(typeof document.documentMode != 'undefined' ? document.documentMode : BROWSER.ie); HTMLNODE.className = 'ie_all ie' + BROWSER.iemode; } var lang1='请输入商家或商品关键词'; var lang2='抱歉,你的浏览器不支持此操作。\n请使用按键 Ctrl+D 收藏拉手。'; function browserVersion(types) { var other = 1; for(i in types) { var v = types[i] ? types[i] : i; if(USERAGENT.indexOf(v) != -1) { var re = new RegExp(v + '(\\/|\\s)([\\d\\.]+)', 'ig'); var matches = re.exec(USERAGENT); var ver = matches != null ? matches[2] : 0; other = ver !== 0 && v != 'mozilla' ? 0 : other; }else { var ver = 0; } eval('BROWSER.' + i + '= ver'); } BROWSER.other = other; } function check_all(obj,id,n) { for(var i=0;i请选择二级地区'); IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&it618_area_id="+it618_area_id+""+"&formhash=68e011f4", {ac:"getbrandarea"},function (data, textStatus){ IT618_BRAND("#it618_area_id1").html(data); }, "html"); } function getbrandclass(it618_class_id){ IT618_BRAND("#it618_class_id1").html(''); IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&it618_class_id="+it618_class_id+"&formhash=68e011f4", {ac:"getbrandclass"},function (data, textStatus){ IT618_BRAND("#it618_class_id1").html(data); }, "html"); } IT618_BRAND.ajaxSetup({cache:false}); var dialog_renzheng; KindEditor.ready(function(K) {K('.renzheng').click(function() { if(confirm('抱歉,请先登录!也可以直接点确定跳转到登录页面!')){ location.href="member.php?mod=logging"+"&action=login"; return; }else{ return; } getrenzheng(K); });}); var dialog_mysale; KindEditor.ready(function(K) {K('#mysale').click(function() { getmysale(K); });}); var dialog_mysale1; KindEditor.ready(function(K) {K('#mysale1').click(function() { getmysale1(K); });}); var dialog_myorder; KindEditor.ready(function(K) {K('#myorder').click(function() { getmyorder(K); });}); var dialog_mycollect; KindEditor.ready(function(K) {K('#mycollect').click(function() { getmycollect(K); });}); var dialog_mycard; KindEditor.ready(function(K) {K('#mycard').click(function() { getmycard(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_salepj,salepjid=0; KindEditor.ready(function(K) {K('#salepj').click(function() { getsalepj(K); });}); KindEditor.ready(function(K) {K('.a-2').click(function() { getrenzheng(K); });}); var dialog_map; KindEditor.ready(function(K) {K('.brandmap').click(function() { getbrandmap(K,this); });}); KindEditor.ready(function(K) {K('.tmpbrandmap').click(function() { getbrandmap(K,this); });}); var dialog_share; KindEditor.ready(function(K) {K('.getshare').click(function() { getshare(K,this); });}); var dialog_credits; KindEditor.ready(function(K) {K("#it618_credits").click(function() { dialog_credits = K.dialog({ width : 800, height: 550, title : "积分钱包", body : '
', closeBtn : { name : "关闭", click : function(e) { dialog_credits.remove(); } } }); });}); function getrenzheng(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:showrenzheng", {ac:"add"},function (data, textStatus){ var tmparr=data.split("it618_split"); dialog_renzheng = K.dialog({ width : 1100, height: 520, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_renzheng.remove(); } } }); }, "html"); } function getmyorder(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:myorder", {ac:"add"},function (data, textStatus){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&formhash=68e011f4", {ac:"orderlist_get",ac1:"pcmyorder"},function (data1, textStatus){ var tmparr=data.split("it618_split"); var tmparr1=data1.split("it618_split"); var bodytmp=tmparr[1]; bodytmp=bodytmp.replace("it618myordersum",tmparr1[0]); bodytmp=bodytmp.replace("it618myorderlist",tmparr1[1]); bodytmp=bodytmp.replace("it618myorderpage",tmparr1[2]); bodytmp=bodytmp.replace("it618myjfcount",tmparr1[3]); dialog_myorder = K.dialog({ width : 1080, height: 628, title : tmparr[0], body : bodytmp, closeBtn : { name : '关闭', click : function(e) { dialog_myorder.remove(); } } }); }, "html"); }, "html"); } function getmycollect(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:mycollect", {ac:"add"},function (data, textStatus){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&formhash=68e011f4", {ac:"collectlist_get",ac1:"pcmycollect"},function (data1, textStatus){ var tmparr=data.split("it618_split"); var tmparr1=data1.split("it618_split"); var bodytmp=tmparr[1]; bodytmp=bodytmp.replace("it618mycollectsum",tmparr1[0]); bodytmp=bodytmp.replace("it618mycollectlist",tmparr1[1]); dialog_mycollect = K.dialog({ width : 980, height: 668, title : tmparr[0], body : bodytmp, closeBtn : { name : '关闭', click : function(e) { dialog_mycollect.remove(); } } }); }, "html"); }, "html"); } var saleaddid; function getmysale(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:mysale", {ac:"it618"},function (data, textStatus){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&formhash=68e011f4", {ac:"mysalelist_get",ac1:"pcmysale"},function (data1, textStatus){ var tmparr=data.split("it618_split"); var tmparr1=data1.split("it618_split"); var bodytmp=tmparr[1]; bodytmp=bodytmp.replace("it618_mysalesum",tmparr1[0]); bodytmp=bodytmp.replace("it618_mysalelist",tmparr1[1]); bodytmp=bodytmp.replace("it618_mysalepage",tmparr1[2]); dialog_mysale = K.dialog({ width : 1200, height: 630, title : tmparr[0], body : bodytmp, closeBtn : { name : '关闭', click : function(e) { dialog_mysale.remove(); } } }); if(saleaddid>0)setsalekm(saleaddid); saleaddid=0; }, "html"); }, "html"); } function addmycard(){ var it618_name=document.getElementById("it618_name").value; var it618_tel=document.getElementById("it618_tel").value; if(it618_tel==''){ alert("抱歉,请输入手机号!"); document.getElementById("it618_tel").focus(); return; } var reg = /^0?1[3|4|5|7|8][0-9]\d{8}$/; if (!reg.test(it618_tel)) { alert("抱歉,您的手机号码不是有效的11位手机号码!"); document.getElementById("it618_tel").focus(); return; } if(confirm("确定要提交申请?请确定您的手机号正确!")){ IT618_BRAND.post("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&it618_name="+it618_name+"&it618_tel="+it618_tel+"&formhash=68e011f4", {ac:"addmycard"},function (data, textStatus){ var tmparr=data.split("it618_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); dialog_mycard.remove(); document.getElementById('mycard').click(); }else{ alert(data); } }, "html"); } } function editcardname(cid){ var it618_name=document.getElementById("it618_name").value; IT618_BRAND.post("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&cid="+cid+"&it618_name="+it618_name+"&formhash=68e011f4", {ac:"editcardname"},function (data, textStatus){ var tmparr=data.split("it618_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); dialog_mycard.remove(); document.getElementById('mycard').click(); }else{ alert(data); } }, "html"); } function getmycard(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:mycard", {ac:"it618"},function (data, textStatus){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&formhash=68e011f4", {ac:"mycardmoney_get"},function (data1, textStatus){ var tmparr=data.split("it618_split"); var tmparr1=data1.split("it618_split"); var bodytmp=tmparr[1]; bodytmp=bodytmp.replace("it618_mysalesum",tmparr1[0]); bodytmp=bodytmp.replace("it618_mysalelist",tmparr1[1]); bodytmp=bodytmp.replace("it618_mysalepage",tmparr1[2]); dialog_mycard = K.dialog({ width : 900, height: 660, title : tmparr[0], body : bodytmp, closeBtn : { name : '关闭', click : function(e) { dialog_mycard.remove(); } } }); }, "html"); }, "html"); } function getmysale1(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:mysale1", {ac:"it618"},function (data, textStatus){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&formhash=68e011f4", {ac:"moneylist_get"},function (data1, textStatus){ var tmparr=data.split("it618_split"); var tmparr1=data1.split("it618_split"); var bodytmp=tmparr[1]; bodytmp=bodytmp.replace("it618_mysalesum",tmparr1[0]); bodytmp=bodytmp.replace("it618_mysalelist",tmparr1[1]); bodytmp=bodytmp.replace("it618_mysalepage",tmparr1[2]); dialog_mysale1 = K.dialog({ width : 900, height: 580, title : tmparr[0], body : bodytmp, closeBtn : { name : '关闭', click : function(e) { dialog_mysale1.remove(); } } }); }, "html"); }, "html"); } var sqlurl="";sqlurl1="";sqlurl2=""; function getmysale1list(url){ document.getElementById("img_loading").style.display=""; document.getElementById("mysalelist").style.display="none"; IT618_BRAND.get(url+sqlurl1+"&formhash=68e011f4", {ac:"moneylist_get"},function (data, textStatus){ var tmparr=data.split("it618_split"); IT618_BRAND("#mysalesum").html(tmparr[0]); IT618_BRAND("#mysalelist").html(tmparr[1]); IT618_BRAND("#mysalepage").html(tmparr[2]); document.getElementById("mysaleurl").value=url; document.getElementById("img_loading").style.display="none"; document.getElementById("mysalelist").style.display=""; }, "html"); } function searchmysale1(){ if(parseInt(document.getElementById("it618_time1").value.replace(/-/g,""))>parseInt(document.getElementById("it618_time2").value.replace(/-/g,""))){ alert("开始日期不能大于截止日期!"); return false; } var it618_shopid=document.getElementById("it618_shopid").value; var it618_time1=document.getElementById("it618_time1").value; var it618_time2=document.getElementById("it618_time2").value; url="http://www.syahsh.com/plugin.php?id=it618_brand:ajax"; sqlurl1="&it618_shopid="+it618_shopid+"&it618_time1="+it618_time1+"&it618_time2="+it618_time2; getmysale1list(url); document.getElementById("mysaleurl").value=url; } function getmycradlist(url){ IT618_BRAND.get(url+"&formhash=68e011f4", {ac:"mycardmoney_get"},function (data, textStatus){ var tmparr=data.split("it618_split"); IT618_BRAND("#mysalesum").html(tmparr[0]); IT618_BRAND("#mysalelist").html(tmparr[1]); IT618_BRAND("#mysalepage").html(tmparr[2]); }, "html"); } function getmycollectlist(url){ IT618_BRAND.get(url+"&formhash=68e011f4", {ac:"collectlist_get",ac1:"pcmycollect"},function (data, textStatus){ var tmparr=data.split("it618_split"); IT618_BRAND("#mycollectsum").html(tmparr[0]); IT618_BRAND("#mycollectlist").html(tmparr[1]); document.getElementById("mycollecurl").value=url; }, "html"); } function delcollect(){ IT618_BRAND.post("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&ac=delcollect"+"&formhash=68e011f4",IT618_BRAND("#mycollectids").serialize(),function (data, textStatus){ var tmparr=data.split("it618_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); getmycollectlist(document.getElementById("mycollecurl").value); }else{ alert(data); } }, "html"); } function getmyorderlist(url){ document.getElementById("img_loading").style.display=""; document.getElementById("mysalelist").style.display="none"; IT618_BRAND.get(url+sqlurl2+"&formhash=68e011f4", {ac:"orderlist_get",ac1:"pcmyorder"},function (data, textStatus){ var tmparr=data.split("it618_split"); IT618_BRAND("#mysalesum").html(tmparr[0]); IT618_BRAND("#mysalelist").html(tmparr[1]); IT618_BRAND("#mysalepage").html(tmparr[2]); IT618_BRAND("#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; sqlurl2="&pname="+mysalepname+"&state="+mysalestate+"&it618_time1="+it618_time1+"&it618_time2="+it618_time2; url="http://www.syahsh.com/plugin.php?id=it618_brand:ajax"; getmyorderlist(url); document.getElementById("myorderurl").value=url; } function getmysalelist(url){ document.getElementById("img_loading").style.display=""; document.getElementById("mysalelist").style.display="none"; IT618_BRAND.get(url+sqlurl+"&formhash=68e011f4", {ac:"mysalelist_get",ac1:"pcmysale"},function (data, textStatus){ var tmparr=data.split("it618_split"); IT618_BRAND("#mysalesum").html(tmparr[0]); IT618_BRAND("#mysalelist").html(tmparr[1]); IT618_BRAND("#mysalepage").html(tmparr[2]); document.getElementById("mysaleurl").value=url; document.getElementById("img_loading").style.display="none"; document.getElementById("mysalelist").style.display=""; }, "html"); } 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; url="http://www.syahsh.com/plugin.php?id=it618_brand:ajax"; sqlurl="&pname="+mysalepname+"&state="+mysalestate+"&it618_time1="+it618_time1+"&it618_time2="+it618_time2; getmysalelist(url); document.getElementById("mysaleurl").value=url; } function delorder(orderid){ if(confirm("确定要取消订单?此操作不可逆!")){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&orderid="+orderid+"&formhash=68e011f4", {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_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&saleid="+saleid+"&formhash=68e011f4", {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_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&saleid="+saleid+"&formhash=68e011f4", {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"); } } function setsaletui(saleid){ if(saletuiid==0){ saletuiid=saleid; IT618_BRAND("#saletui").click(); } } function setsalekm(saleid){ if(salekmid==0){ salekmid=saleid; IT618_BRAND("#salekm").click(); } } function setsalepj(saleid){ if(salepjid==0){ salepjid=saleid; IT618_BRAND("#salepj").click(); } } function getsalekm(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:salekm"+"&saleid="+salekmid, {ac:"it618"},function (data, textStatus){ var tmparr=data.split("it618_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 getsaletui(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:saletui"+"&saleid="+saletuiid, {ac:"it618"},function (data, textStatus){ var tmparr=data.split("it618_split"); dialog_saletui = K.dialog({ width : 550, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_saletui.remove(); saletuiid=0; } } }); IT618_BRAND('.ns-sub-a').click(function(){ if(document.getElementById("tuivalue").value==''){ alert("抱歉,请输入申请退货原因!"); document.getElementById("tuivalue").focus(); return; } if(confirm("确定要申请退货?")){ IT618_BRAND.post("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&ac=saletui"+"&saleid="+saletuiid+"&formhash=68e011f4",IT618_BRAND("#it618_saletui").serialize(),function (data, textStatus){ var tmparr=data.split("it618_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); dialog_saletui.remove(); getmysalelist(document.getElementById("mysaleurl").value); saletuiid=0; }else{ alert(data); } }, "html"); } }) IT618_BRAND('.ns-sub-b').click(function(){ dialog_saletui.remove(); saletuiid=0; }) }, "html"); } var ispjpicdel=0; function getsalepj(K){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:salepj"+"&saleid="+salepjid, {ac:"it618"},function (data, textStatus){ var tmparr=data.split("it618_split"); dialog_salepj = K.dialog({ width : 533, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_salepj.remove(); salepjid=0; } } }); if(tmparr[4]==1){ var editor = K.editor({ uploadJson : 'source/plugin/it618_brand/kindeditor/php/upload_json.php?uid='+tmparr[3]+'&imgwidth=880', fileManagerJson : 'source/plugin/it618_brand/kindeditor/php/file_manager_json.php?uid='+tmparr[3], 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) { IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&ac=salepj&saleid="+salepjid+"&picurl="+url+"&formhash=68e011f4",{ac1:"addpjpic"},function (data, textStatus){ getpjpic(salepjid); }, "html"); editor.hideDialog(); } }); }); }); getpjpic(salepjid); } IT618_BRAND('.ns-sub-a').click(function(){ if(getstrlen1(document.getElementById("pjvalue").value)<5){ alert("评价内容字数不能少于5个!"); return; } document.getElementById("pjvalue").value=document.getElementById("pjvalue").value.replace(/\n/g,"[br]"); if(confirm(tmparr[2])){ IT618_BRAND.post("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&ac=salepj"+"&saleid="+salepjid+"&formhash=68e011f4",IT618_BRAND("#it618_salepj").serialize(),function (data, textStatus){ var tmparr=data.split("it618_split"); if(tmparr[0]=="ok"){ alert(tmparr[1]); dialog_salepj.remove(); getmysalelist(document.getElementById("mysaleurl").value); salepjid=0; }else if(tmparr[0]=="editok"){ alert(tmparr[1]); dialog_salepj.remove(); getpjlist(pjurl); salepjid=0; }else{ alert(data); } }, "html"); } }) IT618_BRAND('.ns-sub-b').click(function(){ dialog_salepj.remove(); salepjid=0; }) }, "html"); } function getbigpjpic(saleid,bigpjpic){ IT618_BRAND("#bigpjpic"+saleid).html(""); IT618_BRAND("#bigpjpic"+saleid).show(); } function hidebigpjpic(obj){ obj.style.display='none'; } function delpjpic(saleid,pjpicid){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&ac=salepj&saleid="+saleid+"&pjpicid="+pjpicid+"&formhash=68e011f4",{ac1:"delpjpic"},function (data, textStatus){ getpjpic(saleid); }, "html"); } function getpjpic(saleid){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax"+"&saleid="+saleid+"&formhash=68e011f4", {ac:"getpjpic"},function (data, textStatus){ IT618_BRAND("#divpjpic").html(data); }, "html"); } function getstrlen1(str) { ///鑾峰緱瀛楃涓插疄闄呴暱搴︼紝涓枃2锛岃嫳鏂1 ///瑕佽幏寰楅暱搴︾殑瀛楃涓 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 setpjcolor1(id){ document.getElementById("lab1").style.color="#000"; document.getElementById("lab2").style.color="#000"; document.getElementById("lab3").style.color="#000"; document.getElementById("lab"+id).style.color="#FF6600"; } function getbrandmap(K,obj){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:showmap"+"&sid="+obj.name, {ac:"it618"},function (data, textStatus){ var tmparr=data.split("it618_split"); dialog_map = K.dialog({ width : 980, height: 580, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_map.remove(); } } }); }, "html"); } function gethotbtn(sid){ IT618_BRAND(".tmpbrandmap").attr("name",sid); IT618_BRAND(".tmpbrandmap").click(); } function getshare(K,obj){ var tmparr=obj.id.split("it618_split"); IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:showshare&type="+tmparr[0]+"&shareid="+tmparr[1], {ac:"it618"},function (data, textStatus){ var tmparr=data.split("it618_split"); dialog_share = K.dialog({ width : 580, height: 480, title : tmparr[0], body : '
'+tmparr[1]+'
', closeBtn : { name : '关闭', click : function(e) { dialog_share.remove(); } } }); }, "html"); } var dialog_addr; KindEditor.ready(function(K) {K('#tmpaddrbtn').click(function() { IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:showaddr&type="+addrtype+"&formhash=68e011f4", {ac:"add"},function (data, textStatus){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax&formhash=68e011f4", {ac:"addr_get"},function (data1, textStatus){ dialog_addr = K.dialog({ width : 900, height: 520, title : '收货地址管理', body : '
'+data1+'
'+data+'
', closeBtn : { name : '关闭', click : function(e) { dialog_addr.remove(); if(addrtype=='gwc'){ getgwclist(); } } } }); }, "html"); }, "html"); });}); function savaaddr(action,aid){ if(action=='add'){ tmptips='addrtips'; }else{ tmptips='list_addrtips'; } if(document.getElementById("it618_name"+aid).value==""){ sendmsg(tmptips,"请输入姓名!"); return false; } if(document.getElementById("it618_tel"+aid).value==""){ sendmsg(tmptips,"请输入手机号码!"); return false; } var it618_name=document.getElementById("it618_name"+aid).value; var it618_addr=document.getElementById("it618_addr"+aid).value; var it618_tel=document.getElementById("it618_tel"+aid).value; var it618_qq=document.getElementById("it618_qq"+aid).value; var it618_yzbm=document.getElementById("it618_yzbm"+aid).value; IT618_BRAND.post("http://www.syahsh.com/plugin.php?id=it618_brand:ajax&ac=addr_"+action+"&aid="+aid+"&formhash=68e011f4","it618_name="+it618_name+"&it618_addr="+it618_addr+"&it618_tel="+it618_tel+"&it618_qq="+it618_qq+"&it618_yzbm="+it618_yzbm,function (data, textStatus){ sendmsg(tmptips,data); getaddr(); }, "html"); } function getaddr(){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax&formhash=68e011f4", {ac:"addr_get"},function (data, textStatus){ IT618_BRAND("#addrlist").html(data); }, "html"); } function defaultaddr(aid){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax&aid="+aid+"&formhash=68e011f4", {ac:"addr_default"},function (data, textStatus){ getaddr(); sendmsg('list_addrtips',data); }, "html"); } function deladdr(aid){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax&aid="+aid+"&formhash=68e011f4", {ac:"addr_del"},function (data, textStatus){ getaddr(); sendmsg('list_addrtips',data); }, "html"); } function _attachEvent(obj, evt, func, eventobj) { eventobj = !eventobj ? obj : eventobj; if(obj.addEventListener) { obj.addEventListener(evt, func, false); } else if(eventobj.attachEvent) { obj.attachEvent('on' + evt, func); } } function showTopLink() { if(document.getElementById('body_wrap')){ var viewPortHeight = parseInt(document.documentElement.clientHeight); var scrollHeight = parseInt(document.body.getBoundingClientRect().top); var basew = parseInt(document.getElementById('body_wrap').clientWidth); var sw = document.getElementById('scrolltop').clientWidth; if (basew < 1000) { var left = parseInt(fetchOffset(document.getElementById('body_wrap'))['left']); left = left < sw ? left * 2 - sw : left; document.getElementById('scrolltop').style.left = ( basew + left ) + 'px'; } else { document.getElementById('scrolltop').style.left = 'auto'; document.getElementById('scrolltop').style.right = 0; } if (BROWSER.ie && BROWSER.ie < 7) { document.getElementById('scrolltop').style.top = viewPortHeight - scrollHeight - 150 + 'px'; } if (scrollHeight < -100) { document.getElementById('scrolltop').style.visibility = 'visible'; } else { document.getElementById('scrolltop').style.visibility = 'hidden'; } } } function fetchOffset(obj, mode) { var left_offset = 0, top_offset = 0, mode = !mode ? 0 : mode; if(obj.getBoundingClientRect && !mode) { var rect = obj.getBoundingClientRect(); var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop); var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft); if(document.documentElement.dir == 'rtl') { scrollLeft = scrollLeft + document.documentElement.clientWidth - document.documentElement.scrollWidth; } left_offset = rect.left + scrollLeft - document.documentElement.clientLeft; top_offset = rect.top + scrollTop - document.documentElement.clientTop; } if(left_offset <= 0 || top_offset <= 0) { left_offset = obj.offsetLeft; top_offset = obj.offsetTop; while((obj = obj.offsetParent) != null) { position = getCurrentStyle(obj, 'position', 'position'); if(position == 'relative') { continue; } left_offset += obj.offsetLeft; top_offset += obj.offsetTop; } } return {'left' : left_offset, 'top' : top_offset}; } function brandmode(){ IT618_BRAND.get("http://www.syahsh.com/plugin.php?id=it618_brand:ajax&formhash=68e011f4", {ac:"brandmode"},function (data, textStatus){ if(data=="ok"){ location.reload(); } }, "html"); }