|
|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<view id="_drag_button" class="drag" :style="'left: ' + left + 'px; top:' + top + 'px;'"
|
|
|
- @touchmove.stop.prevent="touchmove" @touchend="touchend"
|
|
|
- :class="{transition: isDock && !isMove }">
|
|
|
- <image src="/static/img/customerService.png" mode="" style="width: 46px;height: 56px;" @click.stop.prevent="click"></image>
|
|
|
- <view class="wechat" @click="weChat">
|
|
|
+ @touchmove.stop.prevent="touchmove" @touchend="touchend" :class="{transition: isDock && !isMove }">
|
|
|
+ <image src="/static/img/customerService.png" mode="" style="width: 46px;height: 56px;"
|
|
|
+ @click.stop.prevent="click"></image>
|
|
|
+ <view class="wechat" @click="weChatService" v-if="isDisplay">
|
|
|
微信客服
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -40,7 +40,9 @@
|
|
|
windowHeight: 0,
|
|
|
isMove: true,
|
|
|
edge: 10,
|
|
|
- text: '按钮'
|
|
|
+ text: '按钮',
|
|
|
+ supportStaffUrl: '', //企业微信客服地址
|
|
|
+ isDisplay: null, //企业微信客服是否展示
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -84,11 +86,18 @@
|
|
|
this.top = this.windowHeight - this.height - this.edge;
|
|
|
}
|
|
|
}).exec();
|
|
|
- }, 200)
|
|
|
-
|
|
|
+ }, 200);
|
|
|
+ this.getWechatData()
|
|
|
},
|
|
|
methods: {
|
|
|
- weChat(){
|
|
|
+ //获取企业微信客服地址,是否展示
|
|
|
+ getWechatData(){
|
|
|
+ this.$http.get('/sys/qy/wechat/find/picture').then(res => {
|
|
|
+ this.supportStaffUrl = res.data.supportStaffUrl
|
|
|
+ this.isDisplay = res.data.display
|
|
|
+ })
|
|
|
+ },
|
|
|
+ weChat() {
|
|
|
this.$emit('weChatClick');
|
|
|
},
|
|
|
click() {
|
|
|
@@ -143,6 +152,18 @@
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ //点击跳转企业微信客服
|
|
|
+ weChatService() {
|
|
|
+ uni.share({
|
|
|
+ provider: "weixin",
|
|
|
+ openCustomerServiceChat: true,
|
|
|
+ customerUrl: this.supportStaffUrl, //企业微信地址
|
|
|
+ corpid: 'wwfe67d19509d43ec5', //企业id
|
|
|
+ success: (res) => {},
|
|
|
+ fail: (err) => {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -168,7 +189,8 @@
|
|
|
&.transition {
|
|
|
transition: left .3s ease, top .3s ease;
|
|
|
}
|
|
|
- .wechat{
|
|
|
+
|
|
|
+ .wechat {
|
|
|
width: 55%;
|
|
|
font-size: 30rpx;
|
|
|
line-height: 30rpx;
|
|
|
@@ -177,7 +199,7 @@
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
- background-color:#07c160 ;
|
|
|
+ background-color: #07c160;
|
|
|
color: #ffffff;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 10rpx;
|