|
|
@@ -1,18 +1,16 @@
|
|
|
<template>
|
|
|
-<div class='home'>
|
|
|
- <div class="btnR" @click="goIndex">立即进入</div>
|
|
|
-</div>
|
|
|
+ <div class="home">
|
|
|
+ <div class="btnR" @click="goIndex">立即进入</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
- name: 'home',
|
|
|
+ name: "home",
|
|
|
components: {},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
// 这里存放数据
|
|
|
- return {
|
|
|
-
|
|
|
- }
|
|
|
+ return {};
|
|
|
},
|
|
|
// 监听属性 类似于data概念
|
|
|
computed: {},
|
|
|
@@ -20,40 +18,36 @@ export default {
|
|
|
watch: {},
|
|
|
// 方法集合
|
|
|
methods: {
|
|
|
- goIndex(){
|
|
|
- this.$router.push('/index?m=1151')
|
|
|
- this.$nextTick(()=>{
|
|
|
+ goIndex() {
|
|
|
+ this.$router.replace("/index?m=1151");
|
|
|
+ this.$nextTick(() => {
|
|
|
setTimeout(() => {
|
|
|
- location.reload(true)
|
|
|
+ location.reload(true);
|
|
|
}, 100);
|
|
|
- })
|
|
|
- }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created () {
|
|
|
-
|
|
|
- },
|
|
|
+ created() {},
|
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
- mounted () {
|
|
|
-
|
|
|
- },
|
|
|
- beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
- beforeMount () {}, // 生命周期 - 挂载之前
|
|
|
- beforeUpdate () {}, // 生命周期 - 更新之前
|
|
|
- updated () {}, // 生命周期 - 更新之后
|
|
|
- beforeDestroy () {}, // 生命周期 - 销毁之前
|
|
|
- destroyed () {}, // 生命周期 - 销毁完成
|
|
|
- activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
-}
|
|
|
+ mounted() {},
|
|
|
+ beforeCreate() {}, // 生命周期 - 创建之前
|
|
|
+ beforeMount() {}, // 生命周期 - 挂载之前
|
|
|
+ beforeUpdate() {}, // 生命周期 - 更新之前
|
|
|
+ updated() {}, // 生命周期 - 更新之后
|
|
|
+ beforeDestroy() {}, // 生命周期 - 销毁之前
|
|
|
+ destroyed() {}, // 生命周期 - 销毁完成
|
|
|
+ activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
|
-.home{
|
|
|
+.home {
|
|
|
position: relative;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- background: url('../../assets/img/indexBac.png');
|
|
|
+ background: url("../../assets/img/indexBac.png");
|
|
|
background-size: 100% 100%;
|
|
|
- .btnR{
|
|
|
+ .btnR {
|
|
|
font-size: 20px;
|
|
|
border-radius: 8px;
|
|
|
cursor: pointer;
|