修改跳转链接路径

This commit is contained in:
al 2025-01-20 20:19:04 +08:00
parent 2ad898e37b
commit a835552dca
3 changed files with 31 additions and 13 deletions

View File

@ -1,4 +1,4 @@
import { Alert, Dimensions, TouchableOpacity } from "react-native";
import { View, Alert, Dimensions, TouchableOpacity } from "react-native";
import React from "react";
import Swiper from "react-native-swiper";
import { Image } from "expo-image";
@ -80,13 +80,19 @@ export default function Banner({
}
}}
>
<Image
source={banner.url}
contentFit="cover"
transition={1000}
cachePolicy="disk"
style={tailwind("w-full h-full rounded-lg overflow-hidden")}
/>
<View
style={tailwind(
"bg-white w-full h-full rounded-lg overflow-hidden"
)}
>
<Image
source={banner.url}
contentFit="cover"
transition={1000}
cachePolicy="disk"
style={tailwind("w-full h-full rounded-lg overflow-hidden")}
/>
</View>
</TouchableOpacity>
))}
</Swiper>

View File

@ -79,13 +79,19 @@ export default function NoticeItem({ navigation, leftIcon, hasLink, data }) {
action: links[0]?.inward_action_type,
});
if (typeof linkAndParams === "string") {
if (links[0]?.action === "webViewHeader") {
if (
links[0]?.action === "webViewHeaderInward" ||
links[0]?.action === "webViewHeaderOutward"
) {
navigation.navigate("WebWithHeader", {
title: "",
uri: linkAndParams,
});
return;
} else if (links[0]?.action === "webViewWithOutHeader") {
} else if (
links[0]?.action === "webViewWithOutHeaderInward" ||
links[0]?.action === "webViewWithOutHeaderOutward"
) {
navigation.navigate("WebWithoutHeader", {
title: "",
uri: linkAndParams,

View File

@ -79,7 +79,7 @@ export default function HostList() {
return {
link: {
url: link,
action: links[0]?.inward_action_type,
action: links[0]?.action,
},
url: item?.image.images[0]?.urls[0],
id: item?.id,
@ -133,13 +133,19 @@ export default function HostList() {
url: link,
});
if (typeof linkAndParams === "string") {
if (links[0]?.action === "webViewHeader") {
if (
links[0]?.action === "webViewHeaderInward" ||
links[0]?.action === "webViewHeaderOutward"
) {
navigation.navigate("WebWithHeader", {
title: "",
uri: linkAndParams,
});
return;
} else if (links[0]?.action === "webViewWithOutHeader") {
} else if (
links[0]?.action === "webViewWithOutHeaderInward" ||
links[0]?.action === "webViewWithOutHeaderOutward"
) {
navigation.navigate("WebWithoutHeader", {
title: "",
uri: linkAndParams,