Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
yezian | c897097986 | |
yezian | 3ed60788ac |
2
app.json
2
app.json
|
@ -2,7 +2,7 @@
|
|||
"expo": {
|
||||
"name": "铁粉空间",
|
||||
"slug": "ironfans",
|
||||
"version": "1.2.7",
|
||||
"version": "1.4.0",
|
||||
"orientation": "portrait",
|
||||
"icon": "./assets/icon.png",
|
||||
"splash": {
|
||||
|
|
|
@ -57,6 +57,16 @@ export function ImageViewer({
|
|||
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(
|
||||
({ cancel, saveToLocal }) => (
|
||||
<Modal
|
||||
|
@ -188,7 +198,10 @@ export function ImageViewer({
|
|||
}
|
||||
return <Image {...props} />;
|
||||
}}
|
||||
renderFooter={(index) => (
|
||||
renderFooter={
|
||||
isTester
|
||||
? () => null
|
||||
: (index) => (
|
||||
<TouchableOpacity
|
||||
onPress={() => hanldSaveImage(index)}
|
||||
style={{
|
||||
|
@ -209,7 +222,8 @@ export function ImageViewer({
|
|||
/>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
)
|
||||
}
|
||||
onSave={(url) => {
|
||||
saveImage(url);
|
||||
}}
|
||||
|
|
|
@ -19,11 +19,21 @@ import Toast from "react-native-toast-message";
|
|||
import { get } from "../../utils/storeInfo";
|
||||
import { useImageViewer } from "../../context/ImageViewProvider";
|
||||
|
||||
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
|
||||
const blurhash = "LcKUT«a%gOYWBYRt6xuoJo~s8V@fk";
|
||||
|
||||
export default function Post({ isBlur, data }) {
|
||||
const blur = data?.top ? false : isBlur;
|
||||
|
||||
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 navigation = useNavigation();
|
||||
const [like, setLike] = useState(data?.is_thumbed_up === 1 ? true : false);
|
||||
|
@ -183,7 +193,8 @@ export default function Post({ isBlur, data }) {
|
|||
<View
|
||||
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
|
||||
onPress={() =>
|
||||
navigation.navigate("SpaceIntroduce", { mid: data?.mid })
|
||||
|
@ -206,7 +217,8 @@ export default function Post({ isBlur, data }) {
|
|||
/>
|
||||
</TouchableOpacity>
|
||||
) : (
|
||||
data?.streamer_ext?.zones?.length !== 0 && (
|
||||
data?.streamer_ext?.zones?.length !== 0 &&
|
||||
!isTester && (
|
||||
<TouchableOpacity
|
||||
onPress={() =>
|
||||
navigation.navigate("SpaceIntroduce", { mid: data?.mid })
|
||||
|
|
|
@ -12,10 +12,13 @@ const Tab = createBottomTabNavigator();
|
|||
|
||||
export default function HomeTab({ navigation, route }) {
|
||||
const [isCreatePostTabVisible, setIsCreatePostTabVisible] = useState(false);
|
||||
const [isTester, setIsTester] = useState(false);
|
||||
useEffect(() => {
|
||||
const checkRole = async () => {
|
||||
const account = await get("account");
|
||||
if (account.role === 3) setIsCreatePostTabVisible(true);
|
||||
if (account.user_id === 314826 || account.user_id === 989430)
|
||||
setIsTester(true);
|
||||
};
|
||||
checkRole();
|
||||
}, []);
|
||||
|
@ -81,6 +84,7 @@ export default function HomeTab({ navigation, route }) {
|
|||
},
|
||||
}}
|
||||
/>
|
||||
{!isTester && (
|
||||
<Tab.Screen
|
||||
name="Space"
|
||||
component={Space}
|
||||
|
@ -104,6 +108,7 @@ export default function HomeTab({ navigation, route }) {
|
|||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{isCreatePostTabVisible && (
|
||||
<Tab.Screen
|
||||
name="Publish"
|
||||
|
|
|
@ -306,6 +306,7 @@ export default function My({ navigation }) {
|
|||
粉丝
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
||||
<TouchableOpacity
|
||||
onPress={() => navigation.navigate("Wallet")}
|
||||
style={tailwind("flex flex-col items-center w-1/4")}
|
||||
|
@ -322,6 +323,8 @@ export default function My({ navigation }) {
|
|||
金币
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
||||
<TouchableOpacity
|
||||
onPress={() => navigation.navigate("Wallet")}
|
||||
style={tailwind("flex flex-col items-center w-1/4")}
|
||||
|
@ -338,8 +341,10 @@ export default function My({ navigation }) {
|
|||
钻石
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
{/* 会员 */}
|
||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
||||
<TouchableOpacity
|
||||
activeOpacity={1}
|
||||
onPress={() =>
|
||||
|
@ -367,7 +372,9 @@ export default function My({ navigation }) {
|
|||
: "尊贵的永久会员"}
|
||||
</Text>
|
||||
</View>
|
||||
<Text style={tailwind("text-sm text-[#FFFFFF40] font-medium")}>
|
||||
<Text
|
||||
style={tailwind("text-sm text-[#FFFFFF40] font-medium")}
|
||||
>
|
||||
{data?.is_a_member !== 1
|
||||
? "限时优惠活动"
|
||||
: "已解锁全部会员权益"}
|
||||
|
@ -386,6 +393,7 @@ export default function My({ navigation }) {
|
|||
)}
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{/* 纵向列表设置区 */}
|
||||
{data?.role === 3 && (
|
||||
<View
|
||||
|
@ -521,6 +529,7 @@ export default function My({ navigation }) {
|
|||
borderColor: "#2c2b2f",
|
||||
}}
|
||||
>
|
||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
||||
<TouchableOpacity
|
||||
onPress={() => navigation.navigate("Wallet")}
|
||||
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
||||
|
@ -535,6 +544,8 @@ export default function My({ navigation }) {
|
|||
source={require("../../assets/icon/32DP/smalllink.png")}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
||||
<TouchableOpacity
|
||||
onPress={() => navigation.navigate("UnlockedWechat")}
|
||||
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
||||
|
@ -549,6 +560,8 @@ export default function My({ navigation }) {
|
|||
source={require("../../assets/icon/32DP/smalllink.png")}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
||||
<TouchableOpacity
|
||||
onPress={() => navigation.navigate("StreamerVerification")}
|
||||
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
|
||||
|
@ -563,6 +576,7 @@ export default function My({ navigation }) {
|
|||
source={require("../../assets/icon/32DP/smalllink.png")}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
<TouchableOpacity
|
||||
onPress={() =>
|
||||
navigation.navigate("MessageDetail", {
|
||||
|
|
|
@ -59,9 +59,12 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
const { isVipVisible } = useVipVisibility();
|
||||
|
||||
//动态是否需要blur
|
||||
const [isTester, setIsTester] = useState(false);
|
||||
const [blur, setBlur] = useState(true);
|
||||
const checkBlur = async () => {
|
||||
const account = await get("account");
|
||||
if (account.user_id === 314826 || account.user_id === 989430)
|
||||
setIsTester(true);
|
||||
const role = account.role;
|
||||
const isVip = account.is_a_member;
|
||||
if (role !== 0 || isVip === 1 || !isVipVisible) {
|
||||
|
@ -658,7 +661,9 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
style={tailwind("h-[3px] rounded-full bg-[#FFFFFF26]")}
|
||||
></View>
|
||||
{/* 空间动态 */}
|
||||
{spaceData && spaceData?.previews?.images?.length > 0 && (
|
||||
{spaceData &&
|
||||
spaceData?.previews?.images?.length > 0 &&
|
||||
!isTester && (
|
||||
<View>
|
||||
<View style={tailwind("my-4")}>
|
||||
<TouchableOpacity
|
||||
|
@ -747,7 +752,7 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
</View>
|
||||
)}
|
||||
{/* 动态 */}
|
||||
{!spaceData && postsData.length !== 0 && (
|
||||
{!spaceData && postsData.length !== 0 && !isTester && (
|
||||
<View>
|
||||
<View style={tailwind("my-4")}>
|
||||
<Text
|
||||
|
@ -831,6 +836,7 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
<Text style={tailwind("text-base text-white font-semibold mb-2")}>
|
||||
来这找我玩
|
||||
</Text>
|
||||
{!isTester && (
|
||||
<View
|
||||
style={tailwind(
|
||||
"flex-row items-center p-2 h-12 rounded-xl border-2 border-[#2c2b2f]"
|
||||
|
@ -840,7 +846,9 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
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 style={tailwind("text-sm text-white ml-1")}>
|
||||
微信:
|
||||
</Text>
|
||||
<Text
|
||||
onPress={() => setIsAddWechatModalVisible(true)}
|
||||
style={tailwind("text-sm text-[#3B69B8] ml-1")}
|
||||
|
@ -850,6 +858,7 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
点击查看
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
{data?.platforms?.map((item) => (
|
||||
<PlatformList key={item?.id} item={item} />
|
||||
))}
|
||||
|
@ -887,6 +896,7 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
>
|
||||
<Text style={tailwind("text-base text-white font-medium")}>私聊</Text>
|
||||
</TouchableOpacity>
|
||||
{!isTester && (
|
||||
<TouchableOpacity
|
||||
onPress={() => setIsAddWechatModalVisible(true)}
|
||||
style={tailwind(
|
||||
|
@ -897,6 +907,7 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
添加微信
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
{/* 拉黑、举报Modal */}
|
||||
<NavbarRightModal />
|
||||
|
|
|
@ -1,13 +1,24 @@
|
|||
import { View, Text, ScrollView } from "react-native";
|
||||
import React from "react";
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useTailwind } from "tailwind-rn";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import { Skeleton } from "@rneui/themed";
|
||||
import { get } from "../../utils/storeInfo";
|
||||
|
||||
export default function StreamerProfileSkeleton() {
|
||||
const tailwind = useTailwind();
|
||||
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 (
|
||||
<View
|
||||
style={{
|
||||
|
@ -173,6 +184,7 @@ export default function StreamerProfileSkeleton() {
|
|||
>
|
||||
<Text style={tailwind("text-base text-white font-medium")}>私聊</Text>
|
||||
</View>
|
||||
{!isTester && (
|
||||
<View
|
||||
style={tailwind(
|
||||
"flex-row flex-1 bg-[#FF669E] items-center justify-center h-10 rounded-full"
|
||||
|
@ -182,6 +194,7 @@ export default function StreamerProfileSkeleton() {
|
|||
添加微信
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue