# connectExternalApplication
链接外部应用
# 调用方式
connectExternalApplication(params)
1
返回 Promise,使用 then/catch 或 await 处理结果。 接收单个业务参数;是否需要传参按下方参数表约定,无业务参数时可省略。具体字段及返回数据由宿主原生约定。
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| app_type | String | Y | - | 外部应用链接 |
# 接口调用示例
this.$bridge.connectExternalApplication({ app_type: this.linkAppIndex });
1
# 返回参数
返回 Promise;原生返回数据的字段由宿主决定,当前 JS 封装未限定完整结构。
# 接口返回示例
this.$bridge.connectExternalApplication({ app_type: this.linkAppIndex }).then((res) => {
this.$bridge.log('res', res);
if (Number(res.code) === 0) {
// 调用成功
// this.$bridge.hideLoading();
} else {
this.$bridge.hideLoading();
}
}).catch((err) => {})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9