소스 검색

feat: 修改

year 2 달 전
부모
커밋
b55ca0894a
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/app/[locale]/(doings)/card/page.tsx

+ 3 - 1
src/app/[locale]/(doings)/card/page.tsx

@@ -80,7 +80,9 @@ const CardPage = () => {
 
                 //自动滚动到第一个买了的商品
                 setTimeout(() => {
-                    setAct(actKey);
+                    if (actKey) {
+                        setAct(actKey);
+                    }
                     swiperRef.current?.slideToLoop(actKey, 0, false);
                 }, 100);