login.vue 2.48 KB
<template>
	<view class="login-page">
		<!-- 公共组件-每个页面必须引入 -->
		<public-module></public-module>
		<view class="u-flex" style="justify-content: center;">
			<image style="width: 250rpx;height: 250rpx;" src="../../static/logo.png" mode="aspectFill"></image>
		</view>
		<view class="f__login">
			<view class="loginPhone">
				<view class="form-row">
					<u--input class="input" prefixIcon="account-fill" type="text" placeholder="登录账号" border="surround"
						v-model="account">
					</u--input>
				</view>
				<view class="form-row">
					<u--input class="input" prefixIcon="lock-fill" :suffixIcon="showPasswordIcon"
						suffixIconStyle="color: #909399" type="password" placeholder="登录密码" border="surround"
						v-model="password" @change="passwordChange">
					</u--input>
				</view>
				<view class="u-flex" style="flex-direction: row;margin-top: 20rpx;justify-content: space-between;">
					<view style="color: #0079fe;font-size: 14px;" @click="openCodeFunc">手机验证码登录</view>
					<view style="color: #0079fe;font-size: 14px;" @click="findPassrordFunc">忘记密码</view>
				</view>
				<button class="submit" size="default" @click="onSubmitFunc"
					:style="{background:PrimaryColor}">登录</button>
				<view class="u-flex" style="justify-content: center;flex-direction: column;margin-top: 60rpx;">
					<view style="color:#cccccc">第三方账号登录</view>
					<view>
						<image style="width: 150rpx;height: 150rpx;" src="../../static/logo.png" mode="aspectFill">
						</image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				PrimaryColor: '#0079fe', //主题色
				showPasswordIcon: 'eye-off'
			}
		},
		methods: {
			passwordChange() {},
			onSubmitFunc() {},
			openCodeFunc() {
				uni.navigateTo({
					url: './code'
				})
			},
			findPassrordFunc() {
				uni.navigateTo({
					url: './findPassword'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.login-page {
		min-height: 100vh;
		background-color: #fff;
	}

	.f__login {
		padding: 48rpx 32rpx;
		border-radius: 18rpx 18rpx 0 0;
		z-index: 99;
		position: relative;
	}

	.loginPhone {
		.form-row {
			position: relative;

			.input {
				font-size: 34rpx;
				line-height: 102rpx;
				height: 114rpx;
				width: 100%;
				box-sizing: border-box;
				font-size: 30rpx;
				padding: 0;
				font-weight: bold;
			}
		}


		.submit {
			margin-top: 60rpx;
			color: #fff;
			width: 100%;
			border: none;
		}
	}
</style>