<template>
	<view>
		<view class="qu" v-for="qu in data">
			<view class="tip">
				<text>{{qu.title}}</text>
			</view>
			<view class="row uni-flex uni-row" v-for="friend in qu.children">
				<view class="row_logo">
					<image :src="BaseUrl+friend.imgSrc"></image>
				</view>
				<view class="flex-item">
					<u-text :text="friend.name" size="18" bold></u-text>
					<u-text mode="phone" :text="friend.phone" size="15" call="true"></u-text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: []
			}
		},
		onLoad() {
			this.getabData()
		},
		onShow() {
			this.getabData()
		},
		methods: {
			async getabData() {
				const {
					data: res
				} = await this.$httpRequest({
					url: '/api/ci/gab?data=' + uni.getStorageSync("groupUserCode"),
					method: 'get',
				})
				if (res.code == 200) {
					this.data = res.data
				} else {
					this.data = []
					uni.showToast({
						icon: 'none',
						title: res.msg
					})
				}
			},
		}
	}
</script>

<style lang="scss">
	page {
		background: #EEEEEE;
	}

	.row {
		background: white;
		display: flex;
		width: 100%;
		height: 60px;

		.row_logo {
			width: 20%;
			display: flex;
			align-items: center;

			image {
				width: 50px;
				height: 50px;
				margin: auto;
				border-radius: 5px;
			}
		}

		.row_left {
			height: 100%;
			width: 40%;
			display: flex;
			align-items: center;

			border: {
				bottom: 1px solid #DDDDDD;
			}

			text {
				font-size: 16px;
				font-family: 'syht';
				display: block;
			}

		}

		.row_right {
			height: 100%;
			width: 40%;
			display: flex;
			align-items: center;

			border: {
				bottom: 1px solid #DDDDDD;
			}

			text {
				font-size: 16px;
				font-family: 'syht';
				display: block;
			}

		}



	}

	.row:last-child {
		.row_right {
			border: 0;
		}
	}

	.qu {
		.tip {
			margin: 3px 0;
			font-size: 14px;
			font-family: 'syht';

			text {
				margin-left: 13px;
			}
		}
	}
</style>
