收藏
回答

uni-app引入微信小程序直播插件一直显示房间id有误,请问怎么解决?大佬们救救孩子

uni-app引入微信小程序直播插件一直显示房间id有误


//跳转直播间

封装的公共函数

let toLiveRoom = roomId => {

console.log('进入直播间:', roomId);

let customParams = {

path: 'packageA/LiveManage/index/index',

pid: 1,

}

uni.navigateTo({

url: plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}&custom_params=${encodeURIComponent(JSON.stringify(customParams))}

});

};

index.vue页面引入:

// 点击进入指定直播间

shareLiveRoom(event) {

let roomId = this.goodsList[this.btn].roomid;

toLiveRoom(roomId)

},

manifest.json:



回答关注问题邀请回答
收藏
登录 后发表内容
问题标签