|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods-category"],{"0118":function(t,e,a){"use strict";var n=a("f45e"),o=a.n(n);o.a},1292:function(t,e,a){var n=a("24fb");e=n(!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-ba64ae46]{padding:0 %?30?%;background:#fff}.search--input[data-v-ba64ae46]{display:block;height:%?70?%;border:none;box-sizing:border-box;background:#f8f8f8}.search--input__placeholder[data-v-ba64ae46]{font-size:%?28?%;color:#666}.cate-content[data-v-ba64ae46]{background:#fff;height:calc(100vh - %?180?%);display:flex}.cate-left[data-v-ba64ae46]{width:%?190?%;color:#444;height:100%;background:#f8f8f8}.cate-right[data-v-ba64ae46]{height:100%;padding:%?30?% 0 0;overflow:hidden;box-sizing:border-box}.type-nav[data-v-ba64ae46]{display:block;width:%?190?%;height:%?100?%;line-height:%?100?%;font-size:%?28?%;text-align:center;color:#999}.type-nav.selected[data-v-ba64ae46]{background:#fff;color:#ff875b;font-size:%?28?%;font-weight:700}.cate-tow-img[data-v-ba64ae46]{width:%?480?%;margin:0 %?40?% %?20?%;height:%?164?%;background:#ccc;border-radius:%?16?%}.cate-tow-group[data-v-ba64ae46]{display:flex;flex-wrap:wrap}.cate-tow-group--title[data-v-ba64ae46]{padding:%?20?% %?40?%;display:block;width:100%;font-size:%?30?%;line-height:%?30?%;font-weight:700;color:#333}.cate-tow-group--item[data-v-ba64ae46]{margin-left:%?40?%}.cate-tow-group--img[data-v-ba64ae46]{display:block;width:%?130?%;height:%?130?%}.cate-tow-group--name[data-v-ba64ae46]{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-ba64ae46]{padding-bottom:%?200?%}.empty[data-v-ba64ae46]{margin-top:%?100?%}',""]),t.exports=e},"145b":function(t,e,a){"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 n=a("5767"),o="/mall/product",r=function(t){return(0,n.ToAsyncAwait)(n.MsbRequest.get("".concat(o,"/app/product/page"),t))};e.ApiGetGoodsList=r;var i=function(t){return(0,n.ToAsyncAwait)(n.MsbRequest.get("".concat(o,"/app/product/recommended"),t))};e.ApiGetRecommendedGoodsList=i;var c=function(t){return(0,n.ToAsyncAwait)(n.MsbRequest.get("".concat(o,"/app/product/").concat(t.id)))};e.ApiGetGoodsDetail=c;var s=function(t){return(0,n.ToAsyncAwait)(n.MsbRequest.get("".concat(o,"/app/product/sku"),t))};e.ApiGetGoodsSkus=s;var u=function(){return(0,n.ToAsyncAwait)(n.MsbRequest.get("".concat(o,"/app/product/categoryNavigation")))};e.ApiGetCategoryNav=u;var d=function(){return(0,n.ToAsyncAwait)(n.MsbRequest.get("".concat(o,"/app/productCategory/levelOne")))};e.ApiGetCategoryOneList=d;var l=function(t){return(0,n.ToAsyncAwait)(n.MsbRequest.get("".concat(o,"/app/productCategory/listCategoryAndProduct/").concat(t.categoryId)))};e.ApiGetCategoryTwoAndGoods=l},"288d":function(t,e,a){var n=a("1292");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=a("4f06").default;o("dd4779fe",n,!0,{sourceMap:!1,shadowMode:!1})},3463:function(t,e,a){"use strict";a.r(e);var n=a("82d1"),o=a.n(n);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=o.a},"45a9":function(t,e,a){"use strict";a.r(e);var n=a("9804"),o=a("3463");for(var r in o)"default"!==r&&function(t){a.d(e,t,(function(){return o[t]}))}(r);a("0118"),a("ab26");var i,c=a("f0c5"),s=Object(c["a"])(o["default"],n["b"],n["c"],!1,null,"ba64ae46",null,!1,n["a"],i);e["default"]=s.exports},"47e4":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{}},props:{icon:{type:String,default:a("7a1a")},tips:{type:String,default:"亲,暂无相关数据"}},mounted:function(){},methods:{}};e.default=n},5726:function(t,e,a){var n=a("fc54");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=a("4f06").default;o("ee1499be",n,!0,{sourceMap:!1,shadowMode:!1})},7985:function(t,e,a){"use strict";a.r(e);var n=a("47e4"),o=a.n(n);for(var r in n)"default"!==r&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=o.a},"7a1a":function(t,e,a){t.exports=a.p+"static/img/empty.bdec362e.png"},"82d1":function(t,e,a){"use strict";var n=a("4ea4");a("d81d"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var o=n(a("1da1")),r=a("145b"),i=n(a("8832")),c=n(a("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 a,n;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:a=e.sent,a.error,n=a.result,t.categoryData=n.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 a(){var n,o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,(0,r.ApiGetCategoryTwoAndGoods)({categoryId:t.id});case 2:n=a.sent,n.error,o=n.result,e.$set(t,"children",o),e.$set(t,"isLoading",!1);case 7:case"end":return a.stop()}}),a)})))()}}};e.default=s},8832:function(t,e,a){"use strict";a.r(e);var n=a("b867"),o=a("7985");for(var r in o)"default"!==r&&function(t){a.d(e,t,(function(){return o[t]}))}(r);a("f35f");var i,c=a("f0c5"),s=Object(c["a"])(o["default"],n["b"],n["c"],!1,null,"54c060f6",null,!1,n["a"],i);e["default"]=s.exports},9804:function(t,e,a){"use strict";a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var n={"u-Input":a("eb73").default,uLoadmore:a("c153").default},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"container"},[n("UiPageHeader",{staticClass:"search",attrs:{back:!1}},[n("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?n("v-uni-view",{staticClass:"cate-content"},[n("v-uni-scroll-view",{staticClass:"cate-left",attrs:{"scroll-y":!0}},t._l(t.categoryData,(function(e,a){return n("v-uni-text",{key:a,staticClass:"type-nav",class:{selected:t.curIndex==a},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handleSelectNav(a)}}},[t._v(t._s(e.name))])})),1),n("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)}}},[n("v-uni-image",{staticClass:"cate-tow-img",attrs:{src:a("9c98")}}),t._l(t.categoryData[t.curIndex].children,(function(e,a){return n("v-uni-view",{key:a,staticClass:"cate-tow-group",class:a===t.categoryData[t.curIndex].children.length-1?"cate-tow-group__last":""},[n("v-uni-text",{staticClass:"cate-tow-group--title"},[t._v(t._s(e.name))]),t._l(e.productList,(function(e){return n("v-uni-view",{key:e.id,staticClass:"cate-tow-group--item",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.$Router.push("/goodsDetail?id="+e.id)}}},[n("v-uni-image",{staticClass:"cate-tow-group--img",attrs:{mode:"scaleToFill",src:e.mainPicture}}),n("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():n("BsEmpty",{staticClass:"empty",attrs:{icon:a("9b25")}}),t.categoryData[t.curIndex].isLoading?n("u-loadmore",{attrs:{status:"loading"}}):t._e()],2)],1):t._e(),t.categoryData.length||t.isLoading?t._e():n("BsEmpty"),t.isLoading?n("u-loadmore",{attrs:{status:"loading"}}):t._e()],1)},r=[]},"9b25":function(t,e,a){t.exports=a.p+"static/img/empty_goods.3495ba6d.png"},"9c98":function(t,e,a){t.exports=a.p+"static/img/category_banner.af669ac8.jpg"},ab26:function(t,e,a){"use strict";var n=a("288d"),o=a.n(n);o.a},b867:function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"empty"},[t._t("icon",[a("v-uni-image",{staticClass:"empty--icon",attrs:{src:t.icon,mode:"widthFix"}})]),a("v-uni-view",{staticClass:"empty--tips"},[t._v(t._s(t.tips))]),t._t("btn")],2)},r=[]},e404:function(t,e,a){var n=a("24fb");e=n(!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-ba64ae46]{background:#fff}body.?%PAGE?%[data-v-ba64ae46]{background:#fff}',""]),t.exports=e},f35f:function(t,e,a){"use strict";var n=a("5726"),o=a.n(n);o.a},f45e:function(t,e,a){var n=a("e404");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=a("4f06").default;o("04e80622",n,!0,{sourceMap:!1,shadowMode:!1})},fc54:function(t,e,a){var n=a("24fb");e=n(!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}}]); |