2021-08-26 09:57:04 +00:00
|
|
|
<template>
|
|
|
|
<view>
|
2022-03-22 03:27:23 +00:00
|
|
|
<view @tap="lianK" :style="{background:publicColor,right:nright+'rpx',bottom:nbottom+'rpx'}" :class="isSmall?'smallImg':''" class="fw posir customer-box" style="position: fixed;z-index: 2; width: 120rpx;height: 120rpx;border-radius: 100%;display: flex;justify-content: center;align-items: center;box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.22);">
|
|
|
|
<image class="posia" src="/static/public/btnKF.png" style="width: 50rpx;height: 50rpx;top: 20rpx;" mode="" lazy-load></image>
|
2021-08-26 09:57:04 +00:00
|
|
|
<view class="colf fon20 posia" style="bottom: 20rpx;">在线客服</view>
|
|
|
|
<button class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact">客服</button>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name:"public-customer",
|
|
|
|
props:{
|
|
|
|
nright:{//距离右边多宽
|
|
|
|
type:Number,
|
|
|
|
default:30
|
|
|
|
},
|
|
|
|
nbottom:{//距离底部多高
|
|
|
|
type:Number,
|
|
|
|
default:260
|
|
|
|
},
|
|
|
|
isSmall:{//是否是大图
|
|
|
|
type:Boolean,
|
|
|
|
default:false
|
|
|
|
},
|
|
|
|
nid:{//内容id
|
|
|
|
type:String,
|
|
|
|
default:'0'
|
|
|
|
}
|
|
|
|
},
|
2022-04-08 09:54:56 +00:00
|
|
|
computed: {
|
|
|
|
// 主题颜色
|
|
|
|
publicColor() {
|
|
|
|
return this.$store.state.publicColor
|
|
|
|
}
|
|
|
|
},
|
2021-08-26 09:57:04 +00:00
|
|
|
data() {
|
2022-04-08 09:54:56 +00:00
|
|
|
return {};
|
2021-08-26 09:57:04 +00:00
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
lianK(){
|
2021-11-02 10:23:53 +00:00
|
|
|
this.$requst.post('user/rand-bind-service').then(res=>{})
|
2021-08-26 09:57:04 +00:00
|
|
|
this.$toolAll.tools.closeTimer()//清空埋点倒计时
|
|
|
|
this.$requst.post('user/record',{type:'other',action:'ask',id:this.nid}).then(res=>{},error=>{})
|
2022-03-04 08:48:40 +00:00
|
|
|
// 调用tools.js中的种植埋点事件
|
|
|
|
this.$toolAll.tools.plantPoint(5);
|
2021-08-26 09:57:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.smallImg{transform: scale(.8);margin-right: -10rpx;}
|
2022-03-22 03:27:23 +00:00
|
|
|
.customer-box {
|
|
|
|
animation: scale_name 1s linear alternate infinite;
|
|
|
|
}
|
|
|
|
@keyframes scale_name{
|
|
|
|
from{transform: scale(1);}
|
|
|
|
to{transform: scale(1.2);}
|
|
|
|
}
|
2021-08-26 09:57:04 +00:00
|
|
|
</style>
|