修改权限请求弹窗;针对989430测试号去除付费逻辑
This commit is contained in:
parent
896d2b713f
commit
4e4d5ba89b
|
@ -306,25 +306,23 @@ export default function MediaPickerModal({
|
|||
title="权限申请"
|
||||
content="该功能需要开启存储权限,用于选择上传媒体文件"
|
||||
confirmText="继续"
|
||||
cancel={() => {
|
||||
setRequestModalVisible(false);
|
||||
}}
|
||||
confirm={() => {
|
||||
custom={() => {
|
||||
setRequestModalVisible(false);
|
||||
requestMediaLibraryPermissions();
|
||||
}}
|
||||
customText="继续"
|
||||
/>
|
||||
<MyModal
|
||||
visible={overlayVisible}
|
||||
setVisible={setOverlayVisible}
|
||||
title="未获得相册权限"
|
||||
content="请先前往设置打开相关权限后重试"
|
||||
confirmText="继续"
|
||||
confirmText="去设置"
|
||||
cancel={() => {
|
||||
setOverlayVisible(false);
|
||||
}}
|
||||
confirm={() => {
|
||||
// Linking.openSettings();
|
||||
Linking.openSettings();
|
||||
setOverlayVisible(false);
|
||||
}}
|
||||
/>
|
||||
|
|
|
@ -8,6 +8,8 @@ export default function MyModal({
|
|||
title,
|
||||
content,
|
||||
confirm,
|
||||
custom,
|
||||
customText,
|
||||
confirmText,
|
||||
cancelText,
|
||||
}) {
|
||||
|
@ -41,32 +43,53 @@ export default function MyModal({
|
|||
{content}
|
||||
</Text>
|
||||
<View style={tailwind("flex-row justify-around")}>
|
||||
<TouchableOpacity
|
||||
onPress={() => setVisible(false)}
|
||||
style={tailwind(
|
||||
"border-r-2 border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
{custom ? (
|
||||
<TouchableOpacity
|
||||
onPress={custom}
|
||||
style={tailwind(
|
||||
"text-[#FFFFFF80] text-base font-medium text-center"
|
||||
"border-t-2 border-[#2c2b2f] w-full pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
{cancelText ? cancelText : "取消"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
onPress={confirm}
|
||||
style={tailwind(
|
||||
"border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
style={tailwind("text-white text-base font-medium text-center")}
|
||||
>
|
||||
{confirmText ? confirmText : "确认"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<Text
|
||||
style={tailwind(
|
||||
"text-white text-base font-medium text-center"
|
||||
)}
|
||||
>
|
||||
{customText ? customText : "确认"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
) : (
|
||||
<>
|
||||
<TouchableOpacity
|
||||
onPress={() => setVisible(false)}
|
||||
style={tailwind(
|
||||
"border-r-2 border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
style={tailwind(
|
||||
"text-[#FFFFFF80] text-base font-medium text-center"
|
||||
)}
|
||||
>
|
||||
{cancelText ? cancelText : "取消"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
onPress={confirm}
|
||||
style={tailwind(
|
||||
"border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
style={tailwind(
|
||||
"text-white text-base font-medium text-center"
|
||||
)}
|
||||
>
|
||||
{confirmText ? confirmText : "确认"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
@ -202,7 +202,9 @@ export default function My({ navigation }) {
|
|||
<Text
|
||||
style={{
|
||||
color:
|
||||
data?.is_a_member === 1 && data?.user_id !== 314826
|
||||
data?.is_a_member === 1 &&
|
||||
data?.user_id !== 314826 &&
|
||||
data?.user_id !== 989430
|
||||
? "#FFADBE"
|
||||
: "white",
|
||||
...tailwind("text-2xl font-medium"),
|
||||
|
@ -212,11 +214,13 @@ export default function My({ navigation }) {
|
|||
>
|
||||
{data?.name}
|
||||
</Text>
|
||||
{data?.is_a_member === 1 && data?.user_id !== 314826 && (
|
||||
<NativeImage
|
||||
source={require("../../assets/icon/others/vipbig.png")}
|
||||
/>
|
||||
)}
|
||||
{data?.is_a_member === 1 &&
|
||||
data?.user_id !== 314826 &&
|
||||
data?.user_id !== 989430 && (
|
||||
<NativeImage
|
||||
source={require("../../assets/icon/others/vipbig.png")}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
<View style={tailwind("flex-row")}>
|
||||
<View
|
||||
|
@ -274,7 +278,7 @@ export default function My({ navigation }) {
|
|||
粉丝
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
{data?.user_id !== 314826 && (
|
||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
||||
<TouchableOpacity
|
||||
onPress={() => navigation.navigate("Wallet")}
|
||||
style={tailwind("flex flex-col items-center w-1/4")}
|
||||
|
@ -312,7 +316,7 @@ export default function My({ navigation }) {
|
|||
)}
|
||||
</View>
|
||||
{/* 会员 */}
|
||||
{data?.user_id !== 314826 && (
|
||||
{data?.user_id !== 314826 && data?.user_id !== 989430 && (
|
||||
<TouchableOpacity
|
||||
activeOpacity={1}
|
||||
onPress={() =>
|
||||
|
@ -475,7 +479,7 @@ export default function My({ navigation }) {
|
|||
borderColor: "#2c2b2f",
|
||||
}}
|
||||
>
|
||||
{data?.user_id !== 314826 && (
|
||||
{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")}
|
||||
|
@ -491,7 +495,7 @@ export default function My({ navigation }) {
|
|||
/>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{data?.user_id !== 314826 && (
|
||||
{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")}
|
||||
|
@ -507,7 +511,7 @@ export default function My({ navigation }) {
|
|||
/>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{data?.user_id !== 314826 && (
|
||||
{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")}
|
||||
|
|
|
@ -211,7 +211,7 @@ export default function FeedPosts({ blur }) {
|
|||
const checkUserId = async () => {
|
||||
const account = await get("account");
|
||||
const userId = account.user_id;
|
||||
if (userId === 314826) {
|
||||
if (userId === 314826 || userId === 989430) {
|
||||
setIsVipBannerVisible(false);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ export default function FollowPosts({ blur }) {
|
|||
const checkUserId = async () => {
|
||||
const account = await get("account");
|
||||
const userId = account.user_id;
|
||||
if (userId === 314826) {
|
||||
if (userId === 314826 || userId === 989430) {
|
||||
setIsVipBannerVisible(false);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,12 @@ export default function Posts({ navigation }) {
|
|||
const role = accountData.data.account.role;
|
||||
const isVip = accountData.data.account.is_a_member;
|
||||
const userId = accountData.data.account.user_id;
|
||||
if (role !== 0 || isVip === 1 || userId === 314826) {
|
||||
if (
|
||||
role !== 0 ||
|
||||
isVip === 1 ||
|
||||
userId === 314826 ||
|
||||
userId === 989430
|
||||
) {
|
||||
setBlur(false);
|
||||
} else {
|
||||
setBlur(true);
|
||||
|
|
|
@ -72,7 +72,7 @@ export default function StreamerProfile({ navigation, route }) {
|
|||
const checkUserId = async () => {
|
||||
const account = await get("account");
|
||||
const userId = account.user_id;
|
||||
if (userId === 314826) {
|
||||
if (userId === 314826 || userId === 989430) {
|
||||
setIsWechatButtonVisible(false);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ export default function StreamerProfileSkeleton() {
|
|||
const checkUserId = async () => {
|
||||
const account = await get("account");
|
||||
const userId = account.user_id;
|
||||
if (userId === 314826) {
|
||||
if (userId === 314826 || userId === 989430) {
|
||||
setIsWechatButtonVisible(false);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ export default function Wallet({ navigation, route }) {
|
|||
>
|
||||
<TouchableOpacity
|
||||
onPress={
|
||||
data?.user_id === 314826
|
||||
data?.user_id === 314826 || data?.user_id === 989430
|
||||
? () =>
|
||||
Toast.show({
|
||||
type: "error",
|
||||
|
|
Loading…
Reference in New Issue