| | |
| | | }) |
| | | } |
| | | let pageMode = e.pageMode || 'vertical' |
| | | if (pageMode == 'horizontal') { |
| | | plus.screen.lockOrientation('landscape-primary'); |
| | | } else { |
| | | plus.screen.lockOrientation('portrait-primary'); |
| | | } |
| | | // #ifdef APP-PLUS |
| | | uni.showLoading({ |
| | | title: "加载中..." |
| | | }) |
| | | setTimeout(() => { |
| | | plus.screen.unlockOrientation(); |
| | | if (pageMode == 'horizontal') { |
| | | plus.screen.lockOrientation('landscape-primary'); |
| | | } else { |
| | | plus.screen.lockOrientation('portrait-primary'); |
| | | } |
| | | uni.hideLoading(); |
| | | }, 800) |
| | | //#endif |
| | | |
| | | |
| | | |
| | | }, |
| | | onUnload() { |
| | | async onUnload() { |
| | | // 恢复到竖屏 |
| | | plus.screen.unlockOrientation() |
| | | plus.screen.lockOrientation('portrait-primary'); |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |