<template>
	<view>
		<index ref="首页" v-show="page == '首页'" />
		<dataBank ref="资料库" v-show="page == '资料库'" />
		<bottom-suspension-frame ref="pages" @onChange="pageChange" />
	</view>
</template>

<script>
import index from './index/index.vue'
import dataBank from './cloud/dataBank.vue'

import bottomSuspensionFrame from "./modules/bottomSuspensionFrame.vue";
export default {
	components: { bottomSuspensionFrame, index, dataBank },
	data() {
		return {
			swiperItemID: 'cloud',
			page: '资料库'
		}
	},
	onLoad() {
	},
	onShow() {
		// #ifdef MP-WEIXIN
		this.updatePageData(this.swiperItemID, this.page)
		// #endif
	},
	methods: {
		updatePageData(itemId, page) {
			this.$refs.pages.onClick(itemId, page)
		},
		pageChange(detail) {
			// this.$refs[detail.name]
			setTimeout(() => { detail.callBack() }, 300)
			console.log("切换页面", detail)
		}
	}
}
</script>

<style lang="scss"></style>
