# getAppInfo ^7.10
指明当前APP的版本号和环境
# 调用方式
getAppInfo()
1
返回 Promise,使用 then/catch 或 await 处理结果。
# 请求参数
无。
# 接口调用示例
this.$bridge
.getAppInfo()
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# 返回参数
返回 Promise;原生返回数据的字段由宿主决定,当前 JS 封装未限定完整结构。
# 接口返回示例
const result = {
appVersion: '8.22.5.398', // app版本
appName: '美的美居', // app名称
appEnv: 'sit', // 环境
appPlatform: 'android' // android/iOS
}
1
2
3
4
5
6
2
3
4
5
6