For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt, and this page is available as Markdown at /apps-plugin/docs/js-api/router/openPageInChat.md.

openPageInChat

在当前关联的主对话流中以半屏形式打开应用内页面。

调用后不会创建或操作全页页面栈。需要进入全页应用插件或操作已有页面栈时,请使用 openPage。

扫码预览

扫码预览 openPageInChat

支持版本

前端库版本不低于 0.2.0。

支持平台

平台支持情况
Android支持
iOS支持
PC不支持
HarmonyOS不支持

支持场景

场景支持情况
页面支持
卡片支持

接入准备

前置条件

  • 当前应用需要关联主对话流

使用说明

  • 不接受页面栈 mode;需要进入应用插件全页或操作已有页面栈时使用 openPage。

调用方式

异步 API

openPageInChat(params: OpenPageInChatParams): Promise<object>

入参

名称类型必填默认值约束说明
urlstring是--应用内页面路径,可携带查询参数。

调用示例

import { openPageInChat } from '@doubao-dev/framework/api';

await openPageInChat({
  url: '/pages/detail/index?id=1'
});

成功返回

无返回字段。