<template>
	<!-- 达人和讲述 -->
	<view class="tell">
		<navbar :title="titles[type]" leftClick @leftClick="$utils.navigateBack" />

		<view class="tell-top" v-if="type == 0 ">
			<view>级别</view>
			<view>遗产点</view>
		</view>

		<cardList :type="type" ref="cardList" :showRoleLevel="type == 1"/>
		<tabber/>
	</view>
</template>

<script>
	import cardList from '../components/list/cardList.vue'
	export default {
		components: {
			cardList
		},
		data() {
			return {
				titles: ['遗产讲述', '达人同游'],
				type: 0,
			}
		},
		onLoad(args) {
			this.type = args.type || 0
		},
		onShow() {
			this.$nextTick(() => {
				this.$refs.cardList.getList()
			})
		},
		onPullDownRefresh(){
			this.$refs.cardList.getList()
		},
		//滚动到屏幕底部
		onReachBottom() {
			this.$refs.cardList.loadMoreList()
		},
		methods: {

		}
	}
</script>


<style scoped lang="scss">
	.tell {
		.tell-top {
			display: flex;
			justify-content: left;
			align-items: center;
			height: 80rpx;
			background-color: #fff;
			border-top: 2rpx solid #D0D0D0;
			border-bottom: 2rpx solid #D0D0D0;

			view {
				flex: 1;
				margin-left: 5%;
			}
		}
	}
</style>