Explorar el Código

fix:finish 1.2

wangJJ hace 5 años
padre
commit
41ccac3659

+ 9 - 1
src/App.vue

@@ -1,5 +1,8 @@
 <template>
-  <div>
+  <div style="width:100%">
+    <div class="home-slice">
+      <img src="./assets/img/homeSlice.png" style="width: 100%;height: 100%"/>
+    </div>
     <header-container/>
     <div class="container-wrapper">
       <slot>
@@ -71,4 +74,9 @@ export default {
     min-height: calc(100% - 70px - 64px);
     margin: 0 auto;
   }
+  .home-slice {
+    width: 100%;
+    height: 170px;
+    /*background-image: url("./assets/img/homeSlice.png");*/
+  }
 </style>

BIN
src/assets/img/homeSlice.png


+ 1 - 1
src/pages/Square/PopularTask.vue

@@ -2,7 +2,7 @@
   <el-card class="popular-card">
     <div slot="header" class="popular-header">
       <img src="../../assets/img/popularTask.png" alt="popular-project" class="popular-header-img"/>
-      <span class="popular-header-title">热门项目</span>
+      <span class="popular-header-title">热门任务</span>
       <el-button style="float: right; padding: 3px 0" type="text" class="pull-right">more>></el-button>
     </div>
     <div class="popular-list">

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

@@ -109,7 +109,7 @@
         this.searchVal = '';
         this.searchData()
       },
-      searchData(){
+      searchData(index){
         if(this.currTab === 'squareHome'){
           this.loadData();
         }else{
@@ -119,6 +119,7 @@
       },
       handleTypeClick(tab){
         this.searchType = tab.name;
+        this.activePage = 1;
       },
 
       loadData(){
@@ -146,11 +147,10 @@
         Http.post(url,params).then((res)=>{
           this.currTab = this.searchType;
           this.projectAndTaskArr = res.data.content;
-          this.activePage = 1;
           this.totalElements=res.data.totalElements;
         })
       },
-      handlePageChange(index){
+      handlePageChange(){
         this.activePage = index;
         this.searchData();
       }

+ 4 - 1
src/pages/Square/SquareCard.vue

@@ -9,7 +9,7 @@
     <div class="card-detail">
       <el-row>
         <el-col :span="6">
-          <span class="card-detail-money">¥{{card.quotedPrice ? card.quotedPrice : card.quotePrice}}</span>
+          <span class="card-detail-money">¥{{(card.quotedPrice||card.quotedPrice === 0) ? card.quotedPrice : card.quotePrice}}</span>
         </el-col>
         <el-col :span="18">
           <span class="card-detail-info pull-right">{{card.time_interval}}/{{card.joinCount}}人参与</span>
@@ -52,6 +52,9 @@
       color:rgba(0,0,0,1);
       line-height:30px;
       margin: 10px 0;
+      overflow:hidden; //超出的文本隐藏
+      text-overflow:ellipsis; //溢出用省略号显示
+      white-space:nowrap; //溢出不换行
     }
 
     .card-content {

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

@@ -8,10 +8,10 @@
       </div>
       <div class="popular-list">
         <el-row class="popular-list-item" v-for="(item,index) in articleArr" :key="item.id" v-if="index<7">
-          <el-col :span=24  @click.native="gotoArticle(item)">
+          <el-col :span="24">
             <img :src="item.photoUrl" alt="logo-project" class="pull-left project-logo-img">
             <div style="margin-left: 55px">
-              <div class="list-item-title">
+              <div class="list-item-title" @click="gotoArticle(item)">
                 {{item.name}}
               </div>
               <div class="project-people-reading">
@@ -37,8 +37,7 @@
     },
     methods:{
       gotoArticle(item){
-        console.log('sss')
-        window.open(item.articles);
+        window.open(item.articlesUrl);
       }
     },
     mounted() {

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

@@ -14,7 +14,7 @@
             <div id="search-block " class="">
               <div class="search-input">
                 <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
-                  <el-button class="search-button" slot="append"  type="primary" @click="loadTechnologyArticles">搜索</el-button>
+                  <el-button class="search-button" slot="append"  type="primary" @click="loadTechnologyArticles(1)">搜索</el-button>
                 </el-input>
               </div>
             </div>
@@ -37,7 +37,7 @@
       <el-row>
         <el-col :span="18" class="project-task">
           <TechnologyCard
-            :techArticleList = techArticleList.content v-if="searchType=='0'" @refreshList="loadTechnologyArticles">
+            :techArticleList = techArticleList.content v-if="searchType=='0'" @refreshList="loadTechnologyArticles(activePage)">
           </TechnologyCard>
           <TechnologyMG :techArticleList = techArticleList.content v-if="searchType=='1'"></TechnologyMG>
           <el-pagination
@@ -103,17 +103,20 @@
         this.searchType = tab.name
         this.activePage = 1;
         this.searchVal = '';
-        this.loadTechnologyArticles();
+        this.loadTechnologyArticles(1);
       },
       loadHotArticles(){
         Http.get('/api/technical/ranking').then((res)=>{
           this.articleArr = res.data.technicalArticlesPage.content;
         })
       },
-      loadTechnologyArticles(){
+      loadTechnologyArticles(index){
         // let url=`/api/technical/articles?searchCondition={"keyword":"${this.keyword}","activePage":${this.activePage}}`;
         // Http.get(encodeURI(url))
         let url = '/api/technical/articles';
+        console.log(index);
+        this.activePage = index;
+        console.log(this.activePage)
         let params = {
           "keyword": this.searchVal,//查询条件,分页展示时就不填
           "activePage": this.activePage,//指定页数
@@ -126,6 +129,7 @@
             }
           ]
         }
+        console.log(params);
         Http.post(url,params)
           .then(res=>{
             if(res.data.technicalArticlesPage){
@@ -140,12 +144,12 @@
       },
       handlePageChange(index){
         this.activePage = index;
-        this.loadTechnologyArticles();
+        this.loadTechnologyArticles(index);
       }
     },
     mounted() {
       this.loadHotArticles();
-      this.loadTechnologyArticles();
+      this.loadTechnologyArticles(1);
     }
   }
 </script>

+ 2 - 2
src/pages/Technology/TechnologyCard.vue

@@ -2,13 +2,13 @@
   <div class="technology-card">
     <div class="card-wrapper" v-if="techArticleList&&techArticleList.length">
       <el-card  v-for="item in techArticleList" :key="item.id"  style="margin-bottom: 15px">
-        <el-row @click.native="gotoDetail(item)">
+        <el-row >
           <el-col :span="6">
             <img :src="item.photoUrl" alt="technology-img" class="pull-left technology-img">
           </el-col>
           <el-col :span="18" class="technology-detail">
 
-            <div class="technology-title">
+            <div class="technology-title" @click="gotoDetail(item)">
               {{item.name}}
             </div>
             <div class="technology-info">

+ 1 - 1
src/pages/Technology/TechnologyMG.vue

@@ -7,7 +7,7 @@
               {{item.longTitle}}
             </div>
           <div class="technology-info">
-            发表年份:{{item.publicYear}}
+            发表年份:{{item.publicTime}}
           </div>
           <div class="technology-info">
             会议:{{item.conferenceJournal}}