1.manifest.json文件设置
"orientation" : [
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
],
2.需要横屏的页面设置
setTimeout(function(){
plus.screen.lockOrientation('landscape-primary');
},1500)
3.横屏页面来源页面设置取消屏幕锁定,并设置为竖屏
onShow() {
var that = this;
// #ifdef APP-PLUS
plus.screen.unlockOrientation(); //解除屏幕方向的锁定,但是不一定是竖屏;
plus.screen.lockOrientation('portrait'); //锁死屏幕方向为竖屏
// #endif
},