增加用户中心、用户注册登录
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user