(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order-submit/store-pick"],{"040d":function(t,o,n){},"2f34":function(t,o,n){},3869:function(t,o,n){"use strict";n.r(o);var i=n("b871"),e=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(o,t,(function(){return i[t]}))}(a);o["default"]=e.a},"3b30":function(t,o,n){"use strict";var i=n("040d"),e=n.n(i);e.a},7823:function(t,o,n){"use strict";n.r(o);var i=n("a1d6"),e=n("3869");for(var a in e)["default"].indexOf(a)<0&&function(t){n.d(o,t,(function(){return e[t]}))}(a);n("d8f5"),n("3b30");var s,c=n("f0c5"),u=Object(c["a"])(e["default"],i["b"],i["c"],!1,null,"1179b229",null,!1,i["a"],s);o["default"]=u.exports},a1d6:function(t,o,n){"use strict";var i;n.d(o,"b",(function(){return e})),n.d(o,"c",(function(){return a})),n.d(o,"a",(function(){return i}));var e=function(){var t=this,o=t.$createElement;t._self._c},a=[]},b871:function(t,o,n){"use strict";(function(t){Object.defineProperty(o,"__esModule",{value:!0}),o.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){console.log("onLoad->",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 o=this;console.log("getLocation--\x3e"),t.showLoading({mask:!0,title:"正在获取位置信息"}),t.getLocation({success:function(n){console.log("getLocation success->",n),t.hideLoading(),o.longitude=n.longitude,o.latitude=n.latitude,o.loadData()},fail:function(){t.hideLoading(),t.showModal({title:"提示",content:"获取位置信息失败，需要授权获取您的位置信息",showCancel:!1,confirmText:"打开授权",success:function(o){o.confirm&&t.openSetting({})}})}})},selectLocation:function(){var o=this;console.log("selectLocation--\x3e"),this.manualLocation=!0,t.chooseLocation({success:function(t){console.log("chooseLocation success->",t),o.longitude=t.longitude,o.latitude=t.latitude,o.locationAddress=(t.address||"")+" "+t.name||"",o.locationAddress=o.locationAddress.trim(),o.loadData()},fail:function(t){console.log("chooseLocation fail->",t)}})},loadData:function(){var o=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&&(o.list=n.data.list)})).catch((function(){t.hideLoading()}))},setData:function(o){if("gift"===this.plugin){this.$store.state.gift.store_id;o,this.$store.commit("gift/storeId",o)}else{var n=this.$store.state.orderSubmit.formData;n.list[this.mchIndex].store_id=o,this.$store.commit("orderSubmit/mutSetFormData",n)}t.navigateBack()}}};o.default=n}).call(this,n("543d")["default"])},d8f5:function(t,o,n){"use strict";var i=n("2f34"),e=n.n(i);e.a},e8ab:function(t,o,n){"use strict";(function(t){n("3447");i(n("66fd"));var o=i(n("7823"));function i(t){return t&&t.__esModule?t:{default:t}}t(o.default)}).call(this,n("543d")["createPage"])}},[["e8ab","common/runtime","common/vendor"]]]);