ソースを参照

收藏接口用户ID修改

S0025136190 5 ヶ月 前
コミット
291f3c11a5
1 ファイル変更3 行追加7 行削除
  1. 3 7
      app/components/sidebar.tsx

+ 3 - 7
app/components/sidebar.tsx

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