Browse Source

Merge branch 'feature-2.0' of ssh://git.mooctest.com:1022/crowd-2019/crowd-test-service-front into feature-2.0

wangJJ 5 years ago
parent
commit
e24d6deba9

+ 2 - 4
src/pages/DetailPage/AgencyDetail.vue

@@ -25,7 +25,7 @@
           <el-link v-if="authentication.explain==null || authentication.explain==''" type="danger" disabled>管理员未填写
           </el-link>
         </el-form-item>
-        <el-form-item label="地址" prop="address">
+        <el-form-item label="地址" prop="address" v-if="this.authentication.address != null &&  this.authentication.address != ''">
           <span >{{authentication.address}}</span>
         </el-form-item>
         <el-form-item label="测评机构能力" prop="evaluationAgencyAbilityList">
@@ -98,9 +98,7 @@
                 this.getAuthInfo ()
             },
             back() {
-                this.$router.push({
-                    name: 'AgencyList'
-                })
+                this.$router.go(-1);
             },
             //加载数据
             getAuthInfo () {

+ 1 - 3
src/pages/DetailPage/ResourceDetail.vue

@@ -61,9 +61,7 @@
                 this.loadData()
             },
             back() {
-                this.$router.push({
-                    name: 'ResourceList'
-                })
+                this.$router.go(-1);
             },
             loadData() {
                 this.showLoading()

+ 3 - 5
src/pages/DetailPage/UserDetail.vue

@@ -9,10 +9,10 @@
           <!--          <span  class="badge">{{user.photo}}</span>-->
           <img :src="user.photo" style="width: 50px; height: 50px;"/>
         </el-form-item>
-        <el-form-item label="性别" prop="count">
+        <el-form-item label="性别" prop="count" v-if="this.gender != null &&  this.gender != ''">
           <span>{{user.gender}}</span>
         </el-form-item>
-        <el-form-item label="省市" prop="address">
+        <el-form-item label="省市" prop="address" v-if="this.address != null &&  this.address != ''">
           <span class="badge">{{user.address}}</span>
         </el-form-item>
         <el-form-item label="接包次数" prop="count">
@@ -60,9 +60,7 @@
                 this.loadData()
             },
             back() {
-                this.$router.push({
-                    name: 'UserList'
-                })
+                this.$router.go(-1);
             },
             loadData() {
                 this.showLoading()

+ 7 - 1
src/pages/Homepage/BrandCard.vue

@@ -7,7 +7,7 @@
     <div style="height: 96px">
       <el-row :gutter="15">
         <el-col v-for="item in residentAgencyList" :key="item.id" :span="6" style="height: 50px">
-          <img :src="item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 100%;height: 100%"/>
+          <img :src="item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 100%;height: 100%; cursor: pointer;" @click="goToDetail(item.userId)"/>
         </el-col>
       </el-row>
     </div>
@@ -24,6 +24,12 @@
                 name: 'AgencyResidentList',
             });
         },
+        goToDetail(userId) {
+            this.$router.push({
+                name: 'AgencyDetail',
+                params: {id: userId, type: 1}
+            })
+        },
     }
   }
 </script>

+ 0 - 1
src/pages/Homepage/Homepage.vue

@@ -157,7 +157,6 @@
         this.setFields();
 
         Http.get('/api/common/index/info/cache').then((res)=>{
-          console.log(res.data);
           this.homeData = res.data;
           // this.homeData.applicationTypeList.map((item)=>{
           //   item.height = (item.testTypeList.length / 2) * 24 + 100;

+ 8 - 2
src/pages/Homepage/HotAgency.vue

@@ -8,8 +8,8 @@
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in agencyRank" :key="item.id">
         <el-col :span="19">
-          <img :src="item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img">
-          <div style="margin-left: 55px">
+          <img :src="item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.userId)">
+          <div style="margin-left: 55px; cursor: pointer;" @click="goToDetail(item.userId)"  >
             <div class="list-item-title">
               {{item.evaluationAgencyName}}
             </div>
@@ -39,6 +39,12 @@
                 name: 'AgencyList',
             });
         },
+        goToDetail(userId) {
+            this.$router.push({
+                name: 'AgencyDetail',
+                params: {id: userId, type: 0}
+            })
+        },
     }
   }
 </script>

+ 1 - 1
src/pages/Homepage/HotCrowd.vue

@@ -8,7 +8,7 @@
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in applicationTypeRank" :key="item.id">
         <el-col :span="19">
-          <img src="../../assets/img/logo-project.png" alt="logo-project" class="pull-left project-logo-img">
+          <img :src="item.image" alt="logo-project" class="pull-left project-logo-img">
           <div style="margin-left: 55px">
             <div class="list-item-title">
               {{item.name}}

+ 8 - 2
src/pages/Homepage/HotUser.vue

@@ -8,8 +8,8 @@
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in userRank" :key="item.id">
         <el-col :span="19">
-          <img src="../../assets/img/logo-project.png" alt="logo-project" class="pull-left project-logo-img">
-          <div style="margin-left: 55px">
+          <img :src="item.photoUrl" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.id)">
+          <div style="margin-left: 55px;cursor: pointer;" @click="goToDetail(item.id)">
             <div class="list-item-title">
               {{item.name}}
             </div>
@@ -38,6 +38,12 @@
                 name: 'UserList',
             });
         },
+        goToDetail(id) {
+            this.$router.push({
+                name: 'UserDetail',
+                params: {id: id}
+            })
+        },
     }
   }
 </script>

+ 7 - 1
src/pages/Homepage/ResourceAndTool.vue

@@ -5,7 +5,7 @@
       <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
     </div>
     <div>
-      <div v-for="item in resourceList" :key="item.code">{{item.name}}</div>
+      <div v-for="item in resourceList" :key="item.code"><span style="cursor: pointer" @click="goToDetail(item.code)">{{item.name}}</span></div>
     </div>
   </el-card>
 </template>
@@ -20,6 +20,12 @@
                 name: 'ResourceList',
             });
         },
+        goToDetail(code) {
+            this.$router.push({
+                name: 'ResourceDetail',
+                params: {id: code}
+            })
+        },
     }
   }
 </script>