|
|
@@ -198,6 +198,21 @@ export default {
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
async created() {
|
|
|
+ // 移动端和pc端的切换
|
|
|
+ if (
|
|
|
+ window.navigator.userAgent.match(
|
|
|
+ /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ // 移动端
|
|
|
+ if (window.location.href.includes("web")) {
|
|
|
+ window.location.href = window.location.href.replace("web", "webM");
|
|
|
+ setTimeout(() => {
|
|
|
+ location.reload(true);
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
let res = await getStatistics();
|
|
|
this.numAll = res.data.visitCount;
|
|
|
this.numDay = res.data.visitToday;
|