bztang-admin/addons/yun_shop/static/app/js/chunk-7973d410.4fa11d1c.js

1 line
5.3 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7973d410"],{"253a":function(t,e,i){t.exports=i.p+"static/app/img/img_default.a608a24a.png"},"2d2d":function(t,e,i){"use strict";i("7b4a")},"7b4a":function(t,e,i){var a=i("9cae");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("499e").default;o("6ca305d4",a,!0,{sourceMap:!1,shadowMode:!1})},8798:function(t,e,i){t.exports=i.p+"static/app/img/no-more-product.f4632785.png"},"9cae":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".swiper img[data-v-c657e4d6]{width:100%;height:0 auto}.headTop[data-v-c657e4d6]{padding:.5rem .75rem;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;background:#fff}.headTop[data-v-c657e4d6],.headTop .local[data-v-c657e4d6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.headTop .local[data-v-c657e4d6],.headTop .txt[data-v-c657e4d6]{overflow:hidden}.headTop .txt[data-v-c657e4d6]{margin:0 .25rem;text-overflow:ellipsis;white-space:nowrap}.search[data-v-c657e4d6]{width:13.44rem;background:#f6f6f6;border-radius:1.09rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:.5rem .75rem}.search .icon-sousuo1[data-v-c657e4d6]{color:#999}.search .txt[data-v-c657e4d6]{font-size:.75rem;color:#999}.goodsbox[data-v-c657e4d6]{background:#fff}",""]),t.exports=e},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var a=document.documentElement,o=document.body,s={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:o&&(t=o.scrollTop),t},getClientHeight:function(){var t=0;return t=o.clientHeight&&a.clientHeight?Math.min(o.clientHeight,a.clientHeight):Math.max(o.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(o.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(){}}}},f22b1:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"yzSupplyLease"},[i("c-title",{attrs:{hide:!1,text:"租赁"}}),i("div",{staticClass:"headTop"},[i("div",{staticClass:"local",on:{click:t.toLocal}},[i("i",{staticClass:"iconfont icon-a-zu4991"}),i("div",{staticClass:"txt"},[t._v(t._s(t.city))]),i("i",{staticClass:"iconfont icon-icon_more11"})]),i("div",{staticClass:"search",on:{click:t.toSearch}},[i("i",{staticClass:"iconfont icon-sousuo1"}),i("div",{staticClass:"txt"},[t._v("请输入关键字搜索")])])]),i("div",{staticClass:"swiper"},[i("van-swipe",{attrs:{autoplay:t.autoplay,"show-indicators":!1}},t._l(t.rotation,(function(e,a){return i("van-swipe-item",{key:a,on:{click:function(i){return t.toUrl(e)}}},[i("img",{attrs:{src:e.pic}})])})),1)],1),t.goodData?i("goodsList",{attrs:{goods:t.goodData}}):t._e()],1)},o=[],s=i("2909"),n=(i("b64b"),i("14d9"),i("99af"),i("ac0d")),c=i("98e3"),r={mixins:[n["a"]],data:function(){return{city:"请选择区域",region_id:"",rotation:[],goodData:null,page:1,isLoadMore:!0,total_page:0}},components:{goodsList:c["a"]},activated:function(){this.init();var t=JSON.parse(window.localStorage.getItem("yzSupplyArea"));t?(this.region_id=t.region_id,this.city=t.area):(this.$route.query.area&&(this.city=this.$route.query.area),this.$route.query.region_id&&(this.region_id=this.$route.query.region_id)),this.getRotation(),this.getData()},methods:{init:function(){this.goodData=[],this.page=1,this.isLoadMore=!0,this.total_page=0},toUrl:function(t){t.url&&(window.location.href=t.url)},toSearch:function(){this.$router.push(this.fun.getUrl("LeaseSearch",{},{region_id:this.$route.query.region_id}))},toLocal:function(){this.$router.push(this.fun.getUrl("yzSupplyLeaseArea",{},{}))},getData:function(){var t=this;$http.get("plugin.yz-supply-lease.api.goods.goods-list",{page:this.page,"search[region]":this.region_id}," ").then((function(e){1===e.result?(t.goodData=e.data.data,t.isLoadMore=!0,t.total_page=e.data.last_page,t.total_page||(t.total_page=0)):t.$toast(e.msg)})).catch((function(t){}))},getMoreData:function(){var t=this;this.isLoadMore=!1,this.page>=this.total_page||(this.page=this.page+1,$http.post("plugin.yz-supply-lease.api.goods.goods-list",{page:this.page},"加载中").then((function(e){if(t.isLoadMore=!0,1===e.result){var i=e.data.data;t.goodData=[].concat(Object(s["a"])(t.goodData),Object(s["a"])(i))}else t.page=t.page-1,t.isLoadMore=!1}),(function(t){})))},getRotation:function(){var t=this;$http.get("plugin.yz-supply-lease.api.goods.rotation-list",{}," ").then((function(e){1===e.result?t.rotation=e.data:t.$toast(e.msg)})).catch((function(t){}))}}},l=r,d=(i("2d2d"),i("2877")),u=Object(d["a"])(l,a,o,!1,null,"c657e4d6",null);e["default"]=u.exports}}]);