diff --git a/App.jsx b/App.jsx
index ec04a57..e92ba35 100644
--- a/App.jsx
+++ b/App.jsx
@@ -56,7 +56,7 @@ import UpdateModal from "./components/UpdateModal";
import StreamerNavigatorModal from "./components/StreamerNavigatorModal";
import { Icon } from "@rneui/themed";
import { StatusBar } from "expo-status-bar";
-import { save, get, remove } from "./utils/storeInfo";
+import { save, get, remove, storeAppInfo } from "./utils/storeInfo";
import baseRequest from "./utils/baseRequest";
import { generateSignature } from "./utils/crypto";
import * as Clipboard from "expo-clipboard";
@@ -161,6 +161,7 @@ const App = () => {
const [versionData, setVersionData] = useState({});
useEffect(() => {
async function prepare() {
+ await storeAppInfo();
try {
const token = await get("token");
const account = await get("account");
diff --git a/components/SpacePost/index.jsx b/components/SpacePost/index.jsx
index 2d2257e..6158633 100644
--- a/components/SpacePost/index.jsx
+++ b/components/SpacePost/index.jsx
@@ -44,24 +44,24 @@ export default function SpacePost({ data }) {
const handleOnTextLayout = (event) => {
if (!textInit) return;
const line = event.nativeEvent.lines.length;
- if (line > 5 && data.is_zone_moment_unlocked === 1) {
- setNumberOfLines(5);
+ if (line > 7 && data.is_zone_moment_unlocked === 1) {
+ setNumberOfLines(7);
setIsFullTextBtnShow(true);
}
- if (line > 5 && data.is_zone_moment_unlocked === 0) {
- if (data.text_visible_range <= 5)
+ if (line > 7 && data.is_zone_moment_unlocked === 0) {
+ if (data.text_visible_range <= 7)
setNumberOfLines(data.text_visible_range);
- if (data.text_visible_range > 5) {
- setNumberOfLines(5);
+ if (data.text_visible_range > 7) {
+ setNumberOfLines(7);
setIsFullTextBtnShow(true);
}
}
- if (line <= 5 && data.is_zone_moment_unlocked === 1) {
+ if (line <= 7 && data.is_zone_moment_unlocked === 1) {
setNumberOfLines(0);
- if (line <= 5 && data.is_zone_moment_unlocked === 0) {
- if (data.text_visible_range <= 5)
+ if (line <= 7 && data.is_zone_moment_unlocked === 0) {
+ if (data.text_visible_range <= 7)
setNumberOfLines(data.text_visible_range);
- if (data.text_visible_range > 5) setNumberOfLines(0);
+ if (data.text_visible_range > 7) setNumberOfLines(0);
}
}
setTextInit(false);
@@ -76,9 +76,9 @@ export default function SpacePost({ data }) {
} else {
setIsTextCollapsed(true);
setNumberOfLines(
- data.is_zone_moment_unlocked === 0 && data.text_visible_range <= 5
+ data.is_zone_moment_unlocked === 0 && data.text_visible_range <= 7
? data.text_visible_range
- : 5
+ : 7
);
}
};
@@ -610,7 +610,7 @@ function ImageDisplay({
const { showImageViewer } = useImageViewer();
const images = displayMedia.map((item) => {
- return { url: item.urls[0] };
+ return { url: item?.urls[0] };
});
const [isCollapsed, setIsCollapsed] = useState(true);
diff --git a/screeens/CreateImagePost/index.jsx b/screeens/CreateImagePost/index.jsx
index b9d4400..9167877 100644
--- a/screeens/CreateImagePost/index.jsx
+++ b/screeens/CreateImagePost/index.jsx
@@ -157,7 +157,6 @@ export default function CreateImagePost({ navigation, route }) {
body: JSON.stringify(body),
}
);
- console.log(response);
const data = await response.json();
if (data.ret === -1) {
Toast.show({
diff --git a/screeens/EditSpacePost/index.jsx b/screeens/EditSpacePost/index.jsx
index b256cb1..d371dd3 100644
--- a/screeens/EditSpacePost/index.jsx
+++ b/screeens/EditSpacePost/index.jsx
@@ -236,6 +236,7 @@ export default function EditSpacePost({ navigation, route }) {
: 1,
is_blurring_cover: blurCover ? 1 : 0,
is_ironfan_visible: isFreeForIronfan ? 1 : 0,
+ price: parseFloat(price) ? parseInt(parseFloat(price) * 100, 10) : null,
};
const signature = await generateSignature(body);
const _response = await fetch(
diff --git a/screeens/SpaceIntroduce/index.jsx b/screeens/SpaceIntroduce/index.jsx
index 761778a..6795c3f 100644
--- a/screeens/SpaceIntroduce/index.jsx
+++ b/screeens/SpaceIntroduce/index.jsx
@@ -81,10 +81,11 @@ export default function SpaceIntroduce({ navigation, route }) {
}, [])
);
- const images = data?.streamer_ext?.album?.images?.map((image, index) => {
- if (index > 4) return;
- return image?.urls[0];
- });
+ const images = data?.streamer_ext?.album?.images
+ ?.slice(0, 5)
+ ?.map((image) => {
+ return image?.urls[0];
+ });
const imagesForImageViewer = images?.map((url) => ({ url }));
//当空间价格为0时,直接加入空间
@@ -149,7 +150,7 @@ export default function SpaceIntroduce({ navigation, route }) {
transition={500}
cachePolicy="disk"
style={{
- aspectRatio: "25/17",
+ aspectRatio: "1/1",
...tailwind("w-full"),
}}
/>
@@ -183,7 +184,7 @@ export default function SpaceIntroduce({ navigation, route }) {
>
{data?.streamer_ext?.name}
-
+
-
-
-
- {data?.zone_moment_count}
-
-
+
+
+
+ {data?.zone_moment_count}
+
+ 动态
+
+
+
+ {data?.image_count}
+
+ 照片
+
+
+
+ {data?.video_count}
+
+ 视频
+
+
navigation.navigate("WebWithHeader", {
title: "收支明细",
- uri: process.env.EXPO_PUBLIC_WEB_URL + "/bill/cost",
+ uri: process.env.EXPO_PUBLIC_WEB_URL + "/bill/recharge",
})
}
style={tailwind("flex-row justify-between items-center py-4")}