diff --git a/src/pages-aigc/detail/components/ResultPreview/index.vue b/src/pages-aigc/detail/components/ResultPreview/index.vue
index 55614bc..bb71216 100644
--- a/src/pages-aigc/detail/components/ResultPreview/index.vue
+++ b/src/pages-aigc/detail/components/ResultPreview/index.vue
@@ -18,16 +18,23 @@
auto-pause-if-navigate
auto-pause-if-open-native
play-btn-position="center"
- object-fit="cover"
+ :object-fit="videoObjectFit"
@play="handleVideoPlay"
@waiting="handleVideoWaiting"
@timeupdate="handleVideoTimeUpdate"
@progress="handleVideoProgress"
@loadedmetadata="handleVideoLoaded"
+ @fullscreenchange="handleVideoFullscreenChange"
@ended="handleVideoEnded"
@error="handleVideoError"
/>
-
+
@@ -76,10 +83,12 @@ const videoLoadVersion = ref(0);
const isVideoLoading = ref(true);
const isVideoEnded = ref(false);
const isVideoError = ref(false);
+const isVideoFullscreen = ref(false);
const hasVideoStarted = ref(false);
const bufferedProgress = ref(0);
const isVideo = computed(() => props.result.mediaType === "video");
+const videoObjectFit = computed(() => (isVideoFullscreen.value ? "contain" : "cover"));
const videoRenderKey = computed(() => `${props.result.videoResultUrl || "video"}-${videoLoadVersion.value}`);
const showCaptionOverlay = computed(
() => !isVideo.value || (!hasVideoStarted.value && !isVideoEnded.value && !isVideoError.value)
@@ -90,6 +99,16 @@ const loadingText = computed(() =>
const getVideoContext = () => uni.createVideoContext(videoId, instance?.proxy || instance);
+const handlePreviewImage = () => {
+ const imageUrl = String(props.result.imageResultUrl || "").trim();
+ if (isVideo.value || !imageUrl) return;
+
+ uni.previewImage({
+ current: imageUrl,
+ urls: [imageUrl],
+ });
+};
+
const resetVideoState = () => {
isVideoLoading.value = isVideo.value;
isVideoEnded.value = false;
@@ -129,6 +148,10 @@ const handleVideoProgress = (event) => {
}
};
+const handleVideoFullscreenChange = (event) => {
+ isVideoFullscreen.value = Boolean(event?.detail?.fullScreen);
+};
+
const handleVideoEnded = () => {
isVideoLoading.value = false;
isVideoEnded.value = true;
diff --git a/src/pages-aigc/detail/components/ResultPreview/styles/index.scss b/src/pages-aigc/detail/components/ResultPreview/styles/index.scss
index 6f537ca..19bf559 100644
--- a/src/pages-aigc/detail/components/ResultPreview/styles/index.scss
+++ b/src/pages-aigc/detail/components/ResultPreview/styles/index.scss
@@ -1,7 +1,9 @@
.result-preview {
position: relative;
- height: 360px;
+ width: 100%;
+ height: 100%;
overflow: hidden;
+ box-sizing: border-box;
border-radius: 26px;
background: var(--result-accent, #0a4d46);
color: #ffffff;
diff --git a/src/pages-aigc/detail/detail.vue b/src/pages-aigc/detail/detail.vue
index f9b3558..8380001 100644
--- a/src/pages-aigc/detail/detail.vue
+++ b/src/pages-aigc/detail/detail.vue
@@ -4,15 +4,17 @@
-
-
-
+
+
+
+
-
- 再生成一版
- 换个模板
- 历史记录
+
+ 再生成一版
+ 换个模板
+ 历史记录
+
diff --git a/src/pages-aigc/detail/styles/index.scss b/src/pages-aigc/detail/styles/index.scss
index 1ed85ef..a596afa 100644
--- a/src/pages-aigc/detail/styles/index.scss
+++ b/src/pages-aigc/detail/styles/index.scss
@@ -19,11 +19,25 @@
.aigc-detail-content {
flex: 1 1 auto;
min-height: 0;
+ display: flex;
+ flex-direction: column;
overflow: hidden;
padding: 0 12px;
box-sizing: border-box;
}
+.aigc-detail-preview {
+ display: block;
+ flex: 1 1 500px;
+ width: 100%;
+ min-height: 360px;
+ max-height: 500px;
+}
+
+.aigc-detail-controls {
+ flex: 0 0 auto;
+}
+
.aigc-detail-text-actions {
height: 50px;
display: grid;
diff --git a/src/pages-aigc/home/components/GiftPointsToast/index.vue b/src/pages-aigc/home/components/GiftPointsToast/index.vue
index c9037c6..bfadc11 100644
--- a/src/pages-aigc/home/components/GiftPointsToast/index.vue
+++ b/src/pages-aigc/home/components/GiftPointsToast/index.vue
@@ -1,5 +1,5 @@
-
+
{{ title }}
{{ message }}
@@ -9,11 +9,17 @@