wangJJ vor 5 Jahren
Ursprung
Commit
c2d90459cf

+ 74 - 11
src/components/commons/HomeSlice.vue

@@ -5,14 +5,14 @@
         <div class="slice-wrapper" style="padding-left: 20%">
           <div class="slice-title"><img src="../../assets/img/homeslice1.png" alt="slice1"></div>
           <div class="slice-info">1分钟带你玩转众测服务平台</div>
-          <div class="slice-btn">立即进入<img src="../../assets/img/home-btn1.png" style="margin-left: 5px"></div>
+          <div class="slice-btn" @click="goToCreateProject" style="cursor: pointer">立即进入<img src="../../assets/img/home-btn1.png" style="margin-left: 5px"></div>
         </div>
       </el-col>
       <el-col :span="10">
         <div class="slice-wrapper">
           <div class="slice-title"><img src="../../assets/img/homeslice2.png" alt="slice2"></div>
           <div class="slice-info">入住众测服务平台流程</div>
-          <div class="slice-btn">立即进入<img src="../../assets/img/home-btn2.png" style="margin-left: 5px"></div>
+          <div class="slice-btn" @click="goToCreateTask" style="cursor: pointer">立即进入<img src="../../assets/img/home-btn2.png" style="margin-left: 5px"></div>
         </div>
       </el-col>
     </el-row>
@@ -20,18 +20,81 @@
 </template>
 
 <script>
-  export default {
-    name: 'HomeSlice'
-  }
+    import Apis from '@/js/api'
+    import Http from '@/js/http'
+    import {storageGet} from '@/js/index.js'
+    import {notify} from "../../constants";
+    export default {
+        name: 'HomeSlice',
+        data() {
+            return {
+                user: {},
+                isLogin: false,
+            }
+        },
+        methods: {
+            loadData(){
+                if (storageGet('user') != null) {
+                    this.isLogin = true;
+                    this.user = storageGet('user').userVO;
+                }
+            },
+            checkCreateProjectAuth() {
+                if (!this.isLogin) {
+                    console.log("请登录后访问");
+                    notify('warning', '请登录后访问');
+                }
+                else if(this.isLogin){
+                    Http.get(`/api/user/${this.user.id}`).then(res => {
+                        res.roleList.forEach(function(item) {
+                            if(item.indexOf("part") != -1){
+                                this.$router.push("/project/create")
+                            }
+                        })
+                        notify('warning', '请先认证成为发包用户');
+                    });
+
+                }
+            },
+            checkCreateTaskAuth() {
+                if (!this.isLogin) {
+                    console.log("请登录后访问");
+                    notify('warning', '请登录后访问');
+                }
+                else if(this.isLogin){
+                    Http.get(`/api/user/${this.user.id}`).then(res => {
+                        console.log(res.roleList);
+                        res.roleList.forEach(function(item) {
+                            if(item.indexOf("evaluation") != -1){
+                                this.$router.push("/square")
+                            }
+                        })
+                        notify('warning', '请先认证成为接包用户');
+                    });
+
+                }
+            },
+            goToCreateProject(){
+              this.checkCreateProjectAuth();
+            },
+            goToCreateTask(){
+                this.checkCreateTaskAuth();
+            },
+        },
+        mounted() {
+            this.loadData();
+        }
+    }
 </script>
 
 <style scoped lang="less">
-.slice-info {
-  font-size:16px;
-  font-family:Source Han Sans CN;
-  color:rgba(243,224,10,1);
-}
-  .slice-btn{
+  .slice-info {
+    font-size: 16px;
+    font-family: Source Han Sans CN;
+    color: rgba(243, 224, 10, 1);
+  }
+
+  .slice-btn {
     display: flex;
     margin-top: 5px;
     line-height: 30px;

+ 0 - 19
src/components/commons/ProjectItem.vue

@@ -1,21 +1,5 @@
 <template>
   <div class="project-item-container">
-    <!--<span class="col-xl-2 col-lg-3 col-md-4 col-sm-1" style="width: 150px">-->
-    <!--<img class="project-cover" src="@/assets/img/home_ban1.jpg">-->
-    <!--</span>-->
-    <!--<span class="project-title col-md-2 col-sm-10" style="width: 150px;font-size: 12px">{{project.name}}</span>-->
-    <!--<span class="project-title col-md-2 col-sm-10" style="width: 10%;font-size: 12px">{{project.id}}</span>-->
-    <!--<span class="col-md-2 col-sm-10" style="width: 10%">-->
-    <!--<span-->
-    <!--style="font-size: 10px;"-->
-    <!--v-bind:class="['badge',{ 'ios-platform': item=='IOS','android-platform': item=='ANDROID','web-platform': item=='WEB'}]"-->
-    <!--v-for="item in project.platform"-->
-    <!--&gt;{{item}}</span>-->
-    <!--</span>-->
-    <!--<span class="col-md-1 col-sm-5" style="width: 10%;font-size: 12px"><div class="badge">¥{{project.budget}}</div></span>-->
-    <!--<span class="project-td" style="width: 15%">-->
-    <!--<span class="btn btn-small btn-info" @click="goToProjectDetail(project.id)">查看详情</span>-->
-    <!--</span>-->
     <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
       <el-col :span="6" type="flex" align="middle" justify="center">
         <el-badge :value="project.statusVO.text" class="item" :type="project.statusVO.style">
@@ -39,10 +23,7 @@
         <span v-if="!project.needHandle" class="btn btn-small btn-info" @click="goToProjectDetail(project.id)">查看详情</span>
       </el-col>
     </el-row>
-
-
   </div>
-
 </template>
 
 <script>

+ 2 - 2
src/js/api.js

@@ -11,7 +11,7 @@ export default {
     REJECT_PROJECT: '/api/project/{projectId}/status/rejected',
     SUBMIT_PROJECT: '/api/project/{projectId}/status/committed',
     END_PROJECT: '/api/project/{projectId}/status/finished',
-    MORE_HOT_PROJECT: '/api/square/hotProject/list/more',
+    MORE_HOT_PROJECT: '/api/square/hotProject/list',
   },
   TASK: {
     GET_TASK: '/api/project/{projectId}/task/{taskId}/',
@@ -22,7 +22,7 @@ export default {
     REJECT_TASK: '/api/project/{projectId}/task/{taskId}/status/reject',
     SUBMIT_TASK: '/api/project/{projectId}/task/{taskId}/status/commit',
     END_TASK: '/api/project/{projectId}/task/{taskId}/status/finished',
-    MORE_HOT_TASK: '/api/square/hotTasks/list/more',
+    MORE_HOT_TASK: '/api/square/hotTasks/list',
   },
   REPORT: {
     GET_TASK_REPORT: '/api/project/{projectId}/task/{taskId}/report/{reportId}/',

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

@@ -6,8 +6,8 @@
     </div>
     <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%; cursor: pointer;" @click="goToDetail(item.userId)"/>
+        <el-col v-for="item in residentAgencyList" :key="item.id" :span="6" style="height: 70px">
+          <img :src="item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 70%;height: 100%; cursor: pointer;" @click="goToDetail(item.userId)"/>
         </el-col>
       </el-row>
     </div>

+ 17 - 17
src/pages/HomepageSearch/ExpertCard.vue

@@ -1,24 +1,29 @@
 <template>
   <el-card class="expert-card">
-    <div>
-      <div class="card-img"><img :src="card.photo" style="height: 50px; width: 50px;"/></div>
-      <div class="card-title">
-        {{card.name}}
-      </div>
-      <div class="card-content">
-        {{card.title}}
-      </div>
+    <el-row>
+      <el-col :span="6">
+        <div class="card-img"><img :src="card.photo" style="height: 50px; width: 50px;"/></div>
+      </el-col>
+      <el-col :span="18">
+        <div class="card-title">
+          {{card.name}}
+        </div>
+        <div class="card-content">
+          {{card.title}}
+        </div>
+      </el-col>
+
       <el-divider></el-divider>
       <div class="card-detail">
         {{card.introduction}}
       </div>
       <div class="card-action">
-        <div class="btn btn-small btn-info" @click="goToDetail(card.id)">查看详情</div>
+        <div class="btn btn-small btn-info pull-right" @click="goToDetail(card.id)">查看详情</div>
         <div class="participate-num">
           <!-- <span v-bind:class="['badge',{ 'ios-platform': item.toLowerCase()=='ios','android-platform': item.toLowerCase()=='android','web-platform': item.toLowerCase()=='web'}]" v-for="item in platformType">{{item}}</span> -->
         </div>
       </div>
-    </div>
+    </el-row>
   </el-card>
 </template>
 
@@ -53,6 +58,7 @@
 
 
   .expert-card {
+    padding: 10px;
     .card-img {
       margin: 10px;
       position: relative;
@@ -60,7 +66,6 @@
     }
 
     .card-title {
-      margin: 10px;
       font-size: 24px;
       font-family: Source Han Sans CN;
       font-weight: 500;
@@ -77,12 +82,11 @@
       font-family: Source Han Sans CN;
       font-weight: 400;
       color: rgba(0, 0, 0, 1);
-      height: 70px;
       overflow: hidden;
       text-overflow: ellipsis;
       display: -webkit-box; //作为弹性伸缩盒子模型显示。
       -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-      -webkit-line-clamp: 3; //显示的行
+      -webkit-line-clamp: 1; //显示的行
     }
 
     .card-detail {
@@ -90,7 +94,6 @@
       font-family: Source Han Sans CN;
       font-weight: 400;
       color: rgba(0, 0, 0, 1);
-      height: 70px;
       overflow: hidden;
       text-overflow: ellipsis;
       display: -webkit-box; //作为弹性伸缩盒子模型显示。
@@ -100,7 +103,4 @@
 
   }
 
-  .card-title, .card-content, .card-detail {
-    padding: 0 10px !important;
-  }
 </style>

+ 3 - 14
src/pages/Square/PopularProject.vue

@@ -41,20 +41,9 @@
     methods:{
         goToMore(){
             console.log("goToMoreProject");
-            let params = {
-                "keyword": '',//搜索关键字
-                "activePage": 1,//指定页面
-                "columnFilters":
-                [
-                ]
-            };
-            Http.post(Apis.PROJECT.MORE_HOT_PROJECT, params).then((res) => {
-                console.log(res)
-                this.$router.push({
-                  name: 'Square',
-                  params: {projectAndTaskArr: res.data.content, type: 1}
-              })
-
+            this.$router.push({
+                name: 'PopularProjectAndTaskList',
+                params: {type: "project"}
             })
         },
     }

+ 279 - 0
src/pages/Square/PopularProjectAndTaskList.vue

@@ -0,0 +1,279 @@
+<template>
+  <div>
+    <div class="nav" stype="height:500px">
+      <!--搜索框-->
+      <el-row class="search-nav" style="padding: 30px 0 20px 0">
+        <el-col :span="6">
+          <div class="pull-left" @click="gotoHome" style="cursor: pointer">
+            <img class="logo-img" src="../../assets/img/logo-blue.png" />
+            <span class="logo-title">群智众测平台</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="search-nav">
+            <div id="search-block " class="">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                <el-tab-pane v-for="item in tabArr" :label="item.label" :name="item.name" :key="item.label"></el-tab-pane>
+              </el-tabs>
+              <div class="search-input">
+                <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
+                  <el-button class="search-button" slot="append"  type="primary" @click="handleSearchData">搜索</el-button>
+                </el-input>
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="6">
+          <el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
+        </el-col>
+      </el-row>
+      <!--TabNav-->
+      <el-tabs v-model="currTab" @tab-click="handleTabClick" class="square-tab" >
+        <el-tab-pane  v-for="item in menuArr" :name="item.name" :key="item.name">
+          <span slot="label" style="font-size: 18px">{{item.label}}</span>
+        </el-tab-pane>
+      </el-tabs>
+      <div>
+      </div>
+    </div>
+    <div class="mine-body" style="text-align: center;">
+      <el-tabs value="myProject" @tab-click="handleTabClick" v-loading="loading" style="width: 90%;margin-left: 5%">
+        <el-tab-pane name="myProject">
+          <span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
+          <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle" justify="center"
+                  style="font-size: 14px;">
+            <el-col :span="6" type="flex" align="middle" justify="center">项目图片</el-col>
+            <el-col :span="6" type="flex" align="middle" justify="center">项目名称</el-col>
+            <el-col :span="6" type="flex" align="middle" justify="center">应用类型</el-col>
+            <el-col :span="2" type="flex" align="middle" justify="center">项目预算</el-col>
+            <el-col :span="4" type="flex" align="middle" justify="center">操作</el-col>
+          </el-row>
+          <project-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 ) || currTab == 'project'"
+                                    v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item"/>
+          <task-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 ) || currTab == 'task'"
+                         v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item"/>
+<!--          <div v-if="projectAndTaskArr != null || projectAndTaskArr.length > 0"-->
+<!--                        v-for="(item,index) in projectAndTaskArr" :key="index" :projectItem="item">-->
+
+<!--          <template>-->
+<!--            <div class="project-item-container">-->
+<!--              <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">-->
+<!--                <el-col :span="6" type="flex" align="middle" justify="center">-->
+<!--                  <el-badge :value="item.statusVO.text" class="item" :type="item.statusVO.style">-->
+<!--                    <img class="project-cover" src="@/assets/img/home_ban1.jpg">-->
+<!--                  </el-badge>-->
+<!--                </el-col>-->
+<!--                <el-col :span="6" type="flex" align="middle" justify="center">{{item.name}}</el-col>-->
+<!--                &lt;!&ndash;<el-col :span="4">{{project.id}}</el-col>&ndash;&gt;-->
+<!--                <el-col :span="6" type="flex" align="middle" justify="center">-->
+<!--        <span style="font-size: 10px;"-->
+<!--              v-bind:class="['badge']"-->
+<!--        >{{item.platform}}</span>-->
+<!--                </el-col>-->
+<!--                <el-col :span="2" type="flex" align="middle" justify="center">-->
+<!--                  <div class="badge">¥{{item.budget}}</div>-->
+<!--                </el-col>-->
+<!--                <el-col :span="4" type="flex" align="middle" justify="center">-->
+<!--                  <el-badge v-if="item.needHandle" is-dot class="item">-->
+<!--                    <span class="btn btn-small btn-info" @click="goToProjectDetail(item.id)">查看详情</span>-->
+<!--                  </el-badge>-->
+<!--                  <span v-if="!item.needHandle" class="btn btn-small btn-info" @click="goToProjectDetail(item.id)">查看详情</span>-->
+<!--                </el-col>-->
+<!--              </el-row>-->
+<!--            </div>-->
+<!--          </template>-->
+<!--          </div>-->
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+
+
+    <div class="container">
+      <el-row>
+        <el-col :span="18" class="project-task">
+<!--          <el-row :gutter="15"  style="margin-bottom: 10px">-->
+<!--            <el-col :span="8" v-for="(item,index) in projectAndTaskArr" :key="index" style="margin-bottom: 15px">-->
+<!--              <SquareCard :card="item"></SquareCard>-->
+<!--            </el-col>-->
+<!--          </el-row>-->
+
+          <el-pagination
+            v-if="currTab!=='squareHome'&&projectAndTaskArr&&projectAndTaskArr.length"
+            :page-size="12"
+            layout="prev, pager, next"
+            :total="totalElements"
+            :current-page = "activePage"
+            @current-change="handlePageChange"
+            class="pull-right"
+          >
+          </el-pagination>
+        </el-col>
+<!--        <el-col :span="6"  class="popular-modules" style="padding-left: 15px">-->
+<!--          <PopularProject :hotCrowdTestProjectVOs="hotCrowdTestProjectVOs" style="margin-bottom: 15px"/>-->
+<!--          <PopularTask :hotCrowdTaskVOs="hotCrowdTaskVOs"/>-->
+<!--        </el-col>-->
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+    import Http from '@/js/http.js'
+    import Apis from '@/js/api.js'
+    import SearchBar from '../../components/commons/SearchBar'
+    import SquareCard from './SquareCard'
+    import PopularProject from './PopularProject'
+    import PopularTask from './PopularTask'
+    import {notify} from "../../constants"
+    import TaskItem from '../../components/commons/TaskItem'
+    import ProjectItem from '../../components/commons/ProjectItem'
+    import {defaultValue, getRolesPermissions, storageGet} from '@/js/index'
+    import { mapActions ,mapGetters} from 'vuex';
+    export default {
+        name: 'PopularProjectAndTaskList',
+        comments: {TaskItem, ProjectItem},
+        data(){
+            return {
+                isLogin: false,
+                searchType:'project',
+                searchVal: '',
+                currTab:'project',
+                tabArr : [
+                    {label:"热门项目",name:"project"},
+                    {label:"热门任务",name:"task"}
+                ],
+                menuArr: [
+                    {label:"热门测试项目",name:"project"},
+                    {label:"热门测试任务",name:"task"}
+                ],
+                projectAndTaskArr:[],
+                type: 0,
+                activePage:1,
+                totalElements:0,
+                type: ''
+            }
+        },
+        components: {
+            ProjectItem,
+            SearchBar,
+            SquareCard,
+            PopularProject,
+            PopularTask
+        },
+        computed:{
+        },
+        methods:{
+            loadData(){
+                if (storageGet('user') != null) {
+                    this.isLogin = true;
+                }
+                this.type = this.$route.params.type;
+                if(this.type === "project"){
+                    this.currTab = 'project';
+                    this.getHotProject();
+                }else{
+                    this.currTab = 'task';
+                    this.getHotTask();
+                }
+            },
+            getHotProject(){
+                let params = {
+                    "keyword": this.keyword,//搜索关键字
+                    "activePage": this.activePage,//指定页面
+                    "columnFilters":[]
+                };
+                Http.post(Apis.PROJECT.MORE_HOT_PROJECT, params).then((res) => {
+                    console.log(res.data);
+                    this.projectAndTaskArr = res.data.content;
+                })
+            },
+            getHotTask(){
+                let params = {
+                    "keyword": this.keyword,//搜索关键字
+                    "activePage": this.activePage,//指定页面
+                    "columnFilters":[]
+                };
+                Http.post(Apis.TASK.MORE_HOT_TASK, params).then((res) => {
+                    this.projectAndTaskArr = res.data.content;
+                })
+            },
+
+            gotoHome(){
+                this.$router.push('/home');
+            },
+            handleTabClick(tab){
+                this.currTab = tab.name
+                this.searchType = this.currTab;
+                this.activePage = 1;
+                this.searchVal = '';
+                this.searchData()
+            },
+            handleTabClickSearch(){
+                this.activePage = 1;
+                this.searchData()
+            },
+            searchData(index){
+                if(this.currTab === 'project'){
+                    this.getHotProject();
+                }else{
+                    this.searchType = this.currTab;
+                    this.getHotTask();
+                }
+            },
+            handleTypeClick(tab){
+                this.searchType = tab.name;
+                // this.currTab = this.searchType;
+                this.activePage = 1;
+            },
+            checkLogin(){
+                if(!this.isLogin){
+                    console.log("请登录后访问");
+                    notify('warning','请登录后访问');
+                }else{
+                    console.log("已登录");
+                    this.$router.push('/project/create');
+                }
+            },
+            handleSearchData(){
+                let url = '/api/square/search/list';
+                let params = {
+                    "keyword": this.searchVal,//搜索关键字
+                    "activePage": this.activePage,//指定页面
+                    "columnFilters":
+                        [
+                            {
+                                "type": this.searchType // 查询项目就是project,任务就是task
+                            }
+                        ]
+                };
+                Http.post(url,params).then((res)=>{
+                    this.currTab = this.searchType;
+                    this.projectAndTaskArr = res.data.content;
+                    this.totalElements=res.data.totalElements;
+                })
+            },
+            handlePageChange(index){
+                this.activePage = index;
+                this.searchData();
+            }
+        },
+        mounted() {
+            this.loadData();
+        }
+    }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+  .project-task {
+    padding: 15px 0;
+    .el-card {
+      border: none;
+    }
+  }
+
+  .popular-modules {
+    padding: 15px 0 15px 15px;
+  }
+
+</style>

+ 3 - 14
src/pages/Square/PopularTask.vue

@@ -38,20 +38,9 @@
       methods:{
           goToMore(){
               console.log("goToMoreTask");
-              let params = {
-                  "keyword": '',//搜索关键字
-                  "activePage": 1,//指定页面
-                  "columnFilters":
-                      [
-
-                      ]
-              };
-              Http.post(Apis.TASK.MORE_HOT_TASK, params).then((res) => {
-                  console.log(res)
-                  this.$router.push({
-                      name: 'Square',
-                      params: {projectAndTaskArr: res.data.content, type: 0}
-                  })
+              this.$router.push({
+                  name: 'PopularProjectAndTaskList',
+                  params: {type: "task"}
               })
           },
       }

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

@@ -139,8 +139,8 @@
             this.isLogin = true;
         }
 
-        this.projectAndTaskArr = this.$route.params.projectAndTaskArr;
-        this.type = this.$route.params.type;
+        // this.projectAndTaskArr = this.$route.params.projectAndTaskArr;
+        // this.type = this.$route.params.type;
 
         // 从首页项目搜索框跳转过来
         this.currTab = this.$route.params.currTab;
@@ -151,11 +151,11 @@
             this.handleTabClickSearch();
         }
 
-        // 从热门项目和任务跳转过来
-        else if(this.type == 1){
-            console.log("type " + this.type);
-            this.getHotData();
-        }
+        // // 从热门项目和任务跳转过来
+        // else if(this.type == 1){
+        //     console.log("type " + this.type);
+        //     this.getHotData();
+        // }
 
         // 正常点击众测广场跳转过来
         else{

+ 4 - 3
src/pages/UserCenter/BindingMobile.vue

@@ -35,7 +35,10 @@
     },
     methods:{
       setUserInfo() {
-        this.user = storageGet('user') && storageGet('user').userVO;
+        let userId = storageGet('user')&&storageGet('user').userVO.id;
+        Http.get(`/api/user/${userId}`).then(res=>{
+          this.user = res.userVO
+        })
       },
       getVerifyCode(){
         let params = {
@@ -68,8 +71,6 @@
           if(res.code === 20000){
             notify('success', '绑定成功');
             this.$router.push({path:'/personal/phoneBinding'});
-            //需要更改vuex和storage中得user
-            console.log(storageGet(user));
          }
         }).catch(err=> {
           notify('error', err.data);

+ 5 - 15
src/pages/UserCenter/PhoneBinding.vue

@@ -17,18 +17,6 @@
         </div>
       </div>
       <router-view></router-view>
-
-
-<!--      <el-form label-width="80px" v-if="active===1">-->
-<!--        <el-form-item label="新手机号">-->
-<!--          <el-input v-model="phoneBindingForm.phone"></el-input>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="验证码">-->
-<!--          <el-input placeholder="验证码内容" v-model="input3" class="input-with-select">-->
-<!--            <el-button slot="append">{{hasVerifyCode ? codeTime :'获取验证码'}}</el-button>-->
-<!--          </el-input>-->
-<!--        </el-form-item>-->
-<!--      </el-form>-->
     </div>
   </div>
 </template>
@@ -53,7 +41,6 @@
           phone: '',
           verifyCode: ''
         },
-
       }
     },
     methods: {
@@ -69,8 +56,11 @@
           path: '/personal/phoneBinding/binding',
         });
       },
-      setUserInfo() {
-        this.user = storageGet('user') && storageGet('user').userVO;
+      setUserInfo(){
+        let userId = storageGet('user')&&storageGet('user').userVO.id;
+        Http.get(`/api/user/${userId}`).then(res=>{
+          this.user = res.userVO
+        })
       },
     },
     mounted() {

+ 18 - 3
src/pages/UserCenter/QualificationCard.vue

@@ -4,15 +4,15 @@
       <el-col :span="8" v-for="item in qualificationVOList" :key="item.id">
         <div class="qualification-card" @click="showQualificationDetail(item)">
           <div class="qualification-card-title" style="padding: 10px;height:24px;  overflow: hidden">
-            <span class="pull-left" style="font-size: 16px;font-weight: bold;line-height: 28px; width: 80%;">{{item.name}}</span>
+            <span class="qualification-card-name pull-left">{{item.name}}</span>
             <el-button type="primary" plain class="pull-right" size="mini">编辑</el-button>
           </div>
           <div class="qualification-card-detail-wrapper">
-            <div class="qualification-card-detail" style="height:24px;  overflow: hidden">
+            <div class="qualification-card-detail">
               <div class="qualification-card-detail-title">证书编号:</div>
               <div class="qualification-card-detail-info">{{item.number}}</div>
             </div>
-            <div class="qualification-card-detail" style="height:24px;  overflow: hidden">
+            <div class="qualification-card-detail">
               <div class="qualification-card-detail-title">发证机关:</div>
               <div class="qualification-card-detail-info">{{item.licensingAuthority}}</div>
             </div>
@@ -47,6 +47,17 @@
   background:rgba(255,255,255,1);
   box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);
   margin-bottom: 10px;
+  .qualification-card-title{
+    .qualification-card-name{
+      font-size: 16px;
+      font-weight: bold;
+      line-height: 28px;
+      width: 75%;
+      overflow: hidden; //超出的文本隐藏
+      text-overflow: ellipsis; //溢出用省略号显示
+      white-space: nowrap; //溢出不换行
+    }
+  }
   .qualification-card-detail-wrapper {
     padding: 10px;
     .qualification-card-detail{
@@ -54,10 +65,14 @@
       margin-bottom: 5px;
       .qualification-card-detail-title {
         font-size: 13px;
+        white-space: nowrap; //溢出不换行
       }
       .qualification-card-detail-info {
         color: rgba(153, 153, 153, 1);
         font-size: 13px;
+        overflow: hidden; //超出的文本隐藏
+        text-overflow: ellipsis; //溢出用省略号显示
+        white-space: nowrap; //溢出不换行
       }
     }
   }

+ 8 - 4
src/pages/UserCenter/ReBindingMobile.vue

@@ -33,7 +33,7 @@
     name: "ReBindingMobile",
     data(){
       return{
-        active: 1,
+        active: 0,
         user:{},
         phoneBindingForm: {
           phone: '',
@@ -45,16 +45,20 @@
     },
     methods:{
       setUserInfo() {
-        this.user = storageGet('user') && storageGet('user').userVO;
+        let userId = storageGet('user')&&storageGet('user').userVO.id;
+        Http.get(`/api/user/${userId}`).then(res=>{
+          this.user = res.userVO
+        })
       },
       reBindingMobile(){
           if(this.active === 0){
             //1.验证原手机
             let params = {
               "id": this.user.id,
-              "mobile": this.user.mobile
+              "mobile": this.user.mobile,
+              "verifyCode":this.phoneBindingForm.verifyCode
             }
-            Http.put('/api/verify/mobile',params).then(res=>{
+            Http.put('/api/verify/old/mobile',params).then(res=>{
               if(res.code === 20000){
                 notify('success', '验证成功');
                 this.active = 1;

+ 9 - 0
src/router/index.js

@@ -256,6 +256,15 @@ export default new Router({
       },
     },
     {
+      path: '/popular/list',
+      name: 'PopularProjectAndTaskList',
+      component: resolve => require(['@/pages/Square/PopularProjectAndTaskList.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      },
+    },
+    {
       path: '/technology',
       name: 'Technology',
       component: resolve => require(['@/pages/Technology/Technology2.0.vue'], resolve),