<template>
	<view v-if="!isLogin" class="m-log g_flex_column_start g_bg_page" style="padding-bottom: calc(50px + env(safe-area-inset-bottom)); min-height: 100vh; opacity: 0; animation: fadeIn 0.2s ease forwards;">
		<view>
			<rh-login-false-list loginUrl="/root/login/index" />
		</view>
	</view>
	<view class="p-root-home-quick g_w_all g_bg_f_5 g_kuaishou" v-else style="padding-bottom: calc(50px + env(safe-area-inset-bottom)); min-height: 100vh; opacity: 0; animation: fadeIn 0.2s ease forwards;">
		<rh-apply useform="pages"></rh-apply>
	</view>
	<custom-tabbar :current="2" />
</template>
<script>
export default {
	data() {
		return {
			isLogin: false,
		};
	},
	onShow() {
		let that = this;
		this.isLogin = uni.getStorageSync("apply-token") ? true : false;
	},
	onShareAppMessage() {
		let that = this;
		let path;
		path = `/pages/apply/index`;
		let appInfo = uni.getStorageSync("miniApp-info");
		return {
			title: appInfo.slogan || "为劳动者创造价值",
			imageUrl: appInfo.sharePoster,
			path,
		};
	},
	onShareTimeline() {
		let that = this;
		let appInfo = uni.getStorageSync("miniApp-info");
		return {
			title: appInfo.slogan || "为劳动者创造价值",
			imageUrl: appInfo.logo,
		};
	},
};
</script>

<style lang="scss">
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
</style>
