diff --git a/App.jsx b/App.jsx index d6fa3e9..b0aba83 100644 --- a/App.jsx +++ b/App.jsx @@ -47,7 +47,7 @@ import SpaceIntroduce from "./screeens/SpaceIntroduce"; import StreamerSpace from "./screeens/StreamerSpace"; import CreateSpace from "./screeens/CreateSpace"; import SpaceSetting from "./screeens/SpaceSetting"; -import NoticeDetail from "./screeens/Message/NoticeDetail"; +import NoticeDetail from "./screeens/NoticeDetail"; import SpaceSearch from "./screeens/SpaceSetting/SpaceSearch"; import ShareSpace from "./screeens/ShareSpace"; import EditSpacePost from "./screeens/EditSpacePost"; diff --git a/screeens/HomeTab/index.jsx b/screeens/HomeTab/index.jsx index 1c64d07..c142409 100644 --- a/screeens/HomeTab/index.jsx +++ b/screeens/HomeTab/index.jsx @@ -1,7 +1,8 @@ import React, { useState, useEffect, useCallback } from "react"; import { Image, TouchableOpacity, View } from "react-native"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; -import Stream from "../Stream"; +// import Stream from "../Stream"; +import NoticeNav from "../NoticeDetail"; import My from "../My"; import Posts from "../Posts"; import Space from "../Space"; @@ -121,10 +122,10 @@ export default function HomeTab({ navigation, route }) { /> )} { if (focused) { diff --git a/screeens/NoticeDetail/ActiveNotice/index.js b/screeens/NoticeDetail/ActiveNotice/index.js new file mode 100644 index 0000000..f4cfe36 --- /dev/null +++ b/screeens/NoticeDetail/ActiveNotice/index.js @@ -0,0 +1,47 @@ +import { ScrollView } from "react-native"; +import React, { useState, useCallback } from "react"; +import { useTailwind } from "tailwind-rn"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; +import NoticeItem from "../components/NoticeItem"; +import { Icon } from "@rneui/themed"; +export default function ActiveNotice({ navigation }) { + const tailwind = useTailwind(); + const insets = useSafeAreaInsets(); + + return ( + + + } + /> + + } + /> + + } + /> + + } + /> + + } + /> + + } + /> + + ); +} diff --git a/screeens/NoticeDetail/NoticeNav/index.jsx b/screeens/NoticeDetail/NoticeNav/index.jsx new file mode 100644 index 0000000..0970452 --- /dev/null +++ b/screeens/NoticeDetail/NoticeNav/index.jsx @@ -0,0 +1,234 @@ +import { + View, + TouchableOpacity, + Image as NativeImage, + Text, +} from "react-native"; +import React, { useState, useCallback } from "react"; +import { useTailwind } from "tailwind-rn"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; + +export default function Message({ navigation }) { + const tailwind = useTailwind(); + const insets = useSafeAreaInsets(); + + return ( + + {/* 广告轮播 */} + + {/* 官方消息 */} + + navigation.navigate("SystemNotice")} + style={{ + ...tailwind("flex flex-row items-center py-4 mb-2 rounded-xl"), + backgroundColor: "#ffffff1a", + }} + > + + + + + + + + 系统通知 + + + 官方 + + + + 官方消息通知 + + + + + 11:00 + + + + 1 + + + + + + navigation.navigate("ActiveNotice")} + style={{ + ...tailwind("flex flex-row items-center py-4 rounded-xl"), + backgroundColor: "#ffffff1a", + }} + > + + + + + + + + 活动消息 + + + 官方 + + + + 展示相关活动推送信息 + + + + + 11:00 + + + + 99 + + + + + + + {/* 私聊消息 */} + + + navigation.navigate("MessageDetail", { + mid: 1, + }) + } + style={{ + ...tailwind("flex flex-row items-center py-4 mb-2 rounded-xl"), + backgroundColor: "#333333", + }} + > + + + + + + + + 铁粉空间官网 + + + 官方客服 + + + + 请回复您的相关消息 + + + + + 11:00 + + + + 1 + + + + + + + + ); +} diff --git a/screeens/NoticeDetail/SystemNotice/index.jsx b/screeens/NoticeDetail/SystemNotice/index.jsx new file mode 100644 index 0000000..e428593 --- /dev/null +++ b/screeens/NoticeDetail/SystemNotice/index.jsx @@ -0,0 +1,66 @@ +import { ScrollView } from "react-native"; +import React, { useState, useCallback } from "react"; +import { useTailwind } from "tailwind-rn"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; +import NoticeItem from "../components/NoticeItem"; +import { Icon } from "@rneui/themed"; +export default function SystemNotice({ navigation }) { + const tailwind = useTailwind(); + const insets = useSafeAreaInsets(); + + return ( + + + } + /> + + } + /> + + } + /> + + } + /> + + } + /> + + } + /> + + ); +} diff --git a/screeens/NoticeDetail/components/NoticeItem/index.jsx b/screeens/NoticeDetail/components/NoticeItem/index.jsx new file mode 100644 index 0000000..3232ba1 --- /dev/null +++ b/screeens/NoticeDetail/components/NoticeItem/index.jsx @@ -0,0 +1,96 @@ +import { + View, + TouchableOpacity, + Image as NativeImage, + Text, +} from "react-native"; +import React from "react"; +import { useTailwind } from "tailwind-rn"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; +export default function NoticeItem({ leftIcon, hasLink }) { + const tailwind = useTailwind(); + const insets = useSafeAreaInsets(); + + return ( + + + {/* 头像 */} + + {/* */} + {leftIcon} + + + {/* 内容 */} + + {/* 文本内容 */} + + + 您的个人资料已审核通过。 + + + {/* 链接跳转 */} + {hasLink && ( + {}} + style={{ + ...tailwind("rounded-xl p-2 flex flex-row items-center my-2"), + backgroundColor: "#ffffff1a", + }} + > + + {/* */} + + + + {hasLink.text} + + + + )} + + {/* 时间 */} + + + 11:00 + + + + + + + ); +} diff --git a/screeens/NoticeDetail/index.jsx b/screeens/NoticeDetail/index.jsx new file mode 100644 index 0000000..26900bb --- /dev/null +++ b/screeens/NoticeDetail/index.jsx @@ -0,0 +1,57 @@ +import React from "react"; +import { createNativeStackNavigator } from "@react-navigation/native-stack"; +import { Icon } from "@rneui/themed"; +import ActiveNotice from "./ActiveNotice"; +import SystemNotice from "./SystemNotice"; +import NoticeNav from "./NoticeNav"; +const SpaceSettingStack = createNativeStackNavigator(); + +export default function NoticeDetail({ navigation, route }) { + return ( + + ({ + headerShown: false, + })} + /> + ({ + headerLeft: () => ( + navigation.goBack()} + /> + ), + title: "系统通知", + headerTitleStyle: { color: "white" }, + headerStyle: { backgroundColor: "#07050A" }, + })} + /> + ({ + headerLeft: () => ( + navigation.goBack()} + /> + ), + title: "活动信息", + headerTitleStyle: { color: "white" }, + headerStyle: { backgroundColor: "#07050A" }, + })} + /> + + ); +}