feat(kefu): 个人中心导航栏与全局客服入口支持直达微信小程序原生客服会话
这个提交包含在:
@@ -7,6 +7,33 @@
|
||||
>
|
||||
{{ data.text }}
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button
|
||||
v-if="data.type === 'image' && isCustomerService"
|
||||
:style="[{ width: width }]"
|
||||
class="ss-reset-button menu-icon-wrap ss-flex ss-row-center ss-col-center"
|
||||
open-type="contact"
|
||||
>
|
||||
<image
|
||||
class="nav-image"
|
||||
:src="data.src && data.src.startsWith('/static/') ? data.src : sheep.$url.cdn(data.src)"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
</button>
|
||||
<view
|
||||
v-else-if="data.type === 'image'"
|
||||
:style="[{ width: width }]"
|
||||
class="menu-icon-wrap ss-flex ss-row-center ss-col-center"
|
||||
@tap="sheep.$router.go(data.url)"
|
||||
>
|
||||
<image
|
||||
class="nav-image"
|
||||
:src="data.src && data.src.startsWith('/static/') ? data.src : sheep.$url.cdn(data.src)"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view
|
||||
v-if="data.type === 'image'"
|
||||
:style="[{ width: width }]"
|
||||
@@ -19,6 +46,7 @@
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="ss-flex-1" v-if="data.type == 'search'" :style="[{ width: width }]">
|
||||
<s-search-block
|
||||
:placeholder="data.placeholder || '搜索关键字'"
|
||||
@@ -49,6 +77,20 @@
|
||||
});
|
||||
|
||||
const height = computed(() => sheep.$platform.capsule.height);
|
||||
|
||||
// 判断是否为客服入口
|
||||
const isCustomerService = computed(() => {
|
||||
const url = props.data?.url || '';
|
||||
const src = props.data?.src || '';
|
||||
return (
|
||||
url === '/pages/chat/index' ||
|
||||
url.startsWith('/pages/chat') ||
|
||||
url.includes('chat') ||
|
||||
url.includes('kefu') ||
|
||||
url.includes('customer_service') ||
|
||||
src.includes('c47b048175b325b1e78f837a3b696794')
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -61,6 +103,16 @@
|
||||
.menu-icon-wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
line-height: normal;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.nav-image {
|
||||
height: 30px;
|
||||
max-width: 100%;
|
||||
|
||||
@@ -6,12 +6,31 @@
|
||||
<view class="container-list ss-flex ss-flex-wrap">
|
||||
<view class="list-item ss-m-b-24" v-for="item in list" :key="item.title">
|
||||
<view class="ss-flex-col ss-col-center">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button
|
||||
v-if="item.url === '/pages/chat/index'"
|
||||
class="ss-reset-button list-image ss-flex ss-row-center ss-col-center"
|
||||
open-type="contact"
|
||||
@tap="closeMenuTools"
|
||||
>
|
||||
<image v-if="show" :src="sheep.$url.static(item.icon)" class="list-icon"></image>
|
||||
</button>
|
||||
<button
|
||||
v-else
|
||||
class="ss-reset-button list-image ss-flex ss-row-center ss-col-center"
|
||||
@tap="onClick(item)"
|
||||
>
|
||||
<image v-if="show" :src="sheep.$url.static(item.icon)" class="list-icon"></image>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<button
|
||||
class="ss-reset-button list-image ss-flex ss-row-center ss-col-center"
|
||||
@tap="onClick(item)"
|
||||
>
|
||||
<image v-if="show" :src="sheep.$url.static(item.icon)" class="list-icon"></image>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
<view class="list-title ss-m-t-20">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
在新工单中引用
屏蔽一个用户