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