Browse Source

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

xiaozhen 6 years ago
parent
commit
ba85b339c0

BIN
assets/img/interview/banner1.png


BIN
assets/img/interview/banner1@2x.png


BIN
assets/img/interview/wechat.png


BIN
assets/img/interview/wechat@2x.png


+ 1 - 1
components/interview/interview.vue

@@ -116,7 +116,7 @@
       <p class="helper">扫码联系客户经理</p>
       <h6>咨询电话</h6>
       <div class="phone">
-        <i class="el-icon-phone"></i>0571-28120931 转1
+        <i class="el-icon-phone"></i>0571-28120931 转5
       </div>
     </section>
   </section>

+ 42 - 7
pages/cert/type/_id.vue

@@ -4,7 +4,7 @@
     <section class="apply-top">
       <h1>{{detail.name}}认证</h1>
       <section class="info" v-html="detail.description" />
-      <section v-if="showCats.length > 0" class="developer-show">
+      <section v-if="showCats && showCats.length > 0" class="developer-show">
         <h4>认证开发者展示</h4>
         <div class="developer_show-list">
           <div class="avatar_list">
@@ -13,10 +13,14 @@
                 <img class="avatar" :src="item.icon_url" alt="`${item.uid}`" />
               </a>
             </template>
+            <a
+              target="_blank"
+              style="vertical-align: bottom;display: inline-block;"
+              :href="`/cat/?verified=${id}`"
+            >
+              <el-button class="avatar-more" icon="el-icon-more" circle></el-button>
+            </a>
           </div>
-          <a target="_blank" :href="`/cat/?verified=${id}`">
-            <el-button class="avatar-more" icon="el-icon-more" circle></el-button>
-          </a>
         </div>
         <div class="more-link">
           <span>共{{showCount}}人,</span>
@@ -78,6 +82,7 @@ export default {
   async asyncData({ $axios, params, req }) {
     let id = params.id;
     let headers = req && req.headers;
+    console.log("---", params);
     let res = await $axios.$post(
       `/api/cert/getDetail`,
       { id },
@@ -85,7 +90,7 @@ export default {
     );
     let cats = await $axios.$post(
       `/api/cert/get_user_by_cert`,
-      { cert_id: id },
+      { cert_id: id, id },
       { headers, neverLogout: true }
     );
     const showCats =
@@ -94,12 +99,16 @@ export default {
         : [];
     const showCount = cats.data ? cats.data.count : 0;
     const data = res.data;
+    console.log("---", res, cats);
     if (!data) {
       return {
         detail: {
           conditions: {}
         },
-        workYearOp: 1
+        workYearOp: 1,
+        showCats,
+        showCount,
+        id
       };
     }
     let workYearOp = +data.user_info.work_year_op;
@@ -135,7 +144,17 @@ export default {
       return !this.detail.can_click;
     }
   },
-  mounted() {},
+  async mounted() {
+    if (!this.detail.description) {
+      let res = await this.$axios.$post(
+        `/api/cert/getDetail`,
+        { id: this.$route.params.id },
+        { neverLogout: true }
+      );
+      this.detail = res.data;
+      this.workYearOp = +res.data.user_info.work_year_op;
+    }
+  },
   methods: {
     // async loadData(cert_id) {
     //   const res = await this.$axios.$post("", {});
@@ -381,4 +400,20 @@ export default {
     border-top: 1px solid #eee;
   }
 }
+@media screen and (max-width: 800px) {
+  .avatar {
+    width: 38px;
+    height: 38px;
+    margin-bottom: 10px;
+  }
+  .avatar-more {
+    width: 38px;
+    height: 38px;
+    margin-bottom: 10px;
+  }
+
+  .avatar_list a {
+    margin-right: 10px;
+  }
+}
 </style>