mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-05 19:41:37 +08:00
添加全局提示插件
This commit is contained in:
parent
4b8ad9e558
commit
6bc0f1f074
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user