parent
91b8399554
commit
d41253352e
|
@ -57,16 +57,6 @@ export function ImageViewer({
|
||||||
return false;
|
return false;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const [isTester, setIsTester] = useState(false);
|
|
||||||
useEffect(() => {
|
|
||||||
const checkIsTester = async () => {
|
|
||||||
const account = await get("account");
|
|
||||||
if (account.user_id === 314826 || account.user_id === 989430)
|
|
||||||
setIsTester(true);
|
|
||||||
};
|
|
||||||
checkIsTester();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const MenusComponent = useCallback(
|
const MenusComponent = useCallback(
|
||||||
({ cancel, saveToLocal }) => (
|
({ cancel, saveToLocal }) => (
|
||||||
<Modal
|
<Modal
|
||||||
|
@ -198,32 +188,28 @@ export function ImageViewer({
|
||||||
}
|
}
|
||||||
return <Image {...props} />;
|
return <Image {...props} />;
|
||||||
}}
|
}}
|
||||||
renderFooter={
|
renderFooter={(index) => (
|
||||||
isTester
|
<TouchableOpacity
|
||||||
? () => null
|
onPress={() => hanldSaveImage(index)}
|
||||||
: (index) => (
|
style={{
|
||||||
<TouchableOpacity
|
marginLeft: 20,
|
||||||
onPress={() => hanldSaveImage(index)}
|
marginBottom: insets.bottom,
|
||||||
style={{
|
...tailwind(
|
||||||
marginLeft: 20,
|
"flex justify-center items-center w-12 h-12 bg-[#FFFFFF1A] rounded-full"
|
||||||
marginBottom: insets.bottom,
|
),
|
||||||
...tailwind(
|
}}
|
||||||
"flex justify-center items-center w-12 h-12 bg-[#FFFFFF1A] rounded-full"
|
>
|
||||||
),
|
{isSaving && <ActivityIndicator size="small" />}
|
||||||
}}
|
{!isSaving && (
|
||||||
>
|
<Icon
|
||||||
{isSaving && <ActivityIndicator size="small" />}
|
type="ionicon"
|
||||||
{!isSaving && (
|
name="save-outline"
|
||||||
<Icon
|
size={20}
|
||||||
type="ionicon"
|
color="white"
|
||||||
name="save-outline"
|
/>
|
||||||
size={20}
|
)}
|
||||||
color="white"
|
</TouchableOpacity>
|
||||||
/>
|
)}
|
||||||
)}
|
|
||||||
</TouchableOpacity>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
onSave={(url) => {
|
onSave={(url) => {
|
||||||
saveImage(url);
|
saveImage(url);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -20,17 +20,6 @@ import { get } from "../../utils/storeInfo";
|
||||||
import { useImageViewer } from "../../context/ImageViewProvider";
|
import { useImageViewer } from "../../context/ImageViewProvider";
|
||||||
|
|
||||||
export default function Post({ data }) {
|
export default function Post({ data }) {
|
||||||
//判断是否是测试账号
|
|
||||||
const [isTester, setIsTester] = useState(false);
|
|
||||||
useEffect(() => {
|
|
||||||
const checkIsTester = async () => {
|
|
||||||
const account = await get("account");
|
|
||||||
if (account.user_id === 314826 || account.user_id === 989430)
|
|
||||||
setIsTester(true);
|
|
||||||
};
|
|
||||||
checkIsTester();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const tailwind = useTailwind();
|
const tailwind = useTailwind();
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const [like, setLike] = useState(data?.is_thumbed_up === 1 ? true : false);
|
const [like, setLike] = useState(data?.is_thumbed_up === 1 ? true : false);
|
||||||
|
@ -176,8 +165,7 @@ export default function Post({ data }) {
|
||||||
<View
|
<View
|
||||||
style={tailwind("flex flex-row items-center justify-between h-8")}
|
style={tailwind("flex flex-row items-center justify-between h-8")}
|
||||||
>
|
>
|
||||||
{data?.streamer_ext?.is_active_within_a_week === 1 &&
|
{data?.streamer_ext?.is_active_within_a_week === 1 ? (
|
||||||
!isTester ? (
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() =>
|
onPress={() =>
|
||||||
navigation.navigate("SpaceIntroduce", { mid: data?.mid })
|
navigation.navigate("SpaceIntroduce", { mid: data?.mid })
|
||||||
|
@ -200,8 +188,7 @@ export default function Post({ data }) {
|
||||||
/>
|
/>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
) : (
|
) : (
|
||||||
data?.streamer_ext?.zones?.length !== 0 &&
|
data?.streamer_ext?.zones?.length !== 0 && (
|
||||||
!isTester && (
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() =>
|
onPress={() =>
|
||||||
navigation.navigate("SpaceIntroduce", { mid: data?.mid })
|
navigation.navigate("SpaceIntroduce", { mid: data?.mid })
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
Text,
|
Text,
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
import React, { useState, useRef, useCallback, useEffect } from "react";
|
import React, { useState, useRef, useCallback } from "react";
|
||||||
import { useTailwind } from "tailwind-rn";
|
import { useTailwind } from "tailwind-rn";
|
||||||
import { Icon } from "@rneui/themed";
|
import { Icon } from "@rneui/themed";
|
||||||
import { Video, ResizeMode } from "expo-av";
|
import { Video, ResizeMode } from "expo-av";
|
||||||
|
@ -37,16 +37,6 @@ export default function VideoModal({ visible, setVisible, url }) {
|
||||||
return false;
|
return false;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const [isTester, setIsTester] = useState(false);
|
|
||||||
useEffect(() => {
|
|
||||||
const checkIsTester = async () => {
|
|
||||||
const account = await get("account");
|
|
||||||
if (account.user_id === 314826 || account.user_id === 989430)
|
|
||||||
setIsTester(true);
|
|
||||||
};
|
|
||||||
checkIsTester();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const [isVipModalVisible, setIsVipModalVisible] = useState(false);
|
const [isVipModalVisible, setIsVipModalVisible] = useState(false);
|
||||||
const [isSaving, setIsSaving] = useState(false);
|
const [isSaving, setIsSaving] = useState(false);
|
||||||
const [progress, setProgress] = useState(0);
|
const [progress, setProgress] = useState(0);
|
||||||
|
@ -130,30 +120,28 @@ export default function VideoModal({ visible, setVisible, url }) {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
{!isTester && (
|
<TouchableOpacity
|
||||||
<TouchableOpacity
|
onPress={hanldSaveVideo}
|
||||||
onPress={hanldSaveVideo}
|
style={{
|
||||||
style={{
|
left: 20,
|
||||||
left: 20,
|
bottom: insets.bottom,
|
||||||
bottom: insets.bottom,
|
...tailwind(
|
||||||
...tailwind(
|
"flex absolute justify-center items-center w-12 h-12 bg-[#FFFFFF1A] rounded-full"
|
||||||
"flex absolute justify-center items-center w-12 h-12 bg-[#FFFFFF1A] rounded-full"
|
),
|
||||||
),
|
}}
|
||||||
}}
|
>
|
||||||
>
|
{isSaving && (
|
||||||
{isSaving && (
|
<Text style={tailwind("text-white")}>{progress}%</Text>
|
||||||
<Text style={tailwind("text-white")}>{progress}%</Text>
|
)}
|
||||||
)}
|
{!isSaving && (
|
||||||
{!isSaving && (
|
<Icon
|
||||||
<Icon
|
type="ionicon"
|
||||||
type="ionicon"
|
name="save-outline"
|
||||||
name="save-outline"
|
size={20}
|
||||||
size={20}
|
color="white"
|
||||||
color="white"
|
/>
|
||||||
/>
|
)}
|
||||||
)}
|
</TouchableOpacity>
|
||||||
</TouchableOpacity>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
</TouchableWithoutFeedback>
|
</TouchableWithoutFeedback>
|
||||||
<Toast />
|
<Toast />
|
||||||
|
|
|
@ -12,13 +12,10 @@ const Tab = createBottomTabNavigator();
|
||||||
|
|
||||||
export default function HomeTab({ navigation, route }) {
|
export default function HomeTab({ navigation, route }) {
|
||||||
const [isCreatePostTabVisible, setIsCreatePostTabVisible] = useState(false);
|
const [isCreatePostTabVisible, setIsCreatePostTabVisible] = useState(false);
|
||||||
const [isTester, setIsTester] = useState(false);
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const checkRole = async () => {
|
const checkRole = async () => {
|
||||||
const account = await get("account");
|
const account = await get("account");
|
||||||
if (account.role === 3) setIsCreatePostTabVisible(true);
|
if (account.role === 3) setIsCreatePostTabVisible(true);
|
||||||
if (account.user_id === 314826 || account.user_id === 989430)
|
|
||||||
setIsTester(true);
|
|
||||||
};
|
};
|
||||||
checkRole();
|
checkRole();
|
||||||
}, []);
|
}, []);
|
||||||
|
@ -84,31 +81,29 @@ export default function HomeTab({ navigation, route }) {
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{!isTester && (
|
<Tab.Screen
|
||||||
<Tab.Screen
|
name="Space"
|
||||||
name="Space"
|
component={Space}
|
||||||
component={Space}
|
options={{
|
||||||
options={{
|
title: "空间",
|
||||||
title: "空间",
|
headerShown: false,
|
||||||
headerShown: false,
|
tabBarIcon: ({ focused, color, size }) => {
|
||||||
tabBarIcon: ({ focused, color, size }) => {
|
if (focused) {
|
||||||
if (focused) {
|
return (
|
||||||
return (
|
<Image
|
||||||
<Image
|
source={require("../../assets/icon/others/space_focus.png")}
|
||||||
source={require("../../assets/icon/others/space_focus.png")}
|
/>
|
||||||
/>
|
);
|
||||||
);
|
} else {
|
||||||
} else {
|
return (
|
||||||
return (
|
<Image
|
||||||
<Image
|
source={require("../../assets/icon/others/space_blur.png")}
|
||||||
source={require("../../assets/icon/others/space_blur.png")}
|
/>
|
||||||
/>
|
);
|
||||||
);
|
}
|
||||||
}
|
},
|
||||||
},
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{isCreatePostTabVisible && (
|
{isCreatePostTabVisible && (
|
||||||
<Tab.Screen
|
<Tab.Screen
|
||||||
name="Publish"
|
name="Publish"
|
||||||
|
|
|
@ -314,94 +314,86 @@ export default function My({ navigation }) {
|
||||||
粉丝
|
粉丝
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
<TouchableOpacity
|
||||||
<TouchableOpacity
|
onPress={() => navigation.navigate("Wallet")}
|
||||||
onPress={() => navigation.navigate("Wallet")}
|
style={tailwind("flex flex-col items-center w-1/4")}
|
||||||
style={tailwind("flex flex-col items-center w-1/4")}
|
>
|
||||||
|
<Text style={tailwind("text-2xl font-medium text-white")}>
|
||||||
|
{data?.gold_num}
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
color: "#FFFFFF80",
|
||||||
|
...tailwind("text-sm font-medium"),
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Text style={tailwind("text-2xl font-medium text-white")}>
|
金币
|
||||||
{data?.gold_num}
|
</Text>
|
||||||
</Text>
|
</TouchableOpacity>
|
||||||
<Text
|
<TouchableOpacity
|
||||||
style={{
|
onPress={() => navigation.navigate("Wallet")}
|
||||||
color: "#FFFFFF80",
|
style={tailwind("flex flex-col items-center w-1/4")}
|
||||||
...tailwind("text-sm font-medium"),
|
>
|
||||||
}}
|
<Text style={tailwind("text-2xl font-medium text-white")}>
|
||||||
>
|
{data?.diamond_num}
|
||||||
金币
|
</Text>
|
||||||
</Text>
|
<Text
|
||||||
</TouchableOpacity>
|
style={{
|
||||||
)}
|
color: "#FFFFFF80",
|
||||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
...tailwind("text-sm font-medium"),
|
||||||
<TouchableOpacity
|
}}
|
||||||
onPress={() => navigation.navigate("Wallet")}
|
|
||||||
style={tailwind("flex flex-col items-center w-1/4")}
|
|
||||||
>
|
>
|
||||||
<Text style={tailwind("text-2xl font-medium text-white")}>
|
钻石
|
||||||
{data?.diamond_num}
|
</Text>
|
||||||
</Text>
|
</TouchableOpacity>
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
color: "#FFFFFF80",
|
|
||||||
...tailwind("text-sm font-medium"),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
钻石
|
|
||||||
</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
{/* 会员 */}
|
{/* 会员 */}
|
||||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
<TouchableOpacity
|
||||||
<TouchableOpacity
|
activeOpacity={1}
|
||||||
activeOpacity={1}
|
onPress={() =>
|
||||||
onPress={() =>
|
navigation.navigate("WebWithoutHeader", {
|
||||||
navigation.navigate("WebWithoutHeader", {
|
uri: process.env.EXPO_PUBLIC_WEB_URL + "/vip",
|
||||||
uri: process.env.EXPO_PUBLIC_WEB_URL + "/vip",
|
})
|
||||||
})
|
}
|
||||||
}
|
style={tailwind(
|
||||||
style={tailwind(
|
"flex flex-col p-2.5 rounded-2xl mt-3.5 bg-[#301024]"
|
||||||
"flex flex-col p-2.5 rounded-2xl mt-3.5 bg-[#301024]"
|
)}
|
||||||
)}
|
>
|
||||||
|
<View
|
||||||
|
style={tailwind("flex flex-row justify-between items-center")}
|
||||||
>
|
>
|
||||||
<View
|
<View style={tailwind("flex flex-col")}>
|
||||||
style={tailwind("flex flex-row justify-between items-center")}
|
<View style={tailwind("flex flex-row items-center")}>
|
||||||
>
|
<NativeImage
|
||||||
<View style={tailwind("flex flex-col")}>
|
source={require("../../assets/icon/others/vipsmall.png")}
|
||||||
<View style={tailwind("flex flex-row items-center")}>
|
/>
|
||||||
<NativeImage
|
|
||||||
source={require("../../assets/icon/others/vipsmall.png")}
|
|
||||||
/>
|
|
||||||
<Text
|
|
||||||
style={tailwind("text-base text-[#FF669E] font-medium")}
|
|
||||||
>
|
|
||||||
{data?.is_a_member !== 1
|
|
||||||
? "开通会员保存图片"
|
|
||||||
: "尊贵的永久会员"}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
<Text
|
<Text
|
||||||
style={tailwind("text-sm text-[#FFFFFF40] font-medium")}
|
style={tailwind("text-base text-[#FF669E] font-medium")}
|
||||||
>
|
>
|
||||||
{data?.is_a_member !== 1
|
{data?.is_a_member !== 1
|
||||||
? "限时优惠活动"
|
? "开通会员保存图片"
|
||||||
: "已解锁全部会员权益"}
|
: "尊贵的永久会员"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
{data?.is_a_member !== 1 && (
|
<Text style={tailwind("text-sm text-[#FFFFFF40] font-medium")}>
|
||||||
<View
|
{data?.is_a_member !== 1
|
||||||
style={tailwind(
|
? "限时优惠活动"
|
||||||
"flex justify-center items-center h-9 bg-[#FF669E] rounded-full px-4"
|
: "已解锁全部会员权益"}
|
||||||
)}
|
</Text>
|
||||||
>
|
|
||||||
<Text style={tailwind("text-white text-sm font-medium")}>
|
|
||||||
¥{vipPrice}/永久
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
{data?.is_a_member !== 1 && (
|
||||||
)}
|
<View
|
||||||
|
style={tailwind(
|
||||||
|
"flex justify-center items-center h-9 bg-[#FF669E] rounded-full px-4"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Text style={tailwind("text-white text-sm font-medium")}>
|
||||||
|
¥{vipPrice}/永久
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
{/* 纵向列表设置区 */}
|
{/* 纵向列表设置区 */}
|
||||||
{data?.role === 3 && (
|
{data?.role === 3 && (
|
||||||
<View
|
<View
|
||||||
|
@ -537,54 +529,48 @@ export default function My({ navigation }) {
|
||||||
borderColor: "#2c2b2f",
|
borderColor: "#2c2b2f",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
<TouchableOpacity
|
||||||
<TouchableOpacity
|
onPress={() => navigation.navigate("Wallet")}
|
||||||
onPress={() => navigation.navigate("Wallet")}
|
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
||||||
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
>
|
||||||
>
|
<NativeImage
|
||||||
<NativeImage
|
source={require("../../assets/icon/32DP/wallet.png")}
|
||||||
source={require("../../assets/icon/32DP/wallet.png")}
|
/>
|
||||||
/>
|
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
|
||||||
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
|
我的钱包
|
||||||
我的钱包
|
</Text>
|
||||||
</Text>
|
<NativeImage
|
||||||
<NativeImage
|
source={require("../../assets/icon/32DP/smalllink.png")}
|
||||||
source={require("../../assets/icon/32DP/smalllink.png")}
|
/>
|
||||||
/>
|
</TouchableOpacity>
|
||||||
</TouchableOpacity>
|
<TouchableOpacity
|
||||||
)}
|
onPress={() => navigation.navigate("UnlockedWechat")}
|
||||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
||||||
<TouchableOpacity
|
>
|
||||||
onPress={() => navigation.navigate("UnlockedWechat")}
|
<NativeImage
|
||||||
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
source={require("../../assets/icon/32DP/wechat.png")}
|
||||||
>
|
/>
|
||||||
<NativeImage
|
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
|
||||||
source={require("../../assets/icon/32DP/wechat.png")}
|
已解锁微信
|
||||||
/>
|
</Text>
|
||||||
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
|
<NativeImage
|
||||||
已解锁微信
|
source={require("../../assets/icon/32DP/smalllink.png")}
|
||||||
</Text>
|
/>
|
||||||
<NativeImage
|
</TouchableOpacity>
|
||||||
source={require("../../assets/icon/32DP/smalllink.png")}
|
<TouchableOpacity
|
||||||
/>
|
onPress={() => navigation.navigate("StreamerVerification")}
|
||||||
</TouchableOpacity>
|
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
||||||
)}
|
>
|
||||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
<NativeImage
|
||||||
<TouchableOpacity
|
source={require("../../assets/icon/32DP/join.png")}
|
||||||
onPress={() => navigation.navigate("StreamerVerification")}
|
/>
|
||||||
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
|
||||||
>
|
申请入驻
|
||||||
<NativeImage
|
</Text>
|
||||||
source={require("../../assets/icon/32DP/join.png")}
|
<NativeImage
|
||||||
/>
|
source={require("../../assets/icon/32DP/smalllink.png")}
|
||||||
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
|
/>
|
||||||
申请入驻
|
</TouchableOpacity>
|
||||||
</Text>
|
|
||||||
<NativeImage
|
|
||||||
source={require("../../assets/icon/32DP/smalllink.png")}
|
|
||||||
/>
|
|
||||||
</TouchableOpacity>
|
|
||||||
)}
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() =>
|
onPress={() =>
|
||||||
navigation.navigate("MessageDetail", {
|
navigation.navigate("MessageDetail", {
|
||||||
|
|
|
@ -37,17 +37,6 @@ export default function StreamerProfile({ navigation, route }) {
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
const headerHeight = useHeaderHeight();
|
const headerHeight = useHeaderHeight();
|
||||||
|
|
||||||
//判断是否是测试账号
|
|
||||||
const [isTester, setIsTester] = useState(false);
|
|
||||||
useEffect(() => {
|
|
||||||
const checkTester = async () => {
|
|
||||||
const account = await get("account");
|
|
||||||
if (account.user_id === 314826 || account.user_id === 989430)
|
|
||||||
setIsTester(true);
|
|
||||||
};
|
|
||||||
checkTester();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
//设置header右侧按钮功能
|
//设置header右侧按钮功能
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
navigation.setOptions({
|
navigation.setOptions({
|
||||||
|
@ -650,11 +639,43 @@ export default function StreamerProfile({ navigation, route }) {
|
||||||
style={tailwind("h-[3px] rounded-full bg-[#FFFFFF26]")}
|
style={tailwind("h-[3px] rounded-full bg-[#FFFFFF26]")}
|
||||||
></View>
|
></View>
|
||||||
{/* 空间动态 */}
|
{/* 空间动态 */}
|
||||||
{spaceData &&
|
{spaceData && spaceData?.previews?.images?.length > 0 && (
|
||||||
spaceData?.previews?.images?.length > 0 &&
|
<View>
|
||||||
!isTester && (
|
<View style={tailwind("my-4")}>
|
||||||
<View>
|
<TouchableOpacity
|
||||||
<View style={tailwind("my-4")}>
|
activeOpacity={1}
|
||||||
|
onPress={
|
||||||
|
spaceData?.visitor_role === 4
|
||||||
|
? () =>
|
||||||
|
navigation.navigate("SpaceIntroduce", {
|
||||||
|
mid: route.params.mid,
|
||||||
|
})
|
||||||
|
: () =>
|
||||||
|
navigation.navigate("StreamerSpace", {
|
||||||
|
mid: route.params.mid,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
style={tailwind(
|
||||||
|
"flex flex-row justify-between items-center"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
style={tailwind(
|
||||||
|
"text-base font-semibold text-white mb-2"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
空间动态
|
||||||
|
</Text>
|
||||||
|
<View style={tailwind("flex flex-row items-center")}>
|
||||||
|
<Text style={tailwind("text-sm text-[#FFFFFFB2]")}>
|
||||||
|
查看{spaceData?.zone_moment_count}条
|
||||||
|
</Text>
|
||||||
|
<NativeImage
|
||||||
|
source={require("../../assets/icon/32DP/smalllink.png")}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
<ScrollView horizontal>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
activeOpacity={1}
|
activeOpacity={1}
|
||||||
onPress={
|
onPress={
|
||||||
|
@ -668,77 +689,43 @@ export default function StreamerProfile({ navigation, route }) {
|
||||||
mid: route.params.mid,
|
mid: route.params.mid,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
style={tailwind(
|
style={{
|
||||||
"flex flex-row justify-between items-center"
|
height: 100,
|
||||||
)}
|
gap: 4,
|
||||||
|
...tailwind("flex flex-row"),
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Text
|
{spaceData?.previews?.images?.map((item, index) => {
|
||||||
style={tailwind(
|
if (index > 3) return;
|
||||||
"text-base font-semibold text-white mb-2"
|
return (
|
||||||
)}
|
<Image
|
||||||
>
|
key={index}
|
||||||
空间动态
|
style={{
|
||||||
</Text>
|
aspectRatio: "1",
|
||||||
<View style={tailwind("flex flex-row items-center")}>
|
...tailwind("h-full rounded"),
|
||||||
<Text style={tailwind("text-sm text-[#FFFFFFB2]")}>
|
}}
|
||||||
查看{spaceData?.zone_moment_count}条
|
blurRadius={
|
||||||
</Text>
|
spaceData?.visitor_role === 4
|
||||||
<NativeImage
|
? Platform.OS === "ios"
|
||||||
source={require("../../assets/icon/32DP/smalllink.png")}
|
? 130
|
||||||
/>
|
: 10
|
||||||
</View>
|
: 0
|
||||||
|
}
|
||||||
|
source={item?.urls[0]}
|
||||||
|
contentFit="cover"
|
||||||
|
transition={100}
|
||||||
|
cachePolicy="disk"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<ScrollView horizontal>
|
</ScrollView>
|
||||||
<TouchableOpacity
|
|
||||||
activeOpacity={1}
|
|
||||||
onPress={
|
|
||||||
spaceData?.visitor_role === 4
|
|
||||||
? () =>
|
|
||||||
navigation.navigate("SpaceIntroduce", {
|
|
||||||
mid: route.params.mid,
|
|
||||||
})
|
|
||||||
: () =>
|
|
||||||
navigation.navigate("StreamerSpace", {
|
|
||||||
mid: route.params.mid,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
style={{
|
|
||||||
height: 100,
|
|
||||||
gap: 4,
|
|
||||||
...tailwind("flex flex-row"),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{spaceData?.previews?.images?.map((item, index) => {
|
|
||||||
if (index > 3) return;
|
|
||||||
return (
|
|
||||||
<Image
|
|
||||||
key={index}
|
|
||||||
style={{
|
|
||||||
aspectRatio: "1",
|
|
||||||
...tailwind("h-full rounded"),
|
|
||||||
}}
|
|
||||||
blurRadius={
|
|
||||||
spaceData?.visitor_role === 4
|
|
||||||
? Platform.OS === "ios"
|
|
||||||
? 130
|
|
||||||
: 10
|
|
||||||
: 0
|
|
||||||
}
|
|
||||||
source={item?.urls[0]}
|
|
||||||
contentFit="cover"
|
|
||||||
transition={100}
|
|
||||||
cachePolicy="disk"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</TouchableOpacity>
|
|
||||||
</ScrollView>
|
|
||||||
</View>
|
|
||||||
<View
|
|
||||||
style={tailwind("h-[3px] rounded-full bg-[#FFFFFF26]")}
|
|
||||||
></View>
|
|
||||||
</View>
|
</View>
|
||||||
)}
|
<View
|
||||||
|
style={tailwind("h-[3px] rounded-full bg-[#FFFFFF26]")}
|
||||||
|
></View>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
{/* 动态 */}
|
{/* 动态 */}
|
||||||
{!spaceData && postsData.length !== 0 && (
|
{!spaceData && postsData.length !== 0 && (
|
||||||
<View>
|
<View>
|
||||||
|
@ -820,29 +807,25 @@ export default function StreamerProfile({ navigation, route }) {
|
||||||
<Text style={tailwind("text-base text-white font-semibold mb-2")}>
|
<Text style={tailwind("text-base text-white font-semibold mb-2")}>
|
||||||
来这找我玩
|
来这找我玩
|
||||||
</Text>
|
</Text>
|
||||||
{!isTester && (
|
<View
|
||||||
<View
|
style={tailwind(
|
||||||
style={tailwind(
|
"flex-row items-center p-2 h-12 rounded-xl border-2 border-[#2c2b2f]"
|
||||||
"flex-row items-center p-2 h-12 rounded-xl border-2 border-[#2c2b2f]"
|
)}
|
||||||
)}
|
>
|
||||||
|
<NativeImage
|
||||||
|
source={require("../../assets/images/platform_wechat.png")}
|
||||||
|
style={{ aspectRatio: "1/1", ...tailwind("w-8") }}
|
||||||
|
/>
|
||||||
|
<Text style={tailwind("text-sm text-white ml-1")}>微信:</Text>
|
||||||
|
<Text
|
||||||
|
onPress={() => setIsAddWechatModalVisible(true)}
|
||||||
|
style={tailwind("text-sm text-[#3B69B8] ml-1")}
|
||||||
|
numberOfLines={1}
|
||||||
|
ellipsizeMode="tail"
|
||||||
>
|
>
|
||||||
<NativeImage
|
点击查看
|
||||||
source={require("../../assets/images/platform_wechat.png")}
|
</Text>
|
||||||
style={{ aspectRatio: "1/1", ...tailwind("w-8") }}
|
</View>
|
||||||
/>
|
|
||||||
<Text style={tailwind("text-sm text-white ml-1")}>
|
|
||||||
微信:
|
|
||||||
</Text>
|
|
||||||
<Text
|
|
||||||
onPress={() => setIsAddWechatModalVisible(true)}
|
|
||||||
style={tailwind("text-sm text-[#3B69B8] ml-1")}
|
|
||||||
numberOfLines={1}
|
|
||||||
ellipsizeMode="tail"
|
|
||||||
>
|
|
||||||
点击查看
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
{data?.platforms?.map((item) => (
|
{data?.platforms?.map((item) => (
|
||||||
<PlatformList key={item?.id} item={item} />
|
<PlatformList key={item?.id} item={item} />
|
||||||
))}
|
))}
|
||||||
|
@ -880,18 +863,16 @@ export default function StreamerProfile({ navigation, route }) {
|
||||||
>
|
>
|
||||||
<Text style={tailwind("text-base text-white font-medium")}>私聊</Text>
|
<Text style={tailwind("text-base text-white font-medium")}>私聊</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
{!isTester && (
|
<TouchableOpacity
|
||||||
<TouchableOpacity
|
onPress={() => setIsAddWechatModalVisible(true)}
|
||||||
onPress={() => setIsAddWechatModalVisible(true)}
|
style={tailwind(
|
||||||
style={tailwind(
|
"flex-row flex-1 bg-[#FF669E] items-center justify-center h-10 rounded-full"
|
||||||
"flex-row flex-1 bg-[#FF669E] items-center justify-center h-10 rounded-full"
|
)}
|
||||||
)}
|
>
|
||||||
>
|
<Text style={tailwind("text-base text-white font-medium")}>
|
||||||
<Text style={tailwind("text-base text-white font-medium")}>
|
添加微信
|
||||||
添加微信
|
</Text>
|
||||||
</Text>
|
</TouchableOpacity>
|
||||||
</TouchableOpacity>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
{/* 拉黑、举报Modal */}
|
{/* 拉黑、举报Modal */}
|
||||||
<NavbarRightModal />
|
<NavbarRightModal />
|
||||||
|
|
|
@ -1,24 +1,13 @@
|
||||||
import { View, Text, ScrollView } from "react-native";
|
import { View, Text, ScrollView } from "react-native";
|
||||||
import React, { useState, useEffect } from "react";
|
import React from "react";
|
||||||
import { useTailwind } from "tailwind-rn";
|
import { useTailwind } from "tailwind-rn";
|
||||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
import { Skeleton } from "@rneui/themed";
|
import { Skeleton } from "@rneui/themed";
|
||||||
import { get } from "../../utils/storeInfo";
|
|
||||||
|
|
||||||
export default function StreamerProfileSkeleton() {
|
export default function StreamerProfileSkeleton() {
|
||||||
const tailwind = useTailwind();
|
const tailwind = useTailwind();
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
|
|
||||||
const [isTester, setIsTester] = useState(false);
|
|
||||||
useEffect(() => {
|
|
||||||
const checkIsTester = async () => {
|
|
||||||
const account = await get("account");
|
|
||||||
if (account.user_id === 314826 || account.user_id === 989430)
|
|
||||||
setIsTester(true);
|
|
||||||
};
|
|
||||||
checkIsTester();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
@ -184,17 +173,15 @@ export default function StreamerProfileSkeleton() {
|
||||||
>
|
>
|
||||||
<Text style={tailwind("text-base text-white font-medium")}>私聊</Text>
|
<Text style={tailwind("text-base text-white font-medium")}>私聊</Text>
|
||||||
</View>
|
</View>
|
||||||
{!isTester && (
|
<View
|
||||||
<View
|
style={tailwind(
|
||||||
style={tailwind(
|
"flex-row flex-1 bg-[#FF669E] items-center justify-center h-10 rounded-full"
|
||||||
"flex-row flex-1 bg-[#FF669E] items-center justify-center h-10 rounded-full"
|
)}
|
||||||
)}
|
>
|
||||||
>
|
<Text style={tailwind("text-base text-white font-medium")}>
|
||||||
<Text style={tailwind("text-base text-white font-medium")}>
|
添加微信
|
||||||
添加微信
|
</Text>
|
||||||
</Text>
|
</View>
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue