Bläddra i källkod

fix:finish 1.3

wangJJ 5 år sedan
förälder
incheckning
9a0906230d

+ 18 - 7
src/App.vue

@@ -1,8 +1,6 @@
 <template>
-  <div style="width:100%">
-    <div class="home-slice">
-      <img src="./assets/img/homeSlice.png" style="width: 100%;height: 100%"/>
-    </div>
+  <div style="width:100%;min-width: 1300px">
+    <home-slice v-if="showSlice"/>
     <header-container/>
     <div class="container-wrapper">
       <slot>
@@ -18,11 +16,17 @@
 <script>
 import HeaderContainer from '@/components/commons/Header2.0'
 import FooterContainer from '@/components/commons/Footer2.0'
+import HomeSlice from '@/components/commons/HomeSlice'
 import {getCurrentUser, storageGet, storageSave} from '@/js/index'
 
 export default {
   name: 'App',
-  components: {HeaderContainer, FooterContainer},
+  components: {HeaderContainer, FooterContainer, HomeSlice},
+  data(){
+    return {
+      // showSlice:false
+    }
+  },
   methods: {
     setUserInfo () {
       // storageGet('user').then((res)=>{
@@ -64,7 +68,13 @@ export default {
       //   this.isLogin = true
       // }
     },
-  }
+  },
+  computed:{
+    showSlice(){
+      if(this.$route.path==='/home')
+        return  true;
+    }
+  },
 }
 </script>
 
@@ -77,6 +87,7 @@ export default {
   .home-slice {
     width: 100%;
     height: 170px;
-    /*background-image: url("./assets/img/homeSlice.png");*/
+    background-image: url("./assets/img/homeSlice.png");
+    background-size: 100% 100%
   }
 </style>

BIN
src/assets/img/home-btn1.png


BIN
src/assets/img/home-btn2.png


BIN
src/assets/img/homeslice1.png


BIN
src/assets/img/homeslice2.png


+ 42 - 0
src/components/commons/HomeSlice.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="home-slice">
+    <el-row style="padding-top: 40px">
+      <el-col :span="14">
+        <div class="slice-wrapper" style="padding-left: 20%">
+          <div class="slice-title"><img src="../../assets/img/homeslice1.png" alt="slice1"></div>
+          <div class="slice-info">1分钟带你玩转众测服务平台</div>
+          <div class="slice-btn">立即进入<img src="../../assets/img/home-btn1.png" style="margin-left: 5px"></div>
+        </div>
+      </el-col>
+      <el-col :span="10">
+        <div class="slice-wrapper">
+          <div class="slice-title"><img src="../../assets/img/homeslice2.png" alt="slice2"></div>
+          <div class="slice-info">入住众测服务平台流程</div>
+          <div class="slice-btn">立即进入<img src="../../assets/img/home-btn2.png" style="margin-left: 5px"></div>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'HomeSlice'
+  }
+</script>
+
+<style scoped lang="less">
+.slice-info {
+  font-size:16px;
+  font-family:Source Han Sans CN;
+  color:rgba(243,224,10,1);
+}
+  .slice-btn{
+    display: flex;
+    margin-top: 5px;
+    line-height: 30px;
+    color: white;
+    font-weight: 400;
+  }
+
+</style>

+ 16 - 11
src/pages/Homepage/InstitutionCard.vue

@@ -20,9 +20,7 @@
       </el-col>
       <el-col :span="8">
         <div class="insititution-block">
-          <div style="line-height: 60px;text-align: center;font-size:22px;
-                        font-family:Source Han Sans CN;
-                        font-weight:400;">
+          <div class="single-title">
             北京计算机技术及应用研究所
           </div>
 
@@ -56,9 +54,7 @@
         </el-col>
         <el-col :span="8">
           <div class="insititution-block">
-            <div style="line-height: 60px;text-align: center;font-size:22px;
-                        font-family:Source Han Sans CN;
-                        font-weight:400;">
+            <div class="single-title">
               上海计算机软件技术开发中心
             </div>
 
@@ -96,9 +92,7 @@
                  alt="logo-institution"
                  class="insititution-logo">
             <div class="iscas-info">
-              <div class="iscas-title" style="line-height: 60px;text-align: center;font-size:22px;
-                        font-family:Source Han Sans CN;
-                        font-weight:400;">
+              <div class="iscas-title single-title" >
                 南京慕测信息科技有限公司
               </div>
             </div>
@@ -108,7 +102,7 @@
           <div class="insititution-block">
             <img src="../../assets/img/SQA.png"
                  alt="logo-institution"
-                 style="height: 60px;width: 100%"
+                 style="height: 60px;width: 60px"
 
             >
           </div>
@@ -148,6 +142,11 @@
         border: 1px solid #ccc;
         margin: 0 10px 20px 0;
         height: 60px;
+        .single-title{
+          line-height: 60px;text-align: center;font-size:22px;
+          font-family:Source Han Sans CN;
+          font-weight:400;
+        }
         .insititution-logo {
           height: 60px;
           width: 65px;
@@ -157,7 +156,7 @@
       .iscas-block {
         display: flex;
         .iscas-logo {
-          width: 120px;
+          width: 100px;
           height: 60px;
           display: inline-block;
         }
@@ -182,4 +181,10 @@
       }
     }
   }
+  @media screen and (max-width: 1450px) { /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
+    .single-title {
+      font-size: 16px !important;
+    }
+  }
+
 </style>

+ 2 - 1
src/pages/Square/PopularProject.vue

@@ -21,7 +21,8 @@
         </el-col>
         <el-col :span="5">
           <div class="project-people-number">
-            {{item.joinCount}}人
+            <span v-if="item.joinCount > 10000">{{item.joinCount > 10000 ? Math.floor(item.joinCount/10000) + 'w+' : item.joinCount}}人</span>
+            <span v-else>{{item.joinCount > 1000 ? Math.floor(item.joinCount/1000) + 'k+' : item.joinCount}}人</span>
           </div>
         </el-col>
       </el-row>

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

@@ -12,7 +12,7 @@
         <el-col :span="12">
           <div class="search-nav">
             <div id="search-block " class="">
-              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick" v-if="tabArr">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
                 <el-tab-pane v-for="item in tabArr" :label="item.label" :name="item.name" :key="item.label"></el-tab-pane>
               </el-tabs>
               <div class="search-input">
@@ -150,7 +150,7 @@
           this.totalElements=res.data.totalElements;
         })
       },
-      handlePageChange(){
+      handlePageChange(index){
         this.activePage = index;
         this.searchData();
       }

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

@@ -8,11 +8,13 @@
     </div>
     <div class="card-detail">
       <el-row>
-        <el-col :span="6">
-          <span class="card-detail-money">¥{{(card.quotedPrice||card.quotedPrice === 0) ? card.quotedPrice : card.quotePrice}}</span>
+        <el-col :lg="6" :md="24">
+          <span class="card-detail-money" v-if="card.quotedPrice||card.quotedPrice === 0">¥{{card.quotedPrice > 10000 ? Math.floor(card.quotedPrice/10000) + 'w+' : card.quotedPrice}}</span>
+          <span class="card-detail-money" v-else>¥{{card.quotePrice > 10000 ? Math.floor(card.quotePrice/10000)+'w+' : 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>
+        <el-col :lg="18" :md="24">
+          <span class="card-detail-info pull-right">{{card.time_interval}}/{{card.joinCount > 10000 ? Math.floor(card.joinCount/10000)+'w+': card.joinCount}}人参与</span>
         </el-col>
       </el-row>
     </div>

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

@@ -13,6 +13,9 @@
           <div class="search-nav">
             <div id="search-block " class="">
               <div class="search-input">
+                <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                  <el-tab-pane v-for="item in searchTypeArr" :label="item.label" :name="item.value" :key="item.value"></el-tab-pane>
+                </el-tabs>
                 <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
                   <el-button class="search-button" slot="append"  type="primary" @click="loadTechnologyArticles(1)">搜索</el-button>
                 </el-input>
@@ -85,11 +88,13 @@
         searchTypeArr:[
           {
             "name": "技术文章",
-            "value": "0"
+            "value": "0",
+            "label":'文章'
           },
           {
             "name": "论文专著",
-            "value": "1"
+            "value": "1",
+            "label":'专著'
           }
         ],
         articleArr:[],
@@ -99,6 +104,9 @@
       }
     },
     methods:{
+      handleTypeClick(tab){
+        this.handleTabClick(tab);
+      },
       handleTabClick(tab){
         this.searchType = tab.name
         this.activePage = 1;
@@ -114,9 +122,7 @@
         // 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,//指定页数
@@ -129,7 +135,6 @@
             }
           ]
         }
-        console.log(params);
         Http.post(url,params)
           .then(res=>{
             if(res.data.technicalArticlesPage){

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

@@ -7,7 +7,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" @click="gotoDetail(item)">
               {{item.name}}
             </div>

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

@@ -33,7 +33,6 @@
     props:['techArticleList'],
     methods:{
       gotoDetail(item){
-        console.log('aaa');
         item.chineseBrief ? window.open(item.chineseBrief) : null
       }
     }

+ 1 - 0
src/router/index.js

@@ -34,6 +34,7 @@ export default new Router({
       meta: {
         title: '',
         requireAuth: false,
+        showSlice: true
       },
     },
     // {