|
|
(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",r=function(t){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/product/page"),t))};e.ApiGetGoodsList=r;var i=function(t){return(0,a.ToAsyncAwait)(a.MsbRequest.get("".concat(o,"/app/product/recommended"),t))};e.ApiGetRecommendedGoodsList=i;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},"1a19":function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),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)},r=[]},"23b3":function(t,e,n){var a=n("ee72");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("4f06").default;o("073f447a",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 r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=o.a},"443b":function(t,e,n){var a=n("8efa");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("4f06").default;o("db90570a",a,!0,{sourceMap:!1,shadowMode:!1})},"45a9":function(t,e,n){"use strict";n.r(e);var a=n("deb2"),o=n("3463");for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("dae2"),n("9fd6");var i,c=n("f0c5"),s=Object(c["a"])(o["default"],a["b"],a["c"],!1,null,"2d29567f",null,!1,a["a"],i);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},"53ab":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-2d29567f]{background:#fff}body.?%PAGE?%[data-v-2d29567f]{background:#fff}',""]),t.exports=e},7412:function(t,e,n){var a=n("53ab");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=n("4f06").default;o("05c3979c",a,!0,{sourceMap:!1,shadowMode:!1})},7985:function(t,e,n){"use strict";n.r(e);var a=n("47e4"),o=n.n(a);for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);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")),r=n("145b"),i=a(n("8832")),c=a(n("1014")),s={components:{BsEmpty:i.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,r.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,r.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("1a19"),o=n("7985");for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("b44b");var i,c=n("f0c5"),s=Object(c["a"])(o["default"],a["b"],a["c"],!1,null,"012c6a88",null,!1,a["a"],i);e["default"]=s.exports},"8efa":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-2d29567f]{padding:0 %?30?%}.search--input[data-v-2d29567f]{display:block;height:%?70?%;border:none;box-sizing:border-box;background:#f8f8f8}.search--input__placeholder[data-v-2d29567f]{font-size:%?26?%;color:#666}.cate-content[data-v-2d29567f]{background:#fff;height:calc(100vh - %?180?%);display:flex}.cate-left[data-v-2d29567f]{width:%?190?%;color:#444;height:100%;background:#f8f8f8}.cate-right[data-v-2d29567f]{height:100%;padding:%?40?% 0 0;overflow:hidden;box-sizing:border-box}.type-nav[data-v-2d29567f]{display:block;width:%?190?%;height:%?100?%;line-height:%?100?%;font-size:%?28?%;text-align:center;color:#999}.type-nav.selected[data-v-2d29567f]{background:#fff;color:#ff875b;font-size:%?28?%}.cate-tow-img[data-v-2d29567f]{width:%?480?%;margin:0 %?40?% %?40?%;height:%?164?%;background:#ccc;border-radius:%?16?%}.cate-tow-group[data-v-2d29567f]{display:flex;flex-wrap:wrap;margin-bottom:%?40?%}.cate-tow-group--title[data-v-2d29567f]{padding:%?20?% %?40?%;display:block;width:100%;font-size:%?30?%;color:#333}.cate-tow-group--item[data-v-2d29567f]{margin-left:%?40?%}.cate-tow-group--img[data-v-2d29567f]{display:block;width:%?130?%;height:%?130?%}.cate-tow-group--name[data-v-2d29567f]{display:block;width:%?130?%;text-align:center;font-size:%?24?%;line-height:%?36?%;margin:%?10?% 0 %?40?%;color:#333;display:-webkit-box;\n /*! autoprefixer: off */-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.cate-tow-group__last[data-v-2d29567f]{padding-bottom:%?200?%}',""]),t.exports=e},"9c98":function(t,e,n){t.exports=n.p+"static/img/category_banner.af669ac8.jpg"},"9fd6":function(t,e,n){"use strict";var a=n("443b"),o=n.n(a);o.a},b44b:function(t,e,n){"use strict";var a=n("23b3"),o=n.n(a);o.a},dae2:function(t,e,n){"use strict";var a=n("7412"),o=n.n(a);o.a},deb2:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),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"),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)},r=[]},ee72: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-012c6a88]{box-sizing:border-box;width:100%;padding:%?50?%;text-align:center;background:#fff}.empty--tips[data-v-012c6a88]{font-size:%?26?%;color:#999;margin:%?30?% 0 %?50?%}.empty--icon[data-v-012c6a88]{width:%?280?%}',""]),t.exports=e}}]); |