浏览代码

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);