<template>
	<view style="min-height: 100vh;background-color: #f8f8f8;padding-top: 20px;box-sizing: border-box;">
		<view style="padding: 0px 15px;">
			<view class="list-item" v-for="(item,index) in listData" :key="index">
				<image :src="item.avatar" mode="" style="width: 40px;height: 40px;border-radius: 50%;" @click="goHomePage(item.fans_mid)"></image>
				<view class="txt">
					{{item.nickname}}
				</view>
			</view>
			<view class="" v-if="listData.length==0">
				<loadmore :isMore="true" v-if="listData.length=='0'" />
			</view>
		</view>
	</view>
</template>

<script>
import App from '@/common/js/app.js';
import loadmore from '@/components/template/loadmore.vue'
	export default {
		data() {
			return {
				listData: [],
				myName: '',
				keyword: '',
				mid: '',
			}
		},
		components: {
			loadmore
		},
		onLoad(e){
			// this.myName = uni.getStorageSync('userinfo').nickname;
			this.mid = e.id;
			this.getFans();
		},
		methods: {
			getFans(page = 1, isPage = false) {
				let _this = this,
					requestData = {
						name: this.keyword,
						mid: this.mid
					};
				App._post_form('&p=member&do=getFansUserList', requestData, res => {
					_this.listData = res.data.data;
				}, false, () => {
					
				})
			},
			goHomePage(id){
				if (id > 0) {
					App.navigationTo({
						url: 'pages/subPages/homepage/homepage/homepage?mid=' + id + '&checkType=' + 1
					});
				}
			},
			
		}
	}
</script>

<style lang="scss" scoped>
.dis-flex{
	display: flex;
	align-items: center;
}
.list-item{
	display: flex;
	align-items: flex-start;
	line-height: 26px;
	margin-bottom: 10px;
	padding-right: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #efefef;
	
	image{
		margin-right: 5px;
		color: #999;
		font-size: 13px;
	}
	.txt{
		display:-webkit-box;//将盒子转换为弹性盒子
		-webkit-box-orient:vertical;//文本显示方式，默认水平
		-webkit-line-clamp:2;//设置显示多少行
		overflow:hidden;
	}
}
</style>
