kfid路由窗口: 5类别映射企微客服链接(ROUTING_TARGETS配置化,弃用business_contacts个人名片)+ send_service_card新函数 + ContactCard支持service_url点击打开客服会话(行政→机票酒店前台/人力→共享服务/财务→报销服务台/法务→行政法务/物业→物业服务)
This commit is contained in:
@@ -27,19 +27,19 @@
|
||||
<div class="contact-card__name-row">
|
||||
<div class="contact-card__name">
|
||||
{{ contact.name }}
|
||||
<span class="contact-card__gender" :class="genderClass">{{ genderIcon }}</span>
|
||||
<span v-if="contact.gender" class="contact-card__gender" :class="genderClass">{{ genderIcon }}</span>
|
||||
</div>
|
||||
<div class="contact-card__dept">{{ contact.department }} · {{ contact.position }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 名片标识 -->
|
||||
<span class="contact-card__badge">员工名片</span>
|
||||
<!-- 名片标识(kfid 服务模式显示「服务窗口」) -->
|
||||
<span class="contact-card__badge">{{ contact.service_url ? '服务窗口' : '员工名片' }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 卡片信息区:负责业务(绿色高亮) / 分机号 / 服务区域 -->
|
||||
<!-- 卡片信息区:负责业务/服务描述(绿色高亮) / 分机号 / 服务区域 -->
|
||||
<div class="contact-card__body">
|
||||
<div class="contact-card__info-item">
|
||||
<span class="contact-card__info-label">负责业务</span>
|
||||
<span class="contact-card__info-label">{{ contact.service_url ? '服务内容' : '负责业务' }}</span>
|
||||
<span class="contact-card__info-value contact-card__info-value--highlight">
|
||||
{{ contact.responsibility }}
|
||||
</span>
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class="contact-card__footer">
|
||||
<button class="contact-card__action-btn" @click="handleContact">
|
||||
<span class="contact-card__action-icon">💬</span>
|
||||
<span>联系TA</span>
|
||||
<span>{{ contact.service_url ? '立即咨询' : '联系TA' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -88,6 +88,8 @@ export interface ContactInfo {
|
||||
wecom_userid: string
|
||||
avatar_url: string
|
||||
business_category: string
|
||||
/** v4.0 kfid 服务模式:企微客服窗口链接(存在时点击打开链接而非 openEnterpriseChat) */
|
||||
service_url?: string
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -142,6 +144,13 @@ const serviceAreaLabel = computed(() => {
|
||||
* - openEnterpriseChat 调用失败 → Toast 提示
|
||||
*/
|
||||
function handleContact(): void {
|
||||
// v4.0 kfid 服务模式:有 service_url 时直接打开企微客服会话链接
|
||||
if (props.contact.service_url) {
|
||||
// 企微 H5 环境:window.open 打开 kfid 链接会唤起客服会话窗口
|
||||
window.open(props.contact.service_url, '_blank')
|
||||
return
|
||||
}
|
||||
|
||||
const userid = props.contact.wecom_userid
|
||||
|
||||
// 1. 检查 userid 是否有效
|
||||
|
||||
Reference in New Issue
Block a user