完善功能;更换icon
This commit is contained in:
parent
f5487d23b5
commit
e95ace080d
|
@ -75,12 +75,14 @@ export function ImageViewer({
|
||||||
};
|
};
|
||||||
|
|
||||||
//查看原图
|
//查看原图
|
||||||
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const handleCheckOriginalImage = async (index) => {
|
const handleCheckOriginalImage = async (index) => {
|
||||||
const isVip = await checkRole();
|
const isVip = await checkRole();
|
||||||
if (!isVip) {
|
if (!isVip) {
|
||||||
setIsVipModalVisible(true);
|
setIsVipModalVisible(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
setIsLoading(true);
|
||||||
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
||||||
try {
|
try {
|
||||||
const base = await baseRequest();
|
const base = await baseRequest();
|
||||||
|
@ -123,6 +125,8 @@ export function ImageViewer({
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
} finally {
|
||||||
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -211,12 +215,15 @@ export function ImageViewer({
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon
|
{isLoading && <ActivityIndicator size="small" />}
|
||||||
type="ionicon"
|
{!isLoading && (
|
||||||
name="image-outline"
|
<Icon
|
||||||
size={20}
|
type="ionicon"
|
||||||
color="white"
|
name="image-outline"
|
||||||
/>
|
size={20}
|
||||||
|
color="white"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Text
|
<Text
|
||||||
style={tailwind("text-xs text-[#FFFFFF80] font-medium mt-1")}
|
style={tailwind("text-xs text-[#FFFFFF80] font-medium mt-1")}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue