|
@@ -7,6 +7,7 @@ import {
|
|
|
ImageBackground,
|
|
ImageBackground,
|
|
|
Modal,
|
|
Modal,
|
|
|
ScrollView,
|
|
ScrollView,
|
|
|
|
|
+ Share,
|
|
|
StatusBar,
|
|
StatusBar,
|
|
|
StyleSheet,
|
|
StyleSheet,
|
|
|
Text,
|
|
Text,
|
|
@@ -144,6 +145,26 @@ export default function WealDetailScreen() {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const handleShare = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const result = await Share.share({
|
|
|
|
|
+ message: `快来参与福利房:${data?.name},房间ID:${id}`,
|
|
|
|
|
+ title: '福利房分享',
|
|
|
|
|
+ });
|
|
|
|
|
+ if (result.action === Share.sharedAction) {
|
|
|
|
|
+ if (result.activityType) {
|
|
|
|
|
+ // shared with activity type of result.activityType
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // shared
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (result.action === Share.dismissedAction) {
|
|
|
|
|
+ // dismissed
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error: any) {
|
|
|
|
|
+ Alert.alert(error.message);
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const showWinRecords = async () => {
|
|
const showWinRecords = async () => {
|
|
|
try {
|
|
try {
|
|
|
const res = await getWinningRecord(id as string);
|
|
const res = await getWinningRecord(id as string);
|
|
@@ -170,7 +191,9 @@ export default function WealDetailScreen() {
|
|
|
<Text style={styles.backText}>←</Text>
|
|
<Text style={styles.backText}>←</Text>
|
|
|
</TouchableOpacity>
|
|
</TouchableOpacity>
|
|
|
<Text style={styles.navTitle}>{TYPE_MAP[data.type]?.title || '详情'}</Text>
|
|
<Text style={styles.navTitle}>{TYPE_MAP[data.type]?.title || '详情'}</Text>
|
|
|
- <View style={styles.placeholder} />
|
|
|
|
|
|
|
+ <TouchableOpacity onPress={handleShare} style={styles.backBtn}>
|
|
|
|
|
+ <Image source={{ uri: Images.mine.invite }} style={{ width: 20, height: 20 }} contentFit="contain" />
|
|
|
|
|
+ </TouchableOpacity>
|
|
|
</View>
|
|
</View>
|
|
|
|
|
|
|
|
<ScrollView
|
|
<ScrollView
|