| 在主文件App.vue  的 onLaunch 生命周期函数里添加 调取hbuilder 5+APPJS 的方法 plus.screen 函数 复制代码// #ifdef APP-PLUS || APP-PLUS-NVUE
                plus.screen.lockOrientation('portrait-primary'); //锁定竖屏
                const devices = plus.device
                uni.setStorageSync('devicesInfo', devices) // 存储设备信息
                // #endif
  
 |