Skip to content

Commit 12801f6

Browse files
committed
feat: add create page
1 parent 4b7d669 commit 12801f6

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/constants/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const TABS_MAP = {
2323
},
2424
dev: {
2525
name: '客户端测试',
26-
color: '#5BD8A6',
26+
color: 'green',
2727
},
2828
};
2929

src/service/topic.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ export const postTopic = async (data: {
3737
return request(`${BASE_URL}/api/v1/topics`, options);
3838
};
3939

40+
export const postTopic = async (data: {
41+
title: string;
42+
tab: string;
43+
content: string;
44+
accesstoken: string;
45+
}) => {
46+
const options: any = {
47+
method: 'POST',
48+
data,
49+
};
50+
51+
return request(`${BASE_URL}/api/v1/topics`, options);
52+
};
53+
4054
export const queryTopicDetail = async (params: {
4155
id: string;
4256
mdrender?: boolean;

0 commit comments

Comments
 (0)