| | |
| | | hideTenantForLogin: false, |
| | | expirySeconds: 60, // 验证码过期时间 |
| | | phoneSeconds: 0, // 手机验证码倒计时 |
| | | roleList: [] |
| | | roleList: [], |
| | | nowRole: {} |
| | | }); |
| | | // 验证码过期计时器 |
| | | let timer: any = null; |
| | |
| | | // 页面初始化 |
| | | onMounted(async () => { |
| | | // 若URL带有Token参数(第三方登录) |
| | | const accessToken = route.query.token; |
| | | |
| | | // if (accessToken) await saveTokenAndInitRoutes(accessToken); |
| | | // watch( |
| | | // () => themeConfig.value.isLoaded, |
| | |
| | | getCaptcha(); |
| | | exRole().then(res => { |
| | | state.roleList = res.result; |
| | | const role = route.query; |
| | | if (role.code) { |
| | | state.nowRole = role; |
| | | } else { |
| | | state.nowRole = state.roleList[0]; |
| | | } |
| | | state.ruleForm.exRoleCode = state.nowRole?.code; |
| | | }); |
| | | // 注册验证码过期计时器 |
| | | // if (state.captchaEnabled) { |
| | |
| | | <div class="login-form"> |
| | | <!-- <avatar class="avatar" /> --> |
| | | <Motion> |
| | | <h2 class="outline-hidden">{{ title }}</h2> |
| | | <h2 class="logintitle">{{ state.nowRole.name }}登录</h2> |
| | | </Motion> |
| | | |
| | | <el-form |
| | |
| | | :rules="loginRules" |
| | | size="large" |
| | | > |
| | | <Motion :delay="150"> |
| | | <!-- <Motion :delay="150"> |
| | | <el-form-item prop="exRoleCode"> |
| | | <el-radio-group v-model="state.ruleForm.exRoleCode"> |
| | | <el-radio |
| | |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </Motion> |
| | | </Motion> --> |
| | | <Motion :delay="100"> |
| | | <el-form-item |
| | | :rules="[ |
| | |
| | | #suffix-span { |
| | | cursor: pointer; |
| | | } |
| | | .login-content-code { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | position: relative; |
| | | |
| | | .login-content-code-img { |
| | | width: 100%; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | background-color: #ffffff; |
| | | // /* border: 1px solid rgb(220, 223, 230); */ |
| | | cursor: pointer; |
| | | transition: all ease 0.2s; |
| | | border-radius: 4px; |
| | | user-select: none; |
| | | |
| | | &:hover { |
| | | border-color: #c0c4cc; |
| | | transition: all ease 0.2s; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .login-content-code-expired { |
| | | @extend .login-content-code; |
| | | &::before { |
| | | content: "验证码已过期"; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | border-radius: 4px; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | color: #ffffff; |
| | | text-align: center; |
| | | line-height: 40px; |
| | | } |
| | | } |
| | | </style> |