Forráskód Böngészése

Merge branch 'Test' into 'master'

Test

See merge request crowd-2019/crowd-test-service-front!106
郭超 5 éve
szülő
commit
8425ce34f0

+ 7 - 1
src/components/commons/Header2.0.vue

@@ -198,7 +198,13 @@
             this.isLogin = false
             logout().then((res) => {
                 // location.reload();
-                this.$router.push('/home')
+              console.log(this.$route.fullPath);
+                if(this.$route.fullPath.includes("/home")){
+                  location.reload();
+                }else{
+                  this.$router.push('/home')
+                }
+
             })
 
         },

+ 2 - 2
src/pages/Homepage/BrandCard.vue

@@ -4,9 +4,9 @@
       <span>入驻品牌机构</span>
       <a class="pull-right" style="color: rgba(0, 118, 203, 1); cursor: pointer" @click="goToMoreAgency()">more>></a>
     </div>
-    <div style="height: 210px">
+    <div style="height: 238px">
       <el-row :gutter="15">
-        <el-col v-for="item in residentAgencyList" :key="item.id" :span="4" style="height: 90px; margin-bottom: 20px">
+        <el-col v-for="item in residentAgencyList" :key="item.id" :span="4" style="height: 90px; margin-bottom: 28px">
           <img :src="item.agencyPhoto==null?defaultValue.image:item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 70%;height: 100%; cursor: pointer;" @click="goToDetail(item.userId)"/>
         </el-col>
       </el-row>

+ 2 - 2
src/pages/Homepage/HotContest.vue

@@ -48,7 +48,7 @@
 
 <style lang="less">
   .popular-card {
-    margin-bottom: 15px;
+    margin-bottom: 5px;
   }
   .popular-header .el-card__header{
     border-bottom: 2px solid rgba(0,117,203,1) !important;
@@ -74,7 +74,7 @@
 
   .popular-list {
     .popular-list-item {
-      padding: 5px 10px;
+      padding: 4px 10px;
       border-bottom: 1px solid #ccc !important;
 
       .list-item-title {

+ 14 - 9
src/pages/Homepage/LoginCard.vue

@@ -1,7 +1,7 @@
 <template>
   <el-card class="login-card">
     <div class="login-welcome">
-      <img :src="this.userImg" alt="welcome-img"
+      <img :src="this.userImg==null?defaultValue.image:this.userImg" alt="welcome-img"
            class="pull-left welcome-img">
 <!--      <img v-else src="../../assets/img/logo-project.png" alt="welcome-img" class="pull-left welcome-img">-->
       <div style="margin-left: 46px">
@@ -27,7 +27,7 @@
 <script>
   import Http from '@/js/http.js'
   import Apis from '@/js/api.js'
-  import {storageGet,logout} from '@/js/index.js'
+  import {storageGet,logout,defaultValue} from '@/js/index.js'
 
   export default {
     name: "LoginCard",
@@ -53,11 +53,16 @@
         })
       },
       getUserImg() {
-        Http.get(`/api/user/image/${this.user.userVO.id}`).then((res)=>{
-          if(res.data){
-            this.userImg = res.data;
-          }
-        })
+        if (this.user == null) {
+          this.userImg = null
+        }else{
+          Http.get(`/api/user/image/${this.user.userVO.id}`).then((res)=>{
+            if(res.data){
+              this.userImg = res.data;
+            }
+          })
+        }
+
       }
     },
     mounted() {
@@ -69,7 +74,7 @@
 
 <style scoped lang="less">
   .login-card {
-    margin-bottom: 15px;
+    margin-bottom: 13px;
 
     .welcome-img {
       width: 40px;
@@ -95,7 +100,7 @@
     .welcome-btn {
       width: 100%;
       height: 28px;
-      margin-top: 25px;
+      margin-top: 20px;
 
       .login-btn {
         background-color: rgba(0, 118, 203, 1);

+ 2 - 2
src/pages/Homepage/ResourceAndTool.vue

@@ -6,8 +6,8 @@
     </div>
     <div>
       <el-row>
-        <el-col :span="8" v-for="item in resourceList" :key="item.code" >
-          <span style="cursor: pointer" @click="goToDetail(item.code)">{{item.name}}</span>
+        <el-col :span="8" v-for="item in resourceList" :key="item.code" style=" margin-bottom: 10px;">
+          <span style="cursor: pointer; font-size: 18px;" @click="goToDetail(item.code)">{{item.name}}</span>
         </el-col>
       </el-row>
     </div>

+ 4 - 4
src/pages/Square/PopularProject.vue

@@ -6,7 +6,7 @@
       <span class="popular-header-title">热门项目</span>
       <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">more>></el-button>
     </div>
-    <div v-if="!hotCrowdTestProjectVOs.length" style="text-align: center;padding: 5px 0"><span>暂无任务</span></div>
+    <div v-if="!hotCrowdTestProjectVOs.length" style="text-align: center;padding: 5px 0"><span>暂无项目</span></div>
     <div class="popular-list" v-else>
       <el-row class="popular-list-item" v-for="item in hotCrowdTestProjectVOs" :key="item.id">
         <el-col :span="19">
@@ -66,12 +66,12 @@
     padding: 0 !important;
   }
   .popular-header {
-    height: 25px;
+    height: 15px;
     vertical-align:middle;
   }
   .popular-header-title {
     display: inline-block;
-    line-height: 25px;
+    line-height: 20px;
     vertical-align:middle;
   }
   .popular-header-img {
@@ -82,7 +82,7 @@
 
   .popular-list {
     .popular-list-item {
-      padding: 5px 10px;
+      padding: 10px 10px;
       border-bottom: 1px solid #ccc !important;
       .list-item-title{
         font-size:14px;

+ 1 - 0
src/pages/Square/Square2.0.vue

@@ -40,6 +40,7 @@
       <el-row>
         <el-col :span="18" class="project-task">
           <el-row :gutter="15"  style="margin-bottom: 10px">
+            <el-col v-if="!projectAndTaskArr.length" style="text-align: center;padding: 5px 0"><span>暂无数据</span></el-col>
             <el-col :span="8" v-for="(item,index) in projectAndTaskArr" :key="index" style="margin-bottom: 15px">
               <SquareCard :card="item"></SquareCard>
             </el-col>

+ 3 - 3
src/pages/Technology/HotActicle.vue

@@ -69,12 +69,12 @@
     padding: 0 !important;
   }
   .popular-header {
-    height: 25px;
+    height: 20px;
     vertical-align:middle;
   }
   .popular-header-title {
     display: inline-block;
-    line-height: 25px;
+    line-height: 20px;
     vertical-align:middle;
   }
   .popular-header-img {
@@ -85,7 +85,7 @@
 
   .popular-list {
     .popular-list-item {
-      padding: 5px 10px;
+      padding: 10px 10px;
       border-bottom: 1px solid #ccc !important;
       .list-item-title{
         cursor:pointer;

+ 11 - 8
src/pages/UserCenter/Mine.vue

@@ -96,12 +96,12 @@
           userName: [
             { required: true, message: '请设置用户名', trigger: 'change' }
           ],
-          province: [
-            { required: true, message: '请选择省份', trigger: 'blur' }
-          ],
-          city: [
-            { required: true, message: '请选择城市', trigger: 'blur' }
-          ],
+          // province: [
+          //   { required: true, message: '请选择省份', trigger: 'blur' }
+          // ],
+          // city: [
+          //   { required: true, message: '请选择城市', trigger: 'blur' }
+          // ],
           gender: [
             { required: true, message: '请选择性别', trigger: 'blur' }
           ],
@@ -120,8 +120,11 @@
           if (valid) {
             let location = getProvinceNameByProvinceCode(this.userForm.province, this.userForm.city);
             console.log(location)
-            this.userForm.province = location.provinceCode;
-            this.userForm.city = location.cityCode;
+            if(typeof location != "undefined"){
+              this.userForm.province = location.provinceCode;
+              this.userForm.city = location.cityCode;
+            }
+
             let params = this.userForm;
             delete params.location;
             console.log(params);