chore:改了企业微信客服,智能客服的悬浮按钮
This commit is contained in:
@@ -488,6 +488,24 @@ export class CustomerService {
|
|||||||
return config?.type === 'weapp';
|
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}
|
* @returns {Boolean}
|
||||||
|
|||||||
@@ -30,7 +30,9 @@
|
|||||||
@click="handleUnifiedKefuClick"
|
@click="handleUnifiedKefuClick"
|
||||||
:style="{ backgroundImage: currentKefuImg ? `url(${currentKefuImg})` : '', backgroundSize: '100% 100%' }"
|
:style="{ backgroundImage: currentKefuImg ? `url(${currentKefuImg})` : '', backgroundSize: '100% 100%' }"
|
||||||
>
|
>
|
||||||
<text class="icox icox-kefu" v-if="!kefuimg"></text>
|
<text class="ai-icon" v-if="isAIKefu && !currentKefuImg">🤖</text>
|
||||||
|
<text class="ai-icon" v-if="isWxworkKefu && !currentKefuImg">💬</text>
|
||||||
|
<text class="icox icox-kefu" v-if="!isAIKefu && !isWxworkKefu && !kefuimg"></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 智能客服按钮(当同时显示小程序系统客服时)-->
|
<!-- 智能客服按钮(当同时显示小程序系统客服时)-->
|
||||||
@@ -40,7 +42,8 @@
|
|||||||
@click="handleUnifiedKefuClick"
|
@click="handleUnifiedKefuClick"
|
||||||
:style="{ backgroundImage: currentKefuImg ? `url(${currentKefuImg})` : '', backgroundSize: '100% 100%' }"
|
:style="{ backgroundImage: currentKefuImg ? `url(${currentKefuImg})` : '', backgroundSize: '100% 100%' }"
|
||||||
>
|
>
|
||||||
<text class="ai-icon" v-if="!currentKefuImg">🤖</text>
|
<text class="ai-icon" v-if="isAIKefu && !currentKefuImg">🤖</text>
|
||||||
|
<text class="ai-icon" v-if="isWxworkKefu && !currentKefuImg">💬</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 小程序系统客服按钮 -->
|
<!-- 小程序系统客服按钮 -->
|
||||||
@@ -127,6 +130,14 @@ export default {
|
|||||||
const customerService = createCustomerService(this);
|
const customerService = createCustomerService(this);
|
||||||
return customerService.isWeappOfficialKefu();
|
return customerService.isWeappOfficialKefu();
|
||||||
},
|
},
|
||||||
|
isAIKefu() {
|
||||||
|
const customerService = createCustomerService(this);
|
||||||
|
return customerService.isAIKefu();
|
||||||
|
},
|
||||||
|
isWxworkKefu() {
|
||||||
|
const customerService = createCustomerService(this);
|
||||||
|
return customerService.isWxworkKefu();
|
||||||
|
},
|
||||||
showWeappSystemKefu() {
|
showWeappSystemKefu() {
|
||||||
const customerService = createCustomerService(this);
|
const customerService = createCustomerService(this);
|
||||||
return customerService.shouldShowExtraWeappSystemKefu();
|
return customerService.shouldShowExtraWeappSystemKefu();
|
||||||
|
|||||||
Reference in New Issue
Block a user