<template>
	<view>
		
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	import {
		$image,
		$response
	} from '@/api'
	import {
		onShow,onLoad
	} from '@dcloudio/uni-app'
	const $props = defineProps({
		hospital: {
			type: String,
			default: ''
		},
	});
	const id_number = ref('')
 
	onLoad((e)=>{
		id_number.value=e.idnumber
		try{
			if(id_number.value.length>18){
				let base64Str=decodeURIComponent(id_number.value)
				id_number.value=atob(base64Str)
			}
		}catch(e){
			  console.error('解码失败', e)
			uni.$lu.toast("解码失败"+e)
			return false
		}
	
		
		if(id_number.value){
			uni.navigateTo({
				url: `/pages/main/list/list?hospital=1&id_number=${id_number.value}`
			})
		}else{
			uni.$lu.toast("身份证不能为空")
		}
	})
</script>

<style>

</style>
