|
|
@@ -249,176 +249,168 @@ const errorTipsRef = ref()
|
|
|
<template>
|
|
|
<div class="login">
|
|
|
<ScoringSystem class="scoring-system"></ScoringSystem>
|
|
|
- <div style="background-color: white">
|
|
|
- <el-card class="login-card" v-if="status === 'login'">
|
|
|
- <div class="card-title">
|
|
|
- <span class="welcome">Welcome to KLN Portal</span>
|
|
|
- <span class="tips">Login to your account</span>
|
|
|
+ <el-card class="login-card" v-if="status === 'login'">
|
|
|
+ <div class="card-title">
|
|
|
+ <span class="welcome">Welcome to KLN Portal</span>
|
|
|
+ <span class="tips">Login to your account</span>
|
|
|
+ </div>
|
|
|
+ <div class="send-email-tips" :style="{ display: isEmailTips ? 'flex' : 'none' }">
|
|
|
+ <div>
|
|
|
+ <span class="font_family icon-icon_confirm_b success-icon"></span>
|
|
|
+ <span class="text-content">{{ emailTipsContent }}</span>
|
|
|
</div>
|
|
|
- <div class="send-email-tips" :style="{ display: isEmailTips ? 'flex' : 'none' }">
|
|
|
- <div>
|
|
|
- <span class="font_family icon-icon_confirm_b success-icon"></span>
|
|
|
- <span class="text-content">{{ emailTipsContent }}</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <span
|
|
|
- @click="handleDeleteEmailTips"
|
|
|
- class="font_family icon-icon_reject_b delete-icon"
|
|
|
- ></span>
|
|
|
+
|
|
|
+ <span
|
|
|
+ @click="handleDeleteEmailTips"
|
|
|
+ class="font_family icon-icon_reject_b delete-icon"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ <div class="login-form">
|
|
|
+ <div class="label">
|
|
|
+ <span>User Name</span>
|
|
|
+ </div>
|
|
|
+ <el-input
|
|
|
+ ref="userNameRef"
|
|
|
+ :class="{ 'is-error': loginError.username }"
|
|
|
+ v-model="loginForm.username"
|
|
|
+ class="user-name"
|
|
|
+ placeholder="Please input user name"
|
|
|
+ @focus="handleDeleteEmailTips('username')"
|
|
|
+ @blur="handleCheckUser"
|
|
|
+ >
|
|
|
+ <template #prefix>
|
|
|
+ <span class="font_family icon-icon_username_b"></span>
|
|
|
+ </template>
|
|
|
+ <template #suffix>
|
|
|
+ <span v-if="isUserNameExit" class="font_family icon-icon_confirm_b confirm-icon"></span>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ <div class="error" v-if="loginError.username">This account does not exist.</div>
|
|
|
+ <div class="label">
|
|
|
+ <span>Password</span>
|
|
|
+ <span class="forgot-password" @click="handleForgot">Forgot Password?</span>
|
|
|
+ </div>
|
|
|
+ <el-input
|
|
|
+ ref="passWordRef"
|
|
|
+ :class="{ 'is-error': loginError.password }"
|
|
|
+ v-model="loginForm.password"
|
|
|
+ type="password"
|
|
|
+ placeholder="Please input password"
|
|
|
+ show-password
|
|
|
+ @focus="handleDeleteEmailTips('password')"
|
|
|
+ ><template #prefix>
|
|
|
+ <span class="font_family icon-icon_password_b"></span>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ <div class="error" v-if="loginError.password">Incorrect password. Please try again.</div>
|
|
|
+ <el-input
|
|
|
+ ref="codeRef"
|
|
|
+ :class="{ 'is-error': loginError.code }"
|
|
|
+ class="verification-code"
|
|
|
+ v-model="loginForm.code"
|
|
|
+ placeholder="Verification Code"
|
|
|
+ @focus="handleDeleteEmailTips('code')"
|
|
|
+ @keyup.enter="handleLogin"
|
|
|
+ >
|
|
|
+ <template #append>
|
|
|
+ <img
|
|
|
+ v-vloading="loading"
|
|
|
+ @click="getCode"
|
|
|
+ class="verification-code-img"
|
|
|
+ :src="verificationCode"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ <div class="error" v-if="loginError.code">Incorrect verification code.</div>
|
|
|
+ <el-checkbox
|
|
|
+ class="remember-password"
|
|
|
+ v-model="isRememerPwd"
|
|
|
+ label="Remember Password"
|
|
|
+ size="large"
|
|
|
+ />
|
|
|
+ <el-button @click="handleLogin" class="el-button--dark login-btn">Login</el-button>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="license">
|
|
|
+ <span>© 2024 KTreker from <span class="company">Kerry Logistics</span></span>
|
|
|
+ <span>Version 0.67</span>
|
|
|
</div>
|
|
|
- <div class="login-form">
|
|
|
- <div class="label">
|
|
|
- <span>User Name</span>
|
|
|
- </div>
|
|
|
- <el-input
|
|
|
- ref="userNameRef"
|
|
|
- :class="{ 'is-error': loginError.username }"
|
|
|
- v-model="loginForm.username"
|
|
|
- class="user-name"
|
|
|
- placeholder="Please input user name"
|
|
|
- @focus="handleDeleteEmailTips('username')"
|
|
|
- @blur="handleCheckUser"
|
|
|
- >
|
|
|
- <template #prefix>
|
|
|
- <span class="font_family icon-icon_username_b"></span>
|
|
|
- </template>
|
|
|
- <template #suffix>
|
|
|
- <span
|
|
|
- v-if="isUserNameExit"
|
|
|
- class="font_family icon-icon_confirm_b confirm-icon"
|
|
|
- ></span>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- <div class="error" v-if="loginError.username">This account does not exist.</div>
|
|
|
- <div class="label">
|
|
|
- <span>Password</span>
|
|
|
- <span class="forgot-password" @click="handleForgot">Forgot Password?</span>
|
|
|
- </div>
|
|
|
- <el-input
|
|
|
- ref="passWordRef"
|
|
|
- :class="{ 'is-error': loginError.password }"
|
|
|
- v-model="loginForm.password"
|
|
|
- type="password"
|
|
|
- placeholder="Please input password"
|
|
|
- show-password
|
|
|
- @focus="handleDeleteEmailTips('password')"
|
|
|
- ><template #prefix>
|
|
|
- <span class="font_family icon-icon_password_b"></span>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- <div class="error" v-if="loginError.password">Incorrect password. Please try again.</div>
|
|
|
- <el-input
|
|
|
- ref="codeRef"
|
|
|
- :class="{ 'is-error': loginError.code }"
|
|
|
- class="verification-code"
|
|
|
- v-model="loginForm.code"
|
|
|
- placeholder="Verification Code"
|
|
|
- @focus="handleDeleteEmailTips('code')"
|
|
|
- @keyup.enter="handleLogin"
|
|
|
- >
|
|
|
- <template #append>
|
|
|
- <img
|
|
|
- v-vloading="loading"
|
|
|
- @click="getCode"
|
|
|
- class="verification-code-img"
|
|
|
- :src="verificationCode"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- <div class="error" v-if="loginError.code">Incorrect verification code.</div>
|
|
|
- <el-checkbox
|
|
|
- class="remember-password"
|
|
|
- v-model="isRememerPwd"
|
|
|
- label="Remember Password"
|
|
|
- size="large"
|
|
|
- />
|
|
|
- <el-button @click="handleLogin" class="el-button--dark login-btn">Login</el-button>
|
|
|
+ </template>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="login-card" v-else-if="status === 'reset'">
|
|
|
+ <div class="card-title">
|
|
|
+ <span class="welcome">Password Retrieval</span>
|
|
|
+ <span class="tips">We'll send your password to your email address.</span>
|
|
|
+ </div>
|
|
|
+ <div class="login-form">
|
|
|
+ <div class="label">
|
|
|
+ <span>User Name</span>
|
|
|
</div>
|
|
|
- <template #footer>
|
|
|
- <div class="license">
|
|
|
- <span>© 2024 KTreker from <span class="company">Kerry Logistics</span></span>
|
|
|
- <span>Version 0.67</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-card>
|
|
|
- <el-card class="login-card" v-else-if="status === 'reset'">
|
|
|
- <div class="card-title">
|
|
|
- <span class="welcome">Password Retrieval</span>
|
|
|
- <span class="tips">We'll send your password to your email address.</span>
|
|
|
+ <el-input
|
|
|
+ ref="userNameRef"
|
|
|
+ :class="{ 'is-error': loginError.username }"
|
|
|
+ v-model="loginForm.username"
|
|
|
+ class="user-name"
|
|
|
+ placeholder="Please input user name"
|
|
|
+ @focus="handleDeleteEmailTips('username')"
|
|
|
+ @blur="handleCheckUser"
|
|
|
+ >
|
|
|
+ <template #prefix>
|
|
|
+ <span class="font_family icon-icon_username_b"></span>
|
|
|
+ </template>
|
|
|
+ <template #suffix>
|
|
|
+ <span v-if="isUserNameExit" class="font_family icon-icon_confirm_b confirm-icon"></span>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ <div class="error" v-if="loginError.username">This account does not exist</div>
|
|
|
+ <div class="label">
|
|
|
+ <span>Email Address</span>
|
|
|
</div>
|
|
|
- <div class="login-form">
|
|
|
- <div class="label">
|
|
|
- <span>User Name</span>
|
|
|
- </div>
|
|
|
- <el-input
|
|
|
- ref="userNameRef"
|
|
|
- :class="{ 'is-error': loginError.username }"
|
|
|
- v-model="loginForm.username"
|
|
|
- class="user-name"
|
|
|
- placeholder="Please input user name"
|
|
|
- @focus="handleDeleteEmailTips('username')"
|
|
|
- @blur="handleCheckUser"
|
|
|
- >
|
|
|
- <template #prefix>
|
|
|
- <span class="font_family icon-icon_username_b"></span>
|
|
|
- </template>
|
|
|
- <template #suffix>
|
|
|
- <span
|
|
|
- v-if="isUserNameExit"
|
|
|
- class="font_family icon-icon_confirm_b confirm-icon"
|
|
|
- ></span>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- <div class="error" v-if="loginError.username">This account does not exist</div>
|
|
|
- <div class="label">
|
|
|
- <span>Email Address</span>
|
|
|
- </div>
|
|
|
- <el-input
|
|
|
- ref="passWordRef"
|
|
|
- :class="{ 'is-error': loginError.email }"
|
|
|
- v-model="loginForm.email"
|
|
|
- placeholder="Please input your email address"
|
|
|
- @focus="handleDeleteEmailTips('email')"
|
|
|
- ><template #prefix>
|
|
|
- <span class="font_family icon-icon_email_b"></span>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- <div class="error" v-if="loginError.email">Incorrect email. Please try again.</div>
|
|
|
- <el-input
|
|
|
- ref="codeRef"
|
|
|
- :class="{ 'is-error': loginError.code }"
|
|
|
- class="verification-code"
|
|
|
- v-model="loginForm.code"
|
|
|
- placeholder="Verification Code"
|
|
|
- @focus="handleDeleteEmailTips('code')"
|
|
|
- @keyup.enter="handleSendPassword"
|
|
|
- ><template #append>
|
|
|
- <img
|
|
|
- v-vloading="loading"
|
|
|
- class="verification-code-img"
|
|
|
- :src="verificationCode"
|
|
|
- @click="getCode"
|
|
|
- alt=""
|
|
|
- /> </template
|
|
|
- ></el-input>
|
|
|
- <div class="error" v-if="loginError.code">Incorrect verification code.</div>
|
|
|
- <el-button @click="handleSendPassword" class="el-button--dark login-btn"
|
|
|
- >Send Password</el-button
|
|
|
- >
|
|
|
- <div @click="backLogin(false)" class="back-text">
|
|
|
- <span class="font_family icon-icon_back_b"></span>
|
|
|
- <span class="text"> Back to login</span>
|
|
|
- </div>
|
|
|
+ <el-input
|
|
|
+ ref="passWordRef"
|
|
|
+ :class="{ 'is-error': loginError.email }"
|
|
|
+ v-model="loginForm.email"
|
|
|
+ placeholder="Please input your email address"
|
|
|
+ @focus="handleDeleteEmailTips('email')"
|
|
|
+ ><template #prefix>
|
|
|
+ <span class="font_family icon-icon_email_b"></span>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ <div class="error" v-if="loginError.email">Incorrect email. Please try again.</div>
|
|
|
+ <el-input
|
|
|
+ ref="codeRef"
|
|
|
+ :class="{ 'is-error': loginError.code }"
|
|
|
+ class="verification-code"
|
|
|
+ v-model="loginForm.code"
|
|
|
+ placeholder="Verification Code"
|
|
|
+ @focus="handleDeleteEmailTips('code')"
|
|
|
+ @keyup.enter="handleSendPassword"
|
|
|
+ ><template #append>
|
|
|
+ <img
|
|
|
+ v-vloading="loading"
|
|
|
+ class="verification-code-img"
|
|
|
+ :src="verificationCode"
|
|
|
+ @click="getCode"
|
|
|
+ alt=""
|
|
|
+ /> </template
|
|
|
+ ></el-input>
|
|
|
+ <div class="error" v-if="loginError.code">Incorrect verification code.</div>
|
|
|
+ <el-button @click="handleSendPassword" class="el-button--dark login-btn"
|
|
|
+ >Send Password</el-button
|
|
|
+ >
|
|
|
+ <div @click="backLogin(false)" class="back-text">
|
|
|
+ <span class="font_family icon-icon_back_b"></span>
|
|
|
+ <span class="text"> Back to login</span>
|
|
|
</div>
|
|
|
- <template #footer>
|
|
|
- <div class="license">
|
|
|
- <span>© 2024 KTreker from <span class="company">Kerry Logistics</span></span>
|
|
|
- <span>Version 0.67</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="license">
|
|
|
+ <span>© 2024 KTreker from <span class="company">Kerry Logistics</span></span>
|
|
|
+ <span>Version 0.67</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-card>
|
|
|
|
|
|
<ErrorTips ref="errorTipsRef" @forget-password="status = 'reset'"></ErrorTips>
|
|
|
</div>
|
|
|
@@ -432,7 +424,8 @@ const errorTipsRef = ref()
|
|
|
align-items: center;
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
- background: url(../src/image/bg.png) no-repeat;
|
|
|
+ background: url(../src/image/bg.png) no-repeat center center;
|
|
|
+ background-size: cover;
|
|
|
.scoring-system {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
@@ -443,23 +436,16 @@ const errorTipsRef = ref()
|
|
|
|
|
|
.login-card {
|
|
|
width: 400px;
|
|
|
- background: url(../src/image/bg-login-card.png) no-repeat center center;
|
|
|
- background-position: top left; /* 从左上角开始显示 */
|
|
|
- background-size: 400px 100px; /* 保持背景图像的原始尺寸 */
|
|
|
+
|
|
|
.card-title {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
height: 94px;
|
|
|
padding-top: 32px;
|
|
|
- // background: linear-gradient(
|
|
|
- // 251deg,
|
|
|
- // #ffffff4d,
|
|
|
- // #fff4eb80 22.66%,
|
|
|
- // #f0f3ff80 44.57%,
|
|
|
- // #e0f7f999 80.46%,
|
|
|
- // #ffffff4d
|
|
|
- // );
|
|
|
+ background: url(../src/image/bg-login-card.png) no-repeat center center;
|
|
|
+ background-position: top left; /* 从左上角开始显示 */
|
|
|
+ background-size: 400px 100px; /* 保持背景图像的原始尺寸 */
|
|
|
|
|
|
.welcome {
|
|
|
margin-bottom: 16px;
|