<template>
    <iframe id="iframe" ref="iframe" frameborder="0" scrolling="no"> </iframe>
</template>
<script>
window.addEventListener(
    'message',
    function(event) {
        if (event.origin === 'https://3gimg.qq.com') {
            var loc = event.data;
            if (window.ReactNativeWebView) {
                window.ReactNativeWebView.postMessage(JSON.stringify(loc));
            }
        }
    },
    false,
);
export default {
		mounted(){
				window.setLocation=this.setLocation
		},
		methods:{
			setLocation(location){
				this.$refs.iframe.src='https://apis.map.qq.com/tools/locpicker?search=1&type=1&zoom=18&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K&referer=Dingdong&coord=' +location
			}
		}
};
</script>
<style lang='less' scoped>
#iframe {
    width: 100vw;
    height: 100vh;
}
</style>