diff --git a/common/js/customer-service.js b/common/js/customer-service.js index 1e59c59..019a940 100644 --- a/common/js/customer-service.js +++ b/common/js/customer-service.js @@ -488,6 +488,24 @@ export class CustomerService { return config?.type === 'weapp'; } + /** + * 判断是否为智能客服 + * @returns {Boolean} + */ + isAIKefu() { + const config = this.getPlatformConfig(); + return config?.type === 'aikefu'; + } + + /** + * 判断是否为企业微信客服 + * @returns {Boolean} + */ + isWxworkKefu() { + const config = this.getPlatformConfig(); + return config?.type === 'wxwork' || config?.type === 'qyweixin'; + } + /** * 判断是否需要同时显示小程序系统客服 * @returns {Boolean} diff --git a/components/hover-nav/hover-nav.vue b/components/hover-nav/hover-nav.vue index 9837224..51ca961 100644 --- a/components/hover-nav/hover-nav.vue +++ b/components/hover-nav/hover-nav.vue @@ -30,7 +30,9 @@ @click="handleUnifiedKefuClick" :style="{ backgroundImage: currentKefuImg ? `url(${currentKefuImg})` : '', backgroundSize: '100% 100%' }" > - + 🤖 + 💬 + @@ -40,7 +42,8 @@ @click="handleUnifiedKefuClick" :style="{ backgroundImage: currentKefuImg ? `url(${currentKefuImg})` : '', backgroundSize: '100% 100%' }" > - 🤖 + 🤖 + 💬 @@ -127,6 +130,14 @@ export default { const customerService = createCustomerService(this); return customerService.isWeappOfficialKefu(); }, + isAIKefu() { + const customerService = createCustomerService(this); + return customerService.isAIKefu(); + }, + isWxworkKefu() { + const customerService = createCustomerService(this); + return customerService.isWxworkKefu(); + }, showWeappSystemKefu() { const customerService = createCustomerService(this); return customerService.shouldShowExtraWeappSystemKefu();