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

View File

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