Bootstrap

mui 的页面传参

个人记录 仅供参考

1、初始化时 数据加载

A页面跳转到B页面 将A页面中的数据带到B页面

// 跳转继续操作页面
mui.openWindow({
	url: 'B.html',
	id: 'B.html',
	extras: {
	// 传递的数据
	item:item
	}
})

//B页面
// 获取传递的数据
var self = plus.webview.currentWebview(); 
console.log(JSON.stringfly(self.item))
2、自定义事件传参
	//A页面
	mui.fire(plus.webview.getWebviewById('B.html'), 'tijiao', {
		'type': 1,
		'list': news.list
	})
	//B页面
	window.addEventListener('tijiao', function(event) {
		if (event.detail.type == 1) {
			news.newArr = event.detail.list
			creatOrderSubmit() // 定义的方法名
		}
	});
;