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
<template>
<div class="app-500">
<img src="assets/images/500.jpg" alt />
<div class="btnbox">
<ion-button class="backbtn" @click="back">上一步</ion-button>
<ion-button class="backbtn" @click="backindex">返回首页</ion-button>
</div>
</div>
</template>
<script lang="ts">
import {
Vue,
Component,
Prop,
Provide,
Emit,
Watch
} from "vue-property-decorator";
@Component({
components: {}
})
export default class App404 extends Vue {
/**
* 返回上一步
*/
public back() {
if (window.history.length <= 1) {
this.$router.push({ path: "/" });
return false;
} else {
this.$router.go(-1);
}
}
/**
* 返回首页
*/
public backindex() {
this.$router.push({ path: "/" });
}
}
</script>
<style lang = "less">
@import "./500";
</style>