bztang-admin/addons/yun_shop/static/app/js/chunk-6eef5161.b54fd820.js

1 line
5.4 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6eef5161"],{"0f18":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,"img[data-v-351b8e78]{width:100%;height:100%}.article-list[data-v-351b8e78]{--article-list-padding--:15px;--block-width--:calc(100vw - var(--article-list-padding--)*2);--blokc-img-height--:calc(var(--block-width--)/2.4);padding:var(--article-list-padding--)}.article-list .article-block[data-v-351b8e78]{border-top-left-radius:10px;border-top-right-radius:10px;overflow:hidden;width:var(--block-width--);margin-bottom:15px;background-color:#fff}.article-list .article-block .img[data-v-351b8e78]{width:var(--block-width--);height:var(--blokc-img-height--)}.article-list .article-block .text[data-v-351b8e78]{padding:10px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.article-list .article-block .text .title[data-v-351b8e78]{width:100%;text-align:left;font-size:15px;font-weight:700;height:30px;line-height:35px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.article-list .article-block .text .desc[data-v-351b8e78]{width:100%;font-size:14px;text-align:left;color:#9c9c9c;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:20px}.article-list .article-block .text .time[data-v-351b8e78]{width:100%;font-size:13px;text-align:left;color:#cdcdcd;height:25px;line-height:25px}",""]),t.exports=e},"99f4":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"article"},[a("c-title",{attrs:{hide:!1,text:t.title}}),a("van-tabs",{model:{value:t.cate_id,callback:function(e){t.cate_id=e},expression:"cate_id"}},t._l(t.cate_list,(function(t,e){return a("van-tab",{key:e,attrs:{title:t.name,name:t.id}})})),1),t.list.length>0?a("div",{staticClass:"article-list"},t._l(t.list,(function(e,l){return a("div",{key:l,staticClass:"article-block",on:{click:function(i){return t.toNoticeInfo(e)}}},[a("div",{staticClass:"img"},[a("img",{attrs:{src:e.thumb?e.thumb:i("db4d2")}})]),a("div",{staticClass:"text"},[a("div",{staticClass:"title"},[t._v(t._s(e.title))]),a("div",{staticClass:"desc"},[t._v(t._s(e.desc))]),a("div",{staticClass:"time"},[t._v(t._s(e.virtual_at))])])])})),0):a("van-empty",{attrs:{description:"暂无更多信息"}})],1)},l=[],c=(i("e7e5"),i("d399")),s=(i("99af"),i("6968")),o=i("ac0d"),n={mixins:[o["a"]],data:function(){return{title:"列表",cate_id:0,cate_list:{},list:[],page:0,total_page:0}},watch:{cate_id:function(){this.list=[],this.total_page=0,this.page=0,this.getList()}},methods:{getCateAndConfig:function(){var t=this;$http.get("plugin.article.api.article.get-cate-and-config",{},"获取中").then((function(e){if(1===e.result){var i=e.data;t.cate_list=i.categories,t.cate_list.unshift({name:"精选文章",id:0}),t.title=i.title,t.fun.setWXTitle(i.title),t.getList()}else Object(c["a"])(e.msg)}))},getList:function(){var t=this;if(t.isLoadMore=!1,!(this.page>=this.total_page&&this.page>0)){t.page++;var e={category_id:this.cate_id,page:this.page};$http.get("plugin.article.api.article.get-list",e,"加载中...").then((function(e){if(1===e.result){var i=e.data;t.list=t.list.concat(i.data),t.total_page=i.last_page,t.isLoadMore=!0}else t.page=t.page-1,t.isLoadMore=!1,Object(c["a"])(e.msg)})).catch((function(t){}))}},getMoreData:function(){this.getList()},toNoticeInfo:function(t){t.has_one_article_pay?t.has_one_record?1==t.type?this.$router.push(this.fun.getUrl("VoiceDetail",{article_id:t.id})):this.$router.push(this.fun.getUrl("articleContent",{id:t.id})):this.$router.push(this.fun.getUrl("payList",{id:t.id})):1==t.type?this.$router.push(this.fun.getUrl("VoiceDetail",{article_id:t.id})):this.$router.push(this.fun.getUrl("articleContent",{id:t.id}))}},mounted:function(){this.getCateAndConfig()},components:{cTitle:s["a"]}},r=n,d=r,h=(i("f05f"),i("2877")),g=Object(h["a"])(d,a,l,!1,null,"351b8e78",null);e["default"]=g.exports},"9c35":function(t,e,i){var a=i("0f18");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var l=i("499e").default;l("56b3cb14",a,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var a=document.documentElement,l=document.body,c={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:l&&(t=l.scrollTop),t},getClientHeight:function(){var t=0;return t=l.clientHeight&&a.clientHeight?Math.min(l.clientHeight,a.clientHeight):Math.max(l.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(l.scrollHeight,a.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},db4d2:function(t,e,i){t.exports=i.p+"static/app/img/default_img_transverse.0a36c7da.jpg"},f05f:function(t,e,i){"use strict";i("9c35")}}]);