sort.vue
1.4 KB
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
<style scoped>
.index {
width: 100%;
position: absolute;
top: 0;
bottom: 0;
left: 0;
text-align: center;
}
</style>
<template>
<div class="index">
<miniapp title="UFO分类页">
<template>
<template v-for="i in list">
<smartfloor :item="i" :key="i.resContentId"></smartfloor>
<divide></divide>
</template>
</template>
</miniapp>
</div>
</template>
<script>
import miniapp from 'components/miniapp'
import smartfloor from 'components/smart-floor'
import divide from 'components/divide'
import util from '@/libs/util'
import ResourceService from '@/service/resource-service'
export default {
data() {
return {
list: [],
resId: null
}
},
mounted() {
this.resId = util.getQueryString('id') || 2;
this.resourceService = new ResourceService();
this.init();
this.$bus.$on('updated', () => {
this.init();
})
},
methods: {
init() {
this.resourceService.info(this.resId).then(result => {
this.list = result;
})
}
},
components: {
miniapp,
smartfloor,
divide
}
};
</script>