<template>
	<view class="pageBg">
		<view class="pad">
			<view class="card">
				<image  :src="pdfUrl"   mode="widthFix"></image>
				<nodata v-if="!pdfUrl" style="margin-bottom: 40rpx;">暂无合同</nodata>
			</view>
		</view>
	</view>
</template>

<script>
	import { selectContractPdfBase64 } from '@/config/api.js'
	export default {
		
		data() {
			return {
				pdfUrl: ''
			}
		},
		onLoad() {
			this.selectContractPdfBase64Fn()
		},
		methods: {
			
			async selectContractPdfBase64Fn() {
				uni.showLoading({
					title: '正在加载……'
				})
				const {data: res} = await selectContractPdfBase64({studentId: this.studentId})
				this.pdfUrl = res
				console.log('this.pdfUrl')
				console.log(this.pdfUrl)
				setTimeout(()=>{
					uni.hideLoading()
				},800)
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	.card {
		padding: 8rpx;
		margin-bottom: 40rpx;
	}
</style>