<template>
|
<div id="app">
|
<myHead></myHead>
|
|
<keep-alive>
|
<router-view v-if="$route.meta.keepAlive"></router-view>
|
</keep-alive>
|
|
<router-view v-if="!$route.meta.keepAlive"></router-view>
|
|
<div class="kf" @click="aRouter1">
|
<img src="@/assets/images/kf.png" alt="" />
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import myHead from "@/components/myHead.vue";
|
import * as api from "@/axios/api.js";
|
export default {
|
name: "App",
|
components: {
|
myHead,
|
},
|
data() {
|
return {
|
onlineService: "",
|
};
|
},
|
created() {
|
this.getInfoSite();
|
},
|
methods: {
|
// 跳转客服页面
|
aRouter1() {
|
window.open(this.onlineService);
|
},
|
// 获取客服地址
|
async getInfoSite() {
|
let data = await api.getInfoSite();
|
if (data.status === 0) {
|
this.onlineService = data.data.onlineService;
|
}
|
// else {
|
// this.$store.commit("elAlertShow", {
|
// elAlertShow: true,
|
// elAlertText: data.msg
|
// });
|
// }
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss">
|
@import "./assets/style/reset.scss";
|
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
|
::-webkit-scrollbar {
|
width: 8px; /*滚动条宽度*/
|
height: 8px; /*滚动条高度*/
|
}
|
|
/*定义滚动条轨道 内阴影+圆角*/
|
::-webkit-scrollbar-track {
|
// -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
border-radius: 10px; /*滚动条的背景区域的圆角*/
|
background-color: rgba($color: #fff, $alpha: 0); /*滚动条的背景颜色*/
|
}
|
|
/*定义滑块 内阴影+圆角*/
|
::-webkit-scrollbar-thumb {
|
border-radius: 10px; /*滚动条的圆角*/
|
// -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
background-color: rgba($color: #ccc, $alpha: 0.5); /*滚动条的背景颜色*/
|
}
|
|
#app {
|
display: flex;
|
flex-direction: column;
|
height: 100%;
|
}
|
|
.kf {
|
width: 48px;
|
height: 48px;
|
position: fixed;
|
bottom: 16px;
|
right: 16px;
|
cursor: pointer;
|
|
img {
|
width: 100%;
|
height: 100%;
|
border-radius: 50%;
|
}
|
}
|
</style>
|