瀏覽代碼

新高考辅助

shilipojs 2 年之前
父節點
當前提交
c3876f2b4e

二進制
src/assets/images/noun_dx.png


二進制
src/assets/images/noun_fsx.png


二進制
src/assets/images/noun_gkzc.png


二進制
src/assets/images/noun_zslq.png


二進制
src/assets/images/noun_zy.png


二進制
src/assets/images/noun_zytb.png


+ 55 - 21
src/views/career/main.vue

@@ -5,45 +5,71 @@
       <el-image style="width: 100vw" :src="require('@/assets/images/fuzhu_banner.png')" fit="fill"></el-image>
     </div>
     <div class="content">
-      <index-card title="新高考政策" more-text="更多" class="mb20">
+      <!--      高考政策-->
+      <index-card-gksp class="mb20"></index-card-gksp>
+      <index-news-top-wrapper class="mb20 index-block"/>
+      <!--      学习技巧-->
+      <index-card-gktf class="mb20"></index-card-gktf>
+      <index-card title="高考名词" class="mb20">
+        <div class="fx-row nounList">
+          <div v-for="item in nounList" class="pointer" @click="$router.push(item.path)">
+            <el-image :src="item.img"></el-image>
+            <p class="text-center">{{item.title}}</p>
+          </div>
+        </div>
       </index-card>
-      <index-card title="资源库" class="mb20">
-      </index-card>
-      <index-card title="学习技巧" more-text="更多"  class="mb20"></index-card>
-      <index-card title="高考名词" class="mb20"></index-card>
     </div>
   </div>
 </template>
 <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 IndexNewsTopWrapper from '@/views/index/components/index-news-top-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 },
+  components: { IndexCard, MxImageWrap, IndexNewsTopWrapper, IndexCardGksp, IndexCardGktf },
+  created() {
+    list().then(res => {
+        this.nounList.map(item => {
+          item.path = '/career/gkmc/detail?id=' + res.rows.find(row => row.type == item.title).children[0].id
+        })
+        console.log(this.nounList)
+    })
+  },
   data() {
     return {
-      library: [
+      nounList: [
+        {
+          title: '大学',
+          img: require('@/assets/images/noun_dx.png'),
+        },
+        {
+          title: '高考政策',
+          img: require('@/assets/images/noun_gkzc.png'),
+        },
         {
-          title: '个人资源库',
-          img: require('@/assets/images/personal_library.png'),
-          path: '/personalDatabase/personalResources/index'
+          title: '专业',
+          img: require('@/assets/images/noun_zy.png'),
         },
         {
-          title: '校本资源库',
-          img: require('@/assets/images/school_library.png'),
-          path: '/personalDatabase/schoolResources/index'
+          title: '志愿填报',
+          img: require('@/assets/images/noun_zytb.png'),
         },
         {
-          title: '云库',
-          img: require('@/assets/images/cloud_library.png'),
-          path: '/personalDatabase/cloudTank/index'
+          title: '招生录取',
+          img: require('@/assets/images/noun_zslq.png'),
         },
-      ],
+        {
+          title: '分数线',
+          img: require('@/assets/images/noun_fsx.png'),
+        }
+      ]
     }
   },
-  methods: {
-  }
+  methods: {}
 }
 </script>
 <style scoped lang="scss">
@@ -57,5 +83,13 @@ export default {
 .container {
   background: #f5f4f9;
 }
+.nounList {
+  >div{
+    margin-right: 72px;
+    &:hover{
+      color: #00CCB4;
+    }
+  }
+}
 
 </style>

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

@@ -0,0 +1,72 @@
+<template>
+  <index-card title="新高考政策" more-text="更多" @more="handleMore">
+    <index-card-content :list="list" :line-size="lineSize">
+      <template #default="{item}">
+        <index-image-item v-bind="item"></index-image-item>
+      </template>
+    </index-card-content>
+  </index-card>
+</template>
+
+<script>
+import IndexCard from '@/views/index/components/index-card'
+import { gkVideo } from '@/api/webApi/career-news'
+import IndexCardContent from '@/views/index/components/index-card-content'
+import IndexImageItem from '@/views/index/components/index-image-item'
+import transferMixin from '@/components/mx-transfer-mixin'
+import loginCheckMixin from '@/views/components/blocks/index-login-interceptor-mixin'
+
+export default {
+  mixins: [transferMixin, loginCheckMixin],
+  name: 'index-card-gksp',
+  components: { IndexImageItem, IndexCardContent, IndexCard },
+  data() {
+    return {
+      morePath: '/fuzhu/index_gksp',
+      list: [],
+      lineSize: 4,
+      queryParams: {
+        pageNum: 1,
+        pageSize: 8,
+        type: '高考视频',
+        tag:''
+      }
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      gkVideo(this.queryParams).then(res => {
+        this.list = res['rows']?.map((item, idx) => {
+          const path = '/career/plan/detail'
+          const nextParams = {
+            id: item.id,
+            aliid: item.aliid,
+            aliIdType: item.aliIdType,
+            name: item.name,
+            count: item.plays,
+            img: item.pictUrl
+          }
+          return {
+            title: item.title,
+            src: item.coverUrl,
+            path: path,
+            nextData: nextParams,
+            class: idx >= this.lineSize ? ['mt15'] : [],
+            titleClasses: ['width100', 'fx-row', 'f-666', 'pf', 'f14', 'text-ellipsis']
+          }
+        })
+      })
+    },
+    async handleMore() {
+      this.transferTo(this.morePath)
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

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

@@ -0,0 +1,72 @@
+<template>
+  <index-card title="学习技巧" more-text="更多" @more="handleMore">
+    <index-card-content :list="list" :line-size="lineSize">
+      <template #default="{item}">
+        <index-image-item v-bind="item"></index-image-item>
+      </template>
+    </index-card-content>
+  </index-card>
+</template>
+
+<script>
+import IndexCard from '@/views/index/components/index-card'
+import { gkVideo } from '@/api/webApi/career-news'
+import IndexCardContent from '@/views/index/components/index-card-content'
+import IndexImageItem from '@/views/index/components/index-image-item'
+import transferMixin from '@/components/mx-transfer-mixin'
+import loginCheckMixin from '@/views/components/blocks/index-login-interceptor-mixin'
+
+export default {
+  mixins: [transferMixin, loginCheckMixin],
+  name: 'index-card-gksp',
+  components: { IndexImageItem, IndexCardContent, IndexCard },
+  data() {
+    return {
+      morePath: '/fuzhu/index_gksp',
+      list: [],
+      lineSize: 4,
+      queryParams: {
+        pageNum: 1,
+        pageSize: 8,
+        type: '高考提分',
+        tag:''
+      }
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      gkVideo(this.queryParams).then(res => {
+        this.list = res['rows']?.map((item, idx) => {
+          const path = '/career/plan/detail'
+          const nextParams = {
+            id: item.id,
+            aliid: item.aliid,
+            aliIdType: item.aliIdType,
+            name: item.name,
+            count: item.plays,
+            img: item.pictUrl
+          }
+          return {
+            title: item.title,
+            src: item.coverUrl,
+            path: path,
+            nextData: nextParams,
+            class: idx >= this.lineSize ? ['mt15'] : [],
+            titleClasses: ['width100', 'fx-row', 'f-666', 'pf', 'f14', 'text-ellipsis']
+          }
+        })
+      })
+    },
+    async handleMore() {
+      this.transferTo(this.morePath)
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>