News新闻

业界新闻动态、技术前沿
Who are we?

您的位置:首页      乐道系统FAQ      乐道企业网站系统增加在线互动工具功能

乐道企业网站系统增加在线互动工具功能

发布日期:2014-02-28 00:00:00 646

增加功能初衷:使企业用户使用更方便,添加或者更改在线客服更方便,不需要更改程序代码。

增加对象

1、skype

2、msn

3、旺旺

4、二维码

 

此处四个功能在前台显示地方为

1、右侧移动在线客服

2、底部联系方式

如图所示

css({top:opts.kftop+”px”,”z-index”:opts.z});if(!opts.defshow){$lrkfwarp.removeClass(“lrkfshow”).css({right:-$lrkfwarp_w})}var json={options:opts.qqs};json=eval(json.options);$.each(json,function(i,o){$kflist.append(“<li><a target=_blank href=http://wpa.qq.com/msgrd?v=3&uin=”+o.qq+”&site=qq&menu=yes><img src=http://wpa.qq.com/pa?p=2:”+o.qq+”:45>”+o.name+”</a></li>”)});var json_skype={options:opts.skype};json_skype=eval(json_skype.options);$.each(json_skype,function(i,o){$kflist.append(“<li><a href=’skype:”+o.skype+”?call’ onclick=’return skypeCheck();’><img src=’http://mystatus.skype.com/bigclassic/”+o.skype+”‘ style=’border: none;’ width=’90′ alt=’Skype:”+o.skype+”‘ /></a></li>”)});var json_msn={options:opts.msn};json_msn=eval(json_msn.options);$.each(json_msn,function(i,o){$kflist.append(“<li><a href=’msnim:chat?contact=”+o.msn+”‘><img src=” style=’border: none;’ width=’90′ alt=’msn:”+o.msn+”‘ /></a></li>”)});var json_wangwang={options:opts.wangwang};json_wangwang=eval(json_wangwang.options);$.each(json_wangwang,function(i,o){$kflist.append(“<li><a target=’_blank’ href=’http://amos1.taobao.com/msg.ww?v=2&uid=”+o.wangwang+”=1′ ><img border=’0′ src=’http://amos1.taobao.com/online.ww?v=2&uid=”+o.wangwang+”=1′ alt=’点击这里给我发消息’ /></a></li>”)});if(opts.tel){$kflist.append(“<li></li>”);var json_tel={options:opts.tel};json_tel=eval(json_tel.options);$.each(json_tel,function(i,o){$kflist.append(“<li>”+o.name+”:<b>”+o.tel+”</b></li>”)})}if(opts.erweima){$kflist.append(“<li></li>”);var json_erweima={options:opts.erweima};json_erweima=eval(json_erweima.options);$.each(json_erweima,function(i,o){$kflist.append(“<li>”+o.name+”:<img src=”+o.erweima+” width=90 /></li>”)})}if(opts.more){$kflist.append(“<li></li><li><a href=’”+opts.more+”‘>>>\u66f4\u591a\u65b9\u5f0f</a></li>”)}var $lrkfwarptop=$lrkfwarp.offset().top;if($.browser.msie&&$.browser.version==6||opts.position==”absolute”){$(window).scroll(function(){var offsetTop=$lrkfwarptop+$(window).scrollTop()+”px”;$lrkfwarp.animate({top:offsetTop},{duration:600,queue:false})})}$lrkf_x.click(function(){$lrkfwarp.hide();return false});if(opts.Event==”"){$lrkfwarp.mouseenter(function(){$(this).stop().animate({right:0})}).mouseleave(function(){$(this).stop().animate({right:-$lrkfwarp_w})})}else{$lrkf_btn.on(“click”,function(){if($lrkfwarp.hasClass(“lrkfshow”)){$lrkfwarp.animate({right:-$lrkfwarp_w},function(){$lrkfwarp.removeClass(“lrkfshow”)})}else{$lrkfwarp.addClass(“lrkfshow”).animate({right:0})}return false})}}})(jQuery);

不显示在线状态版本

(function($){$.fn.lrkf=function(options){var opts={position:”fixed”,btntext:” “,qqs:[{name:"\u61d2\u4eba\u5efa\u7ad9",qq:"191221838"}],tel:”",more:null,kftop:”120″,z:”99999″,defshow:true,Event:”",callback:function(){}},$body=$(“body”),$url=”";$.extend(opts,options);if(!$(“#lrkfwarp”).length>0){$body.append(“<div id=’lrkfwarp’ class=’lrkf lrkfshow’ style=”+opts.position+”><a href=’#’ class=’lrkf_btn lrkf_btn_hide’ id=’lrkf_btn’ onfocus=’this.blur()’>”+opts.btntext+”</a><div class=’lrkf_box’><div class=’lrkf_header’><a href=’#’ title=’\u5173\u95ed’ class=’x’ id=’lrkf_x’></a></div><div class=’lrkf_con’ id=’lrkf_con’><ul class=’kflist’></ul></div><div class=’lrkf_foot’></div></div></div><style>html{overflow-x:hidden;}#lrkfwarp ul{padding-left:0; margin:0;list-style-type: none;}.lrkf{font-size:13px;position:fixed;}.lrkf a{ display:block; color:#666; text-decoration:none; font-size:13px;}#lrkfwarp img{ border:none;vertical-align:middle; margin-right:4px; margin-top:-2px;display:inline;}.lrkf_con{padding:6px 8px;}.lrkf_con li.qq{padding:5px 0;}.lrkf_con li.tel{ line-height:1.35; padding-bottom:4px;}.lrkf_con li.more{ padding:2px 0;}.lrkf_con li.tel b{ display:block; color:#C00;}.lrkf_tool a{ display:block; padding:8px 10px; text-align:center;}.lrkf_con .hr{padding:0;height:0;font-size:0;line-height:0;clear:both;margin:4px 0;border-bottom:#fff solid 1px;border-top:#CFCFCF solid 1px;border-left:none;border-right:none;}.lrkf_btn{position:absolute; top:20px;width:22px;left:-22px;display:block;text-align:center;padding:10px 0;}.lrkf .lrkf_xc{ position:absolute; bottom:-14px; right:6px;font-size:10px;display:none;}</style>”)}var $lrkfwarp=$(“#lrkfwarp”),$lrkf_con=$(“#lrkf_con”),$kflist=$lrkf_con.children(“ul”),$lrkf_x=$(“#lrkf_x”),$lrkf_btn=$(“#lrkf_btn”),$lrkfwarp_w=$lrkfwarp.outerWidth()*1+1;$lrkfwarp.css({top:opts.kftop+”px”,”z-index”:opts.z});if(!opts.defshow){$lrkfwarp.removeClass(“lrkfshow”).css({right:-$lrkfwarp_w})}var json={options:opts.qqs};json=eval(json.options);$.each(json,function(i,o){$kflist.append(“<li><a target=_blank href=http://wpa.qq.com/msgrd?v=3&uin=”+o.qq+”&site=qq&menu=yes class=’zxkf_qq’ ></a></li>”)});var json_skype={options:opts.skype};json_skype=eval(json_skype.options);$.each(json_skype,function(i,o){$kflist.append(“<li><a href=’skype:”+o.skype+”?call’ onclick=’return skypeCheck();’ class=’zxkf_skype’ ></a></li>”)});var json_msn={options:opts.msn};json_msn=eval(json_msn.options);$.each(json_msn,function(i,o){$kflist.append(“<li><a href=’msnim:chat?contact=”+o.msn+”‘ class=’zxkf_msn’ ></a></li>”)});var json_wangwang={options:opts.wangwang};json_wangwang=eval(json_wangwang.options);$.each(json_wangwang,function(i,o){$kflist.append(“<li><a target=’_blank’ href=’http://amos1.taobao.com/msg.ww?v=2&uid=”+o.wangwang+”=1′ ></a></li>”)});if(opts.tel){$kflist.append(“<li></li>”);var json_tel={options:opts.tel};json_tel=eval(json_tel.options);$.each(json_tel,function(i,o){$kflist.append(“<li>”+o.name+”:<b>”+o.tel+”</b></li>”)})}if(opts.erweima){$kflist.append(“<li></li>”);var json_erweima={options:opts.erweima};json_erweima=eval(json_erweima.options);$.each(json_erweima,function(i,o){$kflist.append(“<li>”+o.name+”:<img src=”+o.erweima+” width=90 /></li>”)})}if(opts.more){$kflist.append(“<li></li><li><a href=’”+opts.more+”‘>>>\u66f4\u591a\u65b9\u5f0f</a></li>”)}var $lrkfwarptop=$lrkfwarp.offset().top;if($.browser.msie&&$.browser.version==6||opts.position==”absolute”){$(window).scroll(function(){var offsetTop=$lrkfwarptop+$(window).scrollTop()+”px”;$lrkfwarp.animate({top:offsetTop},{duration:600,queue:false})})}$lrkf_x.click(function(){$lrkfwarp.hide();return false});if(opts.Event==”"){$lrkfwarp.mouseenter(function(){$(this).stop().animate({right:0})}).mouseleave(function(){$(this).stop().animate({right:-$lrkfwarp_w})})}else{$lrkf_btn.on(“click”,function(){if($lrkfwarp.hasClass(“lrkfshow”)){$lrkfwarp.animate({right:-$lrkfwarp_w},function(){$lrkfwarp.removeClass(“lrkfshow”)})}else{$lrkfwarp.addClass(“lrkfshow”).animate({right:0})}return false})}}})(jQuery);

CSS样式支持

.lrkf .lrkf_box .zxkf_qq{ background:url(images/zxkefu.gif) no-repeat; width:83px; height:26px; display:block;}
.lrkf .lrkf_box .zxkf_msn{ background:url(images/zxkefu.gif) 0px -53px no-repeat; width:83px; height:26px; display:block;}
.lrkf .lrkf_box .zxkf_skype{ background:url(images/zxkefu.gif) 0px -27px no-repeat; width:83px; height:26px; display:block;}
.lrkf .lrkf_box .zxkf_wangwang{ background:url(images/zxkefu.gif) 0px -84px no-repeat; width:83px; height:26px; display:block;}

在线客服图片支持

zxkefu

 

全局程序支持

globals.php

$web['msn'] = explode(‘,’,$web['msn']);
$web['skype'] = explode(‘,’,$web['skype']);
$web['wangwang'] = explode(‘,’,$web['wangwang']);

 

最终显示结果

QQ20140228103501