| | |
| | | <template> |
| | | <div class="login"> |
| | | <div class="title-container"> |
| | | <h3 class="title">自贡公安天网运维平台</h3> |
| | | </div> |
| | | <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> |
| | | <h3 class="title">若依后台管理系统</h3> |
| | | <h3 class="title">自贡公安天网运维平台</h3> |
| | | |
| | | <el-form-item prop="username"> |
| | | <el-input |
| | |
| | | <img :src="codeUrl" @click="getCode" class="login-code-img"/> |
| | | </div> |
| | | </el-form-item> |
| | | <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> |
| | | <el-checkbox v-model="loginForm.rememberMe" style=" margin:0px 0px 25px 0px;">记住密码</el-checkbox> |
| | | <el-form-item style="width:100%;"> |
| | | <el-button |
| | | :loading="loading" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-dialog title="为了您的账号安全,首次登陆请修改密码" :visible.sync="loginInfo.firstLogin==0?true:false"> |
| | | <el-dialog title="为了您的账号安全,首次登陆请修改密码" :visible.sync="loginInfo.firstLogin==0"> |
| | | <el-form> |
| | | <el-form-item label="新密码"> |
| | | <el-input v-model="newPassword" autocomplete="off"></el-input> |
| | |
| | | watch: { |
| | | $route: { |
| | | handler: function(route) { |
| | | console.log(route); |
| | | this.redirect = route.query && route.query.redirect; |
| | | }, |
| | | immediate: true |
| | |
| | | this.loginInfo = loginInfo.user |
| | | //如果返回为1正常跳转 |
| | | if(this.loginInfo.firstLogin == 1){ |
| | | this.$router.push({ path: "/" }).catch(()=>{}); |
| | | return; |
| | | this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); |
| | | } else { |
| | | localStorage.setItem('firstLogin',0) |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style rel="stylesheet/scss" lang="scss"> |
| | | <style rel="stylesheet/scss" lang="scss" scoped> |
| | | |
| | | $light_gray:#eee; |
| | | .login { |
| | | display: flex; |
| | | justify-content: center; |
| | |
| | | background-size: cover; |
| | | } |
| | | .title { |
| | | |
| | | margin: 0px auto 30px auto; |
| | | text-align: center; |
| | | color: #707070; |
| | |
| | | .login-code-img { |
| | | height: 38px; |
| | | } |
| | | .title-container { |
| | | position: absolute; |
| | | transform: translateY(-400%); |
| | | left: 35%; |
| | | .title { |
| | | font-size: 40px; |
| | | color: $light_gray; |
| | | margin: 0px auto 20px auto; |
| | | text-align: center; |
| | | font-weight: bold; |
| | | letter-spacing: 20px; |
| | | } |
| | | } |
| | | </style> |