openURL 美居app外浏览器打开

openURL ^7.8

美居app外浏览器打开

#请求参数

Prop Type Required Default Comment
params String Y N/A 需要打开地址,例如http://www.baidu.com

#接口调用示例

const params = "http://www.baidu.com"
this.$bridge
  .openURL(params)
  .then(res => {
    this.$alert(res)
  })
  .catch(err => {
    this.$toast(err)
  })

#返回参数

Prop Type Required Default Comment
code Number Y N/A 状态码, 0:成功,1: 非法url
msg String N N/A 状态信息

#接口返回示例

// 成功返回
{
  code: 0,
  msg: "打开成功"
}

// 失败返回
{
  code: 1,
  msg: "非法url"
}
posted on 2024-12-21 14:40  AtlasLapetos  阅读(21)  评论(0)    收藏  举报