From 5a883e674e4fa75094ea683a0906d15f1e847aea Mon Sep 17 00:00:00 2001
From: hejianhao <15708179461@qq.com>
Date: 星期三, 19 八月 2026 14:27:06 +0800
Subject: [PATCH] feat0806: APP养生直播根据后台设置的密码进行跳转密码页面
---
traditionalApp/pages/home/home.vue | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/traditionalApp/pages/home/home.vue b/traditionalApp/pages/home/home.vue
index 6c72549..5ca632a 100644
--- a/traditionalApp/pages/home/home.vue
+++ b/traditionalApp/pages/home/home.vue
@@ -161,6 +161,7 @@
displayStatus ?: 'NOT_STARTED' | 'LIVING' | 'ENDED';
displayStatusText ?: string;
nextStartTime ?: string;
+ hasPassword ?: boolean;
}
interface HomeFeaturedHealthCourseItem {
@@ -322,7 +323,7 @@
/**
* 经营者培训入口跳转:
- * - 先进入密码验证页,验证成功后:
+ * - 仅当后台明确返回 hasPassword === true 时先进入密码验证页
* - 有正在直播的场次(LIVING)→ 跳转直播视频播放页(watchLive)
* - 无正在直播 → 跳转课程介绍页(liveDetail)
*/
@@ -336,9 +337,10 @@
} else {
targetPageUrl = `/pages/liveDetail/liveDetail?id=${targetCourse.courseId}`;
}
- uni.navigateTo({
- url: `/pages/passwordInput/passwordInput?targetUrl=${encodeURIComponent(targetPageUrl)}`
- });
+ const url = targetCourse?.hasPassword === true
+ ? `/pages/passwordInput/passwordInput?targetUrl=${encodeURIComponent(targetPageUrl)}`
+ : targetPageUrl;
+ uni.navigateTo({ url });
};
/**
--
Gitblit v1.7.1