Compare commits
2 Commits
a869ea0827
...
bc33c158bb
| Author | SHA1 | Date |
|---|---|---|
|
|
bc33c158bb | |
|
|
33b08433b5 |
|
|
@ -1,4 +1,4 @@
|
|||
import { View, ScrollView } from '@tarojs/components';
|
||||
import { View, ScrollView, Canvas } from '@tarojs/components';
|
||||
import { useEffect, useState } from 'react';
|
||||
import Taro, { navigateTo } from '@tarojs/taro';
|
||||
import { useAppDispatch, useAppSelector } from '../../hooks/redux';
|
||||
|
|
@ -92,8 +92,9 @@ export default function Home() {
|
|||
const handleTemplateClick = async (template: Template) => {
|
||||
try {
|
||||
// 第一步:选择并上传图片
|
||||
|
||||
const imageCount = template.templateType === '2image-to-video' ? 2 : 1;
|
||||
const imageUrl = await sdk.chooseAndUploadImage({
|
||||
count: imageCount,
|
||||
onImageSelected: () => {
|
||||
Taro.showLoading({
|
||||
title: getLoadingText('uploading'),
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export interface Template {
|
|||
inputExample: string; // 原始图片
|
||||
outputExample: string; // 输出图片
|
||||
tags: string[]; // 标签数组
|
||||
templateType: string; // 模板类型
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue