Compare commits
No commits in common. "af6daa49117639dc24ed5e4e48aba45e66fba996" and "0ee481dc13b4bfd5fce41879b5fb6e9c13eb90a0" have entirely different histories.
af6daa4911
...
0ee481dc13
|
|
@ -8,7 +8,7 @@ node_modules/
|
||||||
dist/
|
dist/
|
||||||
web-build/
|
web-build/
|
||||||
expo-env.d.ts
|
expo-env.d.ts
|
||||||
nul
|
|
||||||
# Native
|
# Native
|
||||||
.kotlin/
|
.kotlin/
|
||||||
*.orig.*
|
*.orig.*
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,6 @@ type Template = {
|
||||||
name: string
|
name: string
|
||||||
image: string
|
image: string
|
||||||
type: 'video'
|
type: 'video'
|
||||||
price?: number
|
|
||||||
data?: any
|
data?: any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -262,17 +261,9 @@ const TemplateSection = memo<TemplateSectionProps>(function TemplateSection({ te
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
type GenerateSectionProps = {
|
type GenerateSectionProps = { onGenerate: () => void }
|
||||||
selectedTemplate: Template | undefined
|
const GenerateSection = memo<GenerateSectionProps>(function GenerateSection({ onGenerate }) {
|
||||||
onGenerate: () => void
|
|
||||||
}
|
|
||||||
const GenerateSection = memo<GenerateSectionProps>(function GenerateSection({ selectedTemplate, onGenerate }) {
|
|
||||||
const insets = useSafeAreaInsets()
|
const insets = useSafeAreaInsets()
|
||||||
|
|
||||||
if (!selectedTemplate) return null
|
|
||||||
|
|
||||||
const price = selectedTemplate.price || selectedTemplate.data?.price || 0
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Block className="absolute bottom-[96px] left-[16px] right-[16px] z-40" style={{ paddingBottom: insets.bottom }}>
|
<Block className="absolute bottom-[96px] left-[16px] right-[16px] z-40" style={{ paddingBottom: insets.bottom }}>
|
||||||
<Block style={{ transform: [{ skewX: '-6deg' }] }}>
|
<Block style={{ transform: [{ skewX: '-6deg' }] }}>
|
||||||
|
|
@ -290,7 +281,7 @@ const GenerateSection = memo<GenerateSectionProps>(function GenerateSection({ se
|
||||||
{/* 右侧 Goo 标签 */}
|
{/* 右侧 Goo 标签 */}
|
||||||
<Block className="z-10 flex-row items-center gap-[8px] border-[2px] border-black bg-black px-[12px] py-[4px]">
|
<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" />
|
<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>
|
</Block>
|
||||||
</Block>
|
</Block>
|
||||||
|
|
@ -326,7 +317,6 @@ export default function Index() {
|
||||||
name: t.title,
|
name: t.title,
|
||||||
image: t.coverImageUrl,
|
image: t.coverImageUrl,
|
||||||
type: 'video' as const,
|
type: 'video' as const,
|
||||||
price: t.price,
|
|
||||||
data: t,
|
data: t,
|
||||||
}))
|
}))
|
||||||
}, [templates.data])
|
}, [templates.data])
|
||||||
|
|
@ -403,7 +393,7 @@ export default function Index() {
|
||||||
<Block className="h-[200px] w-full"></Block>
|
<Block className="h-[200px] w-full"></Block>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<GenerateSection selectedTemplate={selectedTemplate} onGenerate={handleGenerate} />
|
<GenerateSection onGenerate={handleGenerate} />
|
||||||
</Block>
|
</Block>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ type MediaItem = {
|
||||||
url: string
|
url: string
|
||||||
poster?: string
|
poster?: string
|
||||||
likeCount: number
|
likeCount: number
|
||||||
price: number
|
|
||||||
}
|
}
|
||||||
type ActiveTab = 'gen' | '' | 'new' | 'like'
|
type ActiveTab = 'gen' | '' | 'new' | 'like'
|
||||||
|
|
||||||
|
|
@ -359,7 +358,6 @@ export default function Sync() {
|
||||||
url: isVideo ? template.previewUrl : template.coverImageUrl || template.previewUrl,
|
url: isVideo ? template.previewUrl : template.coverImageUrl || template.previewUrl,
|
||||||
poster: isVideo ? template.coverImageUrl : undefined,
|
poster: isVideo ? template.coverImageUrl : undefined,
|
||||||
likeCount: template.likeCount || 0,
|
likeCount: template.likeCount || 0,
|
||||||
price: template.price || 2, // 默认为 2 Goo
|
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
@ -596,7 +594,7 @@ export default function Sync() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const cost = selectedItem.price
|
const cost = 2
|
||||||
|
|
||||||
if (balance < cost) {
|
if (balance < cost) {
|
||||||
Toast.show({ title: '余额不足,请充值' })
|
Toast.show({ title: '余额不足,请充值' })
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue