feat:英文状态下,详情页客服新增点击跳转到客服会话页面功能

This commit is contained in:
Zhukj
2025-12-19 17:54:23 +08:00
parent 5c7daab504
commit fe3d00c653
3 changed files with 36 additions and 12 deletions

View File

@@ -1,13 +1,12 @@
<template>
<view>
<block v-if="text == '客服'">
<!-- <ns-contact :niushop="chatParam" :send-message-title="sendData.title" :send-message-path="sendData.path" :send-message-img="sendData.img"> -->
<button hoverClass="none" openType="contact" sessionFrom="weapp" showMessageCard="true" class="action-icon-wrap" style="background: transparent;padding: 0;margin: 0;">
<!-- 修改后兼容英文 -->
<block v-if="text == '客服' || text == 'Contact'">
<button hoverClass="none" openType="contact" sessionFrom="weapp" showMessageCard="true" class="action-icon-wrap" style="background: transparent;padding: 0;margin: 0;" @click="contactClick">
<view class="iconfont color-title" :class="icon"></view>
<text>{{ text }}</text>
<view class="corner-mark color-base-bg" v-if="cornerMark.length" :style="{ background: cornerMarkBg+'!important', color: cornerMarkColor }">{{ cornerMark }}</view>
</button>
<!-- </ns-contact> -->
</block>
<block v-else>
<view class="action-icon-wrap" @click="clickEvent">
@@ -24,37 +23,30 @@ import nsContact from '@/components/ns-contact/ns-contact.vue';
export default {
name: 'ns-goods-action-icon',
props: {
// 商品底部icon导航icon图标
icon: {
type: String,
default: ''
},
// 商品底部icon导航文字
text: {
type: String,
default: ''
},
// 角标文字
cornerMark: {
type: String,
default: ''
},
// 角标背景色
cornerMarkBg: {
type: String,
default: ''
},
// 角标文字颜色
cornerMarkColor: {
type: String,
default: '#fff'
},
// 开放能力
openType: {
type: String,
default: ''
},
// 发送内容 openType="contact"时有效
sendData: {
type: Object,
default: function() {
@@ -77,7 +69,11 @@ export default {
},
methods: {
clickEvent() {
console.log('【组件内部】非客服按钮被点击触发clickEvent');
this.$emit('click');
},
contactClick() {
console.log('【组件内部】客服按钮Contact被点击触发contactClick');
}
}
};
@@ -143,4 +139,4 @@ export default {
font-size: $font-size-tag;
line-height: 1;
}
</style>
</style>