(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/article/index"],{"0dde":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("aa6c");i(n("3240"));var r=i(n("3129"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"1ddd":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("af34")),a=i(n("7ca3")),c=n("8f59");function o(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}var s={components:{articleItem:function(){n.e("pages/component/article/index").then(function(){return resolve(n("6253"))}.bind(null,n)).catch(n.oe)}},data:function(){return{loadEnd:!1,titleBarHeight:0,showScreen:!0,screenList:[],selectScreen:0,pageTitle:"",articleList:[],page:1,limit:20,hasMore:!1}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,c.mapState)({themeColor:function(t){return t.app.themeColor},shareImage:function(t){return t.app.shareImage},shareTitle:function(t){return t.app.shareTitle}})),mounted:function(){var e=t.getSystemInfoSync().statusBarHeight,n=t.getMenuButtonBoundingClientRect();this.titleBarHeight=e+2*(n.top-e)+n.height},onLoad:function(e){var n=this;t.showLoading({title:"加载中"}),e.id?(this.selectScreen=e.id,this.showScreen=!1):this.showScreen=!0,this.getArticleCategory(),e.title&&(this.pageTitle=decodeURIComponent(e.title)),this.getArticleList((function(){t.hideLoading(),n.loadEnd=!0}))},onPullDownRefresh:function(){this.page=1,this.getArticleList((function(){t.stopPullDownRefresh()}))},onReachBottom:function(){this.hasMore&&(this.page++,this.getArticleList())},onShareAppMessage:function(){return{title:this.shareTitle,imageUrl:this.shareImage}},onShareTimeline:function(){return{title:this.shareTitle,imageUrl:this.shareImage}},methods:{getPageTitle:function(){var t=this;if(this.pageTitle)return this.pageTitle||"平台动态";var e="平台动态";if(this.selectScreen){var n=this.screenList.findIndex((function(e){return e.id==t.selectScreen}));n>-1&&(e=this.screenList[n].name)}return e},getArticleCategory:function(){var e=this;this.$util.request("main.article.category").then((function(n){1==n.code?e.screenList=n.data:t.showToast({title:n.msg,icon:"none"})})).catch((function(t){console.error("获取文章列表 ",t)}))},getArticleList:function(e){var n=this,i={page:this.page,limit:this.limit};this.selectScreen&&(i.cat_id=this.selectScreen),this.$util.request("main.article.list",i).then((function(i){if(e&&e(),1==i.code){var a=i.data.data;n.hasMore=n.page<i.data.total/n.limit,n.articleList=1==n.page?a:[].concat((0,r.default)(n.articleList),(0,r.default)(a))}else t.showToast({title:i.msg,icon:"none"})})).catch((function(t){e&&e(),console.error("获取文章列表 ",t)}))},changeScreen:function(t){this.selectScreen=t,this.page=1,this.getArticleList()}}};e.default=s}).call(this,n("df3c")["default"])},3129:function(t,e,n){"use strict";n.r(e);var i=n("bf42"),r=n("bb17");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("afa3");var c=n("828b"),o=Object(c["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=o.exports},"8c09":function(t,e,n){},afa3:function(t,e,n){"use strict";var i=n("8c09"),r=n.n(i);r.a},bb17:function(t,e,n){"use strict";n.r(e);var i=n("1ddd"),r=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},bf42:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.getPageTitle()),i=t.loadEnd?t.showScreen&&t.screenList.length:null,r=t.loadEnd?t.articleList.length:null,a=t.loadEnd&&r?t.getPageTitle():null;t.$mp.data=Object.assign({},{$root:{m0:n,g0:i,g1:r,m1:a}})},r=[]}},[["0dde","common/runtime","common/vendor"]]]);