window.addEventListener(
'onorientationchange' in window ? 'orientationchange' : 'resize',
function() {
if (window.orientation === 90 || window.orientation === -90) {
Modal.show({ content: '为了您良好使用体验,建议竖屏观看', btnText: '确认' });
}
if (window.orientation === 180 || window.orientation === 0) {
Modal.close();
}
},
false,
);
网友评论