소스 검색

添加错误页面

syh 5 년 전
부모
커밋
f904c73562
1개의 변경된 파일10개의 추가작업 그리고 3개의 파일을 삭제
  1. 10 3
      src/views/errorPage.vue

+ 10 - 3
src/views/errorPage.vue

@@ -4,8 +4,8 @@
       <img src="https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg"/>
     </div>
     <div class="content">
-      <h1>{{ }}</h1>
-      <div class="desc">{{ }}</div>
+      <h1>{{title}}</h1>
+      <div class="desc">{{desc}}</div>
       <div class="action">
         <a-button type="primary" @click="handleToHome">返回登录</a-button>
       </div>
@@ -25,13 +25,20 @@
     // },
     data() {
       return {
-        errorInfo:''
+        title:'',
+        desc:''
       }
     },
     methods: {
       handleToHome() {
          this.$router.push({name: 'login'})
       }
+    },
+    mounted() {
+      console.log(this.$route.query);
+      this.title=this.$route.query.title;
+      this.desc=this.$route.query.desc;
+
     }
   }
 </script>