Compare commits
1 Commits
main
...
anln_00000
Author | SHA1 | Date |
---|---|---|
|
66a5870cb8 |
|
@ -103,8 +103,8 @@ export default function EditSpacePost({ navigation, route }) {
|
|||
: text
|
||||
);
|
||||
setPrice((price ? price / 100 : 0).toString());
|
||||
setTextVisibleRange(text_visible_range.toString());
|
||||
setImageVisibleRange(media_visible_range.toString());
|
||||
setTextVisibleRange(text_visible_range?.toString());
|
||||
setImageVisibleRange(media_visible_range?.toString());
|
||||
setBlurCover(is_blurring_cover === 1);
|
||||
setIsFreeForIronfan(is_ironfan_visible === 1);
|
||||
setPaidText(paid_text ? paid_text.substring(1) : "");
|
||||
|
|
|
@ -635,9 +635,6 @@ export default function My({ navigation }) {
|
|||
remainCompleteInformation(() =>
|
||||
navigation.navigate("Refund", {
|
||||
screen: "RefundList",
|
||||
params: {
|
||||
b_mid: data.mid,
|
||||
},
|
||||
})
|
||||
)
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ export default function RefundDetail({ navigation, route }) {
|
|||
...base,
|
||||
audit_id: route.params.id,
|
||||
});
|
||||
|
||||
try {
|
||||
const refundResponse = await fetch(
|
||||
`${apiUrl}/api/zone/refund_info?signature=${signature}`,
|
||||
|
@ -48,7 +49,9 @@ export default function RefundDetail({ navigation, route }) {
|
|||
}),
|
||||
}
|
||||
);
|
||||
|
||||
const refundData = await refundResponse.json();
|
||||
|
||||
if (refundData.ret === -1) {
|
||||
Toast.show({
|
||||
type: "error",
|
||||
|
|
|
@ -23,12 +23,12 @@ export default function PendingReview({ zid, navigation }) {
|
|||
const [more, setMore] = useState(1);
|
||||
const [data, setData] = useState({ list: [], total: 0 });
|
||||
const getData = async () => {
|
||||
if (zid === undefined || !more) return;
|
||||
if (!more) return;
|
||||
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
||||
try {
|
||||
const base = await baseRequest();
|
||||
const body = {
|
||||
b_mid: parseInt(zid),
|
||||
b_mid: parseInt(base.b_mid),
|
||||
audit_type: 1,
|
||||
offset: offset,
|
||||
limit: 20,
|
||||
|
|
|
@ -15,7 +15,7 @@ import baseRequest from "../../../../utils/baseRequest";
|
|||
import { generateSignature } from "../../../../utils/crypto";
|
||||
import formatTimestamp from "../../../../utils/formatTimestamp";
|
||||
|
||||
export default function Reviewed({ navigation, zid }) {
|
||||
export default function Reviewed({ navigation }) {
|
||||
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
|
||||
|
||||
const tailwind = useTailwind();
|
||||
|
@ -23,12 +23,12 @@ export default function Reviewed({ navigation, zid }) {
|
|||
const [more, setMore] = useState(1);
|
||||
const [data, setData] = useState({ list: [], total: 0 });
|
||||
const getData = async () => {
|
||||
if (zid === undefined || !more) return;
|
||||
if (!more) return;
|
||||
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
||||
try {
|
||||
const base = await baseRequest();
|
||||
const body = {
|
||||
b_mid: parseInt(zid),
|
||||
b_mid: parseInt(base.b_mid),
|
||||
audit_type: 2,
|
||||
offset: offset,
|
||||
limit: 20,
|
||||
|
|
|
@ -11,7 +11,6 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|||
import { TabView, SceneMap, TabBar } from "react-native-tab-view";
|
||||
import PendingReview from "./PendingReview";
|
||||
import Reviewed from "./Reviewed";
|
||||
|
||||
export default function RefundList({ navigation, route }) {
|
||||
const tailwind = useTailwind();
|
||||
const insets = useSafeAreaInsets();
|
||||
|
@ -25,10 +24,8 @@ export default function RefundList({ navigation, route }) {
|
|||
|
||||
const renderScene = useCallback(
|
||||
SceneMap({
|
||||
doing: () => (
|
||||
<PendingReview zid={route.params.b_mid} navigation={navigation} />
|
||||
),
|
||||
done: () => <Reviewed zid={route.params.b_mid} navigation={navigation} />,
|
||||
doing: () => <PendingReview navigation={navigation} />,
|
||||
done: () => <Reviewed navigation={navigation} />,
|
||||
}),
|
||||
[route]
|
||||
);
|
||||
|
|
|
@ -58,15 +58,15 @@ export function goToPage({ url, action }) {
|
|||
if (action !== "inward") return url;
|
||||
let linkArr = url.split("?");
|
||||
const params = linkArr[1]?.split("&");
|
||||
|
||||
if (!params) return linkArr[0];
|
||||
if (linkArr[0].includes("/")) {
|
||||
const path = linkArr[0].replace(/^\/+|\/+$/g, "");
|
||||
const pathNames = path.split("/").filter((it) => it != "");
|
||||
return [pathNames[0], { screen: pathNames[1] }];
|
||||
}
|
||||
const query = params
|
||||
.map((it) => ({ [it.split("=")[0]]: it.split("=")[1] }))
|
||||
.reduce((acc, cur) => ({ ...acc, ...cur }), {});
|
||||
if (linkArr[0].includes("/")) {
|
||||
const path = linkArr[0].replace(/^\/+|\/+$/g, "");
|
||||
const pathNames = path.split("/").filter((it) => it != "");
|
||||
return [pathNames[0], { screen: pathNames[1], params: query }];
|
||||
}
|
||||
|
||||
return [linkArr[0], query];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue