setPageOrientation 切换页面横竖屏方向

setPageOrientation ^8.6

切换页面横竖屏方向

#请求参数 object

Prop Type Default Comment
orientation Number N/A 0强制竖屏, 1动态横屏

#接口调用示例

const params = {
    "orientation": 0
}

this.$bridge
  .setPageOrientation(params)
  .then(res => {
    this.$alert(res)
  })
  .catch(err => {
    this.$toast(err)
  })

#返回参数

  • 成功时返回 Object res
Prop Type Value
code Number 0: 成功 -2: "json解析失败"
msg String success
posted on 2024-12-16 09:43  AtlasLapetos  阅读(29)  评论(0)    收藏  举报