From b01a392b5a47d9ead6313b1542159bc9978003e9 Mon Sep 17 00:00:00 2001 From: unknown <18119604035@163.com> Date: Mon, 31 Jul 2023 11:28:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=89=93=E5=BC=80?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AF=A6=E6=83=85=E9=A1=B5=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/course/index.tsx b/src/pages/course/index.tsx index b071e7a..23dfe08 100644 --- a/src/pages/course/index.tsx +++ b/src/pages/course/index.tsx @@ -145,7 +145,15 @@ const CoursePage = () => { navigate(-1)} + onClick={() => { + if (window.history.length <= 1) { + // 将页面跳转到首页 + navigate("/"); + } else { + // 返回到前一个页面 + navigate(-1); + } + }} />