|
@@ -6,19 +6,14 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
v-for="(item, index) in category"
|
|
v-for="(item, index) in category"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
- type="primary"
|
|
|
|
|
- size="medium"
|
|
|
|
|
|
|
+ type="info"
|
|
|
|
|
+ size="mini"
|
|
|
:plain="currentCategory !== index"
|
|
:plain="currentCategory !== index"
|
|
|
- circle
|
|
|
|
|
@click="chooseCategory(item, index)"
|
|
@click="chooseCategory(item, index)"
|
|
|
>{{ item }}
|
|
>{{ item }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :md="12">
|
|
|
|
|
- <!--猜您喜欢-->
|
|
|
|
|
-<!-- <recommend />-->
|
|
|
|
|
- </el-col>
|
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :md="12">
|
|
<el-col :md="12">
|
|
@@ -26,10 +21,9 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
v-for="(item, index) in childCategory"
|
|
v-for="(item, index) in childCategory"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
- type="primary"
|
|
|
|
|
- size="medium"
|
|
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ size="mini"
|
|
|
:plain="currentChildCategory !== index"
|
|
:plain="currentChildCategory !== index"
|
|
|
- circle
|
|
|
|
|
@click="getVideoList(item.id, index)"
|
|
@click="getVideoList(item.id, index)"
|
|
|
>{{ item.name }}
|
|
>{{ item.name }}
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -80,13 +74,12 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import VideoCard from 'components/card/VideoCard'
|
|
import VideoCard from 'components/card/VideoCard'
|
|
|
-import Recommend from 'components/recommend/Recommend'
|
|
|
|
|
import HotList from 'components/hotlist/HotList'
|
|
import HotList from 'components/hotlist/HotList'
|
|
|
import { videoCategory, videoPage} from '@/api/video'
|
|
import { videoCategory, videoPage} from '@/api/video'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'Video',
|
|
name: 'Video',
|
|
|
- components: { VideoCard, Recommend, HotList },
|
|
|
|
|
|
|
+ components: { VideoCard, HotList },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
// 屏幕宽度, 为了控制分页条的大小
|
|
// 屏幕宽度, 为了控制分页条的大小
|
|
@@ -125,28 +118,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
- /*const query = this.$route.query
|
|
|
|
|
- var nextId = query.nextId
|
|
|
|
|
- if (nextId !== undefined) {
|
|
|
|
|
- this.nextId = nextId
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- var pageNumber = query.pageNumber
|
|
|
|
|
- if (pageNumber !== undefined) {
|
|
|
|
|
- const pn = parseInt(pageNumber)
|
|
|
|
|
- if (pn !== this.currentPage) {
|
|
|
|
|
- this.currentPage = pn
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: '/video',
|
|
|
|
|
- query: {
|
|
|
|
|
- pageNumber: this.currentPage,
|
|
|
|
|
- nextId: this.nextId
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }*/
|
|
|
|
|
-
|
|
|
|
|
this.videoPageWrapper(this.currentPage, this.prevId, this.nextId, this.categoryId)
|
|
this.videoPageWrapper(this.currentPage, this.prevId, this.nextId, this.categoryId)
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -199,6 +170,8 @@ export default {
|
|
|
this.prevId = 0
|
|
this.prevId = 0
|
|
|
this.nextId = 0
|
|
this.nextId = 0
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
|
|
+
|
|
|
|
|
+ this.videoList = []
|
|
|
this.videoPageWrapper(this.currentPage, this.prevId, this.nextId, this.categoryId)
|
|
this.videoPageWrapper(this.currentPage, this.prevId, this.nextId, this.categoryId)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|