Procházet zdrojové kódy

解决搜索问题

guo00guo před 5 roky
rodič
revize
c55e99d189

+ 2 - 1
src/pages/DetailPage/CrowdDetail.vue

@@ -135,7 +135,8 @@
                 }
             },
             handleSearchData(){
-                this.getCrowdProject();
+              this.activePage = 1;
+              this.getCrowdProject();
             },
             handlePageChange(index){
                 this.activePage = index;

+ 1 - 0
src/pages/HomepageSearch/ResourceList.vue

@@ -149,6 +149,7 @@
                 }
             },
             handleSearchData() {
+
                 if(this.searchType == 0){
                     this.$router.push({name: 'Square', params: {searchVal: this.searchVal, searchType: "project", currTab: "project"}});
                 }else if(this.searchType == 1){

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

@@ -213,6 +213,7 @@
             },
             handleSearchData(){
                 console.log("this.searchVal  "  + this.searchVal)
+                this.activePage = 1;
                 if(this.currTab == 'project'){
                     this.getHotProject();
                 }else{

+ 9 - 7
src/pages/Square/SquareCard.vue

@@ -25,7 +25,7 @@
         </el-col>
         <el-col :span="12" class=" test-btn">
           <el-button type="primary" round size="mini" class="pull-right" v-if="card.applicationType"
-                     @click="goToProjectDetail(card.code)">我要众测
+                     @click="goToProjectDetail(card.code)">查看详情
           </el-button>
           <el-button type="primary" round size="mini" class="pull-right" v-else
                      @click="goToTaskDetail(card.projectId, card.code)">我要众测
@@ -71,13 +71,15 @@
       goToProjectDetail(id) {
         if (!this.isLogin) {
           notify('warning', '请登录后访问');
-        } else if (this.isLogin) {
-          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
-            this.$router.push({name: 'Project', params: {projectId: id}})
-          }).catch((error) => {
-            notify('error', error.data)
-          })
         }
+        // else if (this.isLogin) {
+        //   Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+        //     this.$router.push({name: 'Project', params: {projectId: id}})
+        //   }).catch((error) => {
+        //     notify('error', error.data)
+        //   })
+        // }
+        this.$router.push({name: 'Project', params: {projectId: id}})
       },
       goToTaskDetail(projectId, taskId) {
         if (!this.isLogin) {