<template>
	<view id="test2">
		<button @click="postMessage">发送</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				str: 'hahaha'
			}
		},
		onLoad() {

		},
		methods: {
			postMessage() {
				window.parent.postMessage({
					cmd: 'jump',
					params: {
						val: 1
					}
				},'*')
			},
		},
	}
</script>

<style>
	#test2 {
		width: 300rpx;
		height: 100rpx;
		background-color: #4CD964;
	}
	#test2 button{
		color: red;
	}
</style>
