<template>

	<view class="mobile-login-page">
		<view class="icon-title-navBar-box">
			<view @click="handleBack" class="nav-bar-icon"></view>
			<text class="nav-bar-title">录取通知书</text>
		</view>
		<view class="gsl-sj-listBox custom-certBox">
			<image @click="optenImg(data,index)" :src="base64">></image>
		</view>
	</view>
</template>

<script setup>
	import CryptoJS from 'crypto-js';
	import {
		toast
	} from "@/utils/common";
	import {
		onLoad
	} from "@dcloudio/uni-app";
	import {
		getAppConfig,
		login,
		queryCert
	} from '@/api/login.js'
	import cacheManager from '@/utils/cacheManager.js'
	import JSEncrypt from 'jsencrypt';
	import {
		ref
	} from 'vue';
	const base64 = ref('')
	onLoad(() => {
		base64.value = 'data:image/jpeg;base64,'+cacheManager.get('qrCode').base64
		console.log('base64.value',base64.value);
	})
	function optenImg(){
		uni.previewImage({
		        urls: [base64.value],  // 直接传入Base64字符串
		        current: 0,
		        indicator: "number"      // 显示页码指示器
		      });
	}
	function handleBack() {
		uni.redirectTo({
			url: '/pages/login'
		});
	}
</script>