From ba05fc1b3aff21e46481eb414253cf1aaf08327e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Sat, 2 May 2026 09:32:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20hide=20admin=20buttons=20when=20viewing?= =?UTF-8?q?=20course=20package=20via=20=E8=AF=95=E7=9C=8B=20preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "试看" (preview) from the storefront should show a read-only view without admin operations (编辑, 删除, 发布上架, 下架). Add preview=1 query param to distinguish preview from direct management navigation. Also limit previewable sections to first one in preview mode, consistent with non-owner experience. Co-Authored-By: Claude Opus 4.7 --- src/components/course-package-store.vue | 2 +- src/pages/qumu/course-package/detail.vue | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/course-package-store.vue b/src/components/course-package-store.vue index 733c4d8..4b612ed 100644 --- a/src/components/course-package-store.vue +++ b/src/components/course-package-store.vue @@ -107,7 +107,7 @@ export default defineComponent({ const onPreview = (pkg: CoursePackage) => { if (isLoggedIn()) { - router.push(`/course/course-package/detail?id=${pkg.id}`); + router.push(`/course/course-package/detail?id=${pkg.id}&preview=1`); } else { showDialog({ title: '提示', diff --git a/src/pages/qumu/course-package/detail.vue b/src/pages/qumu/course-package/detail.vue index 463a050..bf01cf0 100644 --- a/src/pages/qumu/course-package/detail.vue +++ b/src/pages/qumu/course-package/detail.vue @@ -42,7 +42,7 @@ -