"plugins": {
"live-player-plugin": {
"version": "1.1.1",
"provider": "wx2b03c6e691cd7370"
}
}
<template>
<div>
<button @tap="toLiveRoom">点我去看直播</button>
</div>
</template>
<script>
import wepy from '@wepy/core'
wepy.page({
data: {
},
computed: {},
created () {
},
onLoad (e) {
},
methods: {
toLiveRoom() {
let roomId = [3]
let customParams = encodeURIComponent(JSON.stringify({ path: '/liveRoom', pid: 1 }))
wx.navigateTo({
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}&custom_params=${customParams}`
})
}
}
})
</script>
<style lang="less">
</style>