From 6bc0f1f074d07a0e60d293f3051bb689c6534f5a Mon Sep 17 00:00:00 2001 From: chenghx Date: Fri, 3 Aug 2018 16:07:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=A8=E5=B1=80=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/login/Login.vue | 1 + src/main.js | 2 ++ src/mock/user/login.js | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/login/Login.vue b/src/components/login/Login.vue index 1cf3e09..718221b 100644 --- a/src/components/login/Login.vue +++ b/src/components/login/Login.vue @@ -121,6 +121,7 @@ export default { const result = res.data if (result.code >= 0) { this.$router.push('/dashboard/workplace') + this.$message.success(result.message, 3) } else { this.error = result.message } diff --git a/src/main.js b/src/main.js index 15296f7..afe4a6a 100644 --- a/src/main.js +++ b/src/main.js @@ -6,9 +6,11 @@ import router from './router' import 'vue-antd-ui/dist/antd.css' import Viser from 'viser-vue' import axios from 'axios' +import message from 'vue-antd-ui/es/message' import '@/mock' Vue.prototype.$axios = axios +Vue.prototype.$message = message Vue.config.productionTip = false Vue.use(Viser) diff --git a/src/mock/user/login.js b/src/mock/user/login.js index 4786b5a..6471dcd 100644 --- a/src/mock/user/login.js +++ b/src/mock/user/login.js @@ -10,7 +10,7 @@ Mock.mock('/login', 'post', ({body}) => { result.message = '账户名或密码错误(admin/888888)' } else { result.code = 0 - result.message = '登录成功' + result.message = Mock.mock('@TIMEFIX') + ',欢迎回来' } return result })