mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-11 12:49:30 +08:00
新增:私密分类的访问
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import HttpHandler from '@/common/http/request.js'
|
||||
import { getCache } from '@/utils/storage.js'
|
||||
export default {
|
||||
/**
|
||||
* 查询分类列表
|
||||
@@ -19,6 +20,8 @@ export default {
|
||||
* @param {Object} params 查询参数
|
||||
*/
|
||||
getCategoryPostList: (slug, params) => {
|
||||
// 从缓存中根据分类获取密码,如果获取到了说明本分类需要密码,避免多个分类需要密码在输入密码后刷新页面点错了分类
|
||||
params.password = getCache('APP_CATEGORY_PWD_' + slug)
|
||||
return HttpHandler.Get(`/api/content/categories/${slug}/posts`, params)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user