修复banner指定设备显示问题

This commit is contained in:
al 2025-01-21 19:46:46 +08:00
parent 6169e8f89e
commit 6b24152029
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
import { import {
Text, Text,
View, View,
Dimensions,
TouchableOpacity, TouchableOpacity,
Image as NativeImage, Image as NativeImage,
Alert, Alert,
@ -18,10 +17,10 @@ import Banner from "../../../components/Banner";
import requireAPI from "../../../utils/requireAPI"; import requireAPI from "../../../utils/requireAPI";
import * as Linking from "expo-linking"; import * as Linking from "expo-linking";
import { goToPage } from "../../../utils/tools"; import { goToPage } from "../../../utils/tools";
import { Platform } from "react-native";
export default function HostList() { export default function HostList() {
const navigation = useNavigation(); const navigation = useNavigation();
const tailwind = useTailwind(); const tailwind = useTailwind();
const screenWidth = Dimensions.get("window").width;
const [hostList, setHostList] = useState([]); const [hostList, setHostList] = useState([]);
const [bannerList, setBannerList] = useState([]); const [bannerList, setBannerList] = useState([]);
useEffect(() => { useEffect(() => {
@ -56,7 +55,7 @@ export default function HostList() {
const _data = await requireAPI( const _data = await requireAPI(
"POST", "POST",
"/api/activity_banner/list", "/api/activity_banner/list",
null, { body: { device_type: Platform.OS === "android" ? 0 : 1 } },
true true
); );
if (_data.ret === -1) { if (_data.ret === -1) {