| | |
| | | const isValidcode = this.codecheck(this.Code); |
| | | const isValiduser = this.usernamecheck(this.username); |
| | | if (isValidcode && isValiduser) { |
| | | let Data = { |
| | | tenantId: "000000", |
| | | grant_type: "smsCode", |
| | | phone: this.username, |
| | | code: this.Code |
| | | }; |
| | | // let Data = { |
| | | // tenantId: "000000", |
| | | // username: this.username, |
| | | // grant_type: "password", |
| | | // password: "94e8cde4612b3fd390677d42e7b22002", |
| | | // scope: "all", |
| | | // type: "account" |
| | | // grant_type: "smsCode", |
| | | // phone: this.username, |
| | | // code: this.Code |
| | | // }; |
| | | let Data = { |
| | | tenantId: "000000", |
| | | username: this.username, |
| | | grant_type: "password", |
| | | password: "94e8cde4612b3fd390677d42e7b22002", |
| | | scope: "all", |
| | | type: "account" |
| | | }; |
| | | Loginto(Data).then(res => { |
| | | if (res.data.code == 400) { |
| | | this.$toast.fail(res.data.msg); |