|
|
@@ -18,26 +18,29 @@ const PinMessage = ({
|
|
|
}, [messageList])
|
|
|
if (visible)
|
|
|
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>
|
|
|
+ <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>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
);
|
|
|
else
|
|
|
return <></>
|
|
|
@@ -134,9 +137,24 @@ const styles = StyleSheet.create({
|
|
|
paddingBottom: 16,
|
|
|
fontSize: 14
|
|
|
},
|
|
|
+ noticeLayer: {
|
|
|
+ top: 0,
|
|
|
+ left: 0,
|
|
|
+ right: 0,
|
|
|
+ bottom: 0,
|
|
|
+ zIndex: 10,
|
|
|
+ position: "absolute",
|
|
|
+ alignItems: 'center',
|
|
|
+ justifyContent: 'center',
|
|
|
+ backgroundColor: 'rgba(0,0,0,.5)'
|
|
|
+ },
|
|
|
noticeDialog: {
|
|
|
+ height: $vh(50)
|
|
|
+ },
|
|
|
+ noticeDialogChild: {
|
|
|
width: Dialog.dialogWidth,
|
|
|
- height: $vw(100) + 48
|
|
|
+ marginLeft: "auto",
|
|
|
+ marginRight: "auto"
|
|
|
},
|
|
|
closeIcon: {
|
|
|
top: 8,
|