| | |
| | | <template> |
| | | <el-form size="large" class="login-content-form"> |
| | | <el-form-item class="login-animation1"> |
| | | <el-input type="text" :placeholder="$t('message.account.accountPlaceholder1')" v-model="ruleForm.name" clearable autocomplete="off" size="large"> |
| | | <el-input type="text" placeholder="请输入用户名" v-model="ruleForm.name" clearable autocomplete="off" size="large"> |
| | | <template #prefix> |
| | | <el-icon class="el-input__icon" style="margin-right: 20px"><img src="../../../assets/loginPage/login_icon_user.png" style="width: 24px; height: 24px" /></el-icon> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item class="login-animation2"> |
| | | <el-input :type="isShowPassword ? 'text' : 'password'" :placeholder="$t('message.account.accountPlaceholder2')" v-model="ruleForm.pwd" autocomplete="off" size="large" @keyup.enter.native="onSignIn"> |
| | | <el-input :type="isShowPassword ? 'text' : 'password'" placeholder="请输入密码" v-model="ruleForm.pwd" autocomplete="off" size="large" @keyup.enter.native="onSignIn"> |
| | | <template #prefix> |
| | | <el-icon class="el-input__icon" style="margin-right: 20px"><img src="../../../assets/loginPage/login_icon_password.png" style="width: 24px; height: 24px" /></el-icon> |
| | | </template> |
| | |
| | | import { useLoginApi } from '/@/api/login'; |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | |
| | | import "amfe-flexible"; |
| | | import {verifyPhone,verifyIdCard} from "/@/utils/toolsValidate" |
| | | import { Base64 } from 'js-base64' |
| | | import {useMenuApi} from "/@/api/systemManage/menu"; |
| | |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | hasUserCodeOrPassword() |
| | | const baseSize = 38; |
| | | /* 设置 rem 函数 */ |
| | | function setRem() { |
| | | const scale = document.documentElement.clientWidth / 1920; /* 当前页面宽度缩放比例,可根据自己需要修改 */ |
| | | document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + "px";/* 设置页面根节点字体大小 */ |
| | | } |
| | | setRem();/* 初始化 rem */ |
| | | |
| | | window.onresize = () => { |
| | | setRem();/* 改变窗口大小时重新设置 rem */ |
| | | } |
| | | // getAllDepartment(); |
| | | }); |
| | | |
| | |
| | | state.loading.signIn = true; |
| | | // 存储 token 到浏览器缓存 |
| | | let res = await useLoginApi().signIn(state.ruleForm); |
| | | console.log(res) |
| | | if (res.data.code === 100) { |
| | | await userInfo.setUserInfos(res.data.data); |
| | | Cookies.set('token', res.data.data.tk); |
| | |
| | | border: 1px solid #11FEEE; |
| | | letter-spacing: 4px; |
| | | font-weight: 300; |
| | | margin-top: 15px; |
| | | background-image: linear-gradient(to bottom,#0081C2,#003892,#0081C2); |
| | | transition: 0.3s; |
| | | box-shadow: 0 8px 30px rgba(88,101,241,.4); |
| | |
| | | border: 2px solid #11FEEE; |
| | | color: #11FEEE; |
| | | font-weight: bolder; |
| | | background-color: transparent; |
| | | background-image: linear-gradient(to bottom,#003892,#003892,#003892); |
| | | } |
| | | &:active { |
| | |
| | | border: 2px solid #11FEEE; |
| | | color: #11FEEE; |
| | | font-weight: bolder; |
| | | background-color: transparent; |
| | | background-image: linear-gradient(to bottom,#003892,#003892,#003892); |
| | | } |
| | | } |