Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Feat/category password #292

Merged
merged 4 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/router/guard/permissionGuard.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ router.beforeEach(async(to, from, next) => {
next({
name: 'Install'
})
onProgressTimerDone()
return
}
if (to.name === 'Login') {
next({
name: 'Dashboard'
})
onProgressTimerDone()
return
}

Expand All @@ -53,9 +55,16 @@ router.beforeEach(async(to, from, next) => {
redirect: to.fullPath
}
})
onProgressTimerDone()
})

router.afterEach(() => {
clearTimeout(progressTimer)
NProgress.done()
onProgressTimerDone()
})

function onProgressTimerDone() {
if (progressTimer) {
clearTimeout(progressTimer)
NProgress.done()
}
}
7 changes: 7 additions & 0 deletions src/views/post/CategoryList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
>
<a-input v-model="form.model.slug" />
</a-form-model-item>
<a-form-model-item
label="密码:"
help="* 分类密码"
prop="password"
>
<a-input-password v-model="form.model.password" autocomplete="new-password" />
</a-form-model-item>
<a-form-model-item
label="上级目录:"
prop="parentId"
Expand Down