This commit is contained in:
linfso 2024-11-12 16:52:53 +08:00
parent 6ba12559d3
commit 3b225a0852

View File

@ -27,13 +27,19 @@
<div class="right-menu">
<!-- 在线客服 -->
<div class="right-menu-item hover-effect" style="padding: 0 20px;" @click="showOnlineKefu">
<!-- @click="showOnlineKefu" -->
<div 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>
</div>
<div v-show="openOnlineKefu" style="position:fixed; top:20px;padding:0px;width:80%;height:500px">
<iframe frameborder="0" :src="rlKefuURL" width="100%" height="100%" />
</div>
<!-- 消息通知 -->
<div class="right-menu-item hover-effect" style="padding: 0 20px;">
<top-notice/>
@ -106,11 +112,11 @@
</span>
</div> -->
<el-dialog title="在线客服" :visible.sync="openOnlineKefu" width="80%" class="kf-panel" append-to-body>
<!-- <el-dialog title="在线客服" :visible.sync="openOnlineKefu" width="80%" class="kf-panel" append-to-body>
<div style="padding:0px;height:500px">
<iframe frameborder="0" :src="rlKefuURL" width="100%" height="100%" />
</div>
</el-dialog>
</el-dialog> -->
</div>
<div class="kf_dialog_center">
@ -248,6 +254,9 @@ export default {
}
}
},
created(){
this.initOnlineKefu();
},
mounted() {
this.initKFClient();
this.checkIsNeedRstPwd();
@ -261,6 +270,11 @@ export default {
});
},
initOnlineKefu(){
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;
@ -270,6 +284,8 @@ export default {
}).catch(error => {
// this.$modal.msgError(error);
});
},
showOnlineKefu(){
this.initOnlineKefu();