|
|
@@ -16,34 +16,59 @@ const PinMessage = ({
|
|
|
showDialog(true)
|
|
|
}
|
|
|
}, [messageList])
|
|
|
- if (visible)
|
|
|
- return (
|
|
|
- <View
|
|
|
- style={styles.noticeLayer}>
|
|
|
- <View style={styles.noticeDialog}>
|
|
|
- <Swiper
|
|
|
- //style={{height: $vh(50)}}
|
|
|
- loop={true}
|
|
|
- autoplay={false}
|
|
|
- //dotColor={"#ccc"}
|
|
|
- activeDotColor={colorAccent}
|
|
|
- removeClippedSubviews={false}
|
|
|
- decelerationRate={"fast"}
|
|
|
- automaticallyAdjustContentInsets={true}>
|
|
|
- { messageList.map((item, index) =>
|
|
|
- <View key={index} style={styles.noticeDialogChild}>
|
|
|
- <NoticeView
|
|
|
- key={index}
|
|
|
- item={item}
|
|
|
- onClose={() => showDialog(false)}/>
|
|
|
- </View>
|
|
|
- )}
|
|
|
- </Swiper>
|
|
|
+ if (isIOS) {
|
|
|
+ if (visible)
|
|
|
+ return (
|
|
|
+ <View
|
|
|
+ style={styles.noticeLayer}>
|
|
|
+ <View style={styles.noticeDialog2}>
|
|
|
+ <Swiper
|
|
|
+ //style={{height: $vh(50)}}
|
|
|
+ loop={true}
|
|
|
+ autoplay={false}
|
|
|
+ //dotColor={"#ccc"}
|
|
|
+ activeDotColor={colorAccent}
|
|
|
+ removeClippedSubviews={false}
|
|
|
+ decelerationRate={"fast"}
|
|
|
+ automaticallyAdjustContentInsets={true}>
|
|
|
+ { messageList.map((item, index) =>
|
|
|
+ <View key={index} style={styles.noticeDialogChild}>
|
|
|
+ <NoticeView
|
|
|
+ key={index}
|
|
|
+ item={item}
|
|
|
+ onClose={() => showDialog(false)}/>
|
|
|
+ </View>
|
|
|
+ )}
|
|
|
+ </Swiper>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
+ );
|
|
|
+ else
|
|
|
+ return <></>
|
|
|
+ } else {
|
|
|
+ return (
|
|
|
+ <MyModal
|
|
|
+ style={styles.noticeDialog}
|
|
|
+ visible={visible}>
|
|
|
+ <Swiper
|
|
|
+ style={{height: $vh(50)}}
|
|
|
+ loop={false}
|
|
|
+ autoplay={false}
|
|
|
+ //dotColor={"#ccc"}
|
|
|
+ activeDotColor={colorAccent}
|
|
|
+ removeClippedSubviews={false}
|
|
|
+ decelerationRate={"fast"}
|
|
|
+ automaticallyAdjustContentInsets={true}>
|
|
|
+ { messageList.map((item, index) =>
|
|
|
+ <NoticeView
|
|
|
+ key={index}
|
|
|
+ item={item}
|
|
|
+ onClose={() => showDialog(false)}/>
|
|
|
+ )}
|
|
|
+ </Swiper>
|
|
|
+ </MyModal>
|
|
|
);
|
|
|
- else
|
|
|
- return <></>
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const Message = ({item}) => {
|
|
|
@@ -142,13 +167,17 @@ const styles = StyleSheet.create({
|
|
|
left: 0,
|
|
|
right: 0,
|
|
|
bottom: 0,
|
|
|
- zIndex: 10,
|
|
|
+ zIndex: 20,
|
|
|
position: "absolute",
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
backgroundColor: 'rgba(0,0,0,.5)'
|
|
|
},
|
|
|
noticeDialog: {
|
|
|
+ width: Dialog.dialogWidth,
|
|
|
+ height: $vw(100) + 48
|
|
|
+ },
|
|
|
+ noticeDialog2: {
|
|
|
height: $vh(50)
|
|
|
},
|
|
|
noticeDialogChild: {
|