bztang-admin/addons/yun_shop/static/app/js/chunk-2eb71d4e.36de4d2e.js

1 line
9.9 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2eb71d4e"],{"23fb":function(e,t,o){var r=o("24fb");t=r(!1),t.push([e.i,"#map{position:absolute;padding:0;width:100%;background:#fff}#container{width:100%;height:100%;font-size:15px}#panel{background-color:#fff;max-height:90%;overflow-y:auto;top:10px;right:10px;width:280px;border-bottom:1px solid silver}#map .search_box{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;padding:0 .625rem;width:19.5rem;height:1.875rem;line-height:1.875rem;border-radius:1rem;background-color:#f5f5f5}.loading{position:absolute;left:50%;top:40%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:rgba(40,40,40,.85);color:#fff;padding:.5rem 1rem;border-radius:10px;z-index:99999!important}.search_box input{border:none;margin-left:.625rem;max-width:19.5rem}.search_box i{color:#999;font-size:1rem}.m-t-10,.mint-cell-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.mint-cell-wrapper{margin-left:.5rem}",""]),e.exports=t},9243:function(e,t,o){var r=o("23fb");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var a=o("499e").default;a("4b997524",r,!0,{sourceMap:!1,shadowMode:!1})},d95d:function(e,t,o){"use strict";o.r(t);var r,a,i,s,n,d,u=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticStyle:{width:"100%",height:"100%"},attrs:{id:"map"}},[o("div",{staticClass:"m-t-10",staticStyle:{width:"100%",height:"3rem"}},[o("a",{staticClass:"mint-cell mint-field"},[o("div",{staticClass:"mint-cell-wrapper"},[o("div",{staticStyle:{background:"#fff","box-shadow":"none","margin-top":"0","padding-right":"0.5rem"},on:{click:e.goback}},[o("i",{staticClass:"iconfont icon-back"})]),o("div",{staticClass:"search_box",staticStyle:{"font-size":"14px"}},[o("i",{staticClass:"iconfont icon-sousuo1"}),o("input",{directives:[{name:"model",rawName:"v-model",value:e.address_detail,expression:"address_detail"}],attrs:{type:"text",id:"suggestId",name:"address_detail",placeholder:"输入您所在的地点"},domProps:{value:e.address_detail},on:{input:function(t){t.target.composing||(e.address_detail=t.target.value)}}})])])])]),o("div",{directives:[{name:"show",rawName:"v-show",value:1!==e.fromHome,expression:"fromHome !== 1"}],staticStyle:{height:"40%"},style:{width:3==this.fun.getPhoneEnv()?"375px":"100%"},attrs:{id:"container"}}),o("div",{directives:[{name:"show",rawName:"v-show",value:1!==e.fromHome,expression:"fromHome !== 1"}],staticStyle:{height:"53%"},style:{width:3==this.fun.getPhoneEnv()?"375px":"100%"},attrs:{id:"panel"}})])])},l=[],p=(o("e7e5"),o("d399")),c=(o("d3b7"),o("b0c0"),o("e9c4"),o("14d9"),o("ac1f"),o("5319"),o("a874"),o("024c")),f=o.n(c),g=[],m=[],h=[],y=0,$={data:function(){return{address_detail:null,listCount:n,listText:g,center:{lng:0,lat:0},num:m,fromHome:0,showLoading:!1}},created:function(){},mounted:function(){i=this,this.ready()},activated:function(){var e=this;this.address_detail="",this.fromHome=this.$route.params.fromHome,1!==this.fromHome&&1!=this.fun.getKey("error")&&(this.showLoading=!0,this.fun.getLocation("定位中,可直接输入").then((function(t){e.address=t.title,e.city=t.city,e.point=t.point;var o=new Promise((function(t,o){e.init(e.point),t()}));o.then((function(){e.searchData(e.point,e.callback),e.demo()}))})).catch((function(t){e.fromHome=1})))},methods:{init:function(e){r=new f.a.Map("container",{center:[e.lng,e.lat],resizeEnable:!1,zoom:5});var t=new f.a.Icon({image:"http://vdata.amap.com/icons/b18/1/2.png",size:new f.a.Size(24,24)});d=new f.a.Marker({icon:t,position:[e.lng,e.lat],offset:new f.a.Pixel(-13,-30)}),r.add(d),f.a.plugin(["AMap.Geolocation","AMap.PlaceSearch","AMap.ToolBar"],(function(){r.addControl(new f.a.ToolBar)}))},searchData:function(e,t){return s={panel:"panel",pageSize:20,pageIndex:1,map:r,visible:!1},f.a.service("AMap.PlaceSearch",(function(){function t(e){f.a.plugin("AMap.Geocoder",(function(){var t=new f.a.Geocoder({city:i.city});t.getAddress(e.data.location,(function(t,o){if("complete"===t&&"OK"===o.info){var r={lat:e.data.location.lat,lng:e.data.location.lng},a={addressComponent:o.regeocode.addressComponent,address:e.data.address,city:o.regeocode.addressComponent.city?o.regeocode.addressComponent.city:o.regeocode.addressComponent.province,province:o.regeocode.addressComponent.province,title:e.data.name,point:r,timestamp:Math.round(new Date/1e3)};if(localStorage.setItem("myLocation",JSON.stringify(a)),i.$store.commit("updateLocation",a),i.$store.commit("setLocation",a),"suppligoodsOrde"==i.$route.query.tag)i.$router.go(-1);else if("hotel"==i.$route.query.tag)i.$router.push(i.fun.getUrl("HotelIndex"));else if("appointment"==i.$route.query.tag)i.$router.push(i.fun.getUrl("Appointment"));else if("selfCarry"==i.$route.query.tag||"goodsDetail"==i.$route.query.tag)i.$router.replace(i.fun.getUrl("SelfCarry_info",{tag:i.$route.params.tag,goodsId:i.$route.params.goodsId,optionsId:i.$route.params.optionsId,total:i.$route.params.total},{cart_ids:i.$route.params.cart_ids}));else if("goodsorder"==i.$route.query.tag)i.$router.replace(i.fun.getUrl("goodsorder",{address_data:i.$route.params.address_data,create:i.$route.params.create,index:i.$route.params.index,district_id:i.$route.params.district_id,pointId:r},{tag:i.$route.params.tag,goodsId:i.$route.params.goodsId,optionsId:i.$route.params.optionsId,total:i.$route.params.total,store_id:i.$route.params.store_id,cart_ids:i.$route.query.cart_ids}));else if(i.$store.state.referer)window.location.href=i.$store.state.referer;else if("selfCarryApply"==i.$route.query.tag)i.$router.push(i.fun.getUrl("SelfCarryApply"));else if("storeApply"==i.$route.query.tag)i.$router.push(i.fun.getUrl("storeApply"));else if("hotelApply"==i.$route.query.tag)i.$router.push(i.fun.getUrl("hotelApply"));else if("hotelSupply"==i.$route.query.tag)i.$router.push(i.fun.getUrl("HotelSupplyIndex"));else if("activity"==i.$route.query.tag)i.$router.push(i.fun.getUrl("activityHome"));else if("oil"==i.$route.query.tag)i.$router.push(i.fun.getUrl("easyRefuel"));else if("timeAppointment_index"==i.$route.query.tag)i.$router.go(-1);else if("tagCloud"==i.$route.query.tag)i.$router.push(i.fun.getUrl("tagCloudIndex"));else if("cake"==i.$route.query.tag){var s=o.regeocode.addressComponent.city?o.regeocode.addressComponent.city:o.regeocode.addressComponent.province;i.$router.push(i.fun.getUrl("sachertorteIndex",{},{city:s}))}else"coffee"==i.$route.query.tag?i.$router.push(i.fun.getUrl("coffee_machine_nearby")):1==i.fun.getKey("error")?i.$router.go(-1):i.$router.push(i.fun.getUrl("o2oHome"))}}))}))}a=new f.a.PlaceSearch(s),a.searchNearBy("",[e.lng,e.lat],1e3,(function(e,t){i.showLoading=!1})),f.a.event.addListener(a,"listElementClick",t)})),t},callback:function(e,t){var o=new Promise((function(e,o){var r=t,a=r.poiList.pois;h=a.copyWithin(0),i.num.push(h),e()}));o.then((function(){return i.demo()}))},demo:function(){if(y++,y>4&&i.num.length>0)return r.clearMap()},goback:function(){this.$router.go(-1)},ready:function(){var e=new f.a.Autocomplete({input:"suggestId",city:i.city});function t(e){f.a.plugin("AMap.Geocoder",(function(){var t=new f.a.Geocoder({city:i.city});t.getAddress(e.poi.location,(function(t,o){if("complete"===t&&"OK"===o.info){var r={lat:e.poi.location.lat,lng:e.poi.location.lng},a={addressComponent:o.regeocode.addressComponent,address:e.poi.address,city:o.regeocode.addressComponent.city?o.regeocode.addressComponent.city:o.regeocode.addressComponent.province,province:o.regeocode.addressComponent.province,title:e.poi.name,point:r,timestamp:Math.round(new Date/1e3)};if(localStorage.setItem("myLocation",JSON.stringify(a)),i.$store.commit("updateLocation",a),i.$store.commit("setLocation",a),"suppligoodsOrde"==i.$route.query.tag)i.$router.go(-1);else if("hotel"==i.$route.query.tag)i.$router.push(i.fun.getUrl("HotelIndex"));else if("appointment"==i.$route.query.tag)i.$router.push(i.fun.getUrl("Appointment"));else if("selfCarry"==i.$route.query.tag||"goodsDetail"==i.$route.query.tag)i.$router.replace(i.fun.getUrl("SelfCarry_info",{tag:i.$route.params.tag,goodsId:i.$route.params.goodsId,optionsId:i.$route.params.optionsId,total:i.$route.params.total,cart_ids:i.$route.params.cart_ids}));else if("goodsorder"==i.$route.query.tag)i.$router.push(i.fun.getUrl("goodsorder",{address_data:i.$route.params.address_data,create:i.$route.params.create,index:i.$route.params.index,district_id:i.$route.params.district_id,pointId:r},{tag:i.$route.params.tag,goodsId:i.$route.params.goodsId,optionsId:i.$route.params.optionsId,total:i.$route.params.total,store_id:i.$route.params.store_id,cart_ids:i.$route.params.cart_ids}));else if("selfCarryApply"==i.$route.query.tag)i.$router.push(i.fun.getUrl("SelfCarryApply"));else if("storeApply"==i.$route.query.tag)i.$router.push(i.fun.getUrl("storeApply"));else if("hotelApply"==i.$route.query.tag)i.$router.push(i.fun.getUrl("hotelApply"));else if("hotelSupply"==i.$route.query.tag)i.$router.push(i.fun.getUrl("HotelSupplyIndex"));else if("activity"==i.$route.query.tag)i.$router.push(i.fun.getUrl("activityHome"));else if(i.$store.state.referer)window.location.href=i.$store.state.referer;else if("oil"==i.$route.query.tag)i.$router.push(i.fun.getUrl("easyRefuel"));else if("tagCloud"==i.$route.query.tag)i.$router.push(i.fun.getUrl("tagCloudIndex"));else if("cake"==i.$route.query.tag){var s=o.regeocode.addressComponent.city?o.regeocode.addressComponent.city:o.regeocode.addressComponent.province;i.$router.push(i.fun.getUrl("sachertorteIndex",{},{city:s}))}else 1==i.fun.getKey("error")?i.$router.go(-1):i.$router.push(i.fun.getUrl("o2oHome"))}else Object(p["a"])("请输入更详细的地址")}))}))}f.a.event.addListener(e,"select",t)}}},v=$,w=(o("f673"),o("2877")),x=Object(w["a"])(v,u,l,!1,null,null,null);t["default"]=x.exports},f673:function(e,t,o){"use strict";o("9243")}}]);