index.vue
1.23 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<template>
<div class="app-container">
<img
:src="tempImage"
class="error-img"
>
<div class="error-text">
哎呀...您访问的页面不存在
</div>
<div class="countdown">
将在
<span id="countdown-number">
{{ num }}
</span>
秒钟后返回首页,若未跳转,请
<a href="/">
点击跳转
</a>
</div>
</div>
</template>
<script>
import image1 from '@/assets/404.png'
export default {
name: 'Page404',
data() {
return {
tempImage: image1,
num: 3
}
},
mounted() {
let time = 3
const interval = setInterval(() => {
if (time === 0) {
window.location.replace('/order')
clearInterval(interval)
}
this.num = time
console.log('jajajja', this.num)
time--
}, 1000)
}
}
</script>
<style
lang="scss"
scoped
>
.app-container {
text-align: center;
padding-top: 20vh;
box-sizing: border-box;
}
.error-img {
max-width: 100vw !important;
height: auto;
}
.error-text {
font-size: 30px;
margin-top: 20px;
color: #9c9c9c;
}
.countdown {
margin-top: 20px;
color: #9c9c9c;
}
@media (max-width: 768px) {
.error-text {
font-size: 20px;
}
}
</style>