针对user_id:314826进行付费功能限制

This commit is contained in:
yezian 2024-03-25 14:41:16 +08:00
parent e472d83bba
commit 7cfb8b226f
3 changed files with 107 additions and 88 deletions

View File

@ -271,22 +271,24 @@ export default function My({ navigation }) {
粉丝
</Text>
</TouchableOpacity>
<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?.gold_num}
</Text>
<Text
style={{
color: "#FFFFFF80",
...tailwind("text-sm font-medium"),
}}
{data?.user_id !== 314826 && (
<TouchableOpacity
onPress={() => navigation.navigate("Wallet")}
style={tailwind("flex flex-col items-center w-1/4")}
>
金币
</Text>
</TouchableOpacity>
<Text style={tailwind("text-2xl font-medium text-white")}>
{data?.gold_num}
</Text>
<Text
style={{
color: "#FFFFFF80",
...tailwind("text-sm font-medium"),
}}
>
金币
</Text>
</TouchableOpacity>
)}
{data?.role === 3 && (
<TouchableOpacity
onPress={() => navigation.navigate("Wallet")}
@ -307,52 +309,56 @@ export default function My({ navigation }) {
)}
</View>
{/* 会员 */}
<TouchableOpacity
activeOpacity={1}
onPress={() =>
navigation.navigate("WebWithoutHeader", {
uri: process.env.EXPO_PUBLIC_WEB_URL + "/vip",
})
}
style={tailwind(
"flex flex-col p-2.5 rounded-2xl mt-3.5 bg-[#301024]"
)}
>
<View
style={tailwind("flex flex-row justify-between items-center")}
{data?.user_id !== 314826 && (
<TouchableOpacity
activeOpacity={1}
onPress={() =>
navigation.navigate("WebWithoutHeader", {
uri: process.env.EXPO_PUBLIC_WEB_URL + "/vip",
})
}
style={tailwind(
"flex flex-col p-2.5 rounded-2xl mt-3.5 bg-[#301024]"
)}
>
<View style={tailwind("flex flex-col")}>
<View style={tailwind("flex flex-row items-center")}>
<NativeImage
source={require("../../assets/icon/others/vipsmall.png")}
/>
<View
style={tailwind("flex flex-row justify-between items-center")}
>
<View style={tailwind("flex flex-col")}>
<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
style={tailwind("text-base text-[#FF669E] font-medium")}
style={tailwind("text-sm text-[#FFFFFF40] font-medium")}
>
{data?.is_a_member !== 1
? "开通会员订阅动态"
: "尊贵的永久会员"}
? "限时优惠活动"
: "已解锁全部会员权益"}
</Text>
</View>
<Text style={tailwind("text-sm text-[#FFFFFF40] font-medium")}>
{data?.is_a_member !== 1
? "限时优惠活动"
: "已解锁全部会员权益"}
</Text>
{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>
{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>
</TouchableOpacity>
)}
{/* 纵向列表设置区 */}
{data?.role === 3 && (
<View
@ -466,34 +472,38 @@ export default function My({ navigation }) {
borderColor: "#2c2b2f",
}}
>
<TouchableOpacity
onPress={() => navigation.navigate("Wallet")}
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
>
<NativeImage
source={require("../../assets/icon/32DP/wallet.png")}
/>
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
我的钱包
</Text>
<NativeImage
source={require("../../assets/icon/32DP/smalllink.png")}
/>
</TouchableOpacity>
<TouchableOpacity
onPress={() => navigation.navigate("UnlockedWechat")}
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
>
<NativeImage
source={require("../../assets/icon/32DP/wechat.png")}
/>
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
已解锁微信
</Text>
<NativeImage
source={require("../../assets/icon/32DP/smalllink.png")}
/>
</TouchableOpacity>
{data?.user_id !== 314826 && (
<TouchableOpacity
onPress={() => navigation.navigate("Wallet")}
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
>
<NativeImage
source={require("../../assets/icon/32DP/wallet.png")}
/>
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
我的钱包
</Text>
<NativeImage
source={require("../../assets/icon/32DP/smalllink.png")}
/>
</TouchableOpacity>
)}
{data?.user_id !== 314826 && (
<TouchableOpacity
onPress={() => navigation.navigate("UnlockedWechat")}
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}
>
<NativeImage
source={require("../../assets/icon/32DP/wechat.png")}
/>
<Text style={tailwind("text-base text-white ml-2 flex-1")}>
已解锁微信
</Text>
<NativeImage
source={require("../../assets/icon/32DP/smalllink.png")}
/>
</TouchableOpacity>
)}
<TouchableOpacity
onPress={() => navigation.navigate("StreamerVerification")}
style={tailwind("flex flex-row h-12 items-center pr-2 pl-4")}

View File

@ -78,7 +78,8 @@ export default function Posts({ navigation }) {
}
const role = accountData.data.account.role;
const isVip = accountData.data.account.is_a_member;
if (role !== 0 || isVip === 1) {
const userId = accountData.data.account.user_id;
if (role !== 0 || isVip === 1 || userId === 314826) {
setBlur(false);
} else {
setBlur(true);

View File

@ -120,11 +120,19 @@ export default function Wallet({ navigation, route }) {
)}
>
<TouchableOpacity
onPress={() =>
navigation.navigate("WebWithHeader", {
title: "充值中心",
uri: process.env.EXPO_PUBLIC_WEB_URL + "/pay",
})
onPress={
data?.user_id === 314826
? () =>
Toast.show({
type: "error",
text1: "ios暂无充值渠道请耐心等候",
topOffset: 60,
})
: () =>
navigation.navigate("WebWithHeader", {
title: "充值中心",
uri: process.env.EXPO_PUBLIC_WEB_URL + "/pay",
})
}
style={tailwind("flex-row justify-between items-center py-4")}
>