|
@@ -230,8 +230,7 @@ const AppDrawer: React.FC<AppDrawerProps> = (props) => {
|
|
|
const fetchAppList = async () => {
|
|
const fetchAppList = async () => {
|
|
|
setListLoading(true);
|
|
setListLoading(true);
|
|
|
try {
|
|
try {
|
|
|
- const userId = '7';
|
|
|
|
|
- const res = await api.get(`/deepseek/api/project/app/${userId}`);
|
|
|
|
|
|
|
+ const res = await api.get(`/deepseek/api/project/app`);
|
|
|
if (type === 'all') {
|
|
if (type === 'all') {
|
|
|
setList(res.data);
|
|
setList(res.data);
|
|
|
} else {
|
|
} else {
|
|
@@ -247,10 +246,8 @@ const AppDrawer: React.FC<AppDrawerProps> = (props) => {
|
|
|
// 收藏应用
|
|
// 收藏应用
|
|
|
const collectApp = async (appId: string) => {
|
|
const collectApp = async (appId: string) => {
|
|
|
try {
|
|
try {
|
|
|
- const userId = '7';
|
|
|
|
|
await api.post('/deepseek/api/app/collect', {
|
|
await api.post('/deepseek/api/app/collect', {
|
|
|
- appId: appId,
|
|
|
|
|
- userId: userId,
|
|
|
|
|
|
|
+ appId: appId
|
|
|
});
|
|
});
|
|
|
message.success('收藏成功');
|
|
message.success('收藏成功');
|
|
|
await fetchAppList();
|
|
await fetchAppList();
|
|
@@ -262,8 +259,7 @@ const AppDrawer: React.FC<AppDrawerProps> = (props) => {
|
|
|
// 取消收藏应用
|
|
// 取消收藏应用
|
|
|
const cancelCollectApp = async (appId: string) => {
|
|
const cancelCollectApp = async (appId: string) => {
|
|
|
try {
|
|
try {
|
|
|
- const userId = '7';
|
|
|
|
|
- await api.delete(`/deepseek/api/app/collect/${userId}/${appId}`);
|
|
|
|
|
|
|
+ await api.delete(`/deepseek/api/app/collect/${appId}`);
|
|
|
message.success('操作成功');
|
|
message.success('操作成功');
|
|
|
await fetchAppList();
|
|
await fetchAppList();
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|