| | |
| | | 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(); |