(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/store/store"],{"3c7b":function(t,o,n){"use strict";var e=n("c715"),i=n.n(e);i.a},"5c15":function(t,o,n){"use strict";(function(t){n("2d0a");e(n("66fd"));var o=e(n("c7ed7"));function e(t){return t&&t.__esModule?t:{default:t}}t(o.default)}).call(this,n("543d")["createPage"])},"8c4f":function(t,o,n){"use strict";(function(t){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var e=function(){n.e("components/page-component/app-shop/app-shop").then(function(){return resolve(n("c9e9"))}.bind(null,n)).catch(n.oe)},i={name:"store",components:{appShop:e},data:function(){return{getFocus:!1,longitude:0,latitude:0,url:"",keyword:"",goods_id:0,list:null,args:!1,load:!1,page:1,toSearch:!1}},onLoad:function(o){this.$commonLoad.onload(o);var n=this;o.book_id?(n.url=n.$api.book.store_list,n.goods_id=o.book_id):(n.url=n.$api.store.list,n.goods_id=0),this.t((function(){t.getLocation({success:function(t){n.longitude=t.longitude,n.latitude=t.latitude,n.loadData()},fail:function(){t.showToast({title:"请开启手机位置权限",icon:"none",duration:1e3,success:function(){}})}})}))},onPullDownRefresh:function(){var o=this;o.keyword="",o.toSearch=!1,o.page=1,this.t((function(){t.getLocation({success:function(t){o.longitude=t.longitude,o.latitude=t.latitude,o.loadData()},fail:function(){t.showToast({title:"请开启手机位置权限",icon:"none",duration:1e3,success:function(){}})},complete:function(){t.stopPullDownRefresh()}})}))},onShareAppMessage:function(){return this.$shareAppMessage({title:this.$children[0].navigationBarTitle,path:"/pages/store/store",params:{}})},onReachBottom:function(){var t=this;if(!t.args&&!t.load){t.load=!0;var o=t.page+1;t.$request({url:t.url,data:{page:o,longitude:t.longitude,latitude:t.latitude,keyword:t.keyword,goods_id:t.goods_id}}).then((function(n){if(0===n.code){var e=[o,0===n.data.list.length,t.list.concat(t.forMatter(n.data.list))];t.page=e[0],t.args=e[1],t.list=e[2]}t.load=!1}))}},methods:{t:function(o){var n="scope.userLocation";t.authorize({scope:n,success:function(t){o()},fail:function(e){t.showModal({title:"提示",content:"您好,请先授权地理位置权限",showCancel:!1,success:function(e){e.confirm&&t.openSetting({success:function(t){t.authSetting[n]&&o()}})}})}})},forMatter:function(t){return t.forEach((function(t,o){t.pic_url=t.cover_url;for(var n=[],e=0;e<t.score;e++)n.push(e);t.score=n})),t},bindConfirm:function(t){this.loadData()},beSearch:function(t){0===this.keyword.length&&(this.toSearch=!this.toSearch,this.getFocus=this.toSearch)},cancelPrint:function(){this.keyword="",this.toSearch=!1,this.loadData()},bindInput:function(t){this.keyword=t.detail.value},loadData:function(){var t=this;t.$showLoading(),t.$request({url:t.url,data:{keyword:t.keyword,longitude:t.longitude,latitude:t.latitude,goods_id:t.goods_id}}).then((function(o){t.$hideLoading(),0===o.code&&(t.list=t.forMatter(o.data.list))})).catch((function(){t.$hideLoading()}))}}};o.default=i}).call(this,n("543d")["default"])},c715:function(t,o,n){},c7ed7:function(t,o,n){"use strict";n.r(o);var e=n("d768"),i=n("e803");for(var a in i)"default"!==a&&function(t){n.d(o,t,(function(){return i[t]}))}(a);n("3c7b");var c,u=n("f0c5"),s=Object(u["a"])(i["default"],e["b"],e["c"],!1,null,"69aa75fc",null,!1,e["a"],c);o["default"]=s.exports},d768:function(t,o,n){"use strict";var e;n.d(o,"b",(function(){return i})),n.d(o,"c",(function(){return a})),n.d(o,"a",(function(){return e}));var i=function(){var t=this,o=t.$createElement;t._self._c},a=[]},e803:function(t,o,n){"use strict";n.r(o);var e=n("8c4f"),i=n.n(e);for(var a in e)"default"!==a&&function(t){n.d(o,t,(function(){return e[t]}))}(a);o["default"]=i.a}},[["5c15","common/runtime","common/vendor"]]]);