如原页面数据
var params = {
content: content,
fontWidth: that.data.width,
direction: that.data.direction,
fontSize: that.data.fontSize,
speed: that.data.speed,
bgColor: that.data.bgcolor,
color: that.data.color
}
let arr=JSON.stringify(params);
wx.navigateTo({
url: 'show_danmu?tempArr='+arr,
})
新页面接收数据
onLoad: function (options) {
let arr=JSON.parse(options.tempArr);
console.log(arr);
}