mirror of
https://github.com/PlayEdu/h5.git
synced 2025-06-27 04:04:33 +08:00
浏览器打开课程详情页返回优化
This commit is contained in:
parent
951d2489d6
commit
b01a392b5a
@ -145,7 +145,15 @@ const CoursePage = () => {
|
||||
<Image
|
||||
className="back-icon"
|
||||
src={backIcon}
|
||||
onClick={() => navigate(-1)}
|
||||
onClick={() => {
|
||||
if (window.history.length <= 1) {
|
||||
// 将页面跳转到首页
|
||||
navigate("/");
|
||||
} else {
|
||||
// 返回到前一个页面
|
||||
navigate(-1);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles["top-content"]}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user