| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-article-index"],{"0a62":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/* 引入uView全局scss变量文件 */\r\n/* 顶部选项卡 */.container[data-v-40e4874e]{min-height:100vh}.tabs-wrapper[data-v-40e4874e]{position:-webkit-sticky;position:sticky;top:var(--window-top);display:flex;width:100%;height:%?88?%;color:#333;font-size:%?28?%;background:#fff;border-bottom:%?1?% solid #e4e4e4;z-index:100;overflow:hidden;white-space:nowrap}.tab-item[data-v-40e4874e]{display:inline-block;padding:0 %?15?%;text-align:center;min-width:20%;height:%?87?%;line-height:%?88?%;box-sizing:border-box}.tab-item .value[data-v-40e4874e]{height:100%}.tab-item.active .value[data-v-40e4874e]{color:#fd4a5f;border-bottom:%?4?% solid #fd4a5f}\r\n/* 文章列表 */.article-list[data-v-40e4874e]{padding-top:%?20?%;line-height:1;background:#f7f7f7}.article-item[data-v-40e4874e]{margin-bottom:%?20?%;padding:%?30?%;background:#fff}.article-item[data-v-40e4874e]:last-child{margin-bottom:0}.article-item .article-item__title[data-v-40e4874e]{max-height:%?80?%;font-size:%?30?%;color:#333}.article-item .article-item__image .image[data-v-40e4874e]{display:block}\r\n/* 小图模式 */.show-type__10[data-v-40e4874e]{display:flex}.show-type__10 .article-item__left[data-v-40e4874e]{padding-right:%?20?%}.show-type__10 .article-item__image .image[data-v-40e4874e]{width:%?240?%}\r\n/* 大图模式 */.show-type__20 .article-item__image .image[data-v-40e4874e]{width:100%}',""]),t.exports=e},"1a14":function(t,e,i){var a=i("0a62");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("9587da6a",a,!0,{sourceMap:!1,shadowMode:!1})},"21ec":function(t,e,i){"use strict";var a=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.list=s,e.detail=c;var n=a(i("2827")),r={list:"article/list",detail:"article/detail"};function s(t,e){return n.default.get(r.list,t,e)}function c(t){return n.default.get(r.detail,{articleId:t})}},"39fb":function(t,e,i){"use strict";var a;i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return a}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("mescroll-body",{ref:"mescrollRef",attrs:{sticky:!0,down:{use:!1},up:t.upOption},on:{init:function(e){arguments[0]=e=t.$handleEvent(e),t.mescrollInit.apply(void 0,arguments)},up:function(e){arguments[0]=e=t.$handleEvent(e),t.upCallback.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"tabs-wrapper"},[i("v-uni-scroll-view",{staticClass:"scroll-view",attrs:{"scroll-x":!0}},[i("v-uni-view",{staticClass:"tab-item",class:{active:0==t.curId},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onSwitchTab(0)}}},[i("v-uni-view",{staticClass:"value"},[i("v-uni-text",[t._v("全部")])],1)],1),t._l(t.categoryList,(function(e,a){return i("v-uni-view",{key:a,staticClass:"tab-item",class:{active:t.curId==e.category_id},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.onSwitchTab(e.category_id)}}},[i("v-uni-view",{staticClass:"value"},[i("v-uni-text",[t._v(t._s(e.name))])],1)],1)}))],2)],1),i("v-uni-view",{staticClass:"article-list"},t._l(t.articleList.data,(function(e,a){return i("v-uni-view",{key:a,staticClass:"article-item",class:["show-type__"+e.show_type],on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.onTargetDetail(e.article_id)}}},[10==e.show_type?[i("v-uni-view",{staticClass:"article-item__left flex-box"},[i("v-uni-view",{staticClass:"article-item__title twolist-hidden"},[i("v-uni-text",[t._v(t._s(e.title))])],1),i("v-uni-view",{staticClass:"article-item__footer m-top10"},[i("v-uni-text",{staticClass:"article-views f-24 col-8"},[t._v(t._s(e.show_views)+"次浏览")])],1)],1),i("v-uni-view",{staticClass:"article-item__image"},[i("v-uni-image",{staticClass:"image",attrs:{mode:"widthFix",src:e.image_url}})],1)]:t._e(),20==e.show_type?[i("v-uni-view",{staticClass:"article-item__title twolist-hidden"},[i("v-uni-text",[t._v(t._s(e.title))])],1),i("v-uni-view",{staticClass:"article-item__image m-top20"},[i("v-uni-image",{staticClass:"image",attrs:{mode:"widthFix",src:e.image_url}})],1),i("v-uni-view",{staticClass:"article-item__footer m-top10"},[i("v-uni-text",{staticClass:"article-views f-24 col-8"},[t._v(t._s(e.show_views)+"次浏览")])],1)]:t._e()],2)})),1)],1)},r=[]},"4d48":function(t,e,i){"use strict";var a=i("dbce"),n=i("4ea4");i("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(i("dc05")),s=n(i("f8d1")),c=a(i("21ec")),l=a(i("b813")),o=i("57c6"),u=15,d={components:{MescrollBody:r.default},mixins:[s.default],data:function(){return{categoryList:[],articleList:(0,o.getEmptyPaginateObj)(),curId:0,upOption:{auto:!0,page:{size:u},noMoreSize:3}}},onLoad:function(t){var e=this;t.categoryId&&(e.curId=t.categoryId),e.getCategoryList()},methods:{upCallback:function(t){var e=this;e.getArticleList(t.num).then((function(t){var i=t.data.length,a=t.data.total;e.mescroll.endBySize(i,a)})).catch((function(){return e.mescroll.endErr()}))},getCategoryList:function(){var t=this;l.list().then((function(e){t.categoryList=e.data.list}))},getArticleList:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this;return new Promise((function(i,a){c.list({categoryId:e.curId,page:t},{load:!1}).then((function(a){var n=a.data.list;e.articleList.data=(0,o.getMoreListData)(n,e.articleList,t),i(n)})).catch((function(t){return a()}))}))},onSwitchTab:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this;e.curId=t,e.articleList=(0,o.getEmptyPaginateObj)(),e.mescroll.resetUpScroll()},onTargetDetail:function(t){this.$navTo("pages/article/detail",{articleId:t})}},onShareAppMessage:function(){return{title:"文章首页",path:"/pages/article/index?"+this.$getShareUrlParams()}},onShareTimeline:function(){return{title:"文章首页",path:"/pages/article/index?"+this.$getShareUrlParams()}}};e.default=d},"508e":function(t,e,i){"use strict";i.r(e);var a=i("39fb"),n=i("e866");for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);i("fbf6");var s,c=i("f0c5"),l=Object(c["a"])(n["default"],a["b"],a["c"],!1,null,"40e4874e",null,!1,a["a"],s);e["default"]=l.exports},b813:function(t,e,i){"use strict";var a=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.list=s;var n=a(i("2827")),r={list:"article.category/list"};function s(){return n.default.get(r.list)}},e866:function(t,e,i){"use strict";i.r(e);var a=i("4d48"),n=i.n(a);for(var r in a)"default"!==r&&function(t){i.d(e,t,(function(){return a[t]}))}(r);e["default"]=n.a},fbf6:function(t,e,i){"use strict";var a=i("1a14"),n=i.n(a);n.a}}]);
|