(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{ZuYC:function(t,e,o){"use strict";o.r(e);var a,n,i,s=o("q1tI"),c=o.n(s),l=o("/MKj"),r=o("ZFw/"),u=o.n(r),d=o("GKBh"),p=o.n(d),g=o("yWgo"),h=(a=Object(l["c"])(t=>{var e=t.authentication;return{authentication:e}}),a((i=class extends s["Component"]{constructor(t){super(t),this.componentDidMount=(()=>{var t=this;"wechat"===Object(g["a"])()?p.a.getLocation({type:"wgs84",success:function(e){var o=e.latitude,a=e.longitude;console.log(o,a,"======================="),t.setState({flag:!0,latitude:o,longitude:a})},fail:function(e){console.log(e,"=================="),t.setState({flag:!0})}}):t.setState({flag:!0}),window.addEventListener("message",this.selectLocation,!1)}),this.componentWillUnmount=(()=>{window.removeEventListener("message",this.selectLocation,!1)}),this.selectLocation=(t=>{var e=t.data;e&&"locationPicker"===e.module&&(console.log("location",e),this.props.dispatch({type:"authentication/geocoder",payload:{location:e.latlng,poiname:e.poiname}}))}),this.state={flag:!1,latitude:null,longitude:null}}render(){var t=this.state,e=t.flag,o=t.latitude,a=t.longitude;return e?c.a.createElement(u.a,{title:"\u5730\u5740\u9009\u62e9"},c.a.createElement("iframe",{title:"\u5730\u5740\u9009\u62e9",style:{position:"absolute"},id:"mapPage",width:"100%",height:"100%",framebborder:0,src:"https://apis.map.qq.com/tools/locpicker?search=1&type=1&policy=1&key=457BZ-TES6V-JS7P2-UJQAQ-IJSSO-RIFBA&referer=CABApp".concat(o?"&coordtype=1&coord="+o+","+a:"")})):c.a.createElement(u.a,{title:"\u5730\u5740\u9009\u62e9"})}},n=i))||n);e["default"]=h}}]);