visuddhinanda преди 2 години
родител
ревизия
03804c1f05
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      dashboard/src/components/channel/ChapterInChannelList.tsx

+ 1 - 1
dashboard/src/components/channel/ChapterInChannelList.tsx

@@ -169,7 +169,7 @@ const ChapterInChannelListWidget = ({ channelId, onSelect }: IWidget) => {
       request={async (params = {}, sorter, filter) => {
       request={async (params = {}, sorter, filter) => {
         // TODO 加排序
         // TODO 加排序
         console.log(params, sorter, filter);
         console.log(params, sorter, filter);
-        const offset = (params.current || 1 - 1) * (params.pageSize || 20);
+        const offset = ((params.current || 1) - 1) * (params.pageSize || 20);
         const res = await get<IChapterListResponse>(
         const res = await get<IChapterListResponse>(
           `/v2/progress?view=chapter&channel=${channelId}&progress=0.01&offset=${offset}`
           `/v2/progress?view=chapter&channel=${channelId}&progress=0.01&offset=${offset}`
         );
         );