text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-category-category"],{2284:function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var n=i(a("3b8d")),o={props:{headerShow:{type:Boolean,default:!0},inputDisabled:{type:Boolean,default:!1},placeholder:{type:String,default:"请输入关键字"},icon:{type:String,default:null},title:{type:String,default:null}},data:function(){return{afterHeaderOpacity:1,headerPosition:"fixed",headerTop:null,statusTop:null,nVueTitle:null,searchValue:this.placeholder}},methods:{handleSearchValueChange:function(t){this.searchValue=t.detail.value},discard:function(){},link:function(){this.$emit("link")},toSearch:function(){var t=(0,n.default)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$emit("search",{searchValue:this.searchValue});case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}};e.default=o},"29d7":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".rf-search-bar[data-v-17d37029]{background-color:#fff}.rf-search-bar .status[data-v-17d37029]{width:100%;height:0;position:fixed;z-index:10;background-color:#fff;top:0}.rf-search-bar .header[data-v-17d37029]{width:100%;height:%?100?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;position:fixed;top:0;z-index:10;background-color:#fff}.rf-search-bar .header .addr[data-v-17d37029]{width:%?120?%;height:%?60?%;-webkit-flex-shrink:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-size:%?28?%}.rf-search-bar .header .addr .iconfont[data-v-17d37029]{height:%?60?%;margin-right:%?6?%;margin-left:%?15?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-size:%?35?%;color:#fa436a}.rf-search-bar .header .input-box[data-v-17d37029]{width:100%;height:%?60?%;background-color:#f5f5f5;border-radius:%?30?%;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0 %?20?% 0 %?10?%}.rf-search-bar .header .input-box .icon[data-v-17d37029]{z-index:9;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;position:absolute;top:0;right:0;width:%?60?%;height:%?60?%;font-size:%?34?%;color:silver}.rf-search-bar .header .input-box uni-input[data-v-17d37029]{width:100%;padding-left:%?28?%;height:%?28?%;color:#888;font-size:%?28?%}.rf-search-bar .place[data-v-17d37029]{background-color:#fff;height:%?100?%}",""]),t.exports=e},"2b74":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notifyAnnounceView=e.notifyAnnounceIndex=e.wechatConfig=e.configList=e.payCreate=e.advList=e.transmitCreate=e.collectDel=e.collectCreate=e.provinceList=void 0;var i="/tiny-shop/v1/common/provinces/index";e.provinceList=i;var n="/tiny-shop/v1/common/collect/create";e.collectCreate=n;var o="/tiny-shop/v1/common/collect/delete";e.collectDel=o;var r="/tiny-shop/v1/common/transmit/create";e.transmitCreate=r;var c="/tiny-shop/v1/common/adv/index";e.advList=c;var s="/tiny-shop/v1/common/config/index";e.configList=s;var l="/tiny-shop/v1/common/pay/create";e.payCreate=l;var d="/tiny-shop/v1/third-party/wechat-js-sdk";e.wechatConfig=d;var u="/tiny-shop/v1/common/notify-announce/index";e.notifyAnnounceIndex=u;var f="/tiny-shop/v1/common/notify-announce/view";e.notifyAnnounceView=f},"32b0":function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"category"},[a("rf-search-bar",{attrs:{icon:"iconxiatubiao--copy",title:"主页",placeholder:t.hotSearchDefault},on:{link:function(e){e=t.$handleEvent(e),t.toIndex(e)},search:function(e){e=t.$handleEvent(e),t.toSearch(e)}}}),0!==t.categoryList.length||t.loading?a("v-uni-view",{staticClass:"category-list"},[a("v-uni-scroll-view",{staticClass:"left",attrs:{"scroll-y":"true"}},t._l(t.categoryList,(function(e,i){return a("v-uni-view",{key:e.id,staticClass:"row",class:[i==t.showCategoryIndex?"on":""],on:{click:function(e){e=t.$handleEvent(e),t.showCategory(i)}}},[a("v-uni-view",{staticClass:"text"},[a("v-uni-view",{staticClass:"block"}),t._v(t._s(e.title))],1)],1)})),1),a("v-uni-scroll-view",{staticClass:"right",class:t.animation,attrs:{"scroll-y":"true"}},t._l(t.categoryList,(function(e,i){return i==t.showCategoryIndex&&e.child.length>0?a("v-uni-view",{key:e.id,staticClass:"category"},[a("v-uni-view",{staticClass:"banner",on:{click:function(e){e=t.$handleEvent(e),t.indexTopToDetailPage(t.cateTop.jump_type,t.cateTop.jump_link)}}},[a("v-uni-image",{attrs:{src:t.cateTop&&t.cateTop.cover,mode:"aspectFill"}})],1),t._l(e.child,(function(e,i){return a("v-uni-view",{key:e.id,staticClass:"box",on:{click:function(a){a=t.$handleEvent(a),t.navToList(e.id)}}},[a("v-uni-view",{staticClass:"text"},[t._v(t._s(e.title))]),e.child&&e.child.length>0?a("v-uni-view",{staticClass:"list"},t._l(e.child,(function(e,i){return a("v-uni-view",{key:e.id,staticClass:"box",on:{click:function(a){a.stopPropagation(),a=t.$handleEvent(a),t.navToList(e.id)}}},[a("v-uni-image",{attrs:{src:e.cover}}),a("v-uni-view",{staticClass:"text"},[t._v(t._s(e.title))])],1)})),1):a("v-uni-view",{staticClass:"no-data"},[a("i",{staticClass:"iconfont icon404"}),t._v("暂无子分类")])],1)}))],2):t._e()})),1)],1):a("rf-empty",{attrs:{info:"暂无产品分类~"}}),t.loading?a("v-uni-view",{staticClass:"cu-load load-modal"},[a("v-uni-image",{attrs:{src:"/static/rage.png",mode:"aspectFit"}}),a("v-uni-view",{staticClass:"gray-text"},[t._v("加载中...")])],1):t._e()],1)},n=[];a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n}))},3731:function(t,e,a){var i=a("29d7");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("781faa4f",i,!0,{sourceMap:!1,shadowMode:!1})},"3eed":function(t,e,a){"use strict";var i=a("3731"),n=a.n(i);n.a},"461a":function(t,e,a){"use strict";a.r(e);var i=a("32b0"),n=a("475c");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("ec78");var r=a("2877"),c=Object(r["a"])(n["default"],i["a"],i["b"],!1,null,"0942e444",null);e["default"]=c.exports},"475c":function(t,e,a){"use strict";a.r(e);var i=a("59bb"),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},"4a7b":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,"uni-page-body[data-v-0942e444]{background-color:#fff}.category .category-list[data-v-0942e444]{width:100%;background-color:#fff;display:-webkit-box;display:-webkit-flex;display:flex}.category .category-list .left[data-v-0942e444],.category .category-list .right[data-v-0942e444]{position:absolute;top:%?100?%;bottom:%?0?%}.category .category-list .left[data-v-0942e444]{width:24%;left:%?0?%;background-color:#f2f2f2}.category .category-list .left .row[data-v-0942e444]{width:100%;height:%?90?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.category .category-list .left .row .text[data-v-0942e444]{width:100%;position:relative;font-size:%?28?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;color:#3c3c3c}.category .category-list .left .row .text .block[data-v-0942e444]{position:absolute;width:%?0?%;left:0}.category .category-list .left .row.on[data-v-0942e444]{height:%?100?%;background-color:#fff}.category .category-list .left .row.on .text[data-v-0942e444]{font-size:%?30?%;font-weight:600;color:#2d2d2d}.category .category-list .left .row.on .text .block[data-v-0942e444]{width:%?10?%;height:80%;top:10%;background-color:#f06c7a}.category .category-list .right[data-v-0942e444]{width:76%;left:24%;background-color:#fff}.category .category-list .right .category[data-v-0942e444]{width:calc(100%);padding:%?20?% %?15?%}.category .category-list .right .category .banner[data-v-0942e444]{width:96%;margin:0 auto %?20?%;height:24.262vw;border-radius:%?10?%;overflow:hidden;box-shadow:%?0?% %?5?% %?20?% rgba(0,0,0,.3)}.category .category-list .right .category .banner uni-image[data-v-0942e444]{width:100%;height:24.262vw}.category .category-list .right .category .list[data-v-0942e444]{margin-top:%?40?%;width:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.category .category-list .right .category .list .box[data-v-0942e444]{width:calc(71.44vw / 3);margin-bottom:%?30?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap}.category .category-list .right .category .list .box uni-image[data-v-0942e444]{width:64%;height:calc(71.44vw / 3 * .64)}.category .category-list .right .category .list .box .text[data-v-0942e444]{margin-top:%?8?%;width:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;font-size:%?26?%}.category .category-list .right .category .no-data[data-v-0942e444]{margin:%?48?% 0;color:#909399;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.category .category-list .right .category .no-data .iconfont[data-v-0942e444]{margin-right:%?20?%;font-size:%?48?%}body.?%PAGE?%[data-v-0942e444]{background-color:#fff}",""]),t.exports=e},"59bb":function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("ac6a"),a("6b54"),a("386d"),a("96cf");var n=i(a("3b8d")),o=a("c4c8"),r=i(a("9f3a")),c=a("2b74"),s={components:{rfSearchBar:r.default},data:function(){return{hotSearchDefault:"请输入关键字",fList:[],sList:[],tList:[],showCategoryIndex:0,categoryList:[],search:{},cateTop:{},animation:"animation-slide-right",loading:!0}},onShow:function(){this.loading=!0,this.categoryList.length=0,this.initData()},methods:{navToList:function(t){uni.navigateTo({url:"/pages/product/list?cate_id=".concat(t)})},initData:function(){var t=(0,n.default)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.search=uni.getStorageSync("search")||{},this.hotSearchDefault="请输入关键字 "+(this.search.hot_search_default?"如: "+this.search.hot_search_default:""),this.getProductCate(),this.initTabBarBadge();case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),initTabBarBadge:function(){if(uni.getStorageSync("accessToken")&&uni.getStorageSync("cartNum")){if(0==uni.getStorageSync("cartNum"))return void uni.removeTabBarBadge({index:2});uni.setTabBarBadge({index:2,text:uni.getStorageSync("cartNum").toString()})}},getProductCate:function(){var t=(0,n.default)(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.fList=[],this.sList=[],this.tList=[],this.loading=!0,t.next=6,this.$get("".concat(o.productCate)).then((function(t){e.loading=!1,e.cateTop=uni.getStorageSync("cateTop"),e.cateTop||e.getAdvList(),t.data.forEach((function(t){t.child&&e.categoryList.push(t)}))})).catch((function(){e.loading=!1}));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getAdvList:function(){var t=(0,n.default)(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$get("".concat(c.advList),{location:"cate_top"}).then((function(t){e.cateTop=t.data.cate_top[0]}));case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),showCategory:function(t){var e=this;this.showCategoryIndex=t,this.animation="animation-slide-right",setTimeout((function(){e.animation=""}),1e3)},toSearch:function(){uni.navigateTo({url:"/pages/index/search/search?search=".concat(JSON.stringify(this.search))})},toIndex:function(){uni.reLaunch({url:"/pages/index/index"})},indexTopToDetailPage:function(t,e){if(t&&e){switch(t){case"product_view":e="/pages/product/product?id=".concat(e);break;case"article_view":this.$api.msg("article_view");break;case"coupon_view":e="/pages/user/coupon/detail?id=".concat(e);break;case"helper_view":this.$api.msg("helper_view");break;case"product_list_for_cate":e="/pages/product/list?cate_id=".concat(e);break;default:break}uni.navigateTo({url:e})}}}};e.default=s},"67f1":function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"rf-search-bar"},[t.headerShow?a("v-uni-view",{staticClass:"status",style:{position:t.headerPosition,top:t.statusTop,opacity:t.afterHeaderOpacity}}):t._e(),t.headerShow?a("v-uni-view",{staticClass:"header",style:{position:t.headerPosition,top:t.headerTop,opacity:t.afterHeaderOpacity}},[a("v-uni-view",{staticClass:"addr",on:{click:function(e){e.stopPropagation(),e=t.$handleEvent(e),t.link(e)}}},[a("i",{staticClass:"iconfont",class:t.icon}),t._v(t._s(t.title))]),t.inputDisabled?a("v-uni-view",{staticClass:"input-box",on:{click:function(e){e.stopPropagation(),e=t.$handleEvent(e),t.discard(e)}}},[a("v-uni-input",{staticStyle:{color:"#888"},attrs:{value:t.placeholder,placeholder:t.placeholder?"":"请输入关键字","placeholder-style":"color:#ccc;"},on:{confirm:function(e){e=t.$handleEvent(e),t.toSearch(e)},input:function(e){e=t.$handleEvent(e),t.handleSearchValueChange(e)}}}),a("v-uni-view",{staticClass:"icon search",on:{click:function(e){e.stopPropagation(),e=t.$handleEvent(e),t.toSearch(e)}}})],1):a("v-uni-view",{staticClass:"input-box"},[a("v-uni-input",{attrs:{disabled:"",value:t.placeholder,"placeholder-style":"color:#ccc;"},on:{click:function(e){e=t.$handleEvent(e),t.toSearch(e)}}}),a("v-uni-view",{staticClass:"icon search"})],1)],1):t._e(),t.headerShow?a("v-uni-view",{staticClass:"place"}):t._e()],1)},n=[];a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n}))},8999:function(t,e,a){"use strict";a.r(e);var i=a("2284"),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},"9f3a":function(t,e,a){"use strict";a.r(e);var i=a("67f1"),n=a("8999");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("3eed");var r=a("2877"),c=Object(r["a"])(n["default"],i["a"],i["b"],!1,null,"17d37029",null);e["default"]=c.exports},ec78:function(t,e,a){"use strict";var i=a("ff50"),n=a.n(i);n.a},ff50:function(t,e,a){var i=a("4a7b");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("b5226e1a",i,!0,{sourceMap:!1,shadowMode:!1})}}]);