59 lines
1.7 KiB
Vue
59 lines
1.7 KiB
Vue
<template>
|
|
<view>
|
|
<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>
|
|
<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'
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
publicColor:uni.getStorageSync('publicColor'),
|
|
};
|
|
},
|
|
methods:{
|
|
lianK(){
|
|
this.$requst.post('user/rand-bind-service').then(res=>{})
|
|
this.$toolAll.tools.closeTimer()//清空埋点倒计时
|
|
this.$requst.post('user/record',{type:'other',action:'ask',id:this.nid}).then(res=>{},error=>{})
|
|
// 调用tools.js中的种植埋点事件
|
|
this.$toolAll.tools.plantPoint(5);
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.smallImg{transform: scale(.8);margin-right: -10rpx;}
|
|
.customer-box {
|
|
animation: scale_name 1s linear alternate infinite;
|
|
}
|
|
@keyframes scale_name{
|
|
from{transform: scale(1);}
|
|
to{transform: scale(1.2);}
|
|
}
|
|
</style>
|