# editSiriShortcut ^7.8
修改快捷指令(iOS)
# 调用方式
editSiriShortcut(params)
1
返回 Promise,使用 then/catch 或 await 处理结果。 接收单个业务参数;是否需要传参按下方参数表约定,无业务参数时可省略。具体字段及返回数据由宿主原生约定。
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| sceneId | String | Y | -- | ID |
| name | String | Y | -- | name |
| sceneName | String | Y | -- | name |
# 接口调用示例
this.$bridge.editSiriShortcut(params)
1
# 返回参数
| Prop | Type | Default | Description |
|---|---|---|---|
| editType | String | update: 更新;delete: 删除 | |
| invocationPhrase | String | 快捷指令 |
# 接口返回示例
this.$bridge.editSiriShortcut(params).then((res) => {
if (res.editType === 'update') {
// 修改Siri
this.$bridge.toast(this.TEXT.scene_detail_siri_save_succ);
this.invocationPhrase = res.invocationPhrase;
this.$emit('updateSiri');
} else if (res.editType === 'delete') {
// 删除Siri
this.$bridge.toast(this.TEXT.scene_detail_siri_delete_succ);
this.invocationPhrase = '';
this.hasSiri = false;
this.$emit('updateSiri');
}
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14