|
@@ -4,44 +4,49 @@
|
|
<el-row v-if="total > 0" :gutter="10">
|
|
<el-row v-if="total > 0" :gutter="10">
|
|
<el-col class="evaluation-card-wrapper" v-for="c in dataList" :key="c.id" :span="4">
|
|
<el-col class="evaluation-card-wrapper" v-for="c in dataList" :key="c.id" :span="4">
|
|
<el-card>
|
|
<el-card>
|
|
- <course-card @click.native="detail(c)" :img="c.coverUrl" :title="c.title" :count="c.clicked"></course-card>
|
|
|
|
|
|
+ <course-card class="pointer" @click.native="detail(c)" :img="c.coverUrl" :title="c.title" :count="c.clicked"></course-card>
|
|
</el-card>
|
|
</el-card>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <evaluation-empty class="mt10" v-else />
|
|
|
|
- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" :page-size="12" :pageSizes="[12, 24, 48]" @pagination="getList" />
|
|
|
|
|
|
+ <evaluation-empty class="mt10" v-else/>
|
|
|
|
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
|
|
+ :page-size="12" :pageSizes="[12, 24, 48]" @pagination="getList"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import {
|
|
|
|
- gkVideo,
|
|
|
|
- saveClicked
|
|
|
|
-} from "@/api/webApi/career-news";
|
|
|
|
-import courseCard from "../components/courseCard.vue";
|
|
|
|
|
|
+import { gkVideo, saveClicked } from '@/api/webApi/career-news'
|
|
|
|
+import courseCard from '../components/courseCard.vue'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- components:{
|
|
|
|
|
|
+ components: {
|
|
courseCard
|
|
courseCard
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- type:'高考视频',
|
|
|
|
- queryParams:{
|
|
|
|
- pageSize:12,
|
|
|
|
|
|
+ type: '',
|
|
|
|
+ queryParams: {
|
|
|
|
+ pageSize: 12,
|
|
pageNum: 1
|
|
pageNum: 1
|
|
},
|
|
},
|
|
- total:0,
|
|
|
|
- dataList:[]
|
|
|
|
- };
|
|
|
|
|
|
+ category: {
|
|
|
|
+ gksp: '高考视频',
|
|
|
|
+ gktf: '高考提分',
|
|
|
|
+ },
|
|
|
|
+ total: 0,
|
|
|
|
+ dataList: []
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- console.log(this.$route.query.type)
|
|
|
|
- this.type = '高考视频'
|
|
|
|
|
|
+ const subPaths = this.$route.path.split("/");
|
|
|
|
+ const lastSubPath = subPaths[subPaths.length - 1]
|
|
|
|
+ const typeKey = lastSubPath.split("_")[lastSubPath.split("_").length - 1]
|
|
|
|
+ this.type = this.category[typeKey]
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- detail (item) {
|
|
|
|
|
|
+ detail(item) {
|
|
this.saveClick(item.id)
|
|
this.saveClick(item.id)
|
|
const nextParams = {
|
|
const nextParams = {
|
|
id: item.id,
|
|
id: item.id,
|
|
@@ -49,12 +54,12 @@ export default {
|
|
aliIdType: item.aliIdType,
|
|
aliIdType: item.aliIdType,
|
|
name: item.title,
|
|
name: item.title,
|
|
count: item.clicked,
|
|
count: item.clicked,
|
|
- img: item.coverUrl,
|
|
|
|
- };
|
|
|
|
|
|
+ img: item.coverUrl
|
|
|
|
+ }
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- path: "/career/plan/detail",
|
|
|
|
- query: nextParams,
|
|
|
|
- });
|
|
|
|
|
|
+ path: '/career/plan/detail',
|
|
|
|
+ query: nextParams
|
|
|
|
+ })
|
|
},
|
|
},
|
|
saveClick(id) {
|
|
saveClick(id) {
|
|
saveClicked({
|
|
saveClicked({
|
|
@@ -73,8 +78,8 @@ export default {
|
|
this.dataList = res.rows
|
|
this.dataList = res.rows
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- },
|
|
|
|
-};
|
|
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
</style>
|
|
</style>
|