Compare commits

..

No commits in common. "af6daa49117639dc24ed5e4e48aba45e66fba996" and "0ee481dc13b4bfd5fce41879b5fb6e9c13eb90a0" have entirely different histories.

3 changed files with 6 additions and 18 deletions

2
.gitignore vendored
View File

@ -8,7 +8,7 @@ node_modules/
dist/
web-build/
expo-env.d.ts
nul
# Native
.kotlin/
*.orig.*

View File

@ -159,7 +159,6 @@ type Template = {
name: string
image: string
type: 'video'
price?: number
data?: any
}
@ -262,17 +261,9 @@ const TemplateSection = memo<TemplateSectionProps>(function TemplateSection({ te
)
})
type GenerateSectionProps = {
selectedTemplate: Template | undefined
onGenerate: () => void
}
const GenerateSection = memo<GenerateSectionProps>(function GenerateSection({ selectedTemplate, onGenerate }) {
type GenerateSectionProps = { onGenerate: () => void }
const GenerateSection = memo<GenerateSectionProps>(function GenerateSection({ onGenerate }) {
const insets = useSafeAreaInsets()
if (!selectedTemplate) return null
const price = selectedTemplate.price || selectedTemplate.data?.price || 0
return (
<Block className="absolute bottom-[96px] left-[16px] right-[16px] z-40" style={{ paddingBottom: insets.bottom }}>
<Block style={{ transform: [{ skewX: '-6deg' }] }}>
@ -290,7 +281,7 @@ const GenerateSection = memo<GenerateSectionProps>(function GenerateSection({ se
{/* 右侧 Goo 标签 */}
<Block className="z-10 flex-row items-center gap-[8px] border-[2px] border-black bg-black px-[12px] py-[4px]">
<Ionicons name="flash" size={14} color="#FFE500" />
<Text className="text-[14px] font-black italic text-[#FFE500]">{price} Goo</Text>
<Text className="text-[14px] font-black italic text-[#FFE500]">3 Goo</Text>
</Block>
</Block>
</Block>
@ -326,7 +317,6 @@ export default function Index() {
name: t.title,
image: t.coverImageUrl,
type: 'video' as const,
price: t.price,
data: t,
}))
}, [templates.data])
@ -403,7 +393,7 @@ export default function Index() {
<Block className="h-[200px] w-full"></Block>
</ScrollView>
<GenerateSection selectedTemplate={selectedTemplate} onGenerate={handleGenerate} />
<GenerateSection onGenerate={handleGenerate} />
</Block>
)
}

View File

@ -32,7 +32,6 @@ type MediaItem = {
url: string
poster?: string
likeCount: number
price: number
}
type ActiveTab = 'gen' | '' | 'new' | 'like'
@ -359,7 +358,6 @@ export default function Sync() {
url: isVideo ? template.previewUrl : template.coverImageUrl || template.previewUrl,
poster: isVideo ? template.coverImageUrl : undefined,
likeCount: template.likeCount || 0,
price: template.price || 2, // 默认为 2 Goo
}
}, [])
@ -596,7 +594,7 @@ export default function Sync() {
return
}
const cost = selectedItem.price
const cost = 2
if (balance < cost) {
Toast.show({ title: '余额不足,请充值' })