CustomerService.vue
1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<el-popover placement="right" width="300" trigger="hover">
<div class="hover-class">
<span>扫码联系专属客服</span>
<img :src="customerServiceQr" alt="" />
<span>立马扫码一对一答疑</span>
</div>
<div class="side-box" slot="reference">
<svg-icon class="right-icon" iconClass="customer-service"></svg-icon>
</div>
</el-popover>
</template>
<script>
// import { getCustomerServiceQrUrl } from '@/api/login'
export default {
data() {
return {
customerServiceQr: '',
}
},
created() {
// getCustomerServiceQrUrl().then((res) => {
// this.customerServiceQr = res.data;
// localStorage.setItem('customerServiceQr',res.data)
// });
},
}
</script>
<style lang="scss" scoped>
.hover-class {
display: flex;
flex-direction: column;
align-items: center;
span:nth-child(1) {
font-size: 18px;
font-weight: bold;
line-height: 36px;
margin-bottom: 10px;
}
img {
width: 160px;
height: 160px;
}
span:nth-child(3) {
font-size: 14px;
line-height: 16px;
margin-top: 20px;
}
}
.side-box {
width: 50px;
height: 50px;
background-color: var(--color);
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
.right-icon {
font-size: 40px;
}
}
.side-box:hover {
cursor: pointer;
}
</style>