mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
fix loading screen on login
This commit is contained in:
@@ -86,10 +86,6 @@ export default {
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
setTimeout(() => {
|
||||
loading.close();
|
||||
}, 1500);
|
||||
|
||||
|
||||
// Submit the form.
|
||||
const { data } = await this.form.post('/api/login')
|
||||
@@ -105,8 +101,10 @@ export default {
|
||||
|
||||
// Redirect home.
|
||||
if(store.getters['auth/user'].role === 'admin'){
|
||||
loading.close();
|
||||
this.$router.push({ name: 'admin.home' })
|
||||
}
|
||||
loading.close();
|
||||
this.$router.push({ name: 'home' })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user