1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e98eb3a6"],{"00a5":function(t,e,a){var o=a("24fb");e=o(!1),e.push([t.i,".ell[data-v-eaa84522]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.covert-flex[data-v-eaa84522]{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.covert-flex[data-v-eaa84522],.goods-item[data-v-eaa84522]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.goods-item[data-v-eaa84522]{background-color:#fff;padding:12px;border-radius:8px 8px 8px 8px;margin:0 0 10px 0}.goods-item .orderHead[data-v-eaa84522]{font-size:14px;font-weight:400;padding:0 0 10px 0}.goods-item .orderHead h3[data-v-eaa84522]{color:#00001c;font-weight:400}.goods-item .orderHead p[data-v-eaa84522]{color:var(--themeBaseColor)}.goods-item .order-sum[data-v-eaa84522]{padding:17px 0 0 0;font-size:13px;font-weight:400;color:#00001c}.goods-item .order-sum .price[data-v-eaa84522]{font-weight:500}.goods-item .img[data-v-eaa84522]{min-width:90px;height:90px}.goods-item .min-img[data-v-eaa84522]{min-width:80px;height:80px}.goods-item .wrap[data-v-eaa84522]{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 0 0 10px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.goods-item .wrap h3[data-v-eaa84522]{word-break:break-all;word-wrap:break-word;text-align:left;font-weight:500;color:#00001c}.goods-item .wrap .sum[data-v-eaa84522]{min-width:20%;font-size:13px;font-weight:400;color:#00001c;text-align:right}.goods-item .order-flex[data-v-eaa84522]{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.goods-item .order-address[data-v-eaa84522]{text-align:left;font-size:13px;font-weight:400;color:#6e6e79;padding:15px 0 0 0}.goods-item .order-address .member-info[data-v-eaa84522]{padding:0 0 8px 0}.goods-item .address-btn[data-v-eaa84522]{padding:12px 0 0 0;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.goods-item .address-btn .btn[data-v-eaa84522]{font-size:13px;line-height:13px;font-weight:400;color:#fff;color:var(--themeBaseColor);padding:9px 14px;border-radius:25px 25px 25px 25px;border:1px solid var(--themeBaseColor);-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:10px}.goods-item .classify[data-v-eaa84522]{padding:10px 0 0 0;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}.goods-item .classify .price[data-v-eaa84522]{color:#f15353;font-weight:500;font-size:16px}.goods-item .classify .price span[data-v-eaa84522]{font-size:12px}.goods-item .classify .select[data-v-eaa84522]{background:#f15353;border-radius:50%;padding:5px 6px}.goods-item .classify .select .icon-gouwuche2[data-v-eaa84522]{color:#fff;font-size:13px}",""]),t.exports=e},"148c":function(t,e,a){var o=a("28e4");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("02b5441f",o,!0,{sourceMap:!1,shadowMode:!1})},"28e4":function(t,e,a){var o=a("24fb");e=o(!1),e.push([t.i,'.h-50[data-v-2288200c]{height:50px;clear:both}.van-collapse[data-v-2288200c]:after{border:none}.van-collapse-item__content[data-v-2288200c]{padding:12px 10px}.catagoryBox[data-v-2288200c],.classify-page[data-v-2288200c]{position:relative}.catagoryBox[data-v-2288200c]{z-index:999}.catagoryBox .threeTitle[data-v-2288200c]{height:2rem;line-height:2rem;font-size:.75rem;color:#202020;text-align:left}.catagoryBox dl[data-v-2288200c]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.catagoryBox dl dt[data-v-2288200c]{min-width:58px;font-size:12px;line-height:12px;padding:8px;border-radius:4px;margin-right:8px;margin-bottom:8px;color:#696969;background:#f8f8f6}.catagoryBox dl .addClass[data-v-2288200c],.catagoryBox dl .addClass1[data-v-2288200c]{color:#fb4a4a;background-color:rgba(241,83,83,.1)}.catagoryBox dl .three-btn[data-v-2288200c]{padding:0 24rpx;height:40rpx;line-height:40rpx;font-size:11px;border-radius:2px;border:1px solid #fff;background:#fff}.catagoryBox dl .three-addClass[data-v-2288200c]{color:#f15353;border:1px solid #f15353}.catagoryBox dl .more-btn-class[data-v-2288200c]{background:transparent;border:none;color:#fb5050;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.catagoryBox .activetitle[data-v-2288200c]{overflow-x:auto}.catagoryBox .activetitle dl[data-v-2288200c]{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.catagoryBox .activetitle dl dt[data-v-2288200c]{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-bottom:0}.coverLayer[data-v-2288200c]{width:100%;height:100%;background-color:rgba(0,0,0,.5);position:absolute;top:0;z-index:99}.container[data-v-2288200c]{width:calc(100% - 80px);height:97vh}.classify-content[data-v-2288200c]{position:relative}.classify-content .classify-left[data-v-2288200c]{background-color:#fafafa;min-width:80px;width:80px;height:102vh}.classify-content .classify-left .left-box[data-v-2288200c]{padding:0 0 50px 0}.classify-content .classify-left .left-box div[data-v-2288200c]{padding:19px 10px;text-align:center;font-size:13px;color:#3b3b4a;text-align:left}.classify-content .classify-left .left-box .on[data-v-2288200c]{background:#fff;position:relative;color:var(--themeBaseColor)}.classify-content .classify-left .left-box .on[data-v-2288200c]:after{position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);content:"";width:3px;height:20px;background:var(--themeBaseColor);border-radius:15px 15px 15px 15px}.classify-content .classify-main[data-v-2288200c]{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:90vh;background-color:#fff;position:relative}.classify-content .classify-main .classify-box[data-v-2288200c]{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 0 50px 0;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;cursor:pointer}.classify-content .classify-main .classify-box .goods-item[data-v-2288200c]{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:0;padding:12px 12px 3px 12px;margin:0}.foo-view[data-v-2288200c]{position:fixed;z-index:10;right:12px;bottom:124px;padding:8px;border-radius:50%;background-color:rgba(0,0,0,.7)}.foo-view .icon-shuzicangpin[data-v-2288200c]{color:#fff;font-size:28px}',""]),t.exports=e},"4b16":function(t,e,a){var o=a("24fb"),i=a("1de5"),s=a("dec5");e=o(!1);var r=i(s);e.push([t.i,'#sort[data-v-dd3684ac]{background:#fff;line-height:2.25rem;font-size:12px;color:#333}#sort .grid-content.up[data-v-dd3684ac]:after{background-position:-10.625rem -.9375rem}#sort .grid-content.down[data-v-dd3684ac]:after{background-position:-10.625rem 0}#sort .grid-content.down[data-v-dd3684ac],#sort .grid-content.up[data-v-dd3684ac]{color:#f15353}#sort .grid-content[data-v-dd3684ac]:after{content:"";display:inline-block;width:.5rem;height:.625rem;background:url('+r+") no-repeat;background-size:12.5rem 12.5rem;background-position:-10.625rem -1.875rem;margin-left:.25rem}#sort i[data-v-dd3684ac]{color:#555}#sort .flex-c[data-v-dd3684ac]{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}#sort .flex-c[data-v-dd3684ac],.flexSort[data-v-dd3684ac]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}",""]),t.exports=e},"4e38":function(t,e,a){var o=a("4b16");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("12c03666",o,!0,{sourceMap:!1,shadowMode:!1})},"59df":function(t,e,a){var o=a("72fff");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("c7168b74",o,!0,{sourceMap:!1,shadowMode:!1})},"64fa":function(t,e,a){"use strict";a("148c")},"72fff":function(t,e,a){var o=a("24fb");e=o(!1),e.push([t.i,".catagoryBox[data-v-2288200c] .van-cell__title{overflow:hidden}[data-v-2288200c] .pcStyle .classify-page .foo-view{margin:0 auto}",""]),t.exports=e},8377:function(t,e,a){var o=a("00a5");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("a179ab0e",o,!0,{sourceMap:!1,shadowMode:!1})},"9dc9":function(t,e,a){"use strict";a("8377")},ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var o=document.documentElement,i=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 o&&o.scrollTop?t=o.scrollTop:i&&(t=i.scrollTop),t},getClientHeight:function(){var t=0;return t=i.clientHeight&&o.clientHeight?Math.min(i.clientHeight,o.clientHeight):Math.max(i.clientHeight,o.clientHeight),t},getScrollHeight:function(){return Math.max(i.scrollHeight,o.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(){}}}},b026:function(t,e,a){"use strict";a("59df")},dec5:function(t,e,a){t.exports=a.p+"static/app/img/jd-sprites.fb1e8d8b.png"},ee38:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"goods-item flex",on:{click:function(e){return e.stopPropagation(),t.goodsTo(t.item.id,t.item.goods_id)}}},[t._t("orderHead"),a("div",{staticClass:"flex"},[a("div",{staticClass:"img",class:["classify"===t.className?"min-img":""]},["classify"!==t.className?a("van-image",{attrs:{width:"90px",height:"90px",src:t.item&&t.item.goods&&t.item.goods.thumb,radius:"8px"}}):a("van-image",{attrs:{width:"80px",height:"80px",src:t.item.thumb,radius:"8px"}})],1),a("div",{staticClass:"wrap flex",class:["covert"===t.className||"present"===t.className?"covert-flex":"","order"===t.className||"classify"===t.className?"order-flex":""]},[a("div",{staticClass:"flex-j-sb title"},["classify"===t.className?a("h3",{staticClass:"ell"},[t._v(t._s(t.item.title))]):a("h3",{staticClass:"ell"},[t._v(t._s(t.item&&t.item.goods&&t.item.goods.title||t.item&&t.item.goods_name))]),t._t("amount")],2),t._t("orderSum"),t._t("convertBtn"),t._t("member"),t._t("classify")],2)]),t._t("orderAddress")],2)},i=[],s=(a("4056"),a("44bf")),r=(a("a9e3"),a("14d9"),{name:"",props:{item:{type:Object,default:function(){return{}}},className:String,goodIndex:Number},components:{VanImage:s["a"]},data:function(){return{}},computed:{},watch:{},methods:{goodsTo:function(t,e){"classify"===this.className&&t&&this.$router.push(this.fun.getUrl("goods",{id:t},{})),"covert"===this.className&&e&&this.$router.push(this.fun.getUrl("goods",{id:e},{}))}},created:function(){},mounted:function(){},beforeCreate:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}}),n=r,c=(a("9dc9"),a("2877")),l=Object(c["a"])(n,o,i,!1,null,"eaa84522",null);e["a"]=l.exports},f40b:function(t,e,a){"use strict";a("4e38")},f701:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"classify-page"},[a("van-search",{attrs:{placeholder:"搜索藏品",shape:"round",disabled:""},on:{click:t.searchTo},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}}),a("div",{staticClass:"classify-content flex"},[a("div",{ref:"classifyArr",staticClass:"classify-left",staticStyle:{overflow:"hidden"}},[t.classifyArr.length>1?a("div",{staticClass:"left-box"},[a("div",{class:-1===t.classifyIndex?"on":"",on:{click:t.letterOn}},[t._v(t._s(t.$i18n.t("category.推荐分类")))]),t._l(t.classifyArr,(function(e,o){return a("block",{key:o},[a("div",{class:t.classifyIndex===o?"on":"",on:{"!click":function(a){return t.classifyOnText(o,e.id,a)}}},[t._v(t._s(e.name))])])}))],2):t._e()]),a("div",{staticClass:"container"},[a("div",{staticClass:"catagoryBox"},[a("van-collapse",{attrs:{border:!1},on:{change:t.titleChange},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("van-collapse-item",{attrs:{name:"1"}},[a("div",{staticClass:"activetitle",attrs:{slot:"title"},slot:"title"},[a("dl",{directives:[{name:"show",rawName:"v-show",value:!t.fun.isTextEmpty(t.showTitle),expression:"!fun.isTextEmpty(showTitle)"}]},t._l(t.showTitle,(function(e,o){return a("dt",{key:o,class:e.id==t.secondaryId?"addClass":"removeClass",on:{click:function(a){return a.stopPropagation(),t.chooseSecondary(e.id,e.level)}}},[t._v(t._s(e.name))])})),0),a("span",{directives:[{name:"show",rawName:"v-show",value:t.fun.isTextEmpty(t.showTitle),expression:"fun.isTextEmpty(showTitle)"}]},[t._v(t._s(t.$i18n.t("category.选择分类")))])]),a("div",{staticStyle:{"overflow-y":"scroll","max-height":"32vh"}},[a("dl",[t._l(t.secondArr,(function(e,o){return a("dt",{key:o,class:e.id==t.secondaryId?"addClass1":"removeClass1",on:{click:function(a){return a.stopPropagation(),t.chooseSecondary(e.id,e.level)}}},[t._v(" "+t._s(e.name)+" ")])})),a("dt",{directives:[{name:"show",rawName:"v-show",value:t.isCategoryMore,expression:"isCategoryMore"}],staticClass:"more-btn-class",on:{click:function(e){return e.stopPropagation(),t.getMoreData_1(0)}}},[t._v("查看更多"),a("i",{staticClass:"iconfont icon-member-bottom"})])],2)]),a("div",{staticClass:"f-10 c-bbb flex-c mt-18",on:{click:function(e){e.stopPropagation(),t.activeName=[]}}},[t._v("点击收起 "),a("i",{staticClass:"iconfont icon-member-bottom"})]),t.fun.isTextEmpty(t.secondArr)?a("p",[t._v(t._s(t.$i18n.t("category.暂无其他分类")))]):t._e()])],1)],1),a("c-sort",{attrs:{show:!0,pluginType:t.pluginType},on:{sortIn:t.sortOut}}),a("div",{ref:"handpickList",staticClass:"classify-main",staticStyle:{overflow:"hidden"}},["1"==this.activeName?a("div",{staticClass:"coverLayer",on:{click:t.maskChange}}):t._e(),t.classifyList.length>0?a("div",{staticClass:"classify-box flex"},[t._l(t.classifyList,(function(e,o){return a("goods-item",{key:o,attrs:{item:e,index:o,className:"classify"},scopedSlots:t._u([{key:"classify",fn:function(){return[a("div",{staticClass:"flex flex-j-sb classify"},[a("p",{staticClass:"price"},[a("span",[t._v("¥")]),t._v(t._s(e.price))])])]},proxy:!0}],null,!0)})})),a("span",{staticStyle:{display:"inline-block",width:"100%",height:"5rem"},attrs:{id:"loadMore"}})],2):a("van-empty",{attrs:{description:"暂无数据"}})],1)],1)]),a("div",{staticClass:"foo-view",on:{click:function(e){return e.stopPropagation(),t.goodsNav.apply(null,arguments)}}},[a("div",{staticClass:"iconfont icon-shuzicangpin"})])],1)},i=[],s=a("2909"),r=(a("14d9"),a("ac1f"),a("841c"),a("99af"),a("ee38")),n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("van-row",{style:{background:t.supplier?"#f6f6f6":"fff"},attrs:{id:"sort"}},[a("div",{staticClass:"flexSort"},["LeaseSearch"!=t.typeName?a("van-col",{attrs:{span:t.show?6:8}},[t.supplier?t._e():a("div",{staticClass:"grid-content",class:{active:1==t.sort.tab,up:1==t.sort.up,down:1==t.sort.down},on:{click:function(e){return t.toggle(e,1)}}},[t._v(" 评价 ")]),t.supplier?a("div",{staticClass:"grid-content",class:{active:5==t.sort.tab,up:5==t.sort.up,down:5==t.sort.down},on:{click:function(e){return t.toggle(e,5)}}},[t._v(" 综合 ")]):t._e()]):t._e(),a("van-col",{attrs:{span:t.show?6:8}},[a("div",{staticClass:"grid-content",class:{active:2==t.sort.tab,up:2==t.sort.up,down:2==t.sort.down},on:{click:function(e){return t.toggle(e,2)}}},[t._v(" 销量 ")])]),a("van-col",{attrs:{span:t.show?6:8}},[a("div",{staticClass:"grid-content",class:{active:3==t.sort.tab,up:3==t.sort.up,down:3==t.sort.down},on:{click:function(e){return t.toggle(e,3)}}},[t._v(" 价格 ")])])],1)])},c=[],l=a("5530"),d=(a("4e82"),a("5880")),f={props:{text:{},hide:{},show:{default:!1},supplier:{default:!1},typeName:{type:String,default:""}},data:function(){return{sort:{up:!1,dows:!1,tab:0}}},computed:Object(l["a"])(Object(l["a"])({},Object(d["mapState"])(["view"])),{},{classObject:function(){return{active:this.isActive&&!this.error,"text-danger":this.error&&"fatal"===this.error.type}}}),methods:Object(l["a"])(Object(l["a"])({},Object(d["mapMutations"])(["views"])),{},{toggle:function(t,e){this.sort.up=e;var a="";4==e?this.$emit("showscreen"):(1==e&&(a="comment_num"),2==e&&(a="show_sales"),5==e&&(a="id"),"grid-content up"==t.target.className?(3==e&&(a="max_price"),t.target.className="grid-content down",this.$emit("sortIn",{order_field:a,order_by:"desc"})):(3==e&&(a="min_price"),t.target.className="grid-content up",this.$emit("sortIn",{order_field:a,order_by:"asc"})))}}),mounted:function(){this.sort.up=!1,this.sort.down=!1}},p=f,h=(a("f40b"),a("2877")),u=Object(h["a"])(p,n,c,!1,null,"dd3684ac",null),g=u.exports,m=a("1fba"),v=a("ac0d"),x={name:"",components:{goodsItem:r["a"],cSort:g},mixins:[v["a"]],data:function(){return{value:"",pluginType:"collection-center",isLoadMore:!0,total_page:0,query:{parent_id:"",is_home:""},params:{search:{keyword:"",parentid:"",childid:""},order_field:"",order_by:"",page:1},storeScroll:"",classifyScroll:"",classifyIndex:0,activeName:[],classifyArr:[],showTitle:[],secondaryId:"",secondArr:[{id:"",name:"全部"}],classifyList:[]}},computed:{},watch:{},methods:{goodsNav:function(){this.$router.push(this.fun.getUrl("collectionUser",{},{}))},sortOut:function(t){0!=this.classifyList.length&&(this.params.page=1,this.params.order_field=t.order_field,this.params.order_by=t.order_by,this.categoryData())},letterOn:function(){this.secondArr=[{id:"",name:"全部"}],this.showTitle=[],this.classifyIndex=-1,this.query.parent_id="",this.query.is_home=1,this.params.search.parentid="",this.params.search.childid="",this.secondaryId="",this.storeScroll&&this.storeScroll.scrollTo(0,0),this.category2(),this.categoryData()},chooseSecondary:function(t,e){this.activeName=[],1==e?(this.params.search.parentid=t,this.params.search.childid=""):(this.params.search.parentid="",this.params.search.childid=t),this.secondaryId=t,this.params.page=1,this.storeScroll&&this.storeScroll.scrollTo(0,0),this.showTitle=this.secondArr,this.categoryData()},maskChange:function(){this.activeName=[]},classifyOnText:function(t,e){this.classifyIndex=t,this.params.search.parentid=e,this.query.parent_id=e,this.params.page=1,this.query.is_home=0,this.params.search.childid="",this.secondArr=[{id:"",name:"全部"}],this.showTitle=[],this.secondaryId="",this.storeScroll&&this.storeScroll.scrollTo(0,0),this.category2(),this.categoryData()},initData:function(){this.params.page=1,this.query.parent_id="",this.params.search.parentid="",this.params.search.childid="",this.query.parentid="",this.classifyIndex=0,this.query.is_home=0,this.classifyArr=[],this.secondArr=[{id:"",name:"全部"}]},category:function(){var t=this;$http.post("plugin.collection-center.frontend.controllers.goods.category.index",this.query,"loading").then((function(e){if(1===e.result){var a=e.data;t.classifyArr=a.category_list,t.classifyArr&&(t.params.search.parentid=a.category_list[0].id,t.query.parent_id=a.category_list[0].id,t.categoryData(),t.category2())}else t.$dialog.alert({message:e.msg})})).catch((function(t){}))},category2:function(){var t=this;$http.post("plugin.collection-center.frontend.controllers.goods.category.index",this.query,"loading").then((function(e){if(1===e.result){var a=e.data,o=a.category_list;t.secondArr=[].concat(Object(s["a"])(t.secondArr),Object(s["a"])(o)),t.showTitle=t.secondArr}else t.$dialog.alert({message:e.msg})})).catch((function(t){}))},titleChange:function(t){1==t[0]?this.showTitle=[]:this.showTitle=this.secondArr},categoryData:function(){var t=this;$http.post("plugin.collection-center.frontend.controllers.goods.goods.index",this.params,"loading").then((function(e){if(1===e.result){var a=e.data,o=a.goods_list.data;t.isLoadMore=!0,t.total_page=a.goods_list.last_page,t.total_page||(t.params.page=0),t.classifyList=o,t.$nextTick((function(){t.classifyList.length>0&&t.debounce()}))}else t.$dialog.alert({message:e.msg})})).catch((function(t){}))},getMoreData:function(){var t=this;this.isLoadMore=!1,this.params.page>=this.total_page||(this.params.page=this.params.page+1,$http.post("plugin.collection-center.frontend.controllers.goods.goods.index",this.params,"加载中").then((function(e){if(t.isLoadMore=!0,1===e.result){var a,o=null===(a=e.data.goods_list)||void 0===a?void 0:a.data;t.classifyList=[].concat(Object(s["a"])(t.classifyList),Object(s["a"])(o))}else t.params.page=t.params.page-1,t.isLoadMore=!1}),(function(t){})))},debounce:function(){var t=this;this.debounce_timer&&clearTimeout(this.debounce_timer),this.debounce_timer=setTimeout((function(){t._initScrollList()}),800)},searchTo:function(){this.$router.push(this.fun.getUrl("search",{fromHome:1},{plugin_type:"collection-center"}))},_initScrollList:function(){var t=this;this.classifyList.length>0?this.storeScroll=new m["a"](this.$refs.handpickList,{click:!0,scrollY:!0,probeType:3,swipeBounceTime:500,useTransition:!1,mouseWheel:!0}):this.storeScroll.refresh();var e=document.getElementById("loadMore");this.storeScroll.on("scroll",(function(a){var o,i;(null===e||void 0===e?void 0:e.offsetTop)>(null===(o=t.$refs.handpickList)||void 0===o?void 0:o.offsetHeight)&&(null===e||void 0===e?void 0:e.offsetTop)+a.y<(null===(i=t.$refs)||void 0===i?void 0:i.handpickList.offsetHeight)&&t.isLoadMore&&(t.getMoreData(),setTimeout((function(){t.storeScroll.refresh()}),800))})),this.$once("hook:beforeDestroy",(function(){window.removeEventListener("scroll",t.storeScroll)}))}},created:function(){},mounted:function(){},beforeCreate:function(){},beforeMount:function(){},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){this.initData(),this.category()}},b=x,y=b,w=(a("b026"),a("64fa"),Object(h["a"])(y,o,i,!1,null,"2288200c",null));e["default"]=w.exports}}]); |