This commit is contained in:
linfso 2024-11-13 19:46:36 +08:00
parent 8b442b3c05
commit 759cb6284b
2 changed files with 9 additions and 10 deletions

View File

@ -25,15 +25,14 @@
</div> </div>
<div v-show="openOnlineKefu" style="position: absolute;top: 50px;padding: 0px;height: 500px;width: 80%;z-index: 9999;right: 10px;"> <div v-if="blSupportKf" v-show="openOnlineKefu" style="position: absolute;top: 50px;padding: 0px;height: 500px;width: 80%;z-index: 9999;right: 10px;">
<iframe frameborder="0" :src="rlKefuURL" width="100%" height="100%" /> <iframe frameborder="0" :src="rlKefuURL" width="100%" height="100%" />
</div> </div>
<div class="right-menu"> <div class="right-menu">
<!-- 在线客服 --> <!-- 在线客服 -->
<!-- @click="showOnlineKefu" --> <div v-if="blSupportKf" slot="reference" class="right-menu-item hover-effect" style="padding: 0 20px;" @click="showOnlineKefu" >
<div slot="reference" class="right-menu-item hover-effect" style="padding: 0 20px;" @click="showOnlineKefu" >
<span class="kf-agent" title="在线客服"> <span class="kf-agent" title="在线客服">
<img src="" alt="" style="display: none;"> <img src="" alt="" style="display: none;">
</span> </span>
@ -220,6 +219,7 @@ export default {
'sidebar', 'sidebar',
'avatar', 'avatar',
'nickName', 'nickName',
"blSupportKf",
'empCode', 'empCode',
'empName', 'empName',
'ownerSiteName', 'ownerSiteName',
@ -271,18 +271,16 @@ export default {
}, },
initOnlineKefu(){ initOnlineKefu(){
if(!this.blSupportKf){
return;
}
window.addEventListener('message', function(e) { window.addEventListener('message', function(e) {
console.log(e,'OnlineKefu==>message') console.log(e,'OnlineKefu==>message')
}) })
getKefuSsoToken().then(res=>{ getKefuSsoToken().then(res=>{
if(res.code==200){
this.rlKefuURL="https://ykf.7moor.com?token="+res.data; this.rlKefuURL="https://ykf.7moor.com?token="+res.data;
}else{
// this.$modal.msgError("token fail");
}
}).catch(error => {
// this.$modal.msgError(error);
}); });

View File

@ -10,6 +10,7 @@ const getters = {
empCode: state => state.user.empCode, empCode: state => state.user.empCode,
empName: state => state.user.empName, empName: state => state.user.empName,
nickName: state => state.user.nickName, nickName: state => state.user.nickName,
blSupportKf: state => state.user.blSupportKf,
name: state => state.user.name, name: state => state.user.name,
ownerCountryCode: state => state.user.ownerCountryCode, ownerCountryCode: state => state.user.ownerCountryCode,
ownerSiteCode: state => state.user.ownerSiteCode, ownerSiteCode: state => state.user.ownerSiteCode,