1 line
4.2 KiB
JavaScript
1 line
4.2 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d8cde3dc"],{"1d75":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"search",transition:"fadeInLeft"}},[o("c-title",{attrs:{hide:!1,text:t.storeName}}),o("div",{staticClass:"uou",class:{mout:t.amout},attrs:{id:"soso"}},[o("c-storeList",{attrs:{stores:t.stores,listStyle:t.openTemplate,text:t.storeName,page:t.page,totalPage:t.total_page},on:{changList:t.changList}})],1),o("div",{staticStyle:{height:"3.4375rem",display:"block"}})],1)},i=[],n=(o("e7e5"),o("d399")),s=(o("99af"),o("306c")),r=o("6968"),c=o("ac0d"),l={mixins:[c["a"]],data:function(){return{title:"搜索",inputs:"",amout:!1,order_by:"",order_field:"",id:"",stores:[],isLoadMore:!0,page:1,total_page:0,myLocation:{point:{}},point:{},openTemplate:0,storeName:""}},activated:function(){this.initData(),this.getStoresByCategoryId()},mounted:function(){},methods:{goback:function(){this.$router.go(-1)},getStoresByCategoryId:function(){var t=this;this.fun.getLocation().then((function(e){t.myLocation=e,t.getStoresByCategoryIdLngAndLat(t.myLocation)})).catch((function(t){}))},getStoresByCategoryIdLngAndLat:function(t){var e=this,o=this,a=this.fun.bd_encrypt(t.point.lng,t.point.lat);o.$store.commit("setLocation",t);var i={point:{lat:a.lat,lng:a.lng},city:t.city};this.locaLng=i,a.lng||(a.lng="",a.lat="");var s={category_id:this.id,lng:a.lng,lat:a.lat,city_name:t.city,page:1};$http.get("plugin.store-cashier.frontend.store.store.get-store-list-by-category-id-to-page",s,"").then((function(t){1==t.result?(e.storeName=t.data.store_category_name,o.isLoadMore=!0,o.total_page=t.data.last_page,o.total_page||(o.total_page=0),o.stores=t.data.data,o.openTemplate=t.data.store_list_style||0):(o.stores=[],Object(n["a"])(t.msg))})).catch((function(t){}))},getMoreData:function(t){t||(t=this.myLocation.lng?this.myLocation:this.locaLng);var e=this;if(e.isLoadMore=!1,!(this.page>=this.total_page)){this.page=this.page+1;var o={category_id:this.id,lng:t.point.lng,lat:t.point.lat,city_name:t.city,page:this.page};$http.get("plugin.store-cashier.frontend.store.store.get-store-list-by-category-id-to-page",o,"正在获取更多...").then((function(t){if(1!=t.result)return e.page=e.page-1,void(e.isLoadMore=!1);e.isLoadMore=!0,e.stores=e.stores.concat(t.data.data)}),(function(t){}))}},changList:function(){this.getMoreData(this.myLocation)},initData:function(){this.id=this.$route.params.id,this.stores=[],this.page=1,this.total_page=0,this.isLoadMore=!0,this.point={}}},components:{cStoreList:s["a"],cTitle:r["a"]}},d=l,h=d,g=(o("fa78"),o("2877")),u=Object(g["a"])(h,a,i,!1,null,"5318c82e",null);e["default"]=u.exports},"5d87":function(t,e,o){var a=o("24fb");e=a(!1),e.push([t.i,"#search .osll[data-v-5318c82e]{min-height:100vh;overflow:scroll}#search .uou[data-v-5318c82e]{z-index:99;top:0;transition:.2s;-webkit-transition:.2s;background:#fff}#search .mout[data-v-5318c82e]{top:-2.25rem}.search[data-v-5318c82e]{overflow:hidden;background:#fff;border-bottom:.0625rem solid #f5f5f5}",""]),t.exports=e},ac0d:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var a=document.documentElement,i=document.body,n={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:i&&(t=i.scrollTop),t},getClientHeight:function(){var t=0;return t=i.clientHeight&&a.clientHeight?Math.min(i.clientHeight,a.clientHeight):Math.max(i.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(i.scrollHeight,a.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},e532:function(t,e,o){var a=o("5d87");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=o("499e").default;i("484e11cc",a,!0,{sourceMap:!1,shadowMode:!1})},fa78:function(t,e,o){"use strict";o("e532")}}]); |