完善功能;更换icon

This commit is contained in:
yezian 2024-12-24 15:29:29 +08:00
parent f5487d23b5
commit e95ace080d
1 changed files with 13 additions and 6 deletions

View File

@ -75,12 +75,14 @@ export function ImageViewer({
};
//
const [isLoading, setIsLoading] = useState(false);
const handleCheckOriginalImage = async (index) => {
const isVip = await checkRole();
if (!isVip) {
setIsVipModalVisible(true);
return;
}
setIsLoading(true);
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
try {
const base = await baseRequest();
@ -123,6 +125,8 @@ export function ImageViewer({
});
} catch (error) {
console.error(error);
} finally {
setIsLoading(false);
}
};
@ -211,12 +215,15 @@ export function ImageViewer({
),
}}
>
<Icon
type="ionicon"
name="image-outline"
size={20}
color="white"
/>
{isLoading && <ActivityIndicator size="small" />}
{!isLoading && (
<Icon
type="ionicon"
name="image-outline"
size={20}
color="white"
/>
)}
<Text
style={tailwind("text-xs text-[#FFFFFF80] font-medium mt-1")}
>