feat: 细节优化
This commit is contained in:
parent
f833d95dfa
commit
3b99caa72b
@ -175,7 +175,7 @@ export default function OwnerPage() {
|
||||
<ThemedText style={styles.headerTitle}>
|
||||
Top Memory Makers
|
||||
</ThemedText>
|
||||
<View className='opacity-0'>123</View>
|
||||
<ThemedText className='opacity-0'>123</ThemedText>
|
||||
</View>
|
||||
<View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 16, marginHorizontal: 16 }}>
|
||||
<TouchableOpacity onPress={() => { setLocationModalVisible(true) }} style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
||||
|
||||
@ -79,7 +79,7 @@ const styles = StyleSheet.create({
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
padding: 16,
|
||||
borderRadius: 12,
|
||||
borderRadius: 24,
|
||||
zIndex: 2,
|
||||
backgroundColor: '#fff',
|
||||
},
|
||||
|
||||
@ -27,16 +27,17 @@ Notifications.setNotificationHandler({
|
||||
export const reverseGeocode = async (latitude: number, longitude: number) => {
|
||||
try {
|
||||
const addressResults = await fetchApi<Address[]>(`/area/gecoding?latitude=${latitude}&longitude=${longitude}`);
|
||||
console.log('地址:', addressResults);
|
||||
for (let address of addressResults) {
|
||||
console.log('地址:', address);
|
||||
if (Object.keys(addressResults).length === 0) {
|
||||
return null;
|
||||
}
|
||||
console.log('地址1:', addressResults);
|
||||
|
||||
if (Platform.OS === 'web') {
|
||||
localStorage.setItem('location', JSON.stringify(address));
|
||||
localStorage.setItem('location', JSON.stringify(addressResults));
|
||||
} else {
|
||||
SecureStore.setItemAsync('location', JSON.stringify(address));
|
||||
}
|
||||
return address;
|
||||
SecureStore.setItemAsync('location', JSON.stringify(addressResults));
|
||||
}
|
||||
return addressResults
|
||||
} catch (error) {
|
||||
console.log('逆地理编码失败:', error);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user