2022-02-12 11:33:47 +00:00
|
|
|
<template>
|
|
|
|
<view>
|
2022-02-14 11:45:52 +00:00
|
|
|
<view @tap="lianK"
|
|
|
|
:style="{
|
|
|
|
background: backgroundColor,
|
|
|
|
right:nright+'rpx',
|
|
|
|
bottom:nbottom+'rpx',
|
|
|
|
boxShadow: `0rpx 0rpx 30rpx rgba(0,0,0,${shadowNum})`,
|
|
|
|
borderRadius: radiusNum,
|
|
|
|
width: widthHeight,
|
|
|
|
height: widthHeight}"
|
|
|
|
class="customer-box">
|
2022-02-18 08:26:42 +00:00
|
|
|
<i class="icon" :style="{color:iconColor}" :class="['icon-customer','icon-customer-black'][iconNum]" style="font-size: 70rpx;"></i>
|
2022-02-14 11:45:52 +00:00
|
|
|
<!-- <image class="posia" src="/static/public/btnKF.png" style="width: 50rpx;height: 50rpx;top: 20rpx;" mode=""></image> -->
|
|
|
|
<view v-if="showText" class="fon20" style="margin-top: -20rpx;">在线客服</view>
|
|
|
|
<button class="fon24 posia-op" open-type="contact"></button>
|
2022-02-12 11:33:47 +00:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name:"public-customer",
|
|
|
|
props:{
|
2022-02-14 11:45:52 +00:00
|
|
|
// 客服框框大小
|
|
|
|
widthHeight:{
|
|
|
|
type:String,
|
|
|
|
default:'110rpx'
|
|
|
|
},
|
|
|
|
// 客服框背景色
|
|
|
|
backgroundColor:{
|
|
|
|
type:String,
|
|
|
|
default:'#000000'
|
|
|
|
},
|
|
|
|
// 阴影大小0~1
|
|
|
|
shadowNum:{
|
|
|
|
type:Number,
|
|
|
|
default:0.55
|
|
|
|
},
|
|
|
|
// 圆角大小
|
|
|
|
radiusNum:{
|
|
|
|
type:String,
|
|
|
|
default: '26rpx'
|
|
|
|
},
|
|
|
|
//距离右边多宽
|
|
|
|
nright:{
|
2022-02-12 11:33:47 +00:00
|
|
|
type:Number,
|
2022-02-14 11:45:52 +00:00
|
|
|
default:20
|
2022-02-12 11:33:47 +00:00
|
|
|
},
|
|
|
|
nbottom:{//距离底部多高
|
|
|
|
type:Number,
|
|
|
|
default:260
|
|
|
|
},
|
2022-02-14 11:45:52 +00:00
|
|
|
// 是否显示在线客服文本
|
|
|
|
showText:{
|
|
|
|
type:Boolean,
|
|
|
|
default:true
|
|
|
|
},
|
|
|
|
// 客服图标选中
|
|
|
|
iconNum:{
|
|
|
|
type:Number,
|
|
|
|
default:0
|
|
|
|
},
|
2022-02-18 08:26:42 +00:00
|
|
|
// 客服图标颜色
|
|
|
|
iconColor:{
|
|
|
|
type:String,
|
|
|
|
default:'#FFFFFF'
|
|
|
|
},
|
2022-02-12 11:33:47 +00:00
|
|
|
nid:{//内容id
|
|
|
|
type:String,
|
|
|
|
default:'0'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
publicColor:uni.getStorageSync('publicColor'),
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
lianK(){
|
|
|
|
this.$requst.post('user/rand-bind-service').then(res=>{})
|
|
|
|
this.$requst.post('user/record',{type:'other',action:'ask',id:this.nid}).then(res=>{},error=>{})
|
|
|
|
let maiOjb = {
|
|
|
|
e:5,//内容咨询
|
|
|
|
t:new Date().getTime()//当前时间戳
|
|
|
|
}
|
|
|
|
this.$toolAll.tools.maiDian(maiOjb)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-02-23 11:08:25 +00:00
|
|
|
<style scoped>
|
2022-02-14 11:45:52 +00:00
|
|
|
.customer-box {
|
|
|
|
position: fixed;z-index: 2;
|
|
|
|
display: flex;justify-content: center;align-items: center;flex-wrap: wrap;
|
|
|
|
box-sizing: border-box;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
2022-02-12 11:33:47 +00:00
|
|
|
</style>
|