54 lines
1.5 KiB
Vue
54 lines
1.5 KiB
Vue
<template>
|
|
<view>
|
|
<view @tap="lianK" :style="{background:publicColor,right:nright+'rpx',bottom:nbottom+'rpx'}" :class="isSmall?'smallImg':''" class="fw posir" 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=""></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.$toolAll.tools.closeTimer()//清空埋点倒计时
|
|
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>
|
|
|
|
<style>
|
|
.smallImg{transform: scale(.8);margin-right: -10rpx;}
|
|
</style>
|