Compare commits
No commits in common. "7c8f1078497ef7922a6f70d8b1c07b928eb8b4c9" and "a69124663cb242444bcca10496850030ca1b2615" have entirely different histories.
7c8f107849
...
a69124663c
@ -1,35 +1,33 @@
|
|||||||
<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 style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
|
<image :src="globalConfig.appInfo.logo" mode="widthFix" style="width: 100rpx;height: 100rpx;">
|
||||||
</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" type="text" placeholder="请输入账号" maxlength="30" />
|
<input v-model="loginForm.username" class="input" maxlength="30" placeholder="请输入账号" type="text"/>
|
||||||
</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" :type="passwordVisible ? 'text' : 'password'" class="input" placeholder="请输入密码" maxlength="20" />
|
<input v-model="loginForm.password" class="input" maxlength="20" placeholder="请输入密码"
|
||||||
<view class="password-eye" @click="togglePasswordVisible">
|
type="password"/>
|
||||||
<uni-icons :type="passwordVisible ? 'eye-slash' : 'eye'" size="20" color="#999"></uni-icons>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view v-if="captchaEnabled" class="input-item flex align-center" style="width: 60%;margin: 0px;">
|
||||||
<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" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
|
<input v-model="loginForm.code" class="input" maxlength="4" placeholder="请输入验证码" type="number"/>
|
||||||
<view class="login-code">
|
<view class="login-code">
|
||||||
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
|
<image :src="codeUrl" class="login-code-img" @click="getCode"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="action-btn">
|
<view class="action-btn">
|
||||||
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
|
<button class="login-btn cu-btn block bg-blue lg round" @click="handleLogin">登录</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="reg text-center" v-if="register">
|
<view v-if="register" class="reg text-center">
|
||||||
<text class="text-grey1">没有账号?</text>
|
<text class="text-grey1">没有账号?</text>
|
||||||
<text @click="handleUserRegister" class="text-blue">立即注册</text>
|
<text class="text-blue" @click="handleUserRegister">立即注册</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -37,7 +35,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, getCurrentInstance } from "vue"
|
import {getCurrentInstance, ref} 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'
|
||||||
@ -50,9 +48,6 @@
|
|||||||
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",
|
||||||
@ -60,11 +55,6 @@
|
|||||||
uuid: ""
|
uuid: ""
|
||||||
})
|
})
|
||||||
|
|
||||||
// 切换密码可见性
|
|
||||||
function togglePasswordVisible() {
|
|
||||||
passwordVisible.value = !passwordVisible.value
|
|
||||||
}
|
|
||||||
|
|
||||||
// 用户注册
|
// 用户注册
|
||||||
function handleUserRegister() {
|
function handleUserRegister() {
|
||||||
proxy.$tab.redirectTo(`/pages/register`)
|
proxy.$tab.redirectTo(`/pages/register`)
|
||||||
@ -111,7 +101,7 @@
|
|||||||
function loginSuccess(result) {
|
function loginSuccess(result) {
|
||||||
// 设置用户信息
|
// 设置用户信息
|
||||||
useUserStore().getInfo().then(res => {
|
useUserStore().getInfo().then(res => {
|
||||||
proxy.$tab.reLaunch('/pages/work/index')
|
proxy.$tab.reLaunch('/pages/index')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +150,6 @@
|
|||||||
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;
|
||||||
@ -174,31 +163,8 @@
|
|||||||
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 class="mine-container" :style="{height: `${windowHeight}px`}">
|
<view :style="{height: `${windowHeight}px`}" class="mine-container">
|
||||||
<!--顶部个人信息栏-->
|
<!--顶部个人信息栏-->
|
||||||
<view class="header-section">
|
<view class="header-section">
|
||||||
<view class="flex padding justify-between">
|
<view class="flex padding justify-between">
|
||||||
@ -7,18 +7,19 @@
|
|||||||
<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" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix">
|
<image v-if="avatar" :src="avatar" class="cu-avatar xl round" mode="widthFix"
|
||||||
|
@click="handleToAvatar">
|
||||||
</image>
|
</image>
|
||||||
<view v-if="!name" @click="handleToLogin" class="login-tip">
|
<view v-if="!name" class="login-tip" @click="handleToLogin">
|
||||||
点击登录
|
点击登录
|
||||||
</view>
|
</view>
|
||||||
<view v-if="name" @click="handleToInfo" class="user-info">
|
<view v-if="name" class="user-info" @click="handleToInfo">
|
||||||
<view class="u_title">
|
<view class="u_title">
|
||||||
用户名:{{ name }}
|
用户名:{{ name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="handleToInfo" class="flex align-center">
|
<view class="flex align-center" @click="handleToInfo">
|
||||||
<text>个人信息</text>
|
<text>个人信息</text>
|
||||||
<view class="iconfont icon-right"></view>
|
<view class="iconfont icon-right"></view>
|
||||||
</view>
|
</view>
|
||||||
@ -26,7 +27,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>
|
||||||
@ -43,7 +44,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">
|
||||||
@ -52,7 +53,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>
|
||||||
@ -63,7 +64,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="userName">
|
<uni-forms-item label="用户昵称" name="nickName">
|
||||||
<uni-easyinput v-model="user.userName" :disabled="true" placeholder="请输入昵称" />
|
<uni-easyinput v-model="user.nickName" 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({
|
||||||
userName: "",
|
nickName: "",
|
||||||
phonenumber: "",
|
phonenumber: "",
|
||||||
email: "",
|
email: "",
|
||||||
sex: ""
|
sex: ""
|
||||||
|
|||||||
1109
utils/utils.js
1109
utils/utils.js
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user