(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/topic/list"],{"12a6":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("2f62");function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-layout/app-layout")]).then(function(){return resolve(n("3dd6"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("components/page-component/app-special-topic/app-special-topic-list").then(function(){return resolve(n("79ca"))}.bind(null,n)).catch(n.oe)},s=1,l={},p=!1,f=!1,d={name:"list",components:{"app-layout":c,appSpecialTopicList:u},data:function(){return{list:[],typeList:[],tabCurrentIndex:0}},computed:o({},(0,i.mapState)({theme:function(t){return t.mallConfig.theme},bar_title:function(t){return t.mallConfig.bar_title}})),onLoad:function(t){s=1,p=!1,f=!1,"undefined"!=typeof t.type&&(l.type=t.type),this.loadData(),this.loadType()},onReachBottom:function(){p||this.loadData()},onShareAppMessage:function(t){var e=this.$platDiff.route(),n="专题列表";for(var i in this.bar_title)if(this.bar_title[i].value==e){n=this.bar_title[i].new_name;break}return this.$shareAppMessage({title:n,path:"/pages/topic/list"})},methods:{loadData:function(){var t=this;f||(this.$showLoading(),f=!0,l.page=s,this.$request({url:this.$api.topic.list,data:l}).then((function(e){f=!1,t.$hideLoading(),0===e.code&&(1===s&&(t.list=[]),e.data.list.length>0?(t.list=t.list.concat(e.data.list),s++):p=!0)})).catch((function(e){t.$hideLoading(),f=!1})))},loadType:function(){var t=this;this.$request({url:this.$api.topic.type}).then((function(e){if(0===e.code&&e.data.list.length>0){var n=[{id:0,name:"全部"},{id:-1,name:"精选"}];for(var i in t.typeList=n.concat(e.data.list),t.typeList)if(t.typeList[i].id==l.type){t.tabCurrentIndex=i;break}}})).catch((function(t){f=!1}))},tabClick:function(t){s=1,p=!1;var e=this.typeList[t].id;this.tabCurrentIndex=t,l={page:s,type:e},this.loadData()}}};e.default=d},3841:function(t,e,n){"use strict";(function(t){n("8748");i(n("66fd"));var e=i(n("b208"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"3a66":function(t,e,n){"use strict";var i,a=function(){var t=this,e=t.$createElement;t._self._c},o=[];n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}))},"3fb3":function(t,e,n){},5861:function(t,e,n){"use strict";n.r(e);var i=n("12a6"),a=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},"73c4":function(t,e,n){"use strict";var i=n("3fb3"),a=n.n(i);a.a},b208:function(t,e,n){"use strict";n.r(e);var i=n("3a66"),a=n("5861");for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("73c4");var r,c=n("f0c5"),u=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"6c69aeee",null,!1,i["a"],r);e["default"]=u.exports}},[["3841","common/runtime","common/vendor"]]]);