mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-24 09:16:53 +00:00
add: dva-loading
This commit is contained in:
+2
-1
@@ -1,9 +1,10 @@
|
||||
import './index.html'
|
||||
import 'babel-polyfill'
|
||||
import createLoading from 'dva-loading'
|
||||
import dva from 'dva'
|
||||
|
||||
// 1. Initialize
|
||||
const app = dva()
|
||||
const app = dva(createLoading())
|
||||
|
||||
// 2. Model
|
||||
app.model(require('./models/app'))
|
||||
|
||||
@@ -46,7 +46,6 @@ export default {
|
||||
*queryUser ({
|
||||
payload
|
||||
}, {call, put}) {
|
||||
yield put({type: 'showLoading'})
|
||||
const data = yield call(userInfo, parse(payload))
|
||||
if (data.success) {
|
||||
yield put({
|
||||
@@ -58,8 +57,6 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
yield put({type: 'hideLoading'})
|
||||
},
|
||||
*logout ({
|
||||
payload
|
||||
|
||||
Reference in New Issue
Block a user