<template>
	<view class="p-root-person-enrollList g_w_all g_bg_f_5 g_kuaishou">
		<view v-show="computeCode == -1" class="g_flex_column_center">
			<rh-loading marginBottom="g_mb_130" />
		</view>
		<view v-show="computeCode == 0" class="g_flex_column_center" style="height: 100vh">
			<rh-empty text="暂无数据" style="padding-top: 160px;"></rh-empty>
		</view>
		<view v-show="computeCode > 0">
			<view class="m_tab"> </view>
			<view class="m_panel">
				<resumePanel :from="from" :active="active" v-if="type == 'resume'" />
				<orderPanel :from="from" v-if="type == 'order'" />
			</view>
		</view>
	</view>
</template>

<script>
import resumePanel from "./child/resume.vue";
import orderPanel from "./child/order.vue";

export default {
	components: {
		resumePanel,
		orderPanel,
	},
	onShareAppMessage() {
		return this.G.shareFun();
	},
	data() {
		return {
			computeCode: -1,
			speed: -1,
			from: "",
			type: "resume",
			active: 0,
		};
	},
	onLoad(options) {
		console.log(options);
		this.from = options.from;
		if (this.from == "tob") {
			wx.setNavigationBarTitle({
				title: "简历工单",
			});
			if (options.active) {
				this.active = options.active;
			}
		} else if (this.from == "toc") {
			wx.setNavigationBarTitle({
				title: "报名记录",
			});
		}
	},
	onShow() {
		let that = this;
		setTimeout(() => {
			that.computeCode = 1;
		}, 300);
	},
	onReachBottom() {
		let that = this;
	},
	methods: {
		getEmptyDom(text = "暂无数据", subText = ""){
			this.G.getEmptyDom(text, subText)
		},
	},
};
</script>

<style lang="scss">
.p-root-person-enrollList {
	background-color: #ededed;
	min-height: 100%;
}
</style>
