Browse Source

解决方案SEO问题

xinfeng 6 years ago
parent
commit
3eefbe60c7
3 changed files with 7 additions and 1 deletions
  1. 1 1
      components/kaifain/dealSeoIndex.js
  2. 3 0
      layouts/default.vue
  3. 3 0
      layouts/opacity_header.vue

+ 1 - 1
components/kaifain/dealSeoIndex.js

@@ -62,7 +62,7 @@ export default class DealSeoData {
           console.log("***urlCheck", urlCheck)
           console.log("***list", list.join(""))
           if (urlCheck !== list.join("")) {
-            this.error(404)
+            this.error({statusCode: 404, message: "您要访问的页面不存在"})
             return
           }
           

+ 3 - 0
layouts/default.vue

@@ -70,6 +70,9 @@ export default {
   min-height: calc(100vh - 376px);
   margin: 20px 0 30px;
 }
+.__nuxt-error-page .title{
+  font-size: 100%
+}
 @media screen and (max-width: 960px) {
   .main {
     min-width: auto;

+ 3 - 0
layouts/opacity_header.vue

@@ -59,6 +59,9 @@ export default {
   min-height: calc(100vh - 376px);
   margin: 20px 0 30px;
 }
+.__nuxt-error-page .title{
+  font-size: 100%
+}
 @media screen and (max-width: 960px) {
   .main {
     min-width: auto;