Compare commits
2 Commits
a69124663c
...
7c8f107849
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c8f107849 | |||
| f11597f7b6 |
@ -1,33 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="normal-login-container">
|
<view class="normal-login-container">
|
||||||
<view class="logo-content align-center justify-center flex">
|
<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>
|
</image>
|
||||||
<text class="title">大冢APS Ultra管理平台</text>
|
<text class="title">大冢APS Ultra管理平台</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="login-form-content">
|
<view class="login-form-content">
|
||||||
<view class="input-item flex align-center">
|
<view class="input-item flex align-center">
|
||||||
<view class="iconfont icon-user icon"></view>
|
<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>
|
||||||
<view class="input-item flex align-center">
|
<view class="input-item flex align-center">
|
||||||
<view class="iconfont icon-password icon"></view>
|
<view class="iconfont icon-password icon"></view>
|
||||||
<input v-model="loginForm.password" class="input" maxlength="20" placeholder="请输入密码"
|
<input v-model="loginForm.password" :type="passwordVisible ? 'text' : 'password'" class="input" placeholder="请输入密码" maxlength="20" />
|
||||||
type="password"/>
|
<view class="password-eye" @click="togglePasswordVisible">
|
||||||
|
<uni-icons :type="passwordVisible ? 'eye-slash' : 'eye'" size="20" color="#999"></uni-icons>
|
||||||
</view>
|
</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>
|
<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">
|
<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>
|
</view>
|
||||||
<view class="action-btn">
|
<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>
|
||||||
<view v-if="register" class="reg text-center">
|
<view class="reg text-center" v-if="register">
|
||||||
<text class="text-grey1">没有账号?</text>
|
<text class="text-grey1">没有账号?</text>
|
||||||
<text class="text-blue" @click="handleUserRegister">立即注册</text>
|
<text @click="handleUserRegister" class="text-blue">立即注册</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -35,7 +37,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getCurrentInstance, ref} from "vue"
|
import { ref, getCurrentInstance } from "vue"
|
||||||
import { onLoad } from "@dcloudio/uni-app"
|
import { onLoad } from "@dcloudio/uni-app"
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import { getCodeImg } from '@/api/login'
|
import { getCodeImg } from '@/api/login'
|
||||||
@ -48,6 +50,9 @@ const codeUrl = ref("")
|
|||||||
const captchaEnabled = ref(true)
|
const captchaEnabled = ref(true)
|
||||||
// 用户注册开关
|
// 用户注册开关
|
||||||
const register = ref(false)
|
const register = ref(false)
|
||||||
|
// 密码可见性
|
||||||
|
const passwordVisible = ref(false)
|
||||||
|
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
username: "admin",
|
username: "admin",
|
||||||
password: "admin123",
|
password: "admin123",
|
||||||
@ -55,6 +60,11 @@ const loginForm = ref({
|
|||||||
uuid: ""
|
uuid: ""
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 切换密码可见性
|
||||||
|
function togglePasswordVisible() {
|
||||||
|
passwordVisible.value = !passwordVisible.value
|
||||||
|
}
|
||||||
|
|
||||||
// 用户注册
|
// 用户注册
|
||||||
function handleUserRegister() {
|
function handleUserRegister() {
|
||||||
proxy.$tab.redirectTo(`/pages/register`)
|
proxy.$tab.redirectTo(`/pages/register`)
|
||||||
@ -101,7 +111,7 @@ async function pwdLogin() {
|
|||||||
function loginSuccess(result) {
|
function loginSuccess(result) {
|
||||||
// 设置用户信息
|
// 设置用户信息
|
||||||
useUserStore().getInfo().then(res => {
|
useUserStore().getInfo().then(res => {
|
||||||
proxy.$tab.reLaunch('/pages/index')
|
proxy.$tab.reLaunch('/pages/work/index')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,6 +160,7 @@ page {
|
|||||||
background-color: #f5f6f7;
|
background-color: #f5f6f7;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
@ -163,8 +174,31 @@ page {
|
|||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 15px;
|
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 {
|
.login-btn {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="{height: `${windowHeight}px`}" class="mine-container">
|
<view class="mine-container" :style="{height: `${windowHeight}px`}">
|
||||||
<!--顶部个人信息栏-->
|
<!--顶部个人信息栏-->
|
||||||
<view class="header-section">
|
<view class="header-section">
|
||||||
<view class="flex padding justify-between">
|
<view class="flex padding justify-between">
|
||||||
@ -7,19 +7,18 @@
|
|||||||
<view v-if="!avatar" class="cu-avatar xl round bg-white">
|
<view v-if="!avatar" class="cu-avatar xl round bg-white">
|
||||||
<view class="iconfont icon-people text-gray icon"></view>
|
<view class="iconfont icon-people text-gray icon"></view>
|
||||||
</view>
|
</view>
|
||||||
<image v-if="avatar" :src="avatar" class="cu-avatar xl round" mode="widthFix"
|
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix">
|
||||||
@click="handleToAvatar">
|
|
||||||
</image>
|
</image>
|
||||||
<view v-if="!name" class="login-tip" @click="handleToLogin">
|
<view v-if="!name" @click="handleToLogin" class="login-tip">
|
||||||
点击登录
|
点击登录
|
||||||
</view>
|
</view>
|
||||||
<view v-if="name" class="user-info" @click="handleToInfo">
|
<view v-if="name" @click="handleToInfo" class="user-info">
|
||||||
<view class="u_title">
|
<view class="u_title">
|
||||||
用户名:{{ name }}
|
用户名:{{ name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex align-center" @click="handleToInfo">
|
<view @click="handleToInfo" class="flex align-center">
|
||||||
<text>个人信息</text>
|
<text>个人信息</text>
|
||||||
<view class="iconfont icon-right"></view>
|
<view class="iconfont icon-right"></view>
|
||||||
</view>
|
</view>
|
||||||
@ -27,7 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content-section">
|
<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="action-item" @click="handleJiaoLiuQun">
|
||||||
<view class="iconfont icon-friendfill text-pink icon"></view>
|
<view class="iconfont icon-friendfill text-pink icon"></view>
|
||||||
<text class="text">交流群</text>
|
<text class="text">交流群</text>
|
||||||
@ -44,7 +43,7 @@
|
|||||||
<view class="iconfont icon-dianzan text-green icon"></view>
|
<view class="iconfont icon-dianzan text-green icon"></view>
|
||||||
<text class="text">点赞我们</text>
|
<text class="text">点赞我们</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="menu-list">
|
<view class="menu-list">
|
||||||
<view class="list-cell list-cell-arrow" @click="handleToEditInfo">
|
<view class="list-cell list-cell-arrow" @click="handleToEditInfo">
|
||||||
@ -53,7 +52,7 @@
|
|||||||
<view>编辑资料</view>
|
<view>编辑资料</view>
|
||||||
</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="menu-item-box">
|
||||||
<view class="iconfont icon-help menu-icon"></view>
|
<view class="iconfont icon-help menu-icon"></view>
|
||||||
<view>常见问题</view>
|
<view>常见问题</view>
|
||||||
@ -64,7 +63,7 @@
|
|||||||
<view class="iconfont icon-aixin menu-icon"></view>
|
<view class="iconfont icon-aixin menu-icon"></view>
|
||||||
<view>关于我们</view>
|
<view>关于我们</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="list-cell list-cell-arrow" @click="handleToSetting">
|
<view class="list-cell list-cell-arrow" @click="handleToSetting">
|
||||||
<view class="menu-item-box">
|
<view class="menu-item-box">
|
||||||
<view class="iconfont icon-setting menu-icon"></view>
|
<view class="iconfont icon-setting menu-icon"></view>
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="example">
|
<view class="example">
|
||||||
<uni-forms ref="form" :model="user" labelWidth="80px">
|
<uni-forms ref="form" :model="user" labelWidth="80px">
|
||||||
<uni-forms-item label="用户昵称" name="nickName">
|
<uni-forms-item label="用户昵称" name="userName">
|
||||||
<uni-easyinput v-model="user.nickName" placeholder="请输入昵称" />
|
<uni-easyinput v-model="user.userName" :disabled="true" placeholder="请输入昵称" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="手机号码" name="phonenumber">
|
<uni-forms-item label="手机号码" name="phonenumber">
|
||||||
<uni-easyinput v-model="user.phonenumber" placeholder="请输入手机号码" />
|
<uni-easyinput v-model="user.phonenumber" placeholder="请输入手机号码" />
|
||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const user = ref({
|
const user = ref({
|
||||||
nickName: "",
|
userName: "",
|
||||||
phonenumber: "",
|
phonenumber: "",
|
||||||
email: "",
|
email: "",
|
||||||
sex: ""
|
sex: ""
|
||||||
|
|||||||
1201
utils/utils.js
1201
utils/utils.js
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user