fansShopMessageList.vue
2.35 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<template>
<div>
<!--<div class="title">-->
<!--已关注达人-->
<!--</div>-->
<div class="item_box">
<ul
v-infinite-scroll="loadMore"
infinite-scroll-disabled="loading"
:infinite-scroll-distance="list.length">
<li v-for="item in list" @click="$parent.toDetail(item)">
<dresserList :dresserList="item"></dresserList>
</li>
</ul>
</div>
</div>
</template>
<script>
import dresserList from "@/components/dresserList/dresserList";
import { Toast, Indicator } from 'mint-ui';
export default {
name: 'test',
data () {
return {
list: [],
loading: false,
}
},
components:{
dresserList
},
created(){
document.title = "已关注达人";
// 获取关注人列表
this.fansShopMessageList();
},
methods: {
/**
* 已关注达人列表
*/
fansShopMessageList () {
// 加载中提示
Indicator.open('加载中...');
// 请求接口
this.http("/api/Dynamic/fansShopMessageList", {
uid:this.$route.query.uid
},this.fansShopMessageListCallback, {
method: "post"
});
},
/**
* 已关注达人列表回调
* @param {object} res [服务器返回数据]
* @param {object} ext [扩展参数]
*/
fansShopMessageListCallback(res, ext) {
// 加载完成
Indicator.close();
// 返回处理
if (res.code == 200) {
// 解构数据
let {data: datas} = res;
/*获取裂变数据*/
// 设置标题
this.$set(this, "list", datas.list);
}
},
loadMore() {
// this.loading = true;
// setTimeout(() => {
// let last = this.list[this.list.length - 1];
// for (let i = 1; i <= 10; i++) {
// this.list.push(last + i);
// }
// this.loading = false;
// }, 2500);
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style rel="stylesheet/less" lang="less" scoped>
@import "fansShopMessageList";
</style>