diff --git a/QMPlusVuePage/src/store/module/user.js b/QMPlusVuePage/src/store/module/user.js
index fc3678d8..d9ebe034 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 d9415a55..0223db2d 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 19bd5262..ca46812e 100644
--- a/QMPlusVuePage/src/view/login/login.vue
+++ b/QMPlusVuePage/src/view/login/login.vue
@@ -1,22 +1,28 @@
-
-
+
-
-
-
+ GIN-VUE-ADMIN
+
+
+
-
-
+
+
+
+ 登 录
+
- 登 录
+ 测试用户:admin 密码:123456
-