getAppInfo 按升级策略进行升级

getAppInfo ^7.10

按升级策略进行升级,如跳转应用市场或者应用内下载,无升级策略返回异常信息。

#请求参数

N/A

#引入接口模块

import bridge from '@minix-iot/etsbridge-sdk'

#接口调用示例

bridge
  .upgradeApp()
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.log(err)
  })

#接口返回示例

  • 成功时返回
Prop Type Value
code Number 0
msg String success
  • 失败时返回(api 为空或者没有)
Prop Type Value
code Number -1
msg String no upgrad

#返回示例

{
  code: true //true or false,
  msg: 'success'
}
posted on 2024-12-27 09:30  AtlasLapetos  阅读(2)  评论(0)    收藏  举报