فهرست منبع

使免费发布众测按钮生效

guo00guo 5 سال پیش
والد
کامیت
cbacafa079

+ 100 - 93
src/pages/DetailPage/CrowdDetail.vue

@@ -5,7 +5,7 @@
       <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" />
+            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
             <span class="logo-title">群智众测平台</span>
           </div>
         </el-col>
@@ -13,11 +13,12 @@
           <div class="search-nav">
             <div id="search-block " class="">
               <el-tabs v-model="searchType" type="card">
-                <el-tab-pane v-for="item in tabArr" :label="item.label" :name="item.name" :key="item.label"></el-tab-pane>
+                <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-button class="search-button" slot="append" type="primary" @click="handleSearchData">搜索</el-button>
                 </el-input>
               </div>
             </div>
@@ -44,7 +45,7 @@
             <el-col :span="4" type="flex" align="middle" justify="center">操作</el-col>
           </el-row>
           <project-item v-if="(projectList != null || projectList.length > 0 )"
-                                    v-for="(item,index) in projectList" :key="item.id" :projectItem="item"/>
+                        v-for="(item,index) in projectList" :key="item.id" :projectItem="item"/>
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -57,7 +58,7 @@
             :page-size="10"
             layout="prev, pager, next"
             :total="totalElements"
-            :current-page = "activePage"
+            :current-page="activePage"
             @current-change="handlePageChange"
             class="pull-right"
           >
@@ -69,102 +70,108 @@
 </template>
 
 <script>
-    import Http from '@/js/http.js'
-    import Apis from '@/js/api.js'
-    import SearchBar from '../../components/commons/SearchBar'
-    import {notify} from "../../constants"
-    import ProjectItem from '../../components/commons/ProjectItem'
-    import {defaultValue, storageGet} from '@/js/index'
-    export default {
-        name: 'CrowdDetail',
-        comments: {ProjectItem},
-        data(){
-            return {
-                loading: false,
-                isLogin: false,
-                searchType:'project',
-                searchVal: '',
-                currTab:'project',
-                tabArr : [
-                    {label:"众测项目",name:"project"},
-                ],
-                projectList:[],
-                activePage:1,
-                totalElements:0,
-                code: ''
-            }
-        },
-        components: {
-            ProjectItem,
-            SearchBar,
-        },
-        computed:{
-        },
-        methods:{
-            loadData(){
-                this.showLoading();
-                if (storageGet('user') != null) {
-                    this.isLogin = true;
-                }
-                this.code = this.$route.params.code;
-                this.getCrowdProject();
-                this.hideLoading();
-            },
-            getCrowdProject(){
-                let params = {
-                    "keyword": this.searchVal,//搜索关键字
-                    "activePage": this.activePage,//指定页面
-                    "columnFilters":[]
-                };
-                Http.post(Apis.PROJECT.CROWD_PROJECT.replace('{code}', this.code), params).then((res) => {
-                    this.projectList = res.data.content;
-                    this.totalElements = res.data.totalElements;
-                    console.log(this.projectList)
-                })
-            },
-            gotoHome(){
-                this.$router.push('/home');
-            },
-          checkLogin() {
-            this.checkCreateProjectAuth();
-          },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
-            }
-          },
-            handleSearchData(){
-              this.activePage = 1;
-              this.getCrowdProject();
-            },
-            handlePageChange(index){
-                this.activePage = index;
-                this.getCrowdProject();
-            },
-            showLoading () {
-                this.loading = true
-            },
-            hideLoading () {
-                this.loading = false
-            },
-        },
-        mounted() {
-            this.loadData();
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import SearchBar from '../../components/commons/SearchBar'
+  import {notify} from "../../constants"
+  import ProjectItem from '../../components/commons/ProjectItem'
+  import {defaultValue, storageGet} from '@/js/index'
+
+  export default {
+    name: 'CrowdDetail',
+    comments: {ProjectItem},
+    data() {
+      return {
+        user: {},
+        loading: false,
+        isLogin: false,
+        searchType: 'project',
+        searchVal: '',
+        currTab: 'project',
+        tabArr: [
+          {label: "众测项目", name: "project"},
+        ],
+        projectList: [],
+        activePage: 1,
+        totalElements: 0,
+        code: ''
+      }
+    },
+    components: {
+      ProjectItem,
+      SearchBar,
+    },
+    computed: {},
+    methods: {
+      loadData() {
+        this.showLoading();
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.code = this.$route.params.code;
+        this.getCrowdProject();
+        this.hideLoading();
+      },
+      getCrowdProject() {
+        let params = {
+          "keyword": this.searchVal,//搜索关键字
+          "activePage": this.activePage,//指定页面
+          "columnFilters": []
+        };
+        Http.post(Apis.PROJECT.CROWD_PROJECT.replace('{code}', this.code), params).then((res) => {
+          this.projectList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
         }
+      },
+      handleSearchData() {
+        this.activePage = 1;
+        this.getCrowdProject();
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.getCrowdProject();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style lang="less">
   @import "../../style/search-nav";
+
   .project-task {
     padding: 15px 0;
+
     .el-card {
       border: none;
     }

+ 2 - 2
src/pages/DetailPage/ExpertDetail.vue

@@ -15,14 +15,14 @@
         <el-form-item label="头衔" prop="address">
           <span>{{expert.title}}</span>
         </el-form-item>
-        <el-form-item label="简介" prop="address">
+        <el-form-item label="简介" prop="address" style="height: 500px; overflow: scroll">
           <span>{{expert.introduction}}</span>
         </el-form-item>
 <!--        <el-form-item label="接包次数" prop="count">-->
 <!--          <span>{{expert.taskCount}}</span>-->
 <!--        </el-form-item>-->
         <el-form-item>
-          <div class="btn btn-medium" @click="back()">返回</div>
+          <div class="btn btn-medium" style="margin-top: 20px" @click="back()">返回</div>
         </el-form-item>
       </el-form>
     </div>

+ 144 - 136
src/pages/HomepageSearch/AgencyList.vue

@@ -44,7 +44,9 @@
               <el-table-column
                 label="头像"
                 width="100">
-                <template slot-scope="scope"><img :src="scope.row.agencyPhoto==null?defaultValue.image:scope.row.agencyPhoto" style="width: 50px; height: 50px;"/>
+                <template slot-scope="scope"><img
+                  :src="scope.row.agencyPhoto==null?defaultValue.image:scope.row.agencyPhoto"
+                  style="width: 50px; height: 50px;"/>
                 </template>
               </el-table-column>
               <el-table-column
@@ -89,146 +91,152 @@
 </template>
 
 <script>
-    import Http from '@/js/http.js';
-    import TopSearch from "../../components/commons/TopSearch";
-    import {storageGet,defaultValue} from '@/js/index.js'
-    import {notify} from "../../constants";
+  import Http from '@/js/http.js';
+  import TopSearch from "../../components/commons/TopSearch";
+  import {storageGet, defaultValue} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api'
 
-    export default {
-        name: "AgencyList",
-        components: {TopSearch},
-        data() {
-            return {
-                isLogin: false,
-                loading: false,
-                defaultValue: defaultValue,
-                searchVal: '',
-                searchType: '1',
-                searchTypeArr: [
-                    {
-                        "name": "全部",
-                        "value": "all"
-                    },
-                    {
-                        "name": "项目",
-                        "value": "0"
-                    },
-                    {
-                        "name": "机构",
-                        "value": "1"
-                    },
-                    {
-                        "name": "工具",
-                        "value": "2"
-                    },
-                    {
-                        "name": "专家",
-                        "value": "3"
-                    }],
-                curAgencyList: [],
-                activePage: 1,
-                totalElements: 0
-            }
-        },
-        methods: {
-            loadData() {
-                this.showLoading();
-                if (storageGet('user') != null) {
-                    this.isLogin = true;
-                }
-                this.searchVal = this.$route.params.searchVal;
-                this.handleSearchData();
-                this.hideLoading();
-            },
-
-            showLoading () {
-                this.loading = true
-            },
-            hideLoading () {
-                this.loading = false
-            },
-          checkLogin() {
-            this.checkCreateProjectAuth();
+  export default {
+    name: "AgencyList",
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        defaultValue: defaultValue,
+        searchVal: '',
+        searchType: '1',
+        searchTypeArr: [
+          {
+            "name": "全部",
+            "value": "all"
           },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
-            }
+          {
+            "name": "项目",
+            "value": "0"
+          },
+          {
+            "name": "机构",
+            "value": "1"
           },
-            handleSearchData() {
-                if (this.searchType == 0) {
-                    // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
-                } else if (this.searchType == 1) {
-                    let url = '/api/agency/list/more';
-                    let params = {
-                        "keyword": this.searchVal,
-                        "activePage": this.activePage,
-                        "columnFilters": [
-                            {
-                                "field": "type",
-                                "type": "enums",
-                                "enums": this.searchTypeArr,
-                                "value": this.searchType
-                            }
-                        ]
-                    }
-                    Http.post(url, params).then((res) => {
-                        this.curAgencyList = res.data.content;
-                        this.totalElements = res.data.totalElements;
-                    })
-                } else if (this.searchType == 2) {
-                    this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
-                } else if (this.searchType == 3) {
-                    this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
-                }
-            },
-            goToDetail(userId) {
-                this.$router.push({
-                    name: 'AgencyDetail',
-                    params: {id: userId, type: 0}
-                })
-            },
-            nextPage() {
-                let url = '/api/agency/list/more';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curAgencyList = res.data.content;
-                    this.totalElements = res.data.totalElements;
-                })
-            },
-            gotoHome() {
-                this.$router.push('/home');
-            },
-            handleTypeClick(tab) {
-                this.searchType = tab.name
-            },
-            handlePageChange(index) {
-                this.activePage = index;
-                this.nextPage();
+          {
+            "name": "工具",
+            "value": "2"
+          },
+          {
+            "name": "专家",
+            "value": "3"
+          }],
+        curAgencyList: [],
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        this.showLoading();
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.searchVal = this.$route.params.searchVal;
+        this.handleSearchData();
+        this.hideLoading();
+      },
+
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        if (this.searchType == 0) {
+          // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
+        } else if (this.searchType == 1) {
+          let url = '/api/agency/list/more';
+          let params = {
+            "keyword": this.searchVal,
+            "activePage": this.activePage,
+            "columnFilters": [
+              {
+                "field": "type",
+                "type": "enums",
+                "enums": this.searchTypeArr,
+                "value": this.searchType
+              }
+            ]
+          }
+          Http.post(url, params).then((res) => {
+            this.curAgencyList = res.data.content;
+            this.totalElements = res.data.totalElements;
+          })
+        } else if (this.searchType == 2) {
+          this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
+        } else if (this.searchType == 3) {
+          this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
+        }
+      },
+      goToDetail(userId) {
+        this.$router.push({
+          name: 'AgencyDetail',
+          params: {id: userId, type: 0}
+        })
+      },
+      nextPage() {
+        let url = '/api/agency/list/more';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-        },
-        mounted() {
-            this.loadData();
-        },
+          ]
+        }
+        Http.post(url, params).then((res) => {
+          this.curAgencyList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.nextPage();
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style scoped>

+ 114 - 106
src/pages/HomepageSearch/AgencyResidentList.vue

@@ -31,7 +31,7 @@
         </el-col>
       </el-row>
     </div>
-    <div class="container" style="margin: 20px auto;">
+    <div class="container" style="margin: 20px auto;" v-loading="loading">
       <div class="create-body">
         <div class="title h2">入驻品牌机构</div>
         <el-collapse accordion style="margin: 0 30px">
@@ -44,7 +44,9 @@
               <el-table-column
                 label="头像"
                 width="100">
-                <template slot-scope="scope"><img :src="scope.row.agencyPhoto==null?defaultValue.image:scope.row.agencyPhoto" style="width: 50px; height: 50px;"/></template>
+                <template slot-scope="scope"><img
+                  :src="scope.row.agencyPhoto==null?defaultValue.image:scope.row.agencyPhoto"
+                  style="width: 50px; height: 50px;"/></template>
               </el-table-column>
               <el-table-column
                 prop="name"
@@ -83,115 +85,121 @@
 </template>
 
 <script>
-    import Http from '@/js/http.js';
-    import TopSearch from "../../components/commons/TopSearch";
-    import {storageGet,defaultValue} from '@/js/index.js'
-    import {notify} from "../../constants";
+  import Http from '@/js/http.js';
+  import TopSearch from "../../components/commons/TopSearch";
+  import {storageGet, defaultValue} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
 
-    export default {
-        name: "AgencyResidentList",
-        props: ['searchVal', 'agencyList'],
-        components: {TopSearch},
-        data() {
-            return {
-                isLogin: false,
-                searchType: '0',
-                loading: false,
-                defaultValue: defaultValue,
-                searchTypeArr: [
-                    {
-                        "name": "入驻机构",
-                        "value": "0"
-                    }],
-                curAgencyList: this.agencyList,
-                activePage: 1,
-                totalElements: 0
+  export default {
+    name: "AgencyResidentList",
+    props: ['searchVal', 'agencyList'],
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        searchType: '0',
+        loading: false,
+        defaultValue: defaultValue,
+        searchTypeArr: [
+          {
+            "name": "入驻机构",
+            "value": "0"
+          }],
+        curAgencyList: this.agencyList,
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        let url = '/api/resident/agency/more';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-        },
-        methods: {
-            loadData() {
-                if (storageGet('user') != null) {
-                    this.isLogin = true;
-                }
-                let url = '/api/resident/agency/more';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curAgencyList = res.data.content;
-                    this.totalElements=res.data.totalElements;
-                })
-            },
-          checkLogin() {
-            this.checkCreateProjectAuth();
-          },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
+          ]
+        }
+        Http.post(url, params).then((res) => {
+          this.curAgencyList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        let url = '/api/resident/agency/more';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-          },
-            handleSearchData() {
-                let url = '/api/resident/agency/more';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curAgencyList = res.data.content;
-                    this.totalElements=res.data.totalElements;
-                })
-            },
-            gotoHome() {
-                this.$router.push('/home');
-            },
-            handleTypeClick(tab) {
-                this.searchType = tab.name
-            },
-            handlePageChange(index) {
-                this.activePage = index;
-                this.handleSearchData();
-            },
-            goToDetail(id) {
-                this.$router.push({
-                    name: 'AgencyDetail',
-                    params: {id: id, type: 1}
-                })
-            },
-            showLoading () {
-                this.loading = true
-            },
-            hideLoading () {
-                this.loading = false
-            },
-        },
-        mounted() {
-            this.loadData();
+          ]
         }
+        Http.post(url, params).then((res) => {
+          this.curAgencyList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.handleSearchData();
+      },
+      goToDetail(id) {
+        this.$router.push({
+          name: 'AgencyDetail',
+          params: {id: id, type: 1}
+        })
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style scoped>

+ 109 - 94
src/pages/HomepageSearch/CompetitionList.vue

@@ -31,7 +31,7 @@
         </el-col>
       </el-row>
     </div>
-    <div class="container" style="margin: 20px auto;">
+    <div class="container" style="margin: 20px auto;" v-loading="loading">
       <div class="create-body">
         <div class="title h2">众测大赛</div>
         <el-collapse accordion style="margin: 0 30px">
@@ -44,13 +44,15 @@
               <el-table-column
                 label="图标"
                 width="100">
-                <template slot-scope="scope"><img :src="scope.row.image==null?defaultValue.image:scope.row.image" style="width: 50px; height: 50px;"/></template>
+                <template slot-scope="scope"><img :src="scope.row.image==null?defaultValue.image:scope.row.image"
+                                                  style="width: 50px; height: 50px;"/></template>
               </el-table-column>
               <el-table-column
                 label="名称"
                 align="left"
                 width="500">
-                <template slot-scope="scope"><a target="_blank" :href="scope.row.linkUrl" itemscope>{{scope.row.name}}</a></template>
+                <template slot-scope="scope"><a target="_blank" :href="scope.row.linkUrl"
+                                                itemscope>{{scope.row.name}}</a></template>
               </el-table-column>
               <el-table-column
                 prop="unit"
@@ -81,102 +83,115 @@
 </template>
 
 <script>
-    import Http from '@/js/http.js';
-    import TopSearch from "../../components/commons/TopSearch";
-    import {storageGet,defaultValue} from '@/js/index.js'
-    import {notify} from "../../constants";
+  import Http from '@/js/http.js';
+  import TopSearch from "../../components/commons/TopSearch";
+  import {storageGet, defaultValue} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
 
-    export default {
-        name: "CompetitionList",
-        props: ['searchVal', 'competitionList'],
-        components: {TopSearch},
-        data() {
-            return {
-                isLogin: false,
-                // searchVal: '',
-                searchType: '0',
-                defaultValue: defaultValue,
-                searchTypeArr: [
-                    {
-                        "name": "大赛",
-                        "value": "0"
-                    }],
-                curCompetitionList: this.competitionList,
-                activePage: 1,
-                totalElements: 0
-            }
-        },
-        methods: {
-            loadData() {
-                if (storageGet('user') != null) {
-                    this.isLogin = true;
-                }
-                let url = '/api/common/index/competition';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curCompetitionList = res.data.content;
-                    this.totalElements=res.data.totalElements;
-                })
-            },
-          checkLogin() {
-            this.checkCreateProjectAuth();
-          },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
+  export default {
+    name: "CompetitionList",
+    props: ['searchVal', 'competitionList'],
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        // searchVal: '',
+        searchType: '0',
+        defaultValue: defaultValue,
+        searchTypeArr: [
+          {
+            "name": "大赛",
+            "value": "0"
+          }],
+        curCompetitionList: this.competitionList,
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        let url = '/api/common/index/competition';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-          },
-            handleSearchData() {
-                let url = '/api/common/index/competition';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curCompetitionList = res.data.content;
-                })
-            },
-            gotoHome() {
-                this.$router.push('/home');
-            },
-            handleTypeClick(tab) {
-                this.searchType = tab.name
-            },
-            handlePageChange(index) {
-                this.activePage = index;
-                this.handleSearchData();
+          ]
+        }
+        Http.post(url, params).then((res) => {
+          this.curCompetitionList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        let url = '/api/common/index/competition';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-        },
-        mounted() {
-            this.loadData();
+          ]
         }
+        Http.post(url, params).then((res) => {
+          this.curCompetitionList = res.data.content;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.handleSearchData();
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style scoped>

+ 120 - 107
src/pages/HomepageSearch/CrowdList.vue

@@ -31,7 +31,7 @@
         </el-col>
       </el-row>
     </div>
-    <div class="container" style="margin: 20px auto;">
+    <div class="container" style="margin: 20px auto;" v-loading="loading">
       <div class="create-body">
         <div class="title h2">众测应用类型</div>
         <template style="color: black">
@@ -65,123 +65,136 @@
             </el-table-column>
           </el-table>
         </template>
-          <el-pagination
-            v-if="curCrowdList&&curCrowdList.length"
-            :page-size="9"
-            layout="prev, pager, next"
-            :total="totalElements"
-            :current-page="activePage"
-            @current-change="handlePageChange"
-            class="pull-right"
-          >
-          </el-pagination>
+        <el-pagination
+          v-if="curCrowdList&&curCrowdList.length"
+          :page-size="9"
+          layout="prev, pager, next"
+          :total="totalElements"
+          :current-page="activePage"
+          @current-change="handlePageChange"
+          class="pull-right"
+        >
+        </el-pagination>
       </div>
     </div>
   </div>
 </template>
 
 <script>
-    import Http from '@/js/http.js';
-    import TopSearch from "../../components/commons/TopSearch";
-    import {storageGet} from '@/js/index.js'
-    import {notify} from "../../constants";
+  import Http from '@/js/http.js';
+  import TopSearch from "../../components/commons/TopSearch";
+  import {storageGet} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
 
-    export default {
-        name: "CrowdList",
-        props: ['searchVal', 'crowdList'],
-        components: {TopSearch},
-        data() {
-            return {
-                isLogin: false,
-                // searchVal: '',
-                searchType: '0',
-                searchTypeArr: [
-                    {
-                        "name": "众测",
-                        "value": "0"
-                    }],
-                curCrowdList: this.crowdList,
-                activePage: 1,
-                totalElements: 0,
+  export default {
+    name: "CrowdList",
+    props: ['searchVal', 'crowdList'],
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        // searchVal: '',
+        searchType: '0',
+        searchTypeArr: [
+          {
+            "name": "众测",
+            "value": "0"
+          }],
+        curCrowdList: this.crowdList,
+        activePage: 1,
+        totalElements: 0,
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        let url = '/api/common/index/application';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-        },
-        methods: {
-            loadData() {
-                if (storageGet('user') != null) {
-                    this.isLogin = true;
-                }
-                let url = '/api/common/index/application';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curCrowdList = res.data.content;
-                    this.totalElements=res.data.totalElements;
-                })
-            },
-          checkLogin() {
-            this.checkCreateProjectAuth();
-          },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
+          ]
+        }
+        Http.post(url, params).then((res) => {
+          this.curCrowdList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        let url = '/api/common/index/application';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-          },
-            handleSearchData() {
-                let url = '/api/common/index/application';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curCrowdList = res.data.content;
-                })
-            },
-            gotoHome() {
-                this.$router.push('/home');
-            },
-            handleTypeClick(tab) {
-                this.searchType = tab.name
-            },
-            handlePageChange(index) {
-                this.activePage = index;
-                this.handleSearchData();
-            },
-            goToDetail(code) {
-                this.$router.push({
-                    name: 'CrowdDetail',
-                    params: {code: code}
-                })
-            },
-        },
-        mounted() {
-            this.loadData();
+          ]
         }
+        Http.post(url, params).then((res) => {
+          this.curCrowdList = res.data.content;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.handleSearchData();
+      },
+      goToDetail(code) {
+        this.$router.push({
+          name: 'CrowdDetail',
+          params: {code: code}
+        })
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style scoped>

+ 135 - 119
src/pages/HomepageSearch/ExpertList.vue

@@ -32,7 +32,7 @@
       </el-row>
     </div>
 
-    <div class="container" style="margin: 20px auto;">
+    <div class="container" style="margin: 20px auto;" v-loading="loading">
       <div class="title h2">专家</div>
       <el-row>
         <el-col :span="18" class="">
@@ -58,130 +58,146 @@
 </template>
 
 <script>
-    import Http from '@/js/http.js';
-    import TopSearch from "../../components/commons/TopSearch";
-    import ExpertCard from "./ExpertCard";
-    import {storageGet} from '@/js/index.js'
-    import {notify} from "../../constants";
+  import Http from '@/js/http.js';
+  import TopSearch from "../../components/commons/TopSearch";
+  import ExpertCard from "./ExpertCard";
+  import {storageGet} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
 
-    export default {
-        name: "ExpertList",
-        components: {ExpertCard, TopSearch},
-        data() {
-            return {
-                isLogin: false,
-                searchVal: '',
-                searchType: '3',
-                searchTypeArr: [
-                    {
-                        "name": "全部",
-                        "value": "all"
-                    },
-                    {
-                        "name": "项目",
-                        "value": "0"
-                    },
-                    {
-                    "name": "机构",
-                    "value": "1"
-                },
-                {
-                    "name": "工具",
-                    "value": "2"
-                },
-                    {
-                        "name": "专家",
-                        "value": "3"
-                    }],
-                expertList: [],
-                activePage: 1,
-                totalElements: 0
-            }
-        },
-        methods: {
-            loadData() {
-                if (storageGet('user') != null) {
-                    this.isLogin = true;
-                }
-                this.searchVal = this.$route.params.searchVal;
-                this.handleSearchData();
-            },
-          checkLogin() {
-            this.checkCreateProjectAuth();
+  export default {
+    name: "ExpertList",
+    components: {ExpertCard, TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        searchVal: '',
+        searchType: '3',
+        searchTypeArr: [
+          {
+            "name": "全部",
+            "value": "all"
           },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
-            }
+          {
+            "name": "项目",
+            "value": "0"
+          },
+          {
+            "name": "机构",
+            "value": "1"
+          },
+          {
+            "name": "工具",
+            "value": "2"
           },
-            handleSearchData() {
-                if(this.searchType == 0){
-                    this.$router.push({name: 'Square', params: {searchVal: this.searchVal, searchType: "project", currTab: "project"}});
-                }else if(this.searchType == 1){
-                    this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
-                }else if(this.searchType == 2){
-                    this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
-                }else if(this.searchType == 3){
-                    let url = '/api/common/index/page';
-                    let params = {
-                        "keyword": this.searchVal,
-                        "activePage": 1,
-                        "columnFilters": [
-                            {
-                                "field": "type",
-                                "type": "enums",
-                                "enums": this.searchTypeArr,
-                                "value": this.searchType
-                            }
-                        ]
-                    }
-                    Http.post(url, params).then((res) => {
-                        this.expertList = res.data.expertPage.content;
-                        this.totalElements = res.data.expertPage.totalElements;
-                    })
-                }
-            },
-            nextPage(){
-                let url = '/api/common/index/page';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": 1,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.expertList = res.data.expertPage.content;
-                    this.totalElements = res.data.expertPage.totalElements;
-                })
-            },
-            gotoHome() {
-                this.$router.push('/home');
-            },
-            handleTypeClick(tab) {
-                this.searchType = tab.name
-            },
-            handlePageChange(index) {
-                this.activePage = index;
-                this.nextPage();
+          {
+            "name": "专家",
+            "value": "3"
+          }],
+        expertList: [],
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.searchVal = this.$route.params.searchVal;
+        this.handleSearchData();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        if (this.searchType == 0) {
+          this.$router.push({
+            name: 'Square',
+            params: {searchVal: this.searchVal, searchType: "project", currTab: "project"}
+          });
+        } else if (this.searchType == 1) {
+          this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
+        } else if (this.searchType == 2) {
+          this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
+        } else if (this.searchType == 3) {
+          let url = '/api/common/index/page';
+          let params = {
+            "keyword": this.searchVal,
+            "activePage": 1,
+            "columnFilters": [
+              {
+                "field": "type",
+                "type": "enums",
+                "enums": this.searchTypeArr,
+                "value": this.searchType
+              }
+            ]
+          }
+          Http.post(url, params).then((res) => {
+            this.expertList = res.data.expertPage.content;
+            this.totalElements = res.data.expertPage.totalElements;
+          })
+        }
+      },
+      nextPage() {
+        let url = '/api/common/index/page';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": 1,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-        },
-        mounted() {
-            this.loadData();
+          ]
         }
+        Http.post(url, params).then((res) => {
+          this.expertList = res.data.expertPage.content;
+          this.totalElements = res.data.expertPage.totalElements;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.nextPage();
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style scoped>

+ 143 - 133
src/pages/HomepageSearch/ResourceList.vue

@@ -39,11 +39,12 @@
             ref="multipleTable"
             :data="curResourceList"
             tooltip-effect="dark"
-            style="width: 100%; font-size: 20px; color: black">
+            style="width: 100%; font-size: 20px; color: black" v-loading="loading">
             <el-table-column
               label="图标"
               width="100">
-              <template slot-scope="scope"><img :src="scope.row.photoUrl" style="width: 50px; height: 50px;"/></template>
+              <template slot-scope="scope"><img :src="scope.row.photoUrl" style="width: 50px; height: 50px;"/>
+              </template>
             </el-table-column>
             <el-table-column
               prop="name"
@@ -93,143 +94,152 @@
 </template>
 
 <script>
-    import Http from '@/js/http.js';
-    import TopSearch from "../../components/commons/TopSearch";
-    import {storageGet} from '@/js/index.js'
-    import {notify} from "../../constants";
+  import Http from '@/js/http.js';
+  import TopSearch from "../../components/commons/TopSearch";
+  import {storageGet} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
 
-    export default {
-        name: "ResourceList",
-        components: {TopSearch},
-        data() {
-            return {
-                isLogin: false,
-                loading: false,
-                searchVal: '',
-                curResourceList: [],
-                searchType: '2',
-                searchTypeArr: [
-                    {
-                        "name": "全部",
-                        "value": "all"
-                    },
-                    {
-                        "name": "项目",
-                        "value": "0"
-                    },
-                    {
-                        "name": "机构",
-                        "value": "1"
-                    },
-                    {
-                        "name": "工具",
-                        "value": "2"
-                    },
-                    {
-                        "name": "专家",
-                        "value": "3"
-                    }],
-                activePage: 1,
-                totalElements: 0
-            }
-        },
-        methods: {
-            loadData() {
-                if (storageGet('user') != null) {
-                    this.isLogin = true;
-                }
-                this.searchVal = this.$route.params.searchVal;
-                this.handleSearchData();
-            },
-          checkLogin() {
-            this.checkCreateProjectAuth();
+  export default {
+    name: "ResourceList",
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        searchVal: '',
+        curResourceList: [],
+        searchType: '2',
+        searchTypeArr: [
+          {
+            "name": "全部",
+            "value": "all"
           },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
-            }
+          {
+            "name": "项目",
+            "value": "0"
+          },
+          {
+            "name": "机构",
+            "value": "1"
+          },
+          {
+            "name": "工具",
+            "value": "2"
           },
-            handleSearchData() {
+          {
+            "name": "专家",
+            "value": "3"
+          }],
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.searchVal = this.$route.params.searchVal;
+        this.handleSearchData();
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
 
-                if(this.searchType == 0){
-                    this.$router.push({name: 'Square', params: {searchVal: this.searchVal, searchType: "project", currTab: "project"}});
-                }else if(this.searchType == 1){
-                    this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
-                }else if(this.searchType == 2){
-                    let url = '/api/common/index/page';
-                    let params = {
-                        "keyword": this.searchVal,
-                        "activePage": 1,
-                        "columnFilters": [
-                            {
-                                "field": "type",
-                                "type": "enums",
-                                "enums": this.searchTypeArr,
-                                "value": this.searchType
-                            }
-                        ]
-                    };
-                    Http.post(url, params).then((res) => {
-                        this.curResourceList = res.data.resourcePage.content;
-                        this.totalElements = res.data.resourcePage.totalElements;
-                    })
-                }else if(this.searchType == 3){
-                    this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
-                }
-            },
-            nextPage(){
-                let url = '/api/common/index/page';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                };
-                Http.post(url, params).then((res) => {
-                    this.curResourceList = res.data.resourcePage.content;
-                    this.totalElements = res.data.resourcePage.totalElements;
-                })
-            },
-            gotoHome() {
-                this.$router.push('/home');
-            },
-            handleTypeClick(tab) {
-                this.searchType = tab.name
-            },
-            handlePageChange(index) {
-                this.activePage = index;
-                this.nextPage();
-            },
-            goToDetail(code) {
-                this.$router.push({
-                    name: 'ResourceDetail',
-                    params: {id: code}
-                })
-            },
-            showLoading () {
-                this.loading = true
-            },
-            hideLoading () {
-                this.loading = false
-            },
-        },
-        mounted() {
-            this.loadData();
+        if (this.searchType == 0) {
+          this.$router.push({
+            name: 'Square',
+            params: {searchVal: this.searchVal, searchType: "project", currTab: "project"}
+          });
+        } else if (this.searchType == 1) {
+          this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
+        } else if (this.searchType == 2) {
+          let url = '/api/common/index/page';
+          let params = {
+            "keyword": this.searchVal,
+            "activePage": 1,
+            "columnFilters": [
+              {
+                "field": "type",
+                "type": "enums",
+                "enums": this.searchTypeArr,
+                "value": this.searchType
+              }
+            ]
+          };
+          Http.post(url, params).then((res) => {
+            this.curResourceList = res.data.resourcePage.content;
+            this.totalElements = res.data.resourcePage.totalElements;
+          })
+        } else if (this.searchType == 3) {
+          this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
         }
+      },
+      nextPage() {
+        let url = '/api/common/index/page';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
+            }
+          ]
+        };
+        Http.post(url, params).then((res) => {
+          this.curResourceList = res.data.resourcePage.content;
+          this.totalElements = res.data.resourcePage.totalElements;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.nextPage();
+      },
+      goToDetail(code) {
+        this.$router.push({
+          name: 'ResourceDetail',
+          params: {id: code}
+        })
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style scoped>

+ 119 - 105
src/pages/HomepageSearch/UserList.vue

@@ -31,7 +31,7 @@
         </el-col>
       </el-row>
     </div>
-    <div class="container" style="margin: 20px auto;">
+    <div class="container" style="margin: 20px auto;" v-loading="loading">
       <div class="create-body">
         <div class="title h2">众测人员</div>
         <el-collapse accordion style="margin: 0 30px">
@@ -44,7 +44,8 @@
               <el-table-column
                 label="头像"
                 width="100">
-                <template slot-scope="scope"><img :src="scope.row.photoUrl==null?defaultValue.image:scope.row.photoUrl" style="width: 50px; height: 50px;"/></template>
+                <template slot-scope="scope"><img :src="scope.row.photoUrl==null?defaultValue.image:scope.row.photoUrl"
+                                                  style="width: 50px; height: 50px;"/></template>
               </el-table-column>
               <el-table-column
                 prop="name"
@@ -52,11 +53,11 @@
                 align="left"
                 width="200">
               </el-table-column>
-<!--              <el-table-column-->
-<!--                prop="gender"-->
-<!--                align="left"-->
-<!--                label="性别">-->
-<!--              </el-table-column>-->
+              <!--              <el-table-column-->
+              <!--                prop="gender"-->
+              <!--                align="left"-->
+              <!--                label="性别">-->
+              <!--              </el-table-column>-->
               <el-table-column
                 prop="address"
                 align="left"
@@ -93,109 +94,122 @@
 </template>
 
 <script>
-    import Http from '@/js/http.js';
-    import TopSearch from "../../components/commons/TopSearch";
-    import {storageGet,defaultValue} from '@/js/index.js'
-    import {notify} from "../../constants";
+  import Http from '@/js/http.js';
+  import TopSearch from "../../components/commons/TopSearch";
+  import {storageGet, defaultValue} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
 
-    export default {
-        name: "UserList",
-        props: ['searchVal', 'userList'],
-        components: {TopSearch},
-        data() {
-            return {
-                isLogin: false,
-                id: 0,
-                // searchVal: '',
-                searchType: '0',
-                searchTypeArr: [
-                    {
-                        "name": "众测人员",
-                        "value": "0"
-                    }],
-                curUserList: this.userList,
-                defaultValue: defaultValue,
-                activePage: 1,
-                totalElements: 0
+  export default {
+    name: "UserList",
+    props: ['searchVal', 'userList'],
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        id: 0,
+        // searchVal: '',
+        searchType: '0',
+        loading: false,
+        searchTypeArr: [
+          {
+            "name": "众测人员",
+            "value": "0"
+          }],
+        curUserList: this.userList,
+        defaultValue: defaultValue,
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        let url = '/api/common/index/user/more';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-        },
-        methods: {
-            loadData() {
-                if (storageGet('user') != null) {
-                    this.isLogin = true;
-                }
-                let url = '/api/common/index/user/more';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage": this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curUserList = res.data.content;
-                    this.totalElements=res.data.totalElements;
-                })
-            },
-          checkLogin() {
-            this.checkCreateProjectAuth();
-          },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
+          ]
+        }
+        Http.post(url, params).then((res) => {
+          this.curUserList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        let url = '/api/common/index/user/more';
+        let params = {
+          "keyword": this.searchVal,
+          "activePage": this.activePage,
+          "columnFilters": [
+            {
+              "field": "type",
+              "type": "enums",
+              "enums": this.searchTypeArr,
+              "value": this.searchType
             }
-          },
-            handleSearchData() {
-                let url = '/api/common/index/user/more';
-                let params = {
-                    "keyword": this.searchVal,
-                    "activePage":  this.activePage,
-                    "columnFilters": [
-                        {
-                            "field": "type",
-                            "type": "enums",
-                            "enums": this.searchTypeArr,
-                            "value": this.searchType
-                        }
-                    ]
-                }
-                Http.post(url, params).then((res) => {
-                    this.curUserList = res.data.content;
-                })
-            },
-            gotoHome() {
-                this.$router.push('/home');
-            },
-            handleTypeClick(tab) {
-                this.searchType = tab.name
-            },
-            handlePageChange(index) {
-                this.activePage = index;
-                this.handleSearchData();
-            },
-            goToDetail(id) {
-                this.$router.push({
-                    name: 'UserDetail',
-                    params: {id: id}
-                })
-            },
-        },
-        mounted() {
-            this.loadData();
+          ]
         }
+        Http.post(url, params).then((res) => {
+          this.curUserList = res.data.content;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.handleSearchData();
+      },
+      goToDetail(id) {
+        this.$router.push({
+          name: 'UserDetail',
+          params: {id: id}
+        })
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style scoped>

+ 176 - 166
src/pages/Square/PopularProjectAndTaskList.vue

@@ -5,7 +5,7 @@
       <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" />
+            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
             <span class="logo-title">群智众测平台</span>
           </div>
         </el-col>
@@ -13,11 +13,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-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-button class="search-button" slot="append" type="primary" @click="handleSearchData">搜索</el-button>
                 </el-input>
               </div>
             </div>
@@ -28,8 +29,8 @@
         </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">
+      <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>
@@ -40,7 +41,8 @@
       <el-tabs value="myProject" @tab-click="handleTabClick" v-loading="loading">
         <el-tab-pane name="myProject" v-if="currTab == 'project'">
           <span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
-          <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle" justify="center"
+          <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>
@@ -50,12 +52,13 @@
             <el-col :span="4" type="flex" align="middle" justify="center">操作</el-col>
           </el-row>
           <project-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 )"
-                                    v-for="(item,index) in projectAndTaskArr" :key="item.id" :projectItem="item"/>
+                        v-for="(item,index) in projectAndTaskArr" :key="item.id" :projectItem="item"/>
         </el-tab-pane>
 
         <el-tab-pane name="myProject" v-if="currTab == 'task'">
           <span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
-          <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle" justify="center"
+          <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle"
+                  justify="center"
                   style="font-size: 14px;">
             <el-col :span="5">任务封面</el-col>
             <el-col :span="4">任务名称</el-col>
@@ -74,179 +77,186 @@
 
     <div class="container">
       <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-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-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 {
-                loading: false,
-                isLogin: false,
-                searchType:'project',
-                searchVal: '',
-                currTab:'project',
-                tabArr : [
-                    {label:"热门项目",name:"project"},
-                    {label:"热门任务",name:"task"}
-                ],
-                menuArr: [
-                    {label:"热门测试项目",name:"project"},
-                    {label:"热门测试任务",name:"task"}
-                ],
-                projectAndTaskArr:[],
-                activePage:1,
-                totalElements:0,
-                type: ''
-            }
-        },
-        components: {
-            TaskItem,
-            ProjectItem,
-            SearchBar,
-            SquareCard,
-            PopularProject,
-            PopularTask
-        },
-        computed:{
-        },
-        methods:{
-            loadData(){
-                this.showLoading();
-                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();
-                }
-                this.hideLoading();
-            },
-            getHotProject(){
-                let params = {
-                    "keyword": this.searchVal,//搜索关键字
-                    "activePage": this.activePage,//指定页面
-                    "columnFilters":[]
-                };
-                Http.post(Apis.PROJECT.MORE_HOT_PROJECT, params).then((res) => {
-                    console.log(res.data);
-                    this.projectAndTaskArr = res.data.content;
-                    this.totalElements = res.data.totalElements;
-                })
-            },
-            getHotTask(){
-                let params = {
-                    "keyword": this.searchVal,//搜索关键字
-                    "activePage": this.activePage,//指定页面
-                    "columnFilters":[]
-                };
-                Http.post(Apis.TASK.MORE_HOT_TASK, params).then((res) => {
-                    this.projectAndTaskArr = res.data.content;
-                    this.totalElements = res.data.totalElements;
-                })
-            },
+  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';
 
-            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() {
-            this.checkCreateProjectAuth();
-          },
-          checkCreateProjectAuth() {
-            if (!this.isLogin) {
-              console.log("请登录后访问");
-              notify('warning', '请登录后访问');
-            } else if (this.isLogin) {
-              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-                this.$router.push('/project/create');
-              }).catch((error) => {
-                notify('error', error.data)
-              })
-            }
-          },
-            handleSearchData(){
-                console.log("this.searchVal  "  + this.searchVal)
-                this.activePage = 1;
-                if(this.currTab == 'project'){
-                    this.getHotProject();
-                }else{
-                    this.getHotTask();
-                }
-            },
-            handlePageChange(index){
-                this.activePage = index;
-                this.searchData();
-            },
-            showLoading () {
-                this.loading = true
-            },
-            hideLoading () {
-                this.loading = false
-            },
-        },
-        mounted() {
-            this.loadData();
+  export default {
+    name: 'PopularProjectAndTaskList',
+    comments: {TaskItem, ProjectItem},
+    data() {
+      return {
+        loading: false,
+        loading: false,
+        isLogin: false,
+        searchType: 'project',
+        searchVal: '',
+        currTab: 'project',
+        tabArr: [
+          {label: "热门项目", name: "project"},
+          {label: "热门任务", name: "task"}
+        ],
+        menuArr: [
+          {label: "热门测试项目", name: "project"},
+          {label: "热门测试任务", name: "task"}
+        ],
+        projectAndTaskArr: [],
+        activePage: 1,
+        totalElements: 0,
+        type: ''
+      }
+    },
+    components: {
+      TaskItem,
+      ProjectItem,
+      SearchBar,
+      SquareCard,
+      PopularProject,
+      PopularTask
+    },
+    computed: {},
+    methods: {
+      loadData() {
+        this.showLoading();
+        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();
+        }
+        this.hideLoading();
+      },
+      getHotProject() {
+        let params = {
+          "keyword": this.searchVal,//搜索关键字
+          "activePage": this.activePage,//指定页面
+          "columnFilters": []
+        };
+        Http.post(Apis.PROJECT.MORE_HOT_PROJECT, params).then((res) => {
+          console.log(res.data);
+          this.projectAndTaskArr = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      getHotTask() {
+        let params = {
+          "keyword": this.searchVal,//搜索关键字
+          "activePage": this.activePage,//指定页面
+          "columnFilters": []
+        };
+        Http.post(Apis.TASK.MORE_HOT_TASK, params).then((res) => {
+          this.projectAndTaskArr = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+
+      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() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        console.log("this.searchVal  " + this.searchVal)
+        this.activePage = 1;
+        if (this.currTab == 'project') {
+          this.getHotProject();
+        } else {
+          this.getHotTask();
+        }
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.searchData();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
     }
+  }
 </script>
 
 <style lang="less">
   @import "../../style/search-nav";
+
   .project-task {
     padding: 15px 0;
+
     .el-card {
       border: none;
     }

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

@@ -66,6 +66,7 @@
 
 <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'
@@ -77,6 +78,7 @@
     name: 'Square2.0',
     data(){
       return {
+        user: {},
         isLogin: false,
         searchType:'project',
         searchVal: '',
@@ -219,9 +221,13 @@
       handlePageChange(index){
         this.activePage = index;
         this.searchData();
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
       }
     },
     mounted() {
+      this.setUserInfo();
       this.loadData();
     }
   }

+ 6 - 0
src/pages/Technology/Technology2.0.vue

@@ -62,6 +62,7 @@
 
 <script>
   import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
   import SearchBar from '../../components/commons/SearchBar'
   import TechnologyCard from './TechnologyCard'
   import TechnologyMG from './TechnologyMG'
@@ -83,6 +84,7 @@
     },
     data(){
       return {
+        loading: false,
         isLogin: false,
         searchVal: '',
         searchType:'',
@@ -174,10 +176,14 @@
       handlePageChange(index){
         this.activePage = index;
         this.loadTechnologyArticles(index);
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
       }
     },
     mounted() {
       this.loadData();
+      this.setUserInfo();
       this.loadHotArticles();
       this.loadTechnologyArticles(1);
     }

+ 5 - 0
src/pages/Technology/TechnologyMore.vue

@@ -78,6 +78,7 @@
     },
     data(){
       return {
+        loading: false,
         isLogin: false,
         searchVal: '',
         searchType:'',
@@ -157,10 +158,14 @@
       handlePageChange(index){
         this.activePage = index;
         this.loadTechnologyArticles(index);
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
       }
     },
     mounted() {
       this.loadData();
+      this.setUserInfo();
       this.loadTechnologyArticles(1);
     }
   }