diff --git a/src/config/router.config.js b/src/config/router.config.js
index 9367b21..decece2 100644
--- a/src/config/router.config.js
+++ b/src/config/router.config.js
@@ -8,7 +8,7 @@ export const asyncRouterMap = [
name: 'index',
component: BasicLayout,
meta: { title: '超级管理后台' },
- redirect: '/store/index',
+ // redirect: '/store/index',
children: [
{
name: 'Store',
diff --git a/src/views/dataCenter/goods/Create.vue b/src/views/dataCenter/goods/Create.vue
index 8580cd8..e0c1638 100644
--- a/src/views/dataCenter/goods/Create.vue
+++ b/src/views/dataCenter/goods/Create.vue
@@ -177,7 +177,7 @@
diff --git a/src/views/dataCenter/goods/Update.vue b/src/views/dataCenter/goods/Update.vue
index 8d3c2ee..c27ecdb 100644
--- a/src/views/dataCenter/goods/Update.vue
+++ b/src/views/dataCenter/goods/Update.vue
@@ -167,7 +167,7 @@
diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue
index aa9d3a4..a2a1f59 100644
--- a/src/views/user/Login.vue
+++ b/src/views/user/Login.vue
@@ -4,21 +4,9 @@
管理后台登录
-
+
-
+
@@ -41,14 +29,14 @@
placeholder="请输入用户密码"
v-decorator="[
'password',
- {rules: [{ required: true, message: '您还没有输入用户密码' }], validateTrigger: 'blur'}
+ { rules: [{ required: true, message: '您还没有输入用户密码' }], validateTrigger: 'blur' },
]"
>
-
+
确定
+ >确定
@@ -67,7 +56,7 @@ import { mapActions } from 'vuex'
import { timeFix } from '@/utils/util'
export default {
- data () {
+ data() {
return {
// 是否登录错误
isLoginError: false,
@@ -76,21 +65,21 @@ export default {
// 表单组件
form: this.$form.createForm(this),
// 页面状态
- state: { loginBtn: false }
+ state: { loginBtn: false },
}
},
- created () { },
+ created() {},
methods: {
...mapActions(['Login', 'Logout']),
/**
* 表单提交: 确定登录
*/
- handleSubmit (e) {
+ handleSubmit(e) {
e.preventDefault()
const {
form: { validateFields },
state,
- Login
+ Login,
} = this
state.loginBtn = true
@@ -99,8 +88,8 @@ export default {
validateFields(['username', 'password'], { force: true }, (err, values) => {
if (!err) {
Login(values)
- .then(res => this.loginSuccess(res))
- .catch(err => this.loginFailed(err))
+ .then((res) => this.loginSuccess(res))
+ .catch((err) => this.loginFailed(err))
.finally(() => {
state.loginBtn = false
})
@@ -115,13 +104,13 @@ export default {
/**
* 登录成功
*/
- loginSuccess (res) {
- this.$router.push({ path: '/' })
+ loginSuccess(res) {
+ this.$router.push('/goods/index')
// 显示欢迎信息
setTimeout(() => {
this.$notification.success({
message: '欢迎',
- description: `${timeFix()},欢迎回来`
+ description: `${timeFix()},欢迎回来`,
})
}, 1000)
this.isLoginError = false
@@ -130,11 +119,11 @@ export default {
/**
* 登录请求失败
*/
- loginFailed (response) {
+ loginFailed(response) {
this.isLoginError = true
this.loginErrorMsg = response.message
- }
- }
+ },
+ },
}