| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import { login } from '../utils/api' |
| | | import { getPerms } from '../api/api'; |
| | | import validCode from './verificationCode.vue'; |
| | | import { mapActions } from 'vuex'; |
| | | |
| | |
| | | this.loading = true; |
| | | this.login(this.loginForm) |
| | | .then((response) => { |
| | | this.$router.push('/mochaitmo'); |
| | | getPerms().then((res) => { |
| | | if (res.code == 200) { |
| | | this.$store.commit('getPermsEntity', res.result); |
| | | if (res.result.length != 0) { |
| | | this.$router.push('/'); |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | } |
| | | }); |
| | | |
| | | this.loading = false; |
| | | //调用录接口 |