(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/taoke/source/rank-source"],{509:function(t,e,n){"use strict";n.r(e);var i=n(510),a=n(512);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n(514);var r,s=n(32),c=Object(s["default"])(a["default"],i["render"],i["staticRenderFns"],!1,null,"57dc3616",null,!1,i["components"],r);c.options.__file="components/taoke/source/rank-source.vue",e["default"]=c.exports},510:function(t,e,n){"use strict";n.r(e);var i=n(511);n.d(e,"render",(function(){return i["render"]})),n.d(e,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(e,"components",(function(){return i["components"]}))},511:function(t,e,n){"use strict";var i;n.r(e),n.d(e,"render",(function(){return a})),n.d(e,"staticRenderFns",(function(){return r})),n.d(e,"recyclableRender",(function(){return o})),n.d(e,"components",(function(){return i}));try{i={bottomNav:function(){return n.e("components/bottom-nav/bottom-nav").then(n.bind(null,531))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件")}var a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.goodsList.length),i=t.goodsList.slice(3);t._isMounted||(t.e0=function(e,n){var i=arguments[arguments.length-1].currentTarget.dataset,a=i.eventParams||i["event-params"];n=a.goods;return t.goToDetail(n.id)}),t.$mp.data=Object.assign({},{$root:{g0:n,l0:i}})},o=!1,r=[];a._withStripped=!0},512:function(t,e,n){"use strict";n.r(e);var i=n(513),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},513:function(t,e,n){"use strict";(function(t){var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n(18)),o=i(n(127)),r=function(){n.e("components/bottom-nav/bottom-nav").then(function(){return resolve(n(531))}.bind(null,n)).catch(n.oe)},s={components:{BottomNav:r},data:function(){return{statusBarHeight:44,rankType:1,currentCateId:0,categoryList:[{id:0,name:"全部"},{id:10,name:"居家"},{id:11,name:"美食"},{id:8,name:"儿童"},{id:3,name:"女装"},{id:4,name:"美妆"}],goodsList:[],loading:!1,page:1}},computed:{rankHeaderHeight:function(){return this.statusBarHeight+90}},onLoad:function(){this.initializePage()},mounted:function(){this.__taokeInitialized||(this.__taokeInitialized=!0,this.initializePage())},methods:{initializePage:function(){if(!this.__pageInitialized){this.__pageInitialized=!0;var e=t.getSystemInfoSync();this.statusBarHeight=e.statusBarHeight||44,this.getRankList(!0)}},switchRankType:function(t){this.rankType!==t&&(this.rankType=t,this.getRankList(!0))},switchCategory:function(t){this.currentCateId!==t&&(this.currentCateId=t,this.getRankList(!0))},getRankList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&(this.page=1,this.goodsList=[]),this.loading||(this.loading=!0,o.default.get("https://api.cmspro.haodanku.com/ranking/lists",{type:this.rankType,category_id:this.currentCateId,page:this.page,page_size:60,cid:"YsWZ21tx"}).then((function(e){if(e.data&&e.data.list_item&&e.data.list_item.list){var n=e.data.list_item.list.map((function(e){var n=e.itemshorttitle||e.itemtitle;n.length>18&&(n=n.substring(0,18)+"...");var i=1===t.rankType?e.todaysale||e.itemsale2||0:e.itemsale,a=i>=1e4?(i/1e4).toFixed(1)+"万":i,o=e.itemsale2||0,r=o>=1e4?(o/1e4).toFixed(1)+"万":o;return{id:e.id,image:e.itempic,title:n,finalPrice:e.itemendprice,originalPrice:e.itemprice,couponValue:e.couponmoney||0,sales:a,itemsale2:r,shopName:e.shopname,labels:e.label||[]}}));t.goodsList=[].concat((0,a.default)(t.goodsList),(0,a.default)(n))}})).finally((function(){t.loading=!1})))},loadMore:function(){},goToDetail:function(e){t.navigateTo({url:"/pages/detail/detail?id=".concat(e)})}}};e.default=s}).call(this,n(2)["default"])},514:function(t,e,n){"use strict";n.r(e);var i=n(515),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},515:function(t,e,n){}}]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/components/taoke/source/rank-source.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/taoke/source/rank-source-create-component',
    {
        'components/taoke/source/rank-source-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('2')['createComponent'](__webpack_require__(509))
        })
    },
    [['components/taoke/source/rank-source-create-component']]
]);
