<script setup>
	/**
	 * name：
	 * user：sa0ChunLuyu
	 * date：2024年8月12日 19:47:35
	 */
	import {
		ref
	} from 'vue'
	import {
		$response
	} from '@/api'
	import {
		onShow
	} from '@dcloudio/uni-app'
	const $props = defineProps({
		openid: {
			type: String,
			default: ''
		}
	});
	const tip_str = ref('授权登录中，请稍候...')
	const checkOpenid = () => {
		let openid = ''
		if (!!$props.openid) {
			openid = decodeURIComponent($props.openid)
		}
		if (!!openid) {
			uni.setStorageSync('OPENID', openid)
			uni.redirectTo({
				url: "/pages/main/index/index"
			})
		} else {
			tip_str.value = '未获取到授权信息，请从小程序进入'
		}
	}

	onShow(() => {
		checkOpenid()
	})
</script>
<template>
	<view class="tip_wrapper">
		{{ tip_str }}
	</view>
</template>
<style scoped>
	.tip_wrapper {
		height: 100vh;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}
</style>