<template>
	<view class="wrap login">
		<view class="sys-name">
			施工管理系统
		</view>

		<view class="login-form">
			<u-form :model="form" ref="uFormRef">
				<u-form-item prop="account" >
					<template #leftIcon>
						<u-icon name="account" size="32" />
					</template>
					<u-input v-model="loginForm.account" placeholder="请输入账号" /></u-form-item>
				<u-form-item prop="password">
					<template #leftIcon>
						<u-icon name="lock" size="32" />
					</template>
					<u-input v-model="loginForm.password" type="password" :password-icon="true"  placeholder="请输入密码" />
				</u-form-item>
				<view class="u-margin-top-60">
					<u-button type="primary" :loading="loading" @click="fetchLogin">登录</u-button>
				</view>
			</u-form>
		</view>
	</view>
</template>

<script setup>
import { ref, reactive } from 'vue';
import { useUserStore } from '@/store';
const userStore = useUserStore();
const {loginForm, fetchLogin} = userStore;
</script>
