<template>
	<view class="center">
		<view>
			<u-navbar left-text="返回" :autoBack="true" placeholder="true" bgColor="transparent">
			</u-navbar>
		</view>
		<view class="flex-column mlr-70 mt-100" style="text-align: left;">
			<text class="fs-48 fw-700">Hello!\n请登录员工账号</text>
			<input class="h-86 lh-86 fs-28 plr-33 mt-80" style="background: #FFFFFF;" placeholder="手机号"
				v-model="account" />
			<input class="h-86 lh-86 fs-28 plr-33 mt-50" style="background: #FFFFFF;" placeholder="密码"
				v-model="password" />
			<view class="fullscreen-btn mt-100" @click="login">
				立即登录
			</view>
		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				account: '',
				password: ''
			};
		},
		onLoad(options) {

		},
		methods: {
			login() {
				const params = {
					url: '/api/login/accountLogin/' + this.account + '/' + this.password,
					loadingTip: '',
					method: 'GET',
				}
				this.$request(params).then(res => {
					uni.setStorageSync('userInfo_yg', res.data)
					this.$wskj.to("/pagesMine/pages/ygzy")
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	.center {
		height: 100vh;
		display: flex;
		flex-direction: column;
		background: linear-gradient(180deg, #DFF4EB 0%, #FFFFFF 100%);
	}
</style>