Compare commits

...

2 Commits

Author SHA1 Message Date
7c8f107849 navigateTo增加 2026-03-16 12:09:15 +08:00
f11597f7b6 1203修改文件预览,登录页面 2026-03-16 12:03:48 +08:00
4 changed files with 1000 additions and 810 deletions

View File

@ -1,33 +1,35 @@
<template>
<view class="normal-login-container">
<view class="logo-content align-center justify-center flex">
<image :src="globalConfig.appInfo.logo" mode="widthFix" style="width: 100rpx;height: 100rpx;">
<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
</image>
<text class="title">大冢APS Ultra管理平台</text>
</view>
<view class="login-form-content">
<view class="input-item flex align-center">
<view class="iconfont icon-user icon"></view>
<input v-model="loginForm.username" class="input" maxlength="30" placeholder="请输入账号" type="text"/>
<input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" />
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-password icon"></view>
<input v-model="loginForm.password" class="input" maxlength="20" placeholder="请输入密码"
type="password"/>
<input v-model="loginForm.password" :type="passwordVisible ? 'text' : 'password'" class="input" placeholder="请输入密码" maxlength="20" />
<view class="password-eye" @click="togglePasswordVisible">
<uni-icons :type="passwordVisible ? 'eye-slash' : 'eye'" size="20" color="#999"></uni-icons>
</view>
<view v-if="captchaEnabled" class="input-item flex align-center" style="width: 60%;margin: 0px;">
</view>
<view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view>
<input v-model="loginForm.code" class="input" maxlength="4" placeholder="请输入验证码" type="number"/>
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
<view class="login-code">
<image :src="codeUrl" class="login-code-img" @click="getCode"></image>
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view>
</view>
<view class="action-btn">
<button class="login-btn cu-btn block bg-blue lg round" @click="handleLogin">登录</button>
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
</view>
<view v-if="register" class="reg text-center">
<view class="reg text-center" v-if="register">
<text class="text-grey1">没有账号</text>
<text class="text-blue" @click="handleUserRegister">立即注册</text>
<text @click="handleUserRegister" class="text-blue">立即注册</text>
</view>
</view>
@ -35,7 +37,7 @@
</template>
<script setup>
import {getCurrentInstance, ref} from "vue"
import { ref, getCurrentInstance } from "vue"
import { onLoad } from "@dcloudio/uni-app"
import { getToken } from '@/utils/auth'
import { getCodeImg } from '@/api/login'
@ -48,6 +50,9 @@ const codeUrl = ref("")
const captchaEnabled = ref(true)
//
const register = ref(false)
//
const passwordVisible = ref(false)
const loginForm = ref({
username: "admin",
password: "admin123",
@ -55,6 +60,11 @@ const loginForm = ref({
uuid: ""
})
//
function togglePasswordVisible() {
passwordVisible.value = !passwordVisible.value
}
//
function handleUserRegister() {
proxy.$tab.redirectTo(`/pages/register`)
@ -101,7 +111,7 @@ async function pwdLogin() {
function loginSuccess(result) {
//
useUserStore().getInfo().then(res => {
proxy.$tab.reLaunch('/pages/index')
proxy.$tab.reLaunch('/pages/work/index')
})
}
@ -150,6 +160,7 @@ page {
background-color: #f5f6f7;
height: 45px;
border-radius: 20px;
position: relative;
.icon {
font-size: 38rpx;
@ -163,8 +174,31 @@ page {
line-height: 20px;
text-align: left;
padding-left: 15px;
padding-right: 45px; /* 为眼睛图标留出更多空间 */
}
.password-eye {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
/* 增加点击区域 */
&::after {
content: '';
position: absolute;
top: -10px;
left: -10px;
right: -10px;
bottom: -10px;
}
}
}
.login-btn {

View File

@ -1,5 +1,5 @@
<template>
<view :style="{height: `${windowHeight}px`}" class="mine-container">
<view class="mine-container" :style="{height: `${windowHeight}px`}">
<!--顶部个人信息栏-->
<view class="header-section">
<view class="flex padding justify-between">
@ -7,19 +7,18 @@
<view v-if="!avatar" class="cu-avatar xl round bg-white">
<view class="iconfont icon-people text-gray icon"></view>
</view>
<image v-if="avatar" :src="avatar" class="cu-avatar xl round" mode="widthFix"
@click="handleToAvatar">
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix">
</image>
<view v-if="!name" class="login-tip" @click="handleToLogin">
<view v-if="!name" @click="handleToLogin" class="login-tip">
点击登录
</view>
<view v-if="name" class="user-info" @click="handleToInfo">
<view v-if="name" @click="handleToInfo" class="user-info">
<view class="u_title">
用户名{{ name }}
</view>
</view>
</view>
<view class="flex align-center" @click="handleToInfo">
<view @click="handleToInfo" class="flex align-center">
<text>个人信息</text>
<view class="iconfont icon-right"></view>
</view>
@ -27,7 +26,7 @@
</view>
<view class="content-section">
<view class="mine-actions grid col-4 text-center">
<!-- <view class="mine-actions grid col-4 text-center">
<view class="action-item" @click="handleJiaoLiuQun">
<view class="iconfont icon-friendfill text-pink icon"></view>
<text class="text">交流群</text>
@ -44,7 +43,7 @@
<view class="iconfont icon-dianzan text-green icon"></view>
<text class="text">点赞我们</text>
</view>
</view>
</view> -->
<view class="menu-list">
<view class="list-cell list-cell-arrow" @click="handleToEditInfo">
@ -53,7 +52,7 @@
<view>编辑资料</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleHelp">
<!-- <view class="list-cell list-cell-arrow" @click="handleHelp">
<view class="menu-item-box">
<view class="iconfont icon-help menu-icon"></view>
<view>常见问题</view>
@ -64,7 +63,7 @@
<view class="iconfont icon-aixin menu-icon"></view>
<view>关于我们</view>
</view>
</view>
</view> -->
<view class="list-cell list-cell-arrow" @click="handleToSetting">
<view class="menu-item-box">
<view class="iconfont icon-setting menu-icon"></view>

View File

@ -2,8 +2,8 @@
<view class="container">
<view class="example">
<uni-forms ref="form" :model="user" labelWidth="80px">
<uni-forms-item label="用户昵称" name="nickName">
<uni-easyinput v-model="user.nickName" placeholder="请输入昵称" />
<uni-forms-item label="用户昵称" name="userName">
<uni-easyinput v-model="user.userName" :disabled="true" placeholder="请输入昵称" />
</uni-forms-item>
<uni-forms-item label="手机号码" name="phonenumber">
<uni-easyinput v-model="user.phonenumber" placeholder="请输入手机号码" />
@ -28,7 +28,7 @@
const { proxy } = getCurrentInstance()
const user = ref({
nickName: "",
userName: "",
phonenumber: "",
email: "",
sex: ""

File diff suppressed because it is too large Load Diff