(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order-submit/store-pick"],{"1d42":function(t,i,n){"use strict";var o;n.d(i,"b",(function(){return e})),n.d(i,"c",(function(){return a})),n.d(i,"a",(function(){return o}));var e=function(){var t=this,i=t.$createElement;t._self._c},a=[]},"335a":function(t,i,n){"use strict";n.r(i);var o=n("1d42"),e=n("42a9");for(var a in e)"default"!==a&&function(t){n.d(i,t,(function(){return e[t]}))}(a);n("f41f"),n("7360");var s,u=n("f0c5"),c=Object(u["a"])(e["default"],o["b"],o["c"],!1,null,"c8e2f5ac",null,!1,o["a"],s);i["default"]=c.exports},"42a9":function(t,i,n){"use strict";n.r(i);var o=n("fc68"),e=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(i,t,(function(){return o[t]}))}(a);i["default"]=e.a},"68ee":function(t,i,n){},7360:function(t,i,n){"use strict";var o=n("ad4c"),e=n.n(o);e.a},ad4c:function(t,i,n){},edf1:function(t,i,n){"use strict";(function(t){n("b8bc");o(n("66fd"));var i=o(n("335a"));function o(t){return t&&t.__esModule?t:{default:t}}t(i.default)}).call(this,n("543d")["createPage"])},f41f:function(t,i,n){"use strict";var o=n("68ee"),e=n.n(o);e.a},fc68:function(t,i,n){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n={name:"store-pick",data:function(){return{mchIndex:null,list:null,firstGoodsId:null,plugin:null,manualLocation:!1,longitude:"",latitude:"",locationAddress:null}},onLoad:function(t){this.mchIndex=t.mchIndex,this.firstGoodsId=t.firstGoodsId||null,this.plugin=t.plugin||null},onShow:function(){this.manualLocation||this.getLocation()},methods:{getLocation:function(){var i=this;t.showLoading({mask:!0,title:"正在获取位置信息"}),t.getLocation({success:function(n){t.hideLoading(),i.longitude=n.longitude,i.latitude=n.latitude,i.loadData()},fail:function(){t.hideLoading(),t.showModal({title:"提示",content:"获取位置信息失败，需要授权获取您的位置信息",showCancel:!1,confirmText:"打开授权",success:function(i){i.confirm&&t.openSetting({})}})}})},selectLocation:function(){var i=this;this.manualLocation=!0,t.chooseLocation({success:function(t){i.longitude=t.longitude,i.latitude=t.latitude,i.locationAddress=(t.address||"")+" "+t.name||"",i.locationAddress=i.locationAddress.trim(),i.loadData()}})},loadData:function(){var i=this;t.showLoading({mask:!0,title:"加载中"}),this.$request({url:"booking"===this.plugin?this.$api.book.store_list:this.$api.order.store_list,data:{keyword:"",longitude:this.longitude,latitude:this.latitude,goods_id:this.firstGoodsId}}).then((function(n){t.hideLoading(),0===n.code&&(i.list=n.data.list)})).catch((function(){t.hideLoading()}))},setData:function(i){if("gift"===this.plugin){this.$store.state.gift.store_id;i,this.$store.commit("gift/storeId",i)}else{var n=this.$store.state.orderSubmit.formData;n.list[this.mchIndex].store_id=i,this.$store.commit("orderSubmit/mutSetFormData",n)}t.navigateBack()}}};i.default=n}).call(this,n("543d")["default"])}},[["edf1","common/runtime","common/vendor"]]]);