<template>
|
|
<view class="float-button">
|
|
<!-- <button type="default" open-type="contact" class="kf-btn">
|
|
<img src="../../static/images/details/kefu.svg" style="width: 26px;height: 36px;" alt="kefu"
|
|
srcset="">
|
|
</button> -->
|
|
<button @click="openCustomerService" class="kf-btn">
|
|
<img src="../../static/images/details/kefu.svg" style="width: 26px;height: 36px;" alt="kefu" srcset="">
|
|
</button>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
|
|
};
|
|
},
|
|
methods: {
|
|
openCustomerService() {
|
|
uni.openCustomerServiceChat({
|
|
//企业微信的企业id
|
|
corpId: 'wwccd9a21f09fed62d',
|
|
extInfo: {
|
|
//客服链接
|
|
url: 'https://work.weixin.qq.com/kfid/kfc09f128696578f66d'
|
|
},
|
|
success: (e) => {
|
|
console.log('e', e)
|
|
},
|
|
fail: (err) => {
|
|
console.log('err', err)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.float-button {
|
|
position: fixed;
|
|
bottom: 150px;
|
|
/* 距离底部的距离 */
|
|
right: 10px;
|
|
/* 距离右侧的距离 */
|
|
width: 50px;
|
|
/* 按钮的宽度 */
|
|
height: 50px;
|
|
|
|
/* 按钮的高度 */
|
|
/* 其他样式 */
|
|
.kf-btn {
|
|
background-color: rgba(255, 255, 255, 1);
|
|
height: 52px;
|
|
width: 52px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
}
|
|
</style>
|