How to use the iview.LoadingBar.error function in iview

To help you get started, we’ve selected a few iview examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github largezhou / admin / resources / src / router / permission.js View on Github external
router.beforeEach(async (to, from, next) => {
  LoadingBar.start()
  if (getToken()) {
    if (to.name === 'login') {
      next('/')
    } else {
      if (store.getters.loggedIn) {
        next()
      } else {
        try {
          await store.dispatch('getUser')
        } catch (e) {
          LoadingBar.error()
          return next(false)
        }
        next()
      }
    }
  } else if (to.matched.some(r => (r.meta && r.meta.auth))) {
    next({
      name: 'login',
      query: {
        redirect: to.path,
      },
    })
  } else {
    next()
  }
  LoadingBar.finish()
github lscho / ThinkJS-Vue.js-blog / client / src / axios / index.js View on Github external
}, error => {
	LoadingBar.error();
	Message.error('请求服务器超时');
	return error;
})
github lscho / ThinkJS-Vue.js-blog / admin / src / axios / index.js View on Github external
}, error => {
  LoadingBar.error()
  Message.error('请求服务器超时')
  return error
})