|
@@ -1,5 +1,6 @@
|
|
|
import { View, Swiper, SwiperItem, Image } from "@tarojs/components";
|
|
|
import React, { useEffect, useState } from "react";
|
|
|
+import { AvatarMedia } from "@/components/AvatarMedia";
|
|
|
import style from "./index.module.less";
|
|
|
import IconStarColor from "@/components/icon/icon-star-color";
|
|
|
import { getUploadedAvatarStatus, genAvatarVideo, type TAvatarItem } from '@/service/storage'
|
|
@@ -121,10 +122,11 @@ export default React.memo(function Index({ prev, next, taskId, setPickedAvatar }
|
|
|
{avatars.map(avatar => {
|
|
|
return <SwiperItem>
|
|
|
<View className={style.swiperItem}>
|
|
|
- <Image
|
|
|
+ <AvatarMedia source={avatar.avatarUrl} className="w-full h-full" />
|
|
|
+ {/* <Image
|
|
|
mode="widthFix"
|
|
|
src={avatar.avatarUrl}
|
|
|
- ></Image>
|
|
|
+ ></Image> */}
|
|
|
{avatar.isOriginal && <View className={style.pickAvatarOriginal}>
|
|
|
<View>原图</View>
|
|
|
</View> }
|
|
@@ -175,11 +177,11 @@ export default React.memo(function Index({ prev, next, taskId, setPickedAvatar }
|
|
|
</View>
|
|
|
|
|
|
<View className="bottom-bar">
|
|
|
- <View className="grid grid-cols-2 gap-8 px-20 py-12">
|
|
|
+ <View className="grid grid-cols-3 gap-8 px-20 py-12">
|
|
|
<View className={`button-rounded`} onClick={prev}>
|
|
|
上一步
|
|
|
</View>
|
|
|
- <View className={`button-rounded`} onClick={genVideo}>
|
|
|
+ <View className={`button-rounded ${avatars.length ? '' : 'opacity-20'}`} onClick={genVideo}>
|
|
|
生成微视频
|
|
|
</View>
|
|
|
<View className={`button-rounded primary ${avatars.length ? '' : 'opacity-20'}`} onClick={()=> goNext()}>
|