From 0b733984acbbc018511fba1ce3ce913d71639f64 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 21 十月 2020 10:35:06 +0800
Subject: [PATCH] 2020-10-21

---
 src/views/companyProfile/index.vue |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/views/companyProfile/index.vue b/src/views/companyProfile/index.vue
index 9df38bb..9d5fc65 100644
--- a/src/views/companyProfile/index.vue
+++ b/src/views/companyProfile/index.vue
@@ -56,7 +56,7 @@
         <p>鎴愪负涓浗淇℃伅鍖栦环鍊间紶閫掔殑鍊″鑰咃紝鑷村姏浜庨�氳繃淇℃伅鍖栨墜娈垫帹鍔ㄤ緵缁欎晶鏀归潻锛屽府鍔╀紒涓氬畬鎴愪腑鍥芥櫤閫犲崌绾с��</p>
         <div class="contentimg"><img src="../../img/feiji.jpg" alt=""></div>
       </div>
-      <div id="anchor-1"></div>
+      <div id="culture"></div>
       <div class="content_title fadeInUp zoomIn animated"><span>浼佷笟鏂囧寲</span></div>
       <div class="enterprise">
         <ul class="culture_ul">
@@ -136,7 +136,7 @@
         </div>
       </div>
 
-      <div id="anchor-2"></div>
+      <div id="aptitude"></div>
       <div class="wrapper">
         <div class="content_title fadeInUp zoomIn animated" style="margin-bottom: 0.8rem;"><span>鑽h獕璧勮川</span></div>
         <div class="m_bakcg">
@@ -222,7 +222,7 @@
           </div>
         </div>
 
-        <div id="anchor-3"></div>
+        <div id="contact"></div>
         <div class="content_title fadeInUp zoomIn animated"><span>鑱旂郴鏄庣</span></div>
         <div class="content contact">
           <ul class="contact_ul">
@@ -262,7 +262,7 @@
 	},
   watch: { //鐩戝惉璺敱
     $route (to, from) {
-      if (to.params.hash && to.params.hash !== 'null') {
+      if (to.params.hash) {
         this.anchor = true
         this.get_anchor(to.params.hash)
       }
@@ -272,13 +272,14 @@
     //鏍规嵁hash鍊艰烦杞笉鍚岄敋鐐�
 		get_anchor (hash) {
       if (this.anchor) {
+        hash = '#' + hash.replace('.html', '')
         document.querySelector(hash).scrollIntoView(true)
       }
     }
   },
 	mounted () {
     let hash = this.$route.params.hash
-    if (hash && hash !== 'null') {
+    if (hash) {
       this.anchor = true
       this.get_anchor(hash)
     }

--
Gitblit v1.8.0