-
Notifications
You must be signed in to change notification settings - Fork 1
/
error.vue
62 lines (58 loc) · 1.5 KB
/
error.vue
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
<template>
<div class="Error">
<h1>{{ msg }}</h1>
<img src="@/assets/img/Error_2.webp" alt="错误的光光图片" />
<button @click="ReturnHomo">返回查询首页</button>
</div>
</template>
<script lang="ts" setup>
import type { Ref } from 'vue';
const msg = ref<string>("亲亲,你输入的ArcId或者名称我们查询不到记录捏")
const error: Ref<any> = useError();
if (error.value) {
const message: string = error.value.url.toLowerCase()
if (message.indexOf("arcaea") !== -1) {
msg.value = "亲亲,请不要查官方Id,因为根本查不到的捏"
}
}
// console.log(error)
function ReturnHomo() {
window.location.replace(window.location.origin);
}
</script>
<style lang="scss" scoped>
.Error {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
// background-image: url("@/assets/img/Error_bg.jpg") ;
// background-repeat: no-repeat;
// background-size: auto 100%;
h1 {
font-weight: 500;
font-size: 5vmin;
padding: 0 16px;
}
button {
border: none;
background-color: #00DC82;
font-size: 3vmin;
color: #fff;
border-radius: 4px;
padding: 12px 32px;
font-weight: 400;
cursor: pointer;
}
img {
margin: 40px 0;
// max-width: 100vw;
max-width: 500px;
height: 50vh;
max-height: 80vh;
object-fit: cover;
}
}
</style>