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