更新:访客模式可以查看图书首页

This commit is contained in:
2025-12-12 14:33:47 +08:00
parent 04e2196942
commit 34d6cfdf9e
10 changed files with 43 additions and 53 deletions

View File

@@ -13,7 +13,6 @@ import type {
} from '@/types/course'
import type { ISearchRequest, ISearchResponse } from '@/types/search'
import type { ICommentListResponse, IAddCommentResponse, IComment } from '@/types/comment'
import { useUserStore } from '@/stores/user'
/**
* 课程相关API
@@ -55,9 +54,8 @@ export const courseApi = {
page: number,
limit: number
}) {
const userStore = useUserStore()
return skeletonClient.request<IMarketCourseListResponse>({
url: userStore.token ? 'medical/home/getMarketCourseList' : 'visitor/getMarketCourseList',
url: uni.getStorageSync('token') ? 'medical/home/getMarketCourseList' : 'visitor/getMarketCourseList',
method: 'POST',
data
})