diff --git a/QMPlusVuePage/src/store/module/user.js b/QMPlusVuePage/src/store/module/user.js
index fc3678d8fb3fdcee182d69319e65b7c4d222910c..d9ebe034c1dd7a3d557d0f2c4574d1b00dd086a7 100644
--- a/QMPlusVuePage/src/store/module/user.js
+++ b/QMPlusVuePage/src/store/module/user.js
@@ -1,6 +1,5 @@
import { login } from '@/api/user'
import router from '@/router/index'
-import { Message } from 'element-ui'
export const user = {
namespaced: true,
state: {
@@ -36,26 +35,17 @@ export const user = {
},
actions: {
async LoginIn({ commit }, loginInfo) {
- try {
- const res = await login(loginInfo)
- commit('setUserInfo', res.data.user)
- commit('setToken', res.data.token)
- commit('setExpiresAt', res.data.expiresAt)
- if (res.success) {
- const redirect = router.history.current.query.redirect
- if (redirect) {
- router.push({ path: redirect, replace: true })
- } else {
- router.push({ path: '/layout/dashbord', replace: true })
- }
+ const res = await login(loginInfo)
+ commit('setUserInfo', res.data.user)
+ commit('setToken', res.data.token)
+ commit('setExpiresAt', res.data.expiresAt)
+ if (res.success) {
+ const redirect = router.history.current.query.redirect
+ if (redirect) {
+ router.push({ path: redirect, replace: true })
+ } else {
+ router.push({ path: '/layout/dashbord', replace: true })
}
- } catch (err) {
- Message({
- type: 'error',
- message: err,
- showClose: true
- })
- return Promise.reject(err)
}
}
},
diff --git a/QMPlusVuePage/src/style/base.scss b/QMPlusVuePage/src/style/base.scss
index d9415a558bf318f962a958983d7dcb0babd415ce..0223db2d03160207870579358180c1e7d98b87fa 100644
--- a/QMPlusVuePage/src/style/base.scss
+++ b/QMPlusVuePage/src/style/base.scss
@@ -30,6 +30,20 @@
margin-left: 14px;
}
+.bottom-mg-lg {
+ margin-bottom: 20px;
+}
+
.left-mg-lg {
margin-left: 18px;
+}
+
+.title-1 {
+ text-align: center;
+ font-size: 32px;
+ margin-bottom: 32px;
+}
+
+.title-3 {
+ text-align: center;
}
\ No newline at end of file
diff --git a/QMPlusVuePage/src/view/login/login.vue b/QMPlusVuePage/src/view/login/login.vue
index 19bd526293a3746308d6fc8170d5ac1b1e121458..ca46812ed168fc653010ef0039c19e455699bd44 100644
--- a/QMPlusVuePage/src/view/login/login.vue
+++ b/QMPlusVuePage/src/view/login/login.vue
@@ -1,22 +1,28 @@
-
-
+
-
-
-
+ GIN-VUE-ADMIN
+
+
+
-
-
+
+
+
+ 登 录
+
- 登 录
+ 测试用户:admin 密码:123456
-