瀏覽代碼

seo关键字,描述title动态获取, 移动端适配调整

ming 1 年之前
父節點
當前提交
61bf8607a0

+ 1 - 0
about/index.html

@@ -5,6 +5,7 @@
     <meta charset="utf-8" />
     <meta http-equiv="x-ua-compatible" content="ie=edge" />
     <meta title="description" content="" />
+    <meta  name="keywords" content="" />
     <meta title="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
     <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no" />
     <link rel="icon" href="../assets/img/favicon.ico">

+ 1 - 16
assets/css/home.css

@@ -133,22 +133,7 @@
     }
 }
 
-@media (max-width: 991px) {
-    .footer-widget-area .container .footerOne .footerWidth {
-        flex: 0 0 100%;
-        max-width: 100%;
-    }
-    .footer-widget-area .container .footerOne .footerNone {
-        display: none;
-    }
-    .ys-text-align .maxWidth {
-        flex: 0 0 50%;
-        max-width: 50%;
-    }
-    .ys-text-align div {
-        margin-bottom: 15px;
-    }
-}
+
 
 @media (max-width: 768px) {
     #hexGrid {

+ 22 - 2
assets/css/style.css

@@ -175,7 +175,7 @@
             
              ::-webkit-scrollbar {
                 /* 滚动条整体样式 */
-                width: 5px;
+                width: 0px;
                 /*高宽分别对应横竖滚动条的尺寸*/
                 height: 5px;
             }
@@ -2728,6 +2728,25 @@
                 margin-bottom: 20px;
                 border-bottom: 1px solid #283742;
             }
+
+            @media (max-width: 991px) {
+                .footer-widget-area .container .footerOne .footerWidth {
+                    flex: 0 0 100%;
+                    max-width: 100%;
+                }
+                .footer-widget-area .container .footerOne .footerNone {
+                    display: none;
+                }
+                .ys-text-align .maxWidth {
+                    flex: 0 0 50%;
+                    max-width: 50%;
+                }
+                .ys-text-align div {
+                    margin-bottom: 15px;
+                }
+            }
+
+
             
             @media only screen and (min-width: 576px) and (max-width: 767px) {
                 footer .footer-widget-area .widget.recent-post .post-loop .post {
@@ -4109,7 +4128,8 @@
             }
             @media (max-width: 1200px) {
                 .common-bradcrumb-section {
-                    height:450px
+                    height:200px;
+                    margin-top:90px
                 }
             }
             /*===========================

+ 14 - 1
assets/js/commonVue.js

@@ -4,6 +4,7 @@ import dialogCom from '/assets/js/component/dialogCom.js'
 import loadingCom from '/assets/js/component/loadingCom.js'
 import headerCom from '/assets/js/component/headerCom.js'
 
+var AboutKeyWrds='';
 
 var app = new Vue({
   el: '#app',
@@ -118,12 +119,15 @@ var app = new Vue({
           if (res.data[i].sname == window.location.pathname) { 
 
             //进入当前栏目页
+            getSeoCommon()
+           
             _this.columnTypes = res.data[i].children 
             _this.colL= _this.columnTypes.childten;
             if (res.data[i].children.length > 0) {
               _this.requestParams.categoryid = (_this.getQuery('isUrlId') == 1) ? _this.getQuery('id') : _this.columnTypes[0].id;
             } else {
-              _this.requestParams.categoryid = _this.getQuery('id')
+              var objData = _this.columnList.filter(obj => obj.sname == window.location.pathname);
+              _this.requestParams.categoryid=objData[0].id
             }
             _this.getArticalData(_this.requestParams) 
             _this.columnImage = res.data[i].imagePath; 
@@ -134,13 +138,17 @@ var app = new Vue({
             if (res.data[i].sname == '/product/index.html' && window.location.pathname == '/product/read.html') {
               
               getDetailCommon()
+              getSeoCommon()
             }
             if (res.data[i].sname == '/solution/index.html' && window.location.pathname == '/solution/read.html') {
               getDetailCommon()
+              getSeoCommon()
             }
             if (res.data[i].sname == '/news/index.html' && window.location.pathname == '/news/read.html') {
               getDetailCommon()
+              getSeoCommon()
             }
+
             function getDetailCommon(){
               //获取内容详情
               _this.getArticalData(_this.requestParams)
@@ -154,6 +162,11 @@ var app = new Vue({
               _this.columnImage = res.data[i].imagePath; //栏目图片获取
             }
           }
+          function getSeoCommon(){
+            $('title').text(res.data[i].categoryName);
+            $('meta[name="description"]').attr('content', res.data[i].metadescription);
+            $('meta[name="keywords"]').attr('content',res.data[i].metakeywords);
+          }
 
           //首页旧
 

+ 1 - 1
assets/js/component/footerCom.js

@@ -17,7 +17,7 @@ export default {
                           <div class="footerNone" style="width:15% !important;" v-for="item in todo" :key="item.id">
                               <div class="widget nav-widget d-flex justify-content-center ">
                                   <div>
-                                      <h5 class="widget-title"><a  :href="item.sname+'?id='+item.id+'isUrlId=0'"
+                                      <h5 class="widget-title"><a  :href="item.sname"
                                               >{{item.categoryName}}</a>
                                       </h5>
                                       <ul>

+ 1 - 1
assets/js/component/headerCom.js

@@ -17,7 +17,7 @@ export default {
                                 <ul v-if="todo">
                                     <li v-for="item in todo" :key="item.id" :class="
                                     currentone==item.sname? 'active':''">
-                                        <a :href="item.sname+'?id='+item.id+'&isUrlId=0'">{{item.categoryName}}</a>
+                                        <a :href="item.sname">{{item.categoryName}}</a>
                                         <ul class="submenu">
                                             <li v-if="item.children" v-for="aa in item.children" :key="aa.id"><a
                                                     :href="item.sname+'?id='+aa.id+'&isUrlId=1'"> <span

+ 9 - 2
index.html

@@ -5,10 +5,10 @@
     <meta charset="utf-8" />
     <meta http-equiv="x-ua-compatible" content="ie=edge" />
     <meta name="description" content="" />
-    <meta name="keywords" content="" />
+    <meta  name="keywords" content="" />
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
     <link rel="icon" href="assets/img/favicon.ico">
-    <title>永天科技</title>
+    <title></title>
     <!--====== bootstrap css ====== -->
     <link rel="stylesheet" href="assets/css/bootstrap.min.css" />
     <!--====== element css ====== -->
@@ -25,6 +25,7 @@
     <link rel="stylesheet" href="assets/css/style.css" />
     <!--====== home css ====== -->
     <link rel="stylesheet" href="assets/css/home.css" />
+    
 </head>
 
 <body>
@@ -240,6 +241,12 @@
     <script src="assets/js/main.js "></script>
     <!--====== commonVue js ======-->
     <script type="module" src="assets/js/commonVue.js "></script>
+
+
+    <script>
+        $('meta[name="description"]').attr("content", "新的描述内容");
+    </script>
+
     </body>
 
 </html>

+ 2 - 0
news/index.html

@@ -5,6 +5,7 @@
     <meta charset="utf-8" />
     <meta http-equiv="x-ua-compatible" content="ie=edge" />
     <meta name="description" content="" />
+    <meta  name="keywords" content="" />
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
     <link rel="icon" href="../assets/img/favicon.ico">
     <title>公司新闻</title>
@@ -22,6 +23,7 @@
     <!--====== Style css ======-->
     <link rel="stylesheet" href="../assets/css/style.css" />
 
+
 </head>
 
 <body>

+ 1 - 0
news/read.html

@@ -5,6 +5,7 @@
     <meta charset="utf-8" />
     <meta http-equiv="x-ua-compatible" content="ie=edge" />
     <meta name="description" content="" />
+    <meta  name="keywords" content="" />
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
     <link rel="icon" href="../assets/img/favicon.ico">
 

+ 1 - 0
product/index.html

@@ -8,6 +8,7 @@
     <meta name=renderer content=ie-stand>
     <meta http-equiv="x-ua-compatible" content="ie=edge" />
     <meta name="description" content="" />
+    <meta  name="keywords" content="" />
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
     <link rel="icon" href="../assets/img/favicon.ico">
     <title>产品服务</title>

+ 1 - 0
product/read.html

@@ -5,6 +5,7 @@
     <meta charset="utf-8" />
     <meta http-equiv="x-ua-compatible" content="ie=edge" />
     <meta name="description" content="" />
+    <meta  name="keywords" content="" />
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
     <link rel="icon" href="../assets/img/favicon.ico">
 

+ 2 - 1
solution/index.html

@@ -5,10 +5,11 @@
     <meta charset="utf-8" />
     <meta http-equiv="x-ua-compatible" content="ie=edge" />
     <meta title="description" content="" />
+    <meta  name="keywords" content="" />
     <meta title="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
     <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no" />
     <link rel="icon" href="../assets/img/favicon.ico">
-    <title>解决方案</title>
+    <title>客户案例1</title>
 
     <!--====== bootstrap css ====== -->
     <link rel="stylesheet" href="../assets/css/bootstrap.min.css" />

+ 2 - 1
solution/read.html

@@ -5,10 +5,11 @@
     <meta charset="utf-8" />
     <meta http-equiv="x-ua-compatible" content="ie=edge" />
     <meta name="description" content="" />
+    <meta  name="keywords" content="" />
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
     <link rel="icon" href="../assets/img/favicon.ico">
 
-    <title>产品详情</title>
+    <title>客户案例1</title>
 
     <!--====== bootstrap css ====== -->
     <link rel="stylesheet" href="../assets/css/bootstrap.min.css" />