| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <template>
- <view class="page-container">
- <!-- 顶部标题区域 -->
- <image class="bg-image " src="@/static/images/bg.png" mode="aspectFill"></image>
- <!-- 登录表单区域 -->
- <view class="login-form">
- <!-- 账号输入框 -->
- <view class="input-group">
- <text class="input-label">账号</text>
- <u-input v-model="account" placeholder="请输入手机号码" :border="false" class="input-field" type="number"
- maxlength="11"></u-input>
- </view>
- <!-- 密码输入框 -->
- <view class="input-group">
- <text class="input-label">密码</text>
- <u-input v-model="password" placeholder="请输入密码" :border="false" class="input-field" type="password"
- :password-icon="true"></u-input>
- </view>
- <!-- 登录按钮 -->
- <button class="login-btn" @tap="handleLogin">
- <text>确定</text>
- </button>
- </view>
- </view>
- </template>
- <script>
- import {
- wxLogin,
- } from '@/config/api.js';
- export default {
- data() {
- return {
- account: '',
- password: ''
- }
- },
- methods: {
- // 处理登录
- handleLogin() {
- if (!this.account) {
- uni.showToast({
- title: '请输入账号',
- icon: 'none'
- });
- return;
- }
- if (!this.password) {
- uni.showToast({
- title: '请输入密码',
- icon: 'none'
- });
- return;
- }
- // TODO: 实现登录逻辑
- console.log('登录信息:', {
- account: this.account,
- password: this.password
- });
- }
- }
- }
- </script>
- <style>
- .page-container {
- min-height: 100vh;
- background: #F5F5F5;
- }
- /* 背景图片 */
- .bg-image {
- top: 0;
- left: 0;
- width: 100%;
- height: 300rpx;
- z-index: 0;
- }
- .login-form {
- background: #FFFFFF;
- border-radius: 24rpx;
- padding: 32rpx;
- margin: 32rpx;
- box-shadow: 0 4rpx 16rpx rgba(41, 44, 53, 0.1);
- .input-group {
- margin-bottom: 32rpx;
- .input-label {
- display: block;
- font-size: 28rpx;
- color: #292C35;
- margin-bottom: 16rpx;
- }
- .input-field {
- background: #F5F5F5;
- border-radius: 12rpx;
- height: 88rpx;
- padding: 0 24rpx;
- font-size: 28rpx;
- }
- }
- .login-btn {
- width: 100%;
- height: 88rpx;
- background: linear-gradient(135deg, #FF5B05 0%, #FF8E3C 100%);
- border-radius: 44rpx;
- color: #FFFFFF;
- font-size: 32rpx;
- font-weight: 500;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 48rpx;
- border: none;
- box-shadow: 0 4rpx 16rpx rgba(255, 91, 5, 0.3);
- &:active {
- transform: translateY(2rpx);
- box-shadow: 0 2rpx 8rpx rgba(255, 91, 5, 0.4);
- }
- }
- }
- </style>
|