You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
3.1 KiB
88 lines
3.1 KiB
{layout name="layout" /}
|
|
|
|
<div class="sec-user sec-detail clearfix">
|
|
<div class="content">
|
|
<div class="user-detail">
|
|
<div class="detail-edit">
|
|
<div class="detail">
|
|
<div class="detail-head clearfix">
|
|
<div class="media">
|
|
<div class="img-wrapper">
|
|
<img src="{$yf_theme_path}assets/img/default.png" alt="">
|
|
</div>
|
|
</div>
|
|
<div class="media-content">
|
|
<div class="content-content">
|
|
<h2 class="title">{$detail.name}</h2>
|
|
<div class="jifen">信誉积分:<span>{$detail.redeem_point}</span></div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="detail-content">
|
|
<div class="cats-title"><span>介绍</span></div>
|
|
<div class="detail-info">{$detail.description|default="暂无"}</div>
|
|
</div>
|
|
<div class="foot"><a href="javascript:void(0);" style="width:20%;" class="btn-xiugai chatbtn">联系客服</a></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="user-caidan">
|
|
{include file="public:userinfo" /}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script type='text/javascript'>
|
|
(function(m, ei, q, i, a, j, s) {
|
|
m[i] = m[i] || function() {
|
|
(m[i].a = m[i].a || []).push(arguments)
|
|
};
|
|
j = ei.createElement(q),
|
|
s = ei.getElementsByTagName(q)[0];
|
|
j.async = true;
|
|
j.charset = 'UTF-8';
|
|
j.src = 'https://static.meiqia.com/dist/meiqia.js?_=t';
|
|
s.parentNode.insertBefore(j, s);
|
|
})(window, document, 'script', '_MEIQIA');
|
|
function allSet(servability){
|
|
// 你可以根据自己的需求编写相应的代码
|
|
console.log('美洽网站插件初始化完毕。');
|
|
_MEIQIA('showPanel',{greeting: '{$detail.name}'});//留言板
|
|
if (servability) {
|
|
console.log('有客服在线');
|
|
} else {
|
|
console.log('无客服在线');
|
|
}
|
|
}
|
|
function handleStart() {
|
|
console.log('会话开始回调')
|
|
}
|
|
function handleEnd(){
|
|
console.log('会话结束时的回调')
|
|
}
|
|
_MEIQIA('entId', 106356);
|
|
_MEIQIA('allSet',allSet);
|
|
//会话开始时的回调
|
|
_MEIQIA('startConversation',handleStart);
|
|
//会话结束时的回调
|
|
_MEIQIA('endConversation',handleEnd);
|
|
_MEIQIA('manualInit');//手动初始化
|
|
|
|
_MEIQIA('metadata',{"name":"老王","qq":"123456","age":"11","gender":"男"});
|
|
// 设置 clientId
|
|
//_MEIQIA('clientId', '顾客的唯一标识');
|
|
_MEIQIA('convClickCallback', clickCallback);
|
|
//展开对话窗口(创建对话/排队/留言)回调接口
|
|
//type 参数共 3 个值,queue(排队),ticket(工单),conv(对话)
|
|
function clickCallback(type, convId) {
|
|
console.log(type);
|
|
if (type === 'conv') {
|
|
console.log(convId);
|
|
}
|
|
}
|
|
$(".chatbtn").click(function(){
|
|
_MEIQIA('init');//自动初始化
|
|
});
|
|
</script>
|