fix: 添加ai生成水印
This commit is contained in:
parent
9e39ca842c
commit
49ec32e2ac
|
|
@ -72,7 +72,6 @@
|
|||
}
|
||||
|
||||
.download-tip {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,12 +123,14 @@
|
|||
/* 模板名称悬浮 - 图片底部 */
|
||||
.name-overlay {
|
||||
position: absolute;
|
||||
bottom: 24rpx;
|
||||
bottom: 12rpx;
|
||||
left: 24rpx;
|
||||
right: 24rpx;
|
||||
z-index: 4;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.name-badge {
|
||||
|
|
@ -143,6 +145,7 @@
|
|||
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
|
||||
text-align: center;
|
||||
max-width: 90%;
|
||||
width: fit-content;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
|
@ -165,6 +168,8 @@
|
|||
object-fit: cover;
|
||||
display: block;
|
||||
border-radius: 32rpx;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
/* 性能优化:启用硬件加速 */
|
||||
transform: translateZ(0);
|
||||
/* 防止视频闪烁 */
|
||||
|
|
@ -183,10 +188,6 @@
|
|||
border-radius: 32rpx;
|
||||
}
|
||||
|
||||
.single-video {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* 视频样式 */
|
||||
.full-video {
|
||||
|
|
@ -201,3 +202,10 @@
|
|||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.watermark-text {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) {
|
|||
const [containerInfo, setContainerInfo] = useState<any>(null)
|
||||
const containerRef = useRef<any>(null)
|
||||
const containerId = `container-${template.code}` // 为每个容器创建唯一ID
|
||||
|
||||
|
||||
// 检测output是否为视频
|
||||
const isOutputVideo = useMemo(() => {
|
||||
return /\.(mp4|webm|ogg|mov|avi|mkv|flv)$/i.test(template.outputExample)
|
||||
}, [template.outputExample])
|
||||
|
||||
|
||||
// 检测input是否为视频
|
||||
const isInputVideo = useMemo(() => {
|
||||
return /\.(mp4|webm|ogg|mov|avi|mkv|flv)$/i.test(template.inputExample)
|
||||
|
|
@ -83,7 +83,7 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) {
|
|||
{isOutputVideo ? (
|
||||
// 当output是视频时,只显示单个视频
|
||||
<View className='single-video-container'>
|
||||
<Image
|
||||
<Image
|
||||
className='video-poster'
|
||||
src={template.inputExample}
|
||||
mode='aspectFill'
|
||||
|
|
@ -105,6 +105,7 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) {
|
|||
<Text className='name-badge'>
|
||||
{template.name}
|
||||
</Text>
|
||||
<Text className='watermark-text'>内容由AI生成</Text>
|
||||
</View>
|
||||
</View>
|
||||
) : (
|
||||
|
|
@ -175,10 +176,11 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) {
|
|||
<Text className='name-badge'>
|
||||
{template.name}
|
||||
</Text>
|
||||
<Text className='watermark-text'>内容由AI生成</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.result-page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: black;
|
||||
background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
135deg,
|
||||
rgba(255, 255, 255, 0.1) 0%,
|
||||
rgba(255, 255, 255, 0.05) 50%,
|
||||
rgba(0, 0, 0, 0.1) 100%
|
||||
|
|
@ -159,4 +159,4 @@
|
|||
height: 100%;
|
||||
max-height: 80vh;
|
||||
border-radius: 0rpx;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ const ResultPage: React.FC = () => {
|
|||
})
|
||||
|
||||
hideToast()
|
||||
|
||||
|
||||
// 跳转到生成页面
|
||||
navigateTo({
|
||||
url: `/pages/generate/index?taskId=${taskId}&templateCode=character_figurine_v1`
|
||||
|
|
@ -336,7 +336,7 @@ const ResultPage: React.FC = () => {
|
|||
onImageToVideo={handleImageToVideo}
|
||||
loading={adLoading}
|
||||
adAvailable={adAvailable}
|
||||
showImageToVideo={mediaType === 'image'}
|
||||
showImageToVideo={false}
|
||||
imageToVideoLoading={loading}
|
||||
/>
|
||||
</View>
|
||||
|
|
|
|||
Loading…
Reference in New Issue