Merge branch '添加pinia'
# Conflicts: # src/api/system/role.ts
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
<script>
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue';
|
||||
import {getCaptcha} from "@/api/login";
|
||||
|
||||
import { useUserStoreHook } from "@/store/modules/user";
|
||||
export default {
|
||||
name: 'Login',
|
||||
components:{
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.$store.dispatch('user/login', this.loginForm).then(() => {
|
||||
useUserStoreHook().login(this.loginForm).then(() => {
|
||||
this.$router.push({ path: this.redirect || '/' })
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
|
||||
Reference in New Issue
Block a user