Skip to content
Snippets Groups Projects

#5 View 이동시 Loading 추가

Merged JunGu Kang requested to merge #5 into development
3 files
+ 25
1
Compare changes
  • Side-by-side
  • Inline

Files

+ 6
0
@@ -27,6 +27,8 @@ const router = new VueRouter({
@@ -27,6 +27,8 @@ const router = new VueRouter({
});
});
router.beforeEach(async (to, from, next) => {
router.beforeEach(async (to, from, next) => {
 
Store.commit('setPageStartLoading');
 
const res = await fetch(APISetting.endpoints.auth.check, APISetting.settings.get);
const res = await fetch(APISetting.endpoints.auth.check, APISetting.settings.get);
if (res.status === 200) {
if (res.status === 200) {
const json = await res.json();
const json = await res.json();
@@ -38,4 +40,8 @@ router.beforeEach(async (to, from, next) => {
@@ -38,4 +40,8 @@ router.beforeEach(async (to, from, next) => {
next();
next();
});
});
 
router.afterEach(() => {
 
Store.commit('setPageFinishLoading');
 
});
 
export default router;
export default router;
Loading