Przeglądaj źródła

定制化 & SEO修改

xinfeng 6 lat temu
rodzic
commit
8bb957dc62

+ 8 - 5
components/kaifain/dealSeoIndex.js

@@ -160,7 +160,7 @@ export default class DealSeoData {
   }
 
   dealThisMeta(isSeoList) {
-    const { city, industry, techType, cityName="", industryName="", techTypeName="", proviceName} = this.selected
+    let { city, industry, techType, cityName="", industryName="", techTypeName="", proviceName} = this.selected
     const {headers: {host}, url} = this.req
 
     let head = {
@@ -172,6 +172,9 @@ export default class DealSeoData {
     } else {
       head.canonical = 'https://' + host + url
     }
+    if (techTypeName) {
+      techTypeName = techTypeName.replace("定制化", "")
+    }
 
     if (city && !industry && !techType) {
       //只有城市的
@@ -182,7 +185,7 @@ export default class DealSeoData {
       head.metaLocation = `province=${proviceName};city=${cityName}`
     } else if (!city && industry && !techType) {
       //只有行业的
-      head.title = `${industryName} 软件、网站、APP、小程序开发及SaaS、PaaS、IaaS、API服务平台-开发屋`
+      head.title = `${industryName}软件、网站、APP、小程序开发及SaaS、PaaS、IaaS、API服务平台-开发屋`
       head.keyword = `${industryName}软件开发,${industryName}APP开发,${industryName}小程序开发,${industryName}SaaS服务商`
       head.descrption = `开发屋为${industryName}中小型企业企业提供各行业软件、APP、小程序开发服务,并整合开发项目所需的各种SaaS、PaaS,LaaS以及API服务商供选择,全程解决开发需求!`
       head.h1 = `${industryName}软件开发`
@@ -201,20 +204,20 @@ export default class DealSeoData {
       head.metaLocation = `province=${proviceName};city=${cityName}`
     } else if (city && !industry && techType) {
       //${cityName}${techTypeName}
-      head.title = `${cityName}定制化${techTypeName}系统开发、${cityName}${techTypeName} 解决方案-开发屋`
+      head.title = `${cityName}定制化${techTypeName.replace("", "")}系统开发、${cityName}${techTypeName}解决方案-开发屋`
       head.keyword = `${cityName}${techTypeName},${cityName}${techTypeName}服务商,${cityName}${techTypeName}解决方案`
       head.descrption = `开发屋提供${cityName}${techTypeName}定制化服务,方便有${cityName}${techTypeName}需求的开发商挑选较为合适的${cityName}${techTypeName}解决方案完成项目开发和应用!`
       head.h1 = `${cityName}${techTypeName}解决方案服务商`
       head.metaLocation = `province=${proviceName};city=${cityName}`
     } else if (!city && industry && techType) {
       //${industryName}${techTypeName}
-      head.title = `${industryName}定制化${techTypeName}系统服务商、${industryName}${techTypeName} 解决方案-开发屋`
+      head.title = `${industryName}定制化${techTypeName}系统服务商、${industryName}${techTypeName}解决方案-开发屋`
       head.keyword = `${industryName}${techTypeName},${industryName}${techTypeName}服务商,${industryName}${techTypeName}解决方案`
       head.descrption = `开发屋提供${industryName}${techTypeName}定制化服务,方便有${industryName}${techTypeName}需求的开发商挑选较为合适的${industryName}${techTypeName}解决方案完成项目开发和应用!`
       head.h1 = `${industryName}${techTypeName}解决方案服务商`
     } else if (city && industry && techType) {
       // 开发屋城市&行业领域&技术分类页
-      head.title = `${cityName}${industryName}定制化${techTypeName}系统服务商、${cityName}${industryName}${techTypeName} 解决方案平台-开发屋`
+      head.title = `${cityName}${industryName}定制化${techTypeName}系统服务商、${cityName}${industryName}${techTypeName}解决方案平台-开发屋`
       head.keyword = `${cityName}${industryName}${techTypeName},${cityName}${industryName}${techTypeName}服务商,${cityName}${industryName}${techTypeName}解决方案`
       head.descrption = `开发屋提供${cityName}${industryName}${techTypeName}定制化服务,方便有${cityName}${industryName}${techTypeName}需求的开发商挑选较为合适的${cityName}${industryName}${techTypeName}解决方案完成项目开发和应用!`
       head.h1 = `${cityName}${industryName}${techTypeName}解决方案服务商`

+ 27 - 27
pages/kaifain/case/_tid.vue

@@ -44,7 +44,7 @@
     components: {ConnectUs, KaifainFooter},
     head() {
       return {
-        title: '/',
+        title: this.title,
         meta: [ {
           'name': 'keywords',
           'content': '定制化Saas、PasS、API、行业技术解决方案'
@@ -63,26 +63,44 @@
       } catch (e) {
         console.log("updateNoneCommonFooter", e)
       }
+
+      let tid = params.$route.params.tid || 0
+      tid = tid.replace(".html", "")
+
       let dealSeoFooterObj = new DealSeoFooter(params)
       let footer = await dealSeoFooterObj.dealData()
+      let detail = {}
+      params.$axios.post('/api/kaifawu/get_public_case?id='+ tid, {id: tid}).then(res=>{
+        if (Number(res.data.status) === 1) {
+          let data = res.data.data
+          if (!data) {
+            this.$message.error('查询失败!')
+            return
+          }
+          if (!Array.isArray(data.successful_case)) {
+            if (data.successful_case && typeof data.successful_case === "object") {
+              data.successful_case = [ data.successful_case ]
+            } else {
+              data.successful_case = []
+            }
+          }
+          detail = data || {}
+        }
+      })
 
       return {
         ...footer,
-        mobile: params.app.$deviceType.isMobile()
+        mobile: params.app.$deviceType.isMobile(),
+        detail
       };
     },
     data() {
       return {
-        detail: {
-        },
-        tid: 0,
         isShowToast: false
       }
     },
     created() {
-      let tid = this.$route.params.tid || 0
-      this.tid = tid.replace(".html", "")
-      this.getDetail()
+
     },
     mounted() {
 
@@ -94,28 +112,10 @@
       }
     },
     methods: {
-      getDetail() {
-        this.$axios.post('/api/kaifawu/get_public_case?id='+this.tid, {id: this.tid}).then(res=>{
-          if (Number(res.data.status) === 1) {
-            let data = res.data.data
-            if (!data) {
-              this.$message.error('查询失败!')
-              return
-            }
-            if (!Array.isArray(data.successful_case)) {
-              if (data.successful_case && typeof data.successful_case === "object") {
-                data.successful_case = [ data.successful_case ]
-              } else {
-                data.successful_case = []
-              }
-            }
-            this.detail = data || {}
-          }
-        })
-      },
       openPDF(item) {
         const {file} = item
         window.open(file, 'pdf' + Math.random())
+        return false
       }
     }
   }

+ 2 - 1
pages/kaifain/detail/_tid/index.vue

@@ -67,7 +67,7 @@
                 <div class="bTitle" v-if="!mobile">{{item.title}}</div>
                 <div class="bStitle">【{{detail.title}}】帮助【{{item.title}}】提供解决方案</div>
               </div>
-              <div class="bottom" @click="openPDF(item)" v-if="!mobile">
+              <div class="bottom" @click.stop="openPDF(item)" v-if="!mobile">
                 <div class="icon"/>
                 <div class="word">{{item.title}}.pdf</div>
               </div>
@@ -220,6 +220,7 @@
       openPDF(item) {
         const { file } = item
         window.open(file, 'pdf' + Math.random())
+        return false
       },
       jumpToCompany() {
         const { uid } = this.detail || {}