增加用户中心、用户注册登录

This commit is contained in:
jiangh277
2025-12-26 15:12:49 +08:00
parent 1eb1dafe1e
commit 07e011febd
43 changed files with 2006 additions and 611 deletions

View File

@@ -1,5 +1,5 @@
import { request } from '@umijs/max';
import { StoryItem, StoryType } from './data.d';
import {StoryItem, StoryItemTimeQueryParams, StoryType} from './data.d';
import {CommonListResponse, CommonResponse} from "@/types/common";
type ParamsType = {
@@ -8,12 +8,12 @@ type ParamsType = {
storyName?: string;
pageSize?: number;
current?: number;
} & Partial<StoryType> & Partial<StoryItem>;
} & Partial<StoryType> & Partial<StoryItem> & Partial<StoryItemTimeQueryParams>;
export async function queryTimelineList(
params: ParamsType,
): Promise<{ data: StoryType[] }> {
return await request('/story/owner/test11', {
return await request('/story/list', {
params,
});
}
@@ -56,6 +56,14 @@ export async function addStoryItem(params: FormData): Promise<any> {
getResponse: true,
});
}
export async function updateStoryItem(params: FormData): Promise<any> {
return request(`/story/item`, {
method: 'PUT',
data: params,
requestType: 'form',
getResponse: true,
});
}
export async function queryStoryItem(params: ParamsType): Promise<{ data: CommonListResponse<StoryItem> }> {
return request(`/story/item/list`, {
@@ -93,3 +101,10 @@ export async function fetchImage(imageInstanceId: string): Promise<any> {
getResponse: true,
});
}
export async function authorizeStoryPermission(params: {userId: string, storyInstanceId: string, permissionType: number}) {
return request('/story/permission/authorize', {
method: 'POST',
data: params,
});
}