<template>
	<view style="background-color: #F1F2F8;letter-spacing: 1rpx;min-height: 100vh;">
		<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="#ffffff">
			<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
				<view style="width: 100%;">
					<view
						style="text-align: center;font-size: 34rpx;color: #000000;letter-spacing: 1px;font-weight: bold;">
						<text>青企圈</text>
					</view>
				</view>
			</view>
		</tn-nav-bar>
		<view :style="{paddingTop: vuex_custom_bar_height + 'px'}"
			style="background-color: #ffffff;padding-bottom: 10rpx;">

		</view>
	</view>
</template>

<script>
	import {
		associationIndex
	} from '@/util/api.js';
	import store from '@/store/index.js'
	export default {
		data() {
			return {
				topCurrent: 0,
				list: [],
				apiImgUrl: this.$store.state.imgUrl,
				content: ''
			}
		},
		mounted() {
			this.getAssociationIndex();
		},
		methods: {
			switchTabbar(d) {
				console.log(d);
				store.commit('$tStore', {
					name: 'Gid',
					value: d.id
				})
				uni.setStorageSync('Gid', d.id);
				uni.$emit('getGid', {
					gid: d.id
				})
				uni.$emit('depId', {
					index: 0
				})
			},
			onsubmit() {
				this.page = 1;
				this.list = [];
				this.getAssociationIndex();
			},
			getAssociationIndex() {
				associationIndex({
						association_name: this.content
					})
					.then(res => {
						console.log(res);
						if (res.code == 1) {
							this.list.push(...res.data);
						}
					})
					.catch(error => {
						uni.showToast({
							title: error,
							icon: 'none',
							duration: 2000
						});
					})
			},
			tn(e) {
				uni.navigateTo({
					url: e
				})
			}
		}
	}
</script>

<style>
	.triangle {
		width: 0;
		height: 0;
		border-top: 20rpx solid #13C296;
		border-right: 20rpx solid transparent;
		border-left: 20rpx solid transparent;
		position: absolute;
		left: 0;
		right: 0;
		margin: 0 auto;
		bottom: -12rpx;
		z-index: 100;
	}
</style>