-
Notifications
You must be signed in to change notification settings - Fork 6
/
Mv.vue
84 lines (72 loc) · 2.09 KB
/
Mv.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<template>
<l-area class="mv" title="全部MV">
<span>地区:</span>
<simple-radio :options="areaLabel" v-model="area"/> <br>
<span>类型:</span>
<simple-radio :options="typeLabel" v-model="type"/> <br>
<span>排序:</span>
<simple-radio :options="orderLabel" v-model="order"/> <br>
<rendering
class="mvs"
:component="require('@/components/content/matrices/CommonVideoMatrices').default"
:adapter="adapter"
:show-creator="true"
:total="total"
:filling="filling"
:unique="area + type + order"
/>
</l-area>
</template>
<script>
import SimpleRadio from "@/components/common/SimpleRadio";
import Rendering from "@/components/layout/Rendering";
import {mvs} from "@/network/request_show";
import LArea from "@/components/common/LArea";
export default {
name: "Mv",
components: {LArea, Rendering, SimpleRadio},
data() {
return {
total: -1,
area: '全部',
type: '全部',
order: '上升最快',
areaLabel: ['全部', '内地', '港台', '欧美', '日本'],
typeLabel: ['全部', '官方版', '原声', '现场版', '网易出品'],
orderLabel:['上升最快', '最热', '最新'],
adapter: {
cover: (video) => video['cover'] + '?param=320y180',
type: (video) => 'mv',
artists: (video) => {
return video['artists'].map(value => {
return {
id: value['id'],
name: value['name'],
alia: value['alias']? value['alias'].slice(-2): []
}
})
}
}
}
},
methods: {
filling(offset, limit, first_load) {
return new Promise(resolve => {
mvs(this.area, this.type, this.order, offset, limit)
.then(result => {
if (first_load) this.total = result['count']
resolve(result['data'])
})
})
}
}
}
</script>
<style scoped>
.mv span {
font-size: 11px;
}
.mvs {
margin-top: 15px;
}
</style>