|
@@ -1,10 +1,10 @@
|
|
<template>
|
|
<template>
|
|
- <a class="zxzx-btn" :href="linkForKefu" target="_blank">在线咨询</a>
|
|
|
|
-
|
|
|
|
|
|
+ <a class="zxzx-btn" :href="linkForKefu" @click="btnClick">在线咨询</a>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {linkForKefu} from "~/defaultConfig"
|
|
import {linkForKefu} from "~/defaultConfig"
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: "onlineInformation",
|
|
name: "onlineInformation",
|
|
props: {
|
|
props: {
|
|
@@ -19,8 +19,21 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ isPC() {
|
|
|
|
+ const browserWidth = document.documentElement.clientWidth;
|
|
|
|
+ if (browserWidth <= 768) {
|
|
|
|
+ return false;
|
|
|
|
+ } else {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
btnClick() {
|
|
btnClick() {
|
|
- this.$router.push({name: 'courseware'});
|
|
|
|
|
|
+ if (this.isPC()) {
|
|
|
|
+ window.open(this.linkForKefu)
|
|
|
|
+ } else {
|
|
|
|
+ window.href = this.linkForKefu
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -39,7 +52,12 @@ export default {
|
|
color: #00b96b;
|
|
color: #00b96b;
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
@media (max-width: 768px) {
|
|
- width: 44%;height:35px;line-height:35px;max-width: 120px;margin: 0 3%;font-size: 14px;
|
|
|
|
|
|
+ width: 44%;
|
|
|
|
+ height: 35px;
|
|
|
|
+ line-height: 35px;
|
|
|
|
+ max-width: 120px;
|
|
|
|
+ margin: 0 3%;
|
|
|
|
+ font-size: 14px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|