"use strict";$define(["pl_util"],function(){$.extend({pl_service:function(c){var e=$.extend({data:{}},c),c="service"+ +new Date;function _(c,n,a){n=n||"";var e={};switch(c){case 1:e={key:"qq",name:"QQ",url:"tencent://message/?uin=".concat(n),id:6};break;case 2:case 3:e={key:"alww",name:i18n.service_alww,url:"http://amos.alicdn.com/getcid.aw?v=2&uid=".concat(n,"&site=cntaobao&s=2&groupid=0&charset=utf-8"),id:2==c?7:8};break;case 4:e={key:"skype",name:"Skype",url:"skype:".concat(n,"?chat"),id:9};break;case 5:e={key:"whatsapp",name:"WhatsApp",url:"https://api.whatsapp.com/send?phone=".concat(n,"&text=Hello"),id:4};break;case 6:e={key:"wx",name:i18n.service_wx,url:"",id:17};break;case 7:e={key:"qyszmp",name:i18n.service_szmp,url:"",id:16};break;case 8:e={key:"yj",name:i18n.service_yx,url:"mailto:".concat(n),id:11};break;case 9:e={key:"tel",name:"电话",url:"tel:".concat(n),id:12};break;case 10:e={key:"link",name:"链接",url:"".concat(a),id:18};break;case 11:e={key:"custom",name:"自定义",url:"".concat(a),id:""};break;case 12:e={key:"smService",name:"智慧客服",url:"".concat(a),id:1}}return e}function h(c){var n=1==e.data.tplId?"solid":"hollow";return isMo()||"number"!=typeof c?serviceIcon.hollow[c]||"":serviceIcon[n][_(c).key]||""}function t(c,u){var a=[];return c&&0'),r=""),p="".concat(o).concat(c.name).concat(r),l='
").concat(o,"").concat(c.account||c.name,"").concat(r,"
"),d="showLang",(6==c.type||7==c.type||11==c.type&&c.imageUrl)&&(a='
').concat(c.name,'
'),p='

').concat(c.name,"

"),l='
').concat(c.name,'
'),d="showImg"),v="",1==u?v='

\n ').concat(o,'').concat(e,"").concat(c.account||c.name,"").concat(r,"\n

"):2==u?v='
\n

'.concat(e,'

\n
\n
\n

\n ').concat(o,'').concat(e,"").concat(c.account||c.name,"").concat(r,"\n

\n
\n
\n ").concat(a,"\n
"):3==u?v='
\n
\n

').concat(e,'

\n
").concat(p,"
\n
\n
"):4==u?v='
\n
\n

\n ').concat(e,"\n

\n ").concat(l,"\n
\n
"):"mo"==u&&(p=" ".concat(o).concat(8===c.type?c.account:c.name," ").concat(r),(6==c.type||7==c.type||11==c.type&&c.imageUrl)&&(p='

').concat(8===c.type?c.account:c.name,"

")),e=11==c.type&&c.iconUrl?c.iconUrl:h(i.key),v='
\n
'.concat(e,'
\n
").concat(p,"
\n
")),m.push(v))}),0'.concat(m.join(""),""))}),a}-1<[1,2,3,4].indexOf(Number(e.data.tplId))&&function(c){isMo()?($("body").append(function(c){var n=t(e.data.staffGroupVOs,"mo");return'
\n
').concat(h("ccontact"),'
\n
\n
\n \n ").concat(n.join(""),' \n
\n
\n
\n
')}(c)),$(".p_defaultIocn").on("click",function(c){$(".custom-service-background").toggle(),$(".pl_content_box").toggleClass("show")}),$(".custom-service-background").on("click",function(c){$(".custom-service-background").hide(),$(".pl_content_box").removeClass("show")})):$("body").append(function(c,n){var a=t(e.data.staffGroupVOs,c);return 1==c?'
\n
\n
\n
\n

').concat(h("kf"),'

\n
\n
\n
\n
\n
\n

\n ').concat(h("kf"),"\n ").concat(i18n.service_zxkf,':\n ').concat(e.data.telephone,'\n

\n

\n ').concat(h("kf"),"\n ").concat(i18n.service_fwsj,":\n ").concat(e.data.serviceTimeStart," - ").concat(e.data.serviceTimeEnd,"\n

\n
\n ").concat(a.join(""),"\n
\n
"):2==c?'
\n
\n

').concat(h("kf"),'

\n
\n
\n

').concat(i18n.service_kfrx,':').concat(e.data.telephone,"

\n

").concat(i18n.service_fwsj,":").concat(e.data.serviceTimeStart," - ").concat(e.data.serviceTimeEnd,"

\n
\n
\n
\n ").concat(a.join(""),"\n
"):3==c?'
\n
\n
\n

').concat(h("kf"),'

\n
\n

').concat(i18n.service_rx,':').concat(e.data.telephone,"

\n

").concat(i18n.service_sj,":").concat(e.data.serviceTimeStart," - ").concat(e.data.serviceTimeEnd,"

\n
\n
\n
\n ").concat(a.join(""),"\n
"):4==c?'
\n
\n
\n

\n ').concat(h("kf"),'\n

\n
\n

').concat(i18n.service_rx,':').concat(e.data.telephone,"

\n

").concat(i18n.service_sj,":").concat(e.data.serviceTimeStart," - ").concat(e.data.serviceTimeEnd,"

\n
\n
\n
\n ").concat(a.join(""),"\n
"):void 0}(e.data.tplId,c));$(".doThirdFunc").click(function(){var c=this,n=Number($(this).attr("type")),a=$(this).attr("img"),e=$(this).attr("account");!isMo()||6!=n&&7!=n&&11!=n?function(c,n){0<$(".service_pop").length?$(".service_pop img").attr("src",$.handleDataImg(c)):$("body").append('
\n

'.concat(i18n.service_sys,'

\n ').concat(n,'\n
'));$(document).on("click",function(c){$(".service_pop").is(c.target)||0!==$(".service_pop").has(c.target).length||$(".doThirdFunc").is(c.target)||0!==$(".doThirdFunc").has(c.target).length||$(".service_pop").remove()})}(a,e):$(this).find(".chat-wraper").hasClass("show")?($(this).find(".chat-wraper").slideUp(500),$(this).find(".chat-wraper").removeClass("show")):(0==$(this).find(".chat-wraper").length&&(a=$.handleDataImg(a),$(this).append(''))),setTimeout(function(){$(c).find(".chat-wraper").slideDown()},100),$(this).find(".chat-wraper").addClass("show"))})}(c)}})});