|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-category"],{"145b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApiGetCategoryTwoAndGoods=e.ApiGetCategoryOneList=e.ApiGetCategoryNav=e.ApiGetGoodsSkus=e.ApiGetGoodsDetail=e.ApiGetRecommendedGoodsList=e.ApiGetGoodsList=void 0;var a=n("5767"),o="/mall/product",i=function(t){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/product/page"),t))};e.ApiGetGoodsList=i;var r=function(t){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/product/recommended"),t))};e.ApiGetRecommendedGoodsList=r;var c=function(t){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/product/").concat(t.id)))};e.ApiGetGoodsDetail=c;var s=function(t){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/product/sku"),t))};e.ApiGetGoodsSkus=s;var u=function(){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/product/categoryNavigation")))};e.ApiGetCategoryNav=u;var d=function(){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/productCategory/levelOne")))};e.ApiGetCategoryOneList=d;var l=function(t){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/productCategory/listCategoryAndProduct/").concat(t.categoryId)))};e.ApiGetCategoryTwoAndGoods=l},1568:function(t,e,n){"use strict";var a=n("887b"),o=n.n(a);o.a},"2e26":function(t,e,n){var a=n("5220");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("4f06").default;o("13964d2c",a,!0,{sourceMap:!1,shadowMode:!1})},3463:function(t,e,n){"use strict";n.r(e);var a=n("82d1"),o=n.n(a);for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=o.a},"453d":function(t,e,n){"use strict";n.r(e);var a=n("91a7"),o=n.n(a);for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=o.a},"45a9":function(t,e,n){"use strict";n.r(e);var a=n("54e2"),o=n("3463");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("1568"),n("dbe2");var r,c=n("f0c5"),s=Object(c["a"])(o["default"],a["b"],a["c"],!1,null,"df7a6c32",null,!1,a["a"],r);e["default"]=s.exports},"47e4":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{}},props:{icon:{type:String,default:n("7a1a")},tips:{type:String,default:"亲,暂无相关数据"}},mounted:function(){},methods:{}};e.default=a},5220:function(t,e,n){var a=n("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.search[data-v-df7a6c32]{height:%?88?%;padding:0 %?30?%;background:#fff}.search--input[data-v-df7a6c32]{display:block;height:%?70?%;border:none;box-sizing:border-box;background:#f8f8f8}.search--input__placeholder[data-v-df7a6c32]{font-size:%?28?%;color:#666}.cate-content[data-v-df7a6c32]{background:#fff;height:calc(100vh - %?180?%);display:flex}.cate-left[data-v-df7a6c32]{width:%?190?%;color:#444;height:100%;background:#f8f8f8}.cate-right[data-v-df7a6c32]{height:100%;padding:%?30?% 0 0;overflow:hidden;box-sizing:border-box}.type-nav[data-v-df7a6c32]{display:block;width:%?190?%;height:%?100?%;line-height:%?100?%;font-size:%?28?%;text-align:center;color:#999}.type-nav.selected[data-v-df7a6c32]{background:#fff;color:#ff875b;font-size:%?28?%;font-weight:700}.cate-tow-img[data-v-df7a6c32]{width:%?480?%;margin:0 %?40?% %?20?%;height:%?164?%;background:#ccc;border-radius:%?16?%}.cate-tow-group[data-v-df7a6c32]{display:flex;flex-wrap:wrap}.cate-tow-group--title[data-v-df7a6c32]{padding:%?20?% %?40?%;display:block;width:100%;font-size:%?30?%;line-height:%?30?%;font-weight:700;color:#333}.cate-tow-group--item[data-v-df7a6c32]{margin-left:%?40?%}.cate-tow-group--img[data-v-df7a6c32]{display:block;width:%?130?%;height:%?130?%}.cate-tow-group--name[data-v-df7a6c32]{display:block;width:%?130?%;text-align:center;font-size:%?24?%;line-height:%?30?%;margin:%?14?% 0 %?20?%;color:#333;display:-webkit-box;\n /*! autoprefixer: off */-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.cate-tow-group__last[data-v-df7a6c32]{padding-bottom:%?200?%}.empty[data-v-df7a6c32]{margin-top:%?100?%}',""]),t.exports=e},"54e2":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return a}));var a={"u-Input":n("eb73").default,uLoadmore:n("c153").default},o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"container"},[a("UiPageHeader",{staticClass:"search",attrs:{back:!1}},[a("u--input",{staticClass:"search--input",attrs:{slot:"custom",prefixIconStyle:"font-size:48rpx;color:#ccc",prefixIcon:"search",placeholderClass:"search--input__placeholder",clearable:!0,placeholder:"请输入您想要搜索的商品名称"},on:{focus:function(e){arguments[0]=e=t.$handleEvent(e),t.$Router.push("/search")}},slot:"custom"})],1),t.categoryData.length>0?a("v-uni-view",{staticClass:"cate-content"},[a("v-uni-scroll-view",{staticClass:"cate-left",attrs:{"scroll-y":!0}},t._l(t.categoryData,(function(e,n){return a("v-uni-text",{key:n,staticClass:"type-nav",class:{selected:t.curIndex==n},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleSelectNav(n)}}},[t._v(t._s(e.name))])})),1),a("v-uni-scroll-view",{staticClass:"cate-right",attrs:{"scroll-top":t.scrollTop,"scroll-y":!0},on:{scrolltolower:function(e){arguments[0]=e=t.$handleEvent(e),t.reachBottom.apply(void 0,arguments)}}},[a("v-uni-image",{staticClass:"cate-tow-img",attrs:{src:n("9c98")}}),t._l(t.categoryData[t.curIndex].children,(function(e,n){return a("v-uni-view",{key:n,staticClass:"cate-tow-group",class:n===t.categoryData[t.curIndex].children.length-1?"cate-tow-group__last":""},[a("v-uni-text",{staticClass:"cate-tow-group--title"},[t._v(t._s(e.name))]),t._l(e.productList,(function(e){return a("v-uni-view",{key:e.id,staticClass:"cate-tow-group--item",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.$Router.push("/goodsDetail?id="+e.id)}}},[a("v-uni-image",{staticClass:"cate-tow-group--img",attrs:{mode:"scaleToFill",src:e.mainPicture}}),a("v-uni-text",{staticClass:"cate-tow-group--name"},[t._v(t._s(e.name))])],1)}))],2)})),t.categoryData[t.curIndex].children.length||t.categoryData[t.curIndex].isLoading?t._e():a("BsEmpty",{staticClass:"empty",attrs:{icon:n("9b25")}}),t.categoryData[t.curIndex].isLoading?a("u-loadmore",{attrs:{status:"loading"}}):t._e()],2)],1):t._e(),t.categoryData.length||t.isLoading?t._e():a("BsEmpty"),t.isLoading?a("u-loadmore",{attrs:{status:"loading"}}):t._e()],1)},i=[]},5726:function(t,e,n){var a=n("fc54");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("4f06").default;o("ee1499be",a,!0,{sourceMap:!1,shadowMode:!1})},5871:function(t,e,n){var a=n("fe9e");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("4f06").default;o("3023f3a0",a,!0,{sourceMap:!1,shadowMode:!1})},"6b19":function(t,e,n){"use strict";n("a9e3"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={props:{status:{type:String,default:uni.$u.props.loadmore.status},bgColor:{type:String,default:uni.$u.props.loadmore.bgColor},icon:{type:Boolean,default:uni.$u.props.loadmore.icon},fontSize:{type:[String,Number],default:uni.$u.props.loadmore.fontSize},color:{type:String,default:uni.$u.props.loadmore.color},loadingIcon:{type:String,default:uni.$u.props.loadmore.loadingIcon},loadmoreText:{type:String,default:uni.$u.props.loadmore.loadmoreText},loadingText:{type:String,default:uni.$u.props.loadmore.loadingText},nomoreText:{type:String,default:uni.$u.props.loadmore.nomoreText},isDot:{type:Boolean,default:uni.$u.props.loadmore.isDot},iconColor:{type:String,default:uni.$u.props.loadmore.iconColor},marginTop:{type:[String,Number],default:uni.$u.props.loadmore.marginTop},marginBottom:{type:[String,Number],default:uni.$u.props.loadmore.marginBottom},height:{type:[String,Number],default:uni.$u.props.loadmore.height},line:{type:Boolean,default:uni.$u.props.loadmore.line}}};e.default=a},7985:function(t,e,n){"use strict";n.r(e);var a=n("47e4"),o=n.n(a);for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=o.a},"7a1a":function(t,e,n){t.exports=n.p+"static/img/empty.bdec362e.png"},"82d1":function(t,e,n){"use strict";var a=n("4ea4");n("d81d"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("96cf");var o=a(n("1da1")),i=n("145b"),r=a(n("8832")),c=a(n("1014")),s={components:{BsEmpty:r.default,UiPageHeader:c.default},data:function(){return{curIndex:0,scrollTop:0,categoryData:[],isLoading:!0}},onLoad:function(){this.getCategoryData()},onShow:function(){},methods:{handleSelectNav:function(t){this.curIndex=t,this.scrollTop=0},reachBottom:function(){if(this.curIndex>=this.categoryData.length)return!1;this.handleSelectNav(this.curIndex+1)},getCategoryData:function(){var t=this;return(0,o.default)(regeneratorRuntime.mark((function e(){var n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.next=3,(0,i.ApiGetCategoryOneList)();case 3:n=e.sent,n.error,a=n.result,t.categoryData=a.map((function(e){return e.children=[],e.isLoading=!0,t.getTwoCategoryData(e),e})),t.isLoading=!1;case 8:case"end":return e.stop()}}),e)})))()},getTwoCategoryData:function(t){var e=this;return(0,o.default)(regeneratorRuntime.mark((function n(){var a,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,i.ApiGetCategoryTwoAndGoods)({categoryId:t.id});case 2:a=n.sent,a.error,o=a.result,e.$set(t,"children",o),e.$set(t,"isLoading",!1);case 7:case"end":return n.stop()}}),n)})))()}}};e.default=s},8832:function(t,e,n){"use strict";n.r(e);var a=n("b867"),o=n("7985");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("f35f");var r,c=n("f0c5"),s=Object(c["a"])(o["default"],a["b"],a["c"],!1,null,"54c060f6",null,!1,a["a"],r);e["default"]=s.exports},"887b":function(t,e,n){var a=n("d008");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("4f06").default;o("f1bbdf66",a,!0,{sourceMap:!1,shadowMode:!1})},"91a7":function(t,e,n){"use strict";var a=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(n("6b19")),i={name:"u-loadmore",mixins:[uni.$u.mpMixin,uni.$u.mixin,o.default],data:function(){return{dotText:"●"}},computed:{loadTextStyle:function(){return{color:this.color,fontSize:uni.$u.addUnit(this.fontSize),lineHeight:uni.$u.addUnit(this.fontSize),backgroundColor:this.bgColor}},showText:function(){var t="";return t="loadmore"==this.status?this.loadmoreText:"loading"==this.status?this.loadingText:"nomore"==this.status&&this.isDot?this.dotText:this.nomoreText,t}},methods:{loadMore:function(){"loadmore"==this.status&&this.$emit("loadmore")}}};e.default=i},9444:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return a}));var a={uLine:n("3e06").default,uLoadingIcon:n("891e").default},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"u-loadmore",style:[t.$u.addStyle(t.customStyle),{backgroundColor:t.bgColor,marginBottom:t.$u.addUnit(t.marginBottom),marginTop:t.$u.addUnit(t.marginTop),height:t.$u.addUnit(t.height)}]},[t.line?n("u-line",{attrs:{length:"140rpx",color:"#E6E8EB",hairline:!1}}):t._e(),n("v-uni-view",{staticClass:"u-loadmore__content",class:"loadmore"==t.status||"nomore"==t.status?"u-more":""},["loading"===t.status&&t.icon?n("v-uni-view",{staticClass:"u-loadmore__content__icon-wrap"},[n("u-loading-icon",{attrs:{color:t.iconColor,size:"17",mode:t.loadingIcon}})],1):t._e(),n("v-uni-text",{staticClass:"u-line-1",class:["nomore"==t.status&&1==t.isDot?"u-loadmore__content__dot-text":"u-loadmore__content__text"],style:[t.loadTextStyle],on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.loadMore.apply(void 0,arguments)}}},[t._v(t._s(t.showText))])],1),t.line?n("u-line",{attrs:{length:"140rpx",color:"#E6E8EB",hairline:!1}}):t._e()],1)},i=[]},"9b25":function(t,e,n){t.exports=n.p+"static/img/empty_goods.3495ba6d.png"},"9c98":function(t,e,n){t.exports=n.p+"static/img/category_banner.af669ac8.jpg"},b867:function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return a}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"empty"},[t._t("icon",[n("v-uni-image",{staticClass:"empty--icon",attrs:{src:t.icon,mode:"widthFix"}})]),n("v-uni-view",{staticClass:"empty--tips"},[t._v(t._s(t.tips))]),t._t("btn")],2)},i=[]},c153:function(t,e,n){"use strict";n.r(e);var a=n("9444"),o=n("453d");for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n("c6b9");var r,c=n("f0c5"),s=Object(c["a"])(o["default"],a["b"],a["c"],!1,null,"17ee0c9a",null,!1,a["a"],r);e["default"]=s.exports},c6b9:function(t,e,n){"use strict";var a=n("5871"),o=n.n(a);o.a},d008:function(t,e,n){var a=n("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */uni-page-body[data-v-df7a6c32]{background:#fff}body.?%PAGE?%[data-v-df7a6c32]{background:#fff}',""]),t.exports=e},dbe2:function(t,e,n){"use strict";var a=n("2e26"),o=n.n(a);o.a},f35f:function(t,e,n){"use strict";var a=n("5726"),o=n.n(a);o.a},fc54:function(t,e,n){var a=n("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.empty[data-v-54c060f6]{box-sizing:border-box;padding:%?50?%;text-align:center;background:#fff;margin:%?20?% %?30?%;border-radius:%?16?%}.empty--tips[data-v-54c060f6]{font-size:%?26?%;color:#999;margin:%?30?% 0 %?50?%}.empty--icon[data-v-54c060f6]{width:%?380?%;height:%?240?%}',""]),t.exports=e},fe9e:function(t,e,n){var a=n("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */uni-view[data-v-17ee0c9a], uni-scroll-view[data-v-17ee0c9a], uni-swiper-item[data-v-17ee0c9a]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-loadmore[data-v-17ee0c9a]{display:flex;flex-direction:row;align-items:center;justify-content:center;flex:1}.u-loadmore__content[data-v-17ee0c9a]{margin:0 15px;display:flex;flex-direction:row;align-items:center;justify-content:center}.u-loadmore__content__icon-wrap[data-v-17ee0c9a]{margin-right:8px}.u-loadmore__content__text[data-v-17ee0c9a]{font-size:14px;color:#606266}.u-loadmore__content__dot-text[data-v-17ee0c9a]{font-size:15px;color:#909193}',""]),t.exports=e}}]); |