返回正文
Are you an LLM? You can read better optimized documentation at /zh-CN/blog/2025-08/wise.md for this page in Markdown format
雀巢平台 Wise 前端对接
背景
适用于嵌入 Wise
的雀巢平台子应用。
安装依赖
bash
npm add maui-jsbridge
1
注册服务
Vue 3.0
在项目入口文件(如 index.ts
或 main.ts
) 注入服务
ts
import { MauiJsBridge } from 'maui-jsbridge'
MauiJsBridge.attach(window.parent)
1
2
2
index.ts
应用场景
Token 失效
向 Wise
发出 Token
失效的消息
ts
import { FrameCommands, MauiJsBridge } from 'maui-jsbridge'
MauiJsBridge.postMessage({
command: FrameCommands.TOKEN_INVALID,
data: {
reason: 'TokenExpired',
appCode: `${appCode}`
}
}, '*')
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
VN/A |
本站访客数
--次 本站总访问量
--人次