소스 검색

大数据导学首页

shilipojs 2 년 전
부모
커밋
c954659c04

BIN
src/assets/images/past_eval.png


BIN
src/assets/images/school_eval.png


+ 3 - 2
src/views/career/main.vue

@@ -1,5 +1,4 @@
 <template>
-  <!-- 题库中心首页 -->
   <div class="container">
     <div class="banner">
       <el-image style="width: 100vw" :src="require('@/assets/images/fuzhu_banner.png')" fit="fill"></el-image>
@@ -18,6 +17,7 @@
           </div>
         </div>
       </index-card>
+      <index-news-single-wrapper class="mb20 index-block"/>
     </div>
   </div>
 </template>
@@ -25,12 +25,13 @@
 import IndexCard from '@/views/index/components/index-card.vue'
 import MxImageWrap from '@/views/questioncenter/components/main-card/mx-image-wrap.vue'
 import IndexNewsTopWrapper from '@/views/index/components/index-news-top-wrapper'
+import IndexNewsSingleWrapper from '@/views/index/components/index-news-single-wrapper'
 import IndexCardGksp from '@/views/index/components/index-card-gksp'
 import IndexCardGktf from '@/views/index/components/index-card-gktf'
 import { list } from '@/api/webApi/career-other'
 
 export default {
-  components: { IndexCard, MxImageWrap, IndexNewsTopWrapper, IndexCardGksp, IndexCardGktf },
+  components: { IndexCard, MxImageWrap, IndexNewsTopWrapper, IndexCardGksp, IndexCardGktf,IndexNewsSingleWrapper },
   created() {
     list().then(res => {
         this.nounList.map(item => {

+ 1 - 1
src/views/components/blocks/index-login-interceptor-mixin.js

@@ -7,7 +7,7 @@ export default {
 
         // 默认通过,因为block组件可能不止在首页使用
         // 不同的嵌入块可以由容器注入不同的校验逻辑
-        return Promise.resolve(true)
+        return () => true
       }
     }
   }

+ 7 - 6
src/views/evaluating/main.vue

@@ -8,7 +8,7 @@
         <el-row :gutter="20">
          <el-col :span="8"  v-for="item in onLinePaper" >
           <div class="wrap-item fx-row jc-between ai-center">
-            <div class="left" >
+            <div class="left mr30" >
               <el-image :src="item.img"></el-image>
             </div>
             <div>
@@ -29,7 +29,7 @@
         <el-row :gutter="20">
           <el-col :span="8"  v-for="item in onLinePaper" >
             <div class="wrap-item fx-row jc-between ai-center">
-              <div class="left" >
+              <div class="left mr30" >
                 <el-image :src="item.img"></el-image>
               </div>
               <div>
@@ -55,10 +55,11 @@
 <script>
 import IndexCard from '@/views/index/components/index-card.vue'
 import MxImageWrap from '@/views/questioncenter/components/main-card/mx-image-wrap.vue'
-import { mapGetters } from 'vuex'
-import store from '@/store'
+import RouterHelpMixin from '@/router/router-help-mixin'
+import loginCheckMixin from '@/views/components/blocks/index-login-check-mixin'
 export default {
   components: { IndexCard, MxImageWrap },
+  mixins: [RouterHelpMixin, loginCheckMixin],
   data() {
     return {
       onLinePaper: [
@@ -69,12 +70,12 @@ export default {
         },
         {
           title: '真题测评',
-          img: require('@/assets/images/personal_eval.png'),
+          img: require('@/assets/images/school_eval.png'),
           path: '/personalDatabase/schoolResources/index'
         },
         {
           title: '学校测评',
-          img: require('@/assets/images/personal_eval.png'),
+          img: require('@/assets/images/past_eval.png'),
           path: '/personalDatabase/cloudTank/index'
         },
       ],

+ 1 - 1
src/views/index/components/index-card-career.vue

@@ -60,7 +60,7 @@ export default {
       })
     },
     async handleMore() {
-      if (this.loginCheck) await this.loginCheck()
+      await this.loginCheck()
       this.transferTo(this.morePath)
     }
   }

+ 6 - 5
src/views/index/components/index-card-gksp.vue

@@ -43,11 +43,11 @@ export default {
           const path = '/career/plan/detail'
           const nextParams = {
             id: item.id,
-            aliid: item.aliid,
+            aliid: item.aliId,
             aliIdType: item.aliIdType,
-            name: item.name,
-            count: item.plays,
-            img: item.pictUrl
+            name: item.title,
+            count: item.clicked,
+            img: item.coverUrl
           }
           return {
             title: item.title,
@@ -55,12 +55,13 @@ export default {
             path: path,
             nextData: nextParams,
             class: idx >= this.lineSize ? ['mt15'] : [],
-            titleClasses: ['width100', 'fx-row', 'f-666', 'pf', 'f14', 'text-ellipsis']
+            titleClasses: ['width100', 'f-666', 'pf', 'f14', 'text-ellipsis']
           }
         })
       })
     },
     async handleMore() {
+      await this.loginCheck()
       this.transferTo(this.morePath)
     }
   }

+ 7 - 5
src/views/index/components/index-card-gktf.vue

@@ -43,11 +43,11 @@ export default {
           const path = '/career/plan/detail'
           const nextParams = {
             id: item.id,
-            aliid: item.aliid,
+            aliid: item.aliId,
             aliIdType: item.aliIdType,
-            name: item.name,
-            count: item.plays,
-            img: item.pictUrl
+            name: item.title,
+            count: item.clicked,
+            img: item.coverUrl
           }
           return {
             title: item.title,
@@ -55,12 +55,14 @@ export default {
             path: path,
             nextData: nextParams,
             class: idx >= this.lineSize ? ['mt15'] : [],
-            titleClasses: ['width100', 'fx-row', 'f-666', 'pf', 'f14', 'text-ellipsis']
+            titleClasses: ['width100',  'f-666', 'pf', 'f14', 'text-ellipsis']
           }
         })
       })
     },
     async handleMore() {
+      await this.loginCheck()
+      if (!this.path) return
       this.transferTo(this.morePath)
     }
   }

+ 72 - 0
src/views/index/components/index-card-news-single.vue

@@ -0,0 +1,72 @@
+<template>
+  <index-card :title="type"  more-text="更多" @more="handleMore">
+        <el-row>
+          <el-col v-for="news in list" :key="news.id" :span="12">
+            <div class="fx-row fx-sta-cen pf f-333 pr40" style="line-height: 35px">
+              <i class="el-icon-alarm-clock"></i>
+              <span class="ml3">{{ news.sendDate }}</span>
+              <span class="ml10 fx-1 text-ellipsis new-title pointer"
+                    :title="news.title" @click="goNewsWithType(type)">
+                {{ news.title }}</span>
+            </div>
+          </el-col>
+        </el-row>
+  </index-card>
+</template>
+
+<script>
+import IndexCard from '@/views/index/components/index-card'
+import loginCheckMixin from '@/views/components/blocks/index-login-interceptor-mixin'
+import transferMixin from '@/components/mx-transfer-mixin'
+import * as career from '@/api/webApi/career-news'
+
+export default {
+  mixins: [transferMixin, loginCheckMixin],
+  name: 'index-card-news-single',
+  components: { IndexCard },
+  props:{
+    type:{
+      type: String,
+      default: '',
+    },
+    morePath: {
+      type: String,
+      default: '',
+    },
+  },
+  data() {
+    return {
+      list: []
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      career.list({
+        pageNum: 1,
+        pageSize: 10,
+        tag:'',
+        type: this.type
+      }).then(res => {
+        this.list = res.rows
+      })
+    },
+    async handleMore() {
+      await this.loginCheck()
+      this.transferTo(this.morePath)
+    },
+    async goNewsWithType(type) {
+      await this.loginCheck()
+      this.transferTo(this.morePath, { type })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.new-title:hover {
+  color: #47C6A2;
+}
+</style>

+ 2 - 2
src/views/index/components/index-card-news.vue

@@ -65,11 +65,11 @@ export default {
       return this.newsCache[type] || []
     },
     async handleMore() {
-      if (this.loginCheck) await this.loginCheck()
+      await this.loginCheck()
       this.transferTo(this.morePath)
     },
     async goNewsWithType(type) {
-      if (this.loginCheck) await this.loginCheck()
+      await this.loginCheck()
       this.transferTo(this.morePath, { type })
     }
   }

+ 1 - 1
src/views/index/components/index-card-subject-query.vue

@@ -35,7 +35,7 @@ export default {
   },
   methods: {
     async handleMore() {
-      if (this.loginCheck) await this.loginCheck()
+      await this.loginCheck()
       this.transferTo(this.morePath)
     }
   }

+ 9 - 2
src/views/index/components/index-card-top.vue

@@ -1,7 +1,7 @@
 <template>
   <index-card title="热门资讯">
     <!-- 空白与左边tabs对齐 -->
-    <div style="height: 55px"></div>
+    <div v-if="isSpace" style="height: 55px"></div>
     <div v-for="news in topNews" :key="news.id" class="fx-row fx-sta-cen pf f-333 pr40" style="line-height: 35px">
       <i class="el-icon-alarm-clock"></i>
       <span class="ml3">{{ news.sendDate }}</span>
@@ -22,6 +22,13 @@ export default {
   mixins: [loginCheckMixin, transferMixin],
   name: 'index-card-top',
   components: { IndexCard },
+  props:{
+    // 是否向上空出来一块
+    isSpace:{
+      type:Boolean,
+      default:true
+    }
+  },
   data() {
     return {
       morePath: '/fuzhu/newGaokaoNews',
@@ -42,7 +49,7 @@ export default {
       })
     },
     async handleMore() {
-      if (this.loginCheck) await this.loginCheck()
+      await this.loginCheck()
       this.transferTo(this.morePath)
     }
   }

+ 1 - 1
src/views/index/components/index-image-item.vue

@@ -63,7 +63,7 @@ export default {
   },
   methods: {
     async handleItem() {
-      if (this.loginCheck) await this.loginCheck()
+      await this.loginCheck()
       if (!this.path) return
       this.transferTo(this.path, this.nextData)
     }

+ 19 - 0
src/views/index/components/index-news-single-wrapper.vue

@@ -0,0 +1,19 @@
+<template>
+  <div class="fx-row">
+    <index-card-news-single type="单招志愿" morePath="/fuzhu/volunteering_single" class="mr20" style="width: 65%"/>
+    <index-card-top :is-space="false" class="fx-1"/>
+  </div>
+</template>
+
+<script>
+import IndexCardNewsSingle from '@/views/index/components/index-card-news-single'
+import IndexCardTop from '@/views/index/components/index-card-top'
+
+export default {
+  name: 'index-news-single-wrapper',
+  components: { IndexCardTop, IndexCardNewsSingle }
+}
+</script>
+
+<style scoped>
+</style>

+ 1 - 1
src/views/index/components/index-preference-simulate.vue

@@ -18,7 +18,7 @@ export default {
   },
   methods: {
     async handleClick() {
-      if (this.loginCheck) await this.loginCheck()
+      await this.loginCheck()
       this.transferTo(this.path)
     }
   }

+ 1 - 1
src/views/index/components/login-top-menus.vue

@@ -33,7 +33,7 @@ export default {
   },
   methods: {
     async handleMenuClick(item) {
-      if (this.loginCheck) await this.loginCheck()
+      await this.loginCheck()
       this.to(item)
     }
   }