Procházet zdrojové kódy

Merge branch 'master' of www.gitinn.com:proginn/proginn-frontend

dxj před 6 roky
rodič
revize
ae13591b34

+ 3 - 2
assets/css/job/_post_id.scss

@@ -4,7 +4,8 @@
   .breadcrumb {
     width: 1000px;
     margin: 30px auto 10px auto;
-    a {
+    display: flex;
+    a, p, h1 {
       color: #666;
       font-size: 14px;
     }
@@ -139,7 +140,7 @@
       }
 
       .qrcode {
-        margin: 50px auto 0  auto;
+        margin: 50px auto 0 auto;
         width: 176px;
         height: 176px;
         position: relative;

+ 2 - 1
assets/css/job/index.scss

@@ -166,7 +166,8 @@
 
     .breadcrumb {
       margin-top: 30px;
-      a {
+      display: flex;
+      a, p, h1 {
         color: #666;
         font-size: 14px;
       }

+ 3 - 3
assets/css/kaifain/detail.scss

@@ -257,22 +257,22 @@
         flex-direction: column;
         .title {
           margin-top: pxtovw(54);
-          height: pxtovw(51);
           font-size: pxtovw(34);
           font-weight: 600;
           color: rgba(255, 255, 255, 1);
           line-height: pxtovw(50);
           letter-spacing: pxtovw(2);
+          text-align: center;
+          padding: 0 pxtovw(20);
         }
         .desc {
           margin-top: pxtovw(10);
-          height: pxtovw(38);
           font-size: pxtovw(13);
           font-weight: 400;
           color: rgba(255, 255, 255, 1);
           line-height: pxtovw(19);
+          padding: 0 pxtovw(20);
         }
-
         .btn {
           width: pxtovw(187);
           height: pxtovw(39);

+ 2 - 0
components/job/dealSeoFooter.js

@@ -15,6 +15,8 @@ export default class DealSeoData {
   
   async dealData() {
     let { name, path, params, fullPath } = this.app.context.route
+    console.log("this.app.context1", this.app.context.route)
+  
     let typeList = await this.getTypeList()
     this.typeList = typeList
     

+ 2 - 1
components/job/dealSeoIndex.js

@@ -48,7 +48,8 @@ export default class DealSeoData {
           list.length = Math.min(list.length, 3) //防止url超出
           list.filter(item => !!item)
           let urlCheck = ""
-          let keys = Object.keys(typeList)
+          // 驻场招聘不参与URL里
+          let keys = ["city", "direction"]
           //3 * 3 * n的循环 n < 100
           list.forEach(item => {
             keys.forEach(keys => {

+ 24 - 4
pages/job/detail/_id.vue

@@ -121,7 +121,8 @@
         :href="item.url"
         :title="item.name"
       >
-        {{item.name}} <span v-if="index!==breadcrumbList.length-1"> > </span>
+        <p v-if="index!==breadcrumbList.length-1">{{item.name}} <span>&nbsp;>&nbsp;</span> </p>
+        <h1 v-else>{{item.name}}</h1>
       </a>
     </div>
     <div class="contentArea">
@@ -206,7 +207,10 @@
         }, {
           'name': 'h1',
           'content': `${this.recruitData.title}`
-        } ]
+        } ],
+        link: [
+          { rel: 'canonical', href:  this.nowUrl},
+        ]
       }
     },
     async asyncData({...params}) {
@@ -240,13 +244,29 @@
 
       let dealSeoFooterObj = new DealSeoFooter(params, recruitData)
       let footer = await dealSeoFooterObj.dealData()
+
+      let nowUrl = ""
+      try {
+        const { headers: {host} } = params.app.context.req || {};
+        let { fullPath } = params.app.context.route
+        //设置baseLink
+        if (host.indexOf('local') !== -1) {
+          nowUrl = 'http://' + host + fullPath
+        } else {
+          nowUrl = 'https://' + host + fullPath
+        }
+      } catch (e) {
+        console.log(e)
+      }
+
       return {
+        nowUrl: nowUrl,
         android,
         recruitId: recruitId,
         recruitData,
         mobile: params.app.$deviceType.isMobile(),
-        footer,
-        breadcrumbList: dealBreadcrumbList
+        breadcrumbList: dealBreadcrumbList,
+        ...footer,
       }
     },
 

+ 6 - 4
pages/job/index.vue

@@ -44,7 +44,8 @@
               :href="item.url"
               :title="item.name"
             >
-              {{item.name}} <span v-if="index!==breadcrumbList.length-1"> > </span>
+              <p v-if="index!==breadcrumbList.length-1">{{item.name}} <span>&nbsp;>&nbsp;</span></p>
+              <h1 v-else>{{item.name}}</h1>
             </a>
         </div>
         <div class="listArea">
@@ -146,7 +147,6 @@
 
       let dealSeoFooterObj = new DealSeoFooter(params)
       let footer = await dealSeoFooterObj.dealData()
-
       return {
         ...ans,
         ...footer
@@ -224,8 +224,10 @@
         if (directionSmallSlug || directionSlug) {
           url += (directionSmallSlug || directionSlug) + '/'
         }
-        if (workTypeSlug) {
-          url += workTypeSlug + '/'
+        //驻场方式 不放到url里面
+        if (key === "workType") {
+          this.getList()
+          return
         }
         location.href = url
       },