支持故事logo,增加默认logo

This commit is contained in:
jiangh277
2025-07-25 20:25:28 +08:00
parent 04dde093a8
commit 56a0042011
6 changed files with 324 additions and 73 deletions

View File

@@ -1,30 +1,27 @@
import { request } from '@umijs/max';
import {AddStoryItem, BaseResponse, StoryItem, StoryType} from './data.d';
import { StoryItem, StoryType } from './data.d';
type ParamsType = {
count?: number;
instanceId?: string;
storyName?: string;
} & Partial<StoryType>;
export async function queryTimelineList(
params: ParamsType,
): Promise<{ data: { data: StoryType[] } }> {
): Promise<{ data: StoryType[] }> {
return await request('/story/owner/test11', {
params
params,
});
}
export async function deleteStory(
params: ParamsType,
): Promise<{ data: { list: StoryType[] } }> {
export async function deleteStory(params: ParamsType): Promise<{ data: { list: StoryType[] } }> {
return request(`/story/${params.instanceId}`, {
method: 'DELETE',
});
}
export async function addStory(
params: ParamsType,
): Promise<{ data: { list: StoryType[] } }> {
export async function addStory(params: ParamsType): Promise<{ data: { list: StoryType[] } }> {
return request('/story/add', {
method: 'POST',
data: {
@@ -33,9 +30,8 @@ export async function addStory(
},
});
}
export async function updateStory(
params: ParamsType,
): Promise<{ data: { list: StoryType[] } }> {
export async function updateStory(params: ParamsType): Promise<{ data: { list: StoryType[] } }> {
return await request(`/story/${params.instanceId}`, {
method: 'PUT',
data: {
@@ -45,9 +41,7 @@ export async function updateStory(
});
}
export async function addStoryItem(
params: FormData,
): Promise<any> {
export async function addStoryItem(params: FormData): Promise<any> {
return request(`/story/item`, {
method: 'POST',
data: params,
@@ -55,9 +49,8 @@ export async function addStoryItem(
getResponse: true,
});
}
export async function queryStoryItem(
masterItemId: string,
): Promise<{ data: StoryItem[] }> {
export async function queryStoryItem(masterItemId: string): Promise<{ data: StoryItem[] }> {
return request(`/story/item/list`, {
method: 'GET',
params: {
@@ -65,26 +58,23 @@ export async function queryStoryItem(
},
});
}
export async function queryStoryItemDetail(
itemId: string,
): Promise<{ data: StoryItem[] }> {
export async function queryStoryItemDetail(itemId: string): Promise<{ data: StoryItem[] }> {
return request(`/story/item/${itemId}`, {
method: 'GET',
});
}
export async function queryStoryItemImages(
itemId: string,
): Promise<{ data: string[] }> {
export async function queryStoryItemImages(itemId: string): Promise<{ data: string[] }> {
return request(`/story/item/images/${itemId}`, {
method: 'GET',
});
}
export async function fetchImage(
imageInstanceId: string,
): Promise<any> {
export async function fetchImage(imageInstanceId: string): Promise<any> {
return request(`/file/download/cover/${imageInstanceId}`, {
method: 'GET',
responseType: 'blob',
getResponse: true,
})
});
}