| | |
| | | <script> |
| | | import { isvalidUsername } from "@/utils/validate"; |
| | | import { createNamespacedHelpers } from "vuex"; |
| | | import users from "@/api/users"; |
| | | |
| | | const { mapActions } = createNamespacedHelpers("users"); |
| | | export default { |
| | | name: "login", |
| | |
| | | loginForm: { |
| | | username:"", |
| | | password:"", |
| | | // username: "admin", |
| | | // password: "macro123", |
| | | }, |
| | | imgUrl:'', |
| | | loginRules: { |
| | |
| | | }, |
| | | methods: { |
| | | showPwd() { |
| | | if (!this.pwdType) { |
| | | this.pwdType = true; |
| | | } else { |
| | | this.pwdType = false; |
| | | } |
| | | this.pwdType = !this.pwdType; |
| | | }, |
| | | ...mapActions(["login"]), |
| | | handleLogin() { |
| | |
| | | }) |
| | | .catch(function (error) { |
| | | }); |
| | | }, |
| | | } |
| | | }, |
| | | }; |
| | | </script> |