pages-product-list.fee3c001.js 18 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-list"],{"1f6c":function(t,e,a){"use strict";a.r(e);var i=a("7d6a"),n=a("7a9b");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("ac92");var r,d=a("f0c5"),s=Object(d["a"])(n["default"],i["b"],i["c"],!1,null,"5516c8de",null,!1,i["a"],r);e["default"]=s.exports},3120:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/uni-page-body[data-v-754868e8],\n.content[data-v-754868e8]{background:#f8f8f8}.content[data-v-754868e8]{padding-top:%?96?%}.navbar[data-v-754868e8]{position:fixed;left:0;top:var(--window-top);display:flex;width:100%;height:%?80?%;background:#fff;box-shadow:0 %?2?% %?10?% rgba(0,0,0,.06);z-index:10}.navbar .nav-item[data-v-754868e8]{flex:1;display:flex;justify-content:center;align-items:center;height:100%;font-size:%?30?%;color:#303133;position:relative}.navbar .nav-item.current[data-v-754868e8]{color:#5dbc7c}.navbar .nav-item.current[data-v-754868e8]:after{content:"";position:absolute;left:50%;bottom:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:%?120?%;height:0;border-bottom:%?4?% solid #5dbc7c}.navbar .p-box[data-v-754868e8]{display:flex;flex-direction:column}.navbar .p-box .iconfont[data-v-754868e8]{display:flex;align-items:center;justify-content:center;width:%?30?%;height:%?14?%;line-height:1;margin-left:%?4?%;font-size:%?26?%;color:#888}.navbar .p-box .iconfont.active[data-v-754868e8]{color:#5dbc7c}.navbar .p-box .xia[data-v-754868e8]{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.navbar .cate-item[data-v-754868e8]{display:flex;justify-content:center;align-items:center;height:100%;width:%?80?%;position:relative;font-size:%?44?%}.navbar .cate-item[data-v-754868e8]:after{content:"";position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);border-left:1px solid #ddd;width:0;height:%?36?%}\n/* 分类 */.cate-mask[data-v-754868e8]{position:fixed;left:0;top:var(--window-top);bottom:0;width:100%;background:transparent;z-index:95;transition:.3s}.cate-mask .cate-content[data-v-754868e8]{width:%?630?%;height:100%;background:#fff;float:right;-webkit-transform:translateX(100%);transform:translateX(100%);transition:.3s}.cate-mask.none[data-v-754868e8]{display:none}.cate-mask.show[data-v-754868e8]{background:rgba(0,0,0,.4)}.cate-mask.show .cate-content[data-v-754868e8]{-webkit-transform:translateX(0);transform:translateX(0)}.cate-list[data-v-754868e8]{display:flex;flex-direction:column;height:100%}.cate-list .cate-item[data-v-754868e8]{display:flex;align-items:center;height:%?90?%;padding-left:%?30?%;font-size:%?28?%;color:#555;position:relative}.cate-list .two[data-v-754868e8]{height:%?64?%;color:#303133;font-size:%?30?%;background:#f8f8f8}.cate-list .active[data-v-754868e8]{color:#5dbc7c}\n/* 商品列表 */.goods-list[data-v-754868e8]{display:flex;flex-wrap:wrap;padding:0 %?30?%;background:#fff}.goods-list .goods-item[data-v-754868e8]{display:flex;flex-direction:column;width:48%;padding-bottom:%?40?%}.goods-list .goods-item[data-v-754868e8]:nth-child(2n + 1){margin-right:4%}.goods-list .image-wrapper[data-v-754868e8]{width:100%;height:%?330?%;border-radius:3px;overflow:hidden}.goods-list .image-wrapper uni-image[data-v-754868e8]{width:100%;height:100%;opacity:1}.goods-list .title[data-v-754868e8]{font-size:%?32?%;color:#303133;line-height:%?80?%}.goods-list .price-box[data-v-754868e8]{display:flex;align-items:center;justify-content:space-between;padding-right:%?10?%;font-size:%?24?%;color:#909399}.goods-list .price[data-v-754868e8]{font-size:%?32?%;color:#5dbc7c;line-height:1}.goods-list .price[data-v-754868e8]:before{content:"¥";font-size:%?26?%}body.?%PAGE?%[data-v-754868e8]{background:#f8f8f8}',""]),t.exports=e},3585:function(t,e,a){"use strict";a.r(e);var i=a("abbb"),n=a.n(i);for(var o in i)"default"!==o&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},"53ea":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".uni-load-more[data-v-5516c8de]{display:flex;flex-direction:row;height:%?80?%;align-items:center;justify-content:center}.uni-load-more__text[data-v-5516c8de]{font-size:%?28?%;color:#999}.uni-load-more__img[data-v-5516c8de]{height:24px;width:24px;margin-right:10px}.uni-load-more__img>.load[data-v-5516c8de]{position:absolute}.uni-load-more__img>.load .item[data-v-5516c8de]{width:6px;height:2px;border-top-left-radius:1px;border-bottom-left-radius:1px;background:#999;position:absolute;opacity:.2;-webkit-transform-origin:50%;transform-origin:50%;-webkit-animation:load-data-v-5516c8de 1.56s ease infinite;animation:load-data-v-5516c8de 1.56s ease infinite}.uni-load-more__img>.load .item[data-v-5516c8de]:nth-child(1){-webkit-transform:rotate(90deg);transform:rotate(90deg);top:2px;left:9px}.uni-load-more__img>.load .item[data-v-5516c8de]:nth-child(2){-webkit-transform:rotate(180deg);transform:rotate(180deg);top:11px;right:0}.uni-load-more__img>.load .item[data-v-5516c8de]:nth-child(3){-webkit-transform:rotate(270deg);transform:rotate(270deg);bottom:2px;left:9px}.uni-load-more__img>.load .item[data-v-5516c8de]:nth-child(4){top:11px;left:0}.load1[data-v-5516c8de],\n.load2[data-v-5516c8de],\n.load3[data-v-5516c8de]{height:24px;width:24px}.load2[data-v-5516c8de]{-webkit-transform:rotate(30deg);transform:rotate(30deg)}.load3[data-v-5516c8de]{-webkit-transform:rotate(60deg);transform:rotate(60deg)}.load1 .item[data-v-5516c8de]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.load2 .item[data-v-5516c8de]:nth-child(1){-webkit-animation-delay:.13s;animation-delay:.13s}.load3 .item[data-v-5516c8de]:nth-child(1){-webkit-animation-delay:.26s;animation-delay:.26s}.load1 .item[data-v-5516c8de]:nth-child(2){-webkit-animation-delay:.39s;animation-delay:.39s}.load2 .item[data-v-5516c8de]:nth-child(2){-webkit-animation-delay:.52s;animation-delay:.52s}.load3 .item[data-v-5516c8de]:nth-child(2){-webkit-animation-delay:.65s;animation-delay:.65s}.load1 .item[data-v-5516c8de]:nth-child(3){-webkit-animation-delay:.78s;animation-delay:.78s}.load2 .item[data-v-5516c8de]:nth-child(3){-webkit-animation-delay:.91s;animation-delay:.91s}.load3 .item[data-v-5516c8de]:nth-child(3){-webkit-animation-delay:1.04s;animation-delay:1.04s}.load1 .item[data-v-5516c8de]:nth-child(4){-webkit-animation-delay:1.17s;animation-delay:1.17s}.load2 .item[data-v-5516c8de]:nth-child(4){-webkit-animation-delay:1.3s;animation-delay:1.3s}.load3 .item[data-v-5516c8de]:nth-child(4){-webkit-animation-delay:1.43s;animation-delay:1.43s}@-webkit-keyframes load-data-v-5516c8de{0%{opacity:1}100%{opacity:.2}}",""]),t.exports=e},6046:function(t,e,a){var i=a("3120");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("38f4ea84",i,!0,{sourceMap:!1,shadowMode:!1})},6884:function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.getProducts=o,e.goodsDetail=r,e.getBargainList=d,e.cartAdd=s,e.collectAdd=l,e.collectDel=c,e.searchKeyword=u,e.groomList=f,e.seckillGoods=v,e.groupGoods=m,e.getCategoryList=p,e.getCombinationList=g,e.getCombinationLisRemove=h,e.getCombinationLisPink=b,e.getCombinationPoster=w,e.getSeckillClass=x,e.getSeckillList=y,e.reply_config=k,e.reply_list=C,e.getJfList=_,e.getJfDetail=L,e.getBl=T;var n=i(a("0e39"));function o(t){return(0,n.default)({url:"/api/products",method:"get",data:t})}function r(t,e){return(0,n.default)({url:"/api/product/detail/"+e,method:"get",data:t})}function d(t){return(0,n.default)({url:"/api/bargain/list",method:"get",data:t})}function s(t){return(0,n.default)({url:"/api/cart/add",method:"post",data:t})}function l(t){return(0,n.default)({url:"/api/collect/add",method:"post",data:t})}function c(t){return(0,n.default)({url:"/api/collect/del",method:"post",data:t})}function u(t){return(0,n.default)({url:"/api/search/keyword",method:"get",data:t})}function f(t,e){return(0,n.default)({url:"/api/groom/list/"+e,method:"get",data:t})}function v(t,e){return(0,n.default)({url:"/api/seckill/detail/"+e,method:"get",data:t})}function m(t,e){return(0,n.default)({url:"/api/combination/detail/"+e,method:"get",data:t})}function p(t){return(0,n.default)({url:"/api/category",method:"get",data:t})}function g(t){return(0,n.default)({url:"/api/combination/list",method:"get",data:t})}function h(t,e){return(0,n.default)({url:"/api/combination/remove"+e,method:"get",data:t})}function b(t,e){return(0,n.default)({url:"/api/combination/pink/"+e,method:"get",data:t})}function w(t){return(0,n.default)({url:"/api/combination/poster",method:"post",data:t})}function x(t){return(0,n.default)({url:"/api/seckill/index",method:"get",data:t})}function y(t,e){return(0,n.default)({url:"/api/seckill/list/"+e,method:"get",data:t})}function k(t,e){return(0,n.default)({url:"/api/reply/config/"+e,method:"get",data:t})}function C(t,e){return(0,n.default)({url:"/api/reply/list/"+e,method:"get",data:t})}function _(t){return(0,n.default)({url:"/api/juniu/lst",method:"post",data:t})}function L(t){return(0,n.default)({url:"/api/juniu/info",method:"get",data:t})}function T(t){return(0,n.default)({url:"/api/index",method:"get",data:t})}},"7a9b":function(t,e,a){"use strict";a.r(e);var i=a("b2e3"),n=a.n(i);for(var o in i)"default"!==o&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},"7d6a":function(t,e,a){"use strict";var i;a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return i}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"uni-load-more"},[a("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:"loading"===t.status&&t.showIcon,expression:"status === 'loading' && showIcon"}],staticClass:"uni-load-more__img"},[a("v-uni-view",{staticClass:"load1 load"},[a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}})],1),a("v-uni-view",{staticClass:"load2 load"},[a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}})],1),a("v-uni-view",{staticClass:"load3 load"},[a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}})],1)],1),a("v-uni-text",{staticClass:"uni-load-more__text",style:{color:t.color}},[t._v(t._s("more"===t.status?t.contentText.contentdown:"loading"===t.status?t.contentText.contentrefresh:t.contentText.contentnomore))])],1)},o=[]},"89cb":function(t,e,a){"use strict";a.r(e);var i=a("a55f"),n=a("3585");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("f7c2");var r,d=a("f0c5"),s=Object(d["a"])(n["default"],i["b"],i["c"],!1,null,"754868e8",null,!1,i["a"],r);e["default"]=s.exports},"99df":function(t,e,a){var i=a("53ea");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("d77b291c",i,!0,{sourceMap:!1,shadowMode:!1})},a55f:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return i}));var i={uniLoadMore:a("1f6c").default},n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"content"},[a("v-uni-view",{staticClass:"navbar",style:{position:t.headerPosition,top:t.headerTop}},[a("v-uni-view",{staticClass:"nav-item",class:{current:0===t.filterIndex},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.tabClick(0)}}},[t._v("综合排序")]),a("v-uni-view",{staticClass:"nav-item",class:{current:1===t.filterIndex},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.tabClick(1)}}},[a("v-uni-text",[t._v("销量优先")]),a("v-uni-view",{staticClass:"p-box"},[a("v-uni-text",{staticClass:"iconfont iconfold",class:{active:1===t.numberOrder&&1===t.filterIndex}}),a("v-uni-text",{staticClass:"iconfont iconfold xia",class:{active:2===t.numberOrder&&1===t.filterIndex}})],1)],1),a("v-uni-view",{staticClass:"nav-item",class:{current:2===t.filterIndex},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.tabClick(2)}}},[a("v-uni-text",[t._v("价格")]),a("v-uni-view",{staticClass:"p-box"},[a("v-uni-text",{staticClass:"iconfont iconfold",class:{active:1===t.priceOrder&&2===t.filterIndex}}),a("v-uni-text",{staticClass:"iconfont iconfold xia",class:{active:2===t.priceOrder&&2===t.filterIndex}})],1)],1),a("v-uni-text",{staticClass:"cate-item iconfont iconapps",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleCateMask("show")}}})],1),a("v-uni-view",{staticClass:"goods-list"},t._l(t.goodsList,(function(e,i){return a("v-uni-view",{key:i,staticClass:"goods-item",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.navToDetailPage(e)}}},[a("v-uni-view",{staticClass:"image-wrapper"},[a("v-uni-image",{attrs:{src:e.image,mode:"aspectFill"}})],1),a("v-uni-text",{staticClass:"title clamp"},[t._v(t._s(e.title))]),a("v-uni-view",{staticClass:"price-box"},[a("v-uni-text",{staticClass:"price"},[t._v(t._s(e.price))]),a("v-uni-text",[t._v("已售 "+t._s(e.sales))])],1)],1)})),1),a("uni-load-more",{attrs:{status:t.loadingType}}),a("v-uni-view",{staticClass:"cate-mask",class:0===t.cateMaskState?"none":1===t.cateMaskState?"show":"",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggleCateMask.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"cate-content",on:{click:function(e){e.stopPropagation(),e.preventDefault(),arguments[0]=e=t.$handleEvent(e),t.stopPrevent.apply(void 0,arguments)},touchmove:function(e){e.stopPropagation(),e.preventDefault(),arguments[0]=e=t.$handleEvent(e),t.stopPrevent.apply(void 0,arguments)}}},[a("v-uni-scroll-view",{staticClass:"cate-list",attrs:{"scroll-y":!0}},t._l(t.cateList,(function(e){return a("v-uni-view",{key:e.id},[a("v-uni-view",{staticClass:"cate-item b-b two"},[t._v(t._s(e.cate_name))]),t._l(e.children,(function(e){return a("v-uni-view",{key:e.id,staticClass:"cate-item b-b",class:{active:e.id==t.cateId},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.changeCate(e)}}},[t._v(t._s(e.cate_name))])}))],2)})),1)],1)],1)],1)},o=[]},abbb:function(t,e,a){"use strict";var i=a("4ea4");a("99af"),a("4160"),a("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var n=i(a("1da1")),o=i(a("1f6c")),r=a("6884"),d={components:{uniLoadMore:o.default},data:function(){return{cateMaskState:0,headerPosition:"fixed",headerTop:"0px",loadingType:"more",filterIndex:0,numberOrder:0,limit:6,page:0,cateId:0,priceOrder:0,cateList:[],goodsList:[]}},onLoad:function(t){this.headerTop=document.getElementsByTagName("uni-page-head")[0].offsetHeight+"px",this.cateId=t.tid,this.loadCateList(t.fid,t.sid),this.loadData()},onPageScroll:function(t){t.scrollTop>=0?this.headerPosition="fixed":this.headerPosition="absolute"},onPullDownRefresh:function(){this.loadData("refresh")},onReachBottom:function(){this.loadData()},methods:{loadCateList:function(t,e){var a=this;return(0,n.default)(regeneratorRuntime.mark((function e(){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=a,(0,r.getCategoryList)({}).then((function(e){console.log(e),e.data.forEach((function(e){e.id!=t||(i.cateList=e.children)})),console.log(i.cateList)}));case 2:case"end":return e.stop()}}),e)})))()},loadData:function(){var t=arguments,e=this;return(0,n.default)(regeneratorRuntime.mark((function a(){var i,n,o,d;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(i=t.length>0&&void 0!==t[0]?t[0]:"add",n=t.length>1?t[1]:void 0,o=e,d={page:o.page,limit:o.limit,sid:o.cateId},"add"!==i){a.next=10;break}if("nomore"!==o.loadingType){a.next=7;break}return a.abrupt("return");case 7:o.loadingType="loading",a.next=11;break;case 10:o.loadingType="more";case 11:"refresh"===i&&(o.goodsList=[],o.page=1),1==e.filterIndex&&(console.log(o.salesOrder),d.salesOrder=1==o.numberOrder?"asc":"desc"),2==e.filterIndex&&(console.log(o.priceOrder),d.priceOrder=1==o.priceOrder?"asc":"desc"),(0,r.getProducts)(d).then((function(t){console.log(t.data),o.goodsList=o.goodsList.concat(t.data),o.limit==t.data.length?(o.page++,o.loadingType="more"):o.loadingType="nomore","refresh"===i&&(1==n?uni.hideLoading():uni.stopPullDownRefresh())}));case 15:case"end":return a.stop()}}),a)})))()},tabClick:function(t){0===this.filterIndex&&this.filterIndex===t||(this.filterIndex=t,1===t&&(this.numberOrder=1===this.numberOrder?2:1),2===t&&(this.priceOrder=1===this.priceOrder?2:1),this.page=1,uni.pageScrollTo({duration:300,scrollTop:0}),this.loadData("refresh",1),uni.showLoading({title:"正在加载"}))},toggleCateMask:function(t){var e=this,a="show"===t?10:300,i="show"===t?1:0;this.cateMaskState=2,setTimeout((function(){e.cateMaskState=i}),a)},changeCate:function(t){this.cateId=t.id,this.toggleCateMask(),uni.pageScrollTo({duration:300,scrollTop:0}),this.page=1,this.loadData("refresh",1),uni.showLoading({title:"正在加载"})},navToDetailPage:function(t){var e=t.id;uni.navigateTo({url:"/pages/product/product?id=".concat(e)})},stopPrevent:function(){}}};e.default=d},ac92:function(t,e,a){"use strict";var i=a("99df"),n=a.n(i);n.a},b2e3:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"uni-load-more",props:{status:{type:String,default:"more"},showIcon:{type:Boolean,default:!0},color:{type:String,default:"#777777"},contentText:{type:Object,default:function(){return{contentdown:"上拉显示更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"}}}},data:function(){return{}}};e.default=i},f7c2:function(t,e,a){"use strict";var i=a("6046"),n=a.n(i);n.a}}]);