<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}6666</text>

			<input @click="denglu" placeholder="自动获得焦点" />
		</view>
	</view>
</template>

<script setup>
	import {
		getAppConfig,
		login,
		kaoshiList
	} from '@/api/login.js'
	import {
		ref
	} from 'vue';
	let title = ref('Hello')
	//console.log(this)
	// getAppConfig();



	const denglu = () => {
		let req = {
			password: 'sVXqow3/+jG5kIDVGqoezXoK/Pceal1cf/kiojvUdvSU0qTjm5ikUz9CHcsu05I9whRxeep/TDVAcNl2dEqAgSUr5Ufq1FDdHr5Pn/HA5LfoZV+n5j82RE93cwcrCJw6/MwW3ZWgISzvG5qN8t9IzkRX2qMB/7SJxnh3NzoaxX4=',
			userName: 'root'
		}
		login(req).then(res => {
			let obj  = JSON.stringify(res.data)
			console.log(obj)
			uni.setStorage({
				key: 'Mta-Auth',
				data: obj // 假设 this.userInputValue 是用户输入的数据
			});

			setTimeout(() => {
				let req = {
					'page': 1,
					'size': 4,
					'status': 1,
				}
				kaoshiList(req).then(res=>{
					console.log(res)
				})
			}, 5000)
		})
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>