Explorar o código

fix:finish 1.4

wangJJ %!s(int64=5) %!d(string=hai) anos
pai
achega
dc94f2338b

+ 1 - 1
src/main.js

@@ -99,7 +99,7 @@ router.beforeEach((to, from, next) => {
         next()
       }
     }).catch((error) => {
-      notify('warning', '请登录')
+      // notify('warning', '请登录')
       if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限
         if (sessionStorage.userName === '2' && urls.includes(to.matched[0].path)) { // 判断缓存里面是否有 userName  //在登录的时候设置它的值
           next()

+ 6 - 5
src/pages/Homepage/Homepage.vue

@@ -5,7 +5,7 @@
       <el-row class="search-nav" style="padding: 30px 0 20px 0">
         <el-col :span="6">
           <div class="pull-left">
-            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
+            <img class="logo-img" src="../../assets/img/logo-blue.png" :to="'/home'"/>
             <span class="logo-title">群智众测平台</span>
           </div>
         </el-col>
@@ -129,9 +129,9 @@
         searchVal: '',
         homeTabArr:{
           menuArr1: [
-            {label: "首页", name: "homepage"},
-            {label: "众测广场", name: "square"},
-            {label: "众测技术", name: "technology"}
+            {label: "首页", name: "homepage",linkTo:'/home'},
+            {label: "众测广场", name: "square",linkTo:'/square'},
+            {label: "众测技术", name: "technology",linkTo:'technology'}
           ],
           menuArr2:[
             {label: "科技服务", name: "monograph"},
@@ -162,7 +162,8 @@
         })
       },
       handleTabClick(tab){
-        this.currTab = tab.name
+        this.currTab = tab.name;
+        this.$router.push(this.homeTabArr.menuArr1[Number(tab.index)].linkTo);
       },
       handleTypeClick(tab){
         this.searchType = tab.name

+ 1 - 1
src/pages/Homepage/InstitutionCard.vue

@@ -102,7 +102,7 @@
           <div class="insititution-block">
             <img src="../../assets/img/SQA.png"
                  alt="logo-institution"
-                 style="height: 60px;width: 60px"
+                 style="height: 60px;width: 100%"
 
             >
           </div>

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

@@ -20,7 +20,7 @@
         </el-col>
         <el-col :span="5">
           <div class="project-people-number">
-            {{item.participantHasCommittedCount}}人
+            {{item.acceptedCount}}人
           </div>
         </el-col>
       </el-row>

+ 5 - 2
src/pages/Square/Square2.0.vue

@@ -4,8 +4,8 @@
       <!--搜索框-->
       <el-row class="search-nav" style="padding: 30px 0 20px 0">
         <el-col :span="6">
-          <div class="pull-left">
-            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
+          <div class="pull-left" @click="gotoHome">
+            <img class="logo-img" src="../../assets/img/logo-blue.png" />
             <span class="logo-title">群智众测平台</span>
           </div>
         </el-col>
@@ -103,6 +103,9 @@
     computed:{
     },
     methods:{
+      gotoHome(){
+        this.$router.push('/home');
+      },
       handleTabClick(tab){
         this.currTab = tab.name
         this.activePage = 1;

+ 7 - 1
src/pages/Technology/HotActicle.vue

@@ -27,6 +27,8 @@
 </template>
 
 <script>
+  import Http from '@/js/http.js'
+
   export default {
     name: 'HotArticle',
     props:['articleArr'],
@@ -37,7 +39,10 @@
     },
     methods:{
       gotoArticle(item){
-        window.open(item.articlesUrl);
+        Http.get(`/api/technical/updateranking/${item.id}`).then(()=>{
+          this.$emit('refreshHotArticle');
+          window.open(item.articlesUrl);
+        });
       }
     },
     mounted() {
@@ -76,6 +81,7 @@
       padding: 5px 10px;
       border-bottom: 1px solid #ccc !important;
       .list-item-title{
+        cursor:pointer;
         font-size:14px;
         font-family:Source Han Sans CN;
         font-weight:400;

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

@@ -4,8 +4,8 @@
       <!--搜索框-->
       <el-row class="search-nav" style="padding: 30px 0 20px 0">
         <el-col :span="6">
-          <div class="pull-left">
-            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
+          <div class="pull-left" @click="gotoHome">
+            <img class="logo-img" src="../../assets/img/logo-blue.png" />
             <span class="logo-title">群智众测平台</span>
           </div>
         </el-col>
@@ -55,7 +55,7 @@
           </el-pagination>
         </el-col>
         <el-col :span="6"  class="popular-modules">
-          <HotActicle :articleArr="articleArr"/>
+          <HotActicle :articleArr="articleArr" @refreshHotArticle="loadHotArticles"/>
         </el-col>
       </el-row>
     </div>
@@ -104,6 +104,9 @@
       }
     },
     methods:{
+      gotoHome(){
+        this.$router.push('/home');
+      },
       handleTypeClick(tab){
         this.handleTabClick(tab);
       },

+ 1 - 0
src/pages/Technology/TechnologyCard.vue

@@ -68,6 +68,7 @@
         flex-direction: column;
         justify-content: space-between;
         .technology-title{
+          cursor:pointer;
           font-size:22px;
           font-family:Source Han Sans CN;
           font-weight:500;

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

@@ -3,8 +3,9 @@
     <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)">
-            <div class="technology-title">
-              {{item.longTitle}}
+            <div class="technology-title" style="cursor: pointer;">
+              {{item.title}}
+              <span v-if="item.chineseBrief" style="color:rgba(0, 118, 203, 1)">[chineseBrief]</span>
             </div>
           <div class="technology-info">
             发表年份:{{item.publicTime}}
@@ -14,7 +15,7 @@
           </div>
             <div class="technology-info">
               <el-row >
-                作者:{{item.author}}
+                作者:{{item.authorList}}
               </el-row>
             </div>
         </el-row>

+ 3 - 3
src/style/main.scss

@@ -63,19 +63,19 @@ a {
 
 @media (min-width: 576px) {
     .container {
-      width: 70%;
+      width: 100%;
     }
 }
 
 @media (min-width: 768px) {
     .container {
-        width: 70%;
+        width: 100%;
     }
 }
 
 @media (min-width: 992px) {
     .container {
-      width: 70%;
+      width: 100%;
     }
 }