| | |
| | | > |
| | | <el-form-item prop="loginName"> |
| | | <el-input |
| | | v-model="user.loginName" |
| | | v-model.trim="user.loginName" |
| | | placeholder="请输入手机号 / 用户名" |
| | | > |
| | | <i slot="prefix" class="iconfont"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="password" class="password-form-item"> |
| | | <el-input |
| | | <PwInput v-model="user.password" :showPreIcon="true"> </PwInput> |
| | | <!-- <el-input |
| | | show-password |
| | | @keyup.enter.native="userLogin" |
| | | v-model="user.password" |
| | | autocomplete="off" |
| | | placeholder="请输入密码" |
| | | > |
| | | <i slot="prefix" class="iconfont"></i> |
| | | </el-input> |
| | | </el-input> --> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | import { |
| | | tologin, |
| | | getLoginUserData, |
| | | getVerifyCode, |
| | | makeVerifyCode, |
| | | getMenuPermission, |
| | | } from "@/api/login"; |
| | | import { isPhone } from "@/scripts/validate"; |
| | |
| | | this.codeDisabled = true; |
| | | this.getValidStr(); |
| | | this.timer = setInterval(this.getValidStr, 1000); |
| | | getVerifyCode({ phoneNum: this.phone.phoneNum }) |
| | | makeVerifyCode({ phoneNum: this.phone.phoneNum, type: 0 }) |
| | | .then(() => { |
| | | this.gotCode = true; |
| | | }) |
| | |
| | | getMenuPermission().then((rep) => { |
| | | data.userInfo.permissions = rep.data.permissions; |
| | | sessionStorage.setItem("userInfo", JSON.stringify(data.userInfo)); |
| | | this.$router.push("/"); |
| | | }); |
| | | this.loading.close(); |
| | | |
| | | this.$router.push("/"); |
| | | }) |
| | | .catch((err) => { |
| | | this.loading.close(); |
| | |
| | | width: 660px; |
| | | height: 454px; |
| | | left: 240px; |
| | | top: 313px; |
| | | top: 25vh; |
| | | box-sizing: border-box; |
| | | background-color: #fff; |
| | | |