更新:课程首页增加骨架屏

This commit is contained in:
2025-12-12 10:22:44 +08:00
parent 3ce5e07573
commit 6e5d63febe
10 changed files with 378 additions and 231 deletions

View File

@@ -1,11 +1,9 @@
// api/modules/common.ts
import { mainClient } from '@/api/clients/main'
import { mainClient, skeletonClient } from '@/api/clients'
import type { IApiResponse } from '@/api/types'
import type { IAgreement } from '@/types/user'
import { useUserStore } from '@/stores/user'
export const commonApi = {
/**
* 发送邮箱验证码
@@ -40,7 +38,7 @@ export const commonApi = {
*/
getMessageList(isBook: number, isMedical: number, isSociology: number) {
const userStore = useUserStore()
return mainClient.request<IMessageListResponse>({
return skeletonClient.request<IApiResponse>({
url: userStore.token ? 'common/message/listByPage' : '/visitor/listByPage',
method: 'POST',
data: { isBook, isMedical, isSociology }