(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order-submit/store-pick"],{"4aed":function(t,o,n){"use strict";var i,e=function(){var t=this,o=t.$createElement;t._self._c},a=[];n.d(o,"b",(function(){return e})),n.d(o,"c",(function(){return a})),n.d(o,"a",(function(){return i}))},5698:function(t,o,n){"use strict";var i=n("cf83"),e=n.n(i);e.a},"7e9c":function(t,o,n){"use strict";var i=n("f746"),e=n.n(i);e.a},abcc:function(t,o,n){"use strict";n.r(o);var i=n("c7b7"),e=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(o,t,(function(){return i[t]}))}(a);o["default"]=e.a},c7b7: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"])},cf83:function(t,o,n){},da61:function(t,o,n){"use strict";n.r(o);var i=n("4aed"),e=n("abcc");for(var a in e)"default"!==a&&function(t){n.d(o,t,(function(){return e[t]}))}(a);n("5698"),n("7e9c");var s,c=n("f0c5"),u=Object(c["a"])(e["default"],i["b"],i["c"],!1,null,"0de2c03e",null,!1,i["a"],s);o["default"]=u.exports},e69d:function(t,o,n){"use strict";(function(t){n("8748");i(n("66fd"));var o=i(n("da61"));function i(t){return t&&t.__esModule?t:{default:t}}t(o.default)}).call(this,n("543d")["createPage"])},f746:function(t,o,n){}},[["e69d","common/runtime","common/vendor"]]]);