| | |
| | | }); |
| | | }; |
| | | |
| | | // 获取验证码 |
| | | export const makeVerifyCode = (params) => { |
| | | return request({ |
| | | url: "/cloud/api-u/user/makeVerifyCode", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | export const getMenuPermission = () => { |
| | | return request({ |
| | | url: "/saas/api-u/user/menuPermissions ", |
| | | method: "get" |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | |
| | | 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 }) |
| | | .then(() => { |
| | | this.gotCode = true; |
| | | }) |
| | |
| | | import { validUser, validPassword, isPhone } from "@/scripts/validate"; // 正则文件 |
| | | import { |
| | | register, |
| | | getVerifyCode, |
| | | makeVerifyCode, |
| | | // getAreas, |
| | | // getDic, |
| | | // entireUserInfo, |
| | |
| | | this.codeDisabled = true; |
| | | this.getValidStr(); |
| | | this.timer = setInterval(this.getValidStr, 1000); |
| | | getVerifyCode({ phoneNum: this.user.phoneNum, type: 1 }) |
| | | makeVerifyCode({ phoneNum: this.user.phoneNum, type: 1 }) |
| | | .then(() => { |
| | | this.gotCode = true; |
| | | }) |