是我写法错了吗?
<navigator
url="plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=4&mock=123456789101112"
style="background: #ffffff; padding: 30rpx; text-align: center;"
>
前往直播间
</navigator>
// App.js
onLaunch: function (e) {
const { query } = e;
if (query.mock) {
wx.showToast({
title: mock,
icon: 'none',
duration: 4000,
});
}
},
获取直播间相关参数及开发者自定义参数API: getLiveParams