1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-678bc336"],{"253a":function(t,e,i){t.exports=i.p+"static/app/img/img_default.a608a24a.png"},4293:function(t,e,i){"use strict";i("ea90")},"55f6":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",{attrs:{id:"notice"}},[a("c-title",{attrs:{hide:!1,text:t.title}}),a("div",{staticClass:"search"},[a("div",{staticClass:"search-box"},[a("form",{attrs:{action:"#",id:"search-form"},on:{submit:function(t){t.preventDefault()}}},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.searchText,expression:"searchText"}],ref:"search_input",attrs:{type:"search",placeholder:"请输入文章标题/关键字"},domProps:{value:t.searchText},on:{keypress:t.enterSearch,input:function(e){e.target.composing||(t.searchText=e.target.value)}}})]),a("i",{ref:"search_icon",staticClass:"iconfont icon-sousuo1",staticStyle:{color:"#ccc"},on:{click:t.searchArt}})])]),a("div",{staticClass:"content"},[a("div",{staticClass:"tab_box"},[a("ul",{staticClass:"tab_list"},[t.categories&&(t.active||"0"==t.active)?a("van-tabs",{ref:"act",attrs:{id:"tab"},on:{click:t.onClick},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[a("van-tab",{staticClass:"tabChild",attrs:{title:"全部"}}),t._l(t.categories,(function(t,e){return a("van-tab",{key:e,staticClass:"tabChild",attrs:{title:t.name}})}))],2):t._e()],1)]),a("ul",{staticClass:"new_box"},t._l(t.datas,(function(e,n){return a("li",{key:n,staticClass:"new_list",on:{click:function(i){return t.toNoticeInfo(e)}}},[a("div",{staticClass:"miain"},[a("div",{staticClass:"title"},[a("div",{staticClass:"title_a",staticStyle:{"-webkit-box-orient":"vertical"}},[e.has_one_article_pay?a("span",{staticClass:"pay-money"},[t._v("付费")]):t._e(),a("span",[t._v(t._s(e.title))])]),e.type?a("div",{staticClass:"title_v"},[a("div",{staticClass:"time"},[t._v(" 播放"+t._s(e.virtual_audio_views)+"次 ")]),a("div",{staticClass:"audioViews"},[a("i",{staticClass:"iconfont icon-seller-time"}),t._v(" "+t._s(e.audio_seconds)+" ")]),a("div",{staticClass:"audioShare",on:{click:function(i){return i.stopPropagation(),t.shareTap(e)}}},[a("i",{staticClass:"iconfont icon-zb_share"}),t._v(" 分享 ")])]):a("div",{staticClass:"title_b"},[a("span",{staticClass:"sort"},[t._v(t._s(e.author))]),a("span",{staticClass:"time"},[t._v(t._s(t.fun.isTextEmpty(e.virtual_at)?e.updated_at:e.virtual_at))])]),a("audio",{ref:"audio"+n,refInFor:!0,staticStyle:{display:"none"},attrs:{id:"audio"+n,controls:"controls",src:e.audio_link},on:{pause:function(e){return t.onPause(n)},play:function(e){return t.onPlay(n)},timeupdate:function(e){return t.onTimeupdate(e,n)},loadedmetadata:function(e){return t.onLoadedmetadata(e,n)},ended:t.endedMethod}},[t._v(" 您的浏览器不支持 audio 标签! ")])]),e.thumb?a("div",{staticClass:"img"},[1==e.type?a("div",{staticClass:"posimg",on:{click:function(i){return i.stopPropagation(),t.startPlayOrPause(e,n)}}},[e.playStatus?a("van-icon",{attrs:{name:"pause"},on:{click:function(e){return e.stopPropagation(),t.pause(n)}}}):a("van-icon",{attrs:{name:"play"},on:{click:function(i){return i.stopPropagation(),t.startPlayOrPause(e,n)}}})],1):t._e(),a("img",{attrs:{src:e.thumb}})]):t._e(),e.thumb?t._e():a("div",{staticClass:"img"},[1==e.type?a("div",{staticClass:"posimg",on:{click:function(i){return i.stopPropagation(),t.startPlayOrPause(e,n)}}},[e.playStatus?a("van-icon",{attrs:{name:"pause"},on:{click:function(e){return e.stopPropagation(),t.pause(n)}}}):a("van-icon",{attrs:{name:"play"},on:{click:function(i){return i.stopPropagation(),t.startPlayOrPause(e,n)}}})],1):t._e(),a("img",{attrs:{src:i("253a")}})])]),1==e.type&&t.sliderShow&&n==t.playInd?a("div",{staticClass:"slider"},[a("div",{staticClass:"sliderBox"},[1==e.type&&n==t.playInd?a("van-slider",{attrs:{"bar-height":"6px","active-color":"#f3a5a5","inactive-color":"#f5f5f5"},on:{input:function(e){return t.handleTouchStart(e,n)}},scopedSlots:t._u([{key:"button",fn:function(){return[a("div",{staticClass:"custom-button"})]},proxy:!0}],null,!0),model:{value:t.sliderTime,callback:function(e){t.sliderTime=e},expression:"sliderTime"}}):t._e()],1),a("div",{staticClass:"iconclose",on:{click:function(e){return e.stopPropagation(),t.tapClose.apply(null,arguments)}}},[a("i",{staticClass:"iconfont icon-close11"})])]):t._e()])})),0),t.noNotice?a("p",{staticClass:"noNotice"},[t._v("该分类下暂无数据")]):t._e()]),t.article_pay?a("div",{staticClass:"btn",on:{click:t.toEssay}},[a("i",{staticClass:"iconfont icon-wz_payed"}),a("div",[t._v("已付费")])]):t._e()],1)},n=[],s=i("c7eb"),o=(i("e7e5"),i("d399")),r=i("1da1"),c=(i("14d9"),i("d3b7"),i("99af"),i("6968")),l=document.documentElement,d=document.body,f={data:function(){return{active:"",id:"0",banner:"",title:"",datas:[],categories:[],isLoadMore:!0,page:1,total_page:0,show1:!1,noNotice:!1,article_pay:"",searchText:"",value:0,sliderTime:0,playInd:null,currentTime:"",postStart:!1,sliderShow:!1}},activated:function(){this.initData(),this.getNetData("true"),window.addEventListener("scroll",this.handleScroll),this.fun.getKey("class_id")?this.active="":this.active=0},deactivated:function(){this.activeName="-1",window.removeEventListener("scroll",this.handleScroll)},mounted:function(){},methods:{handleTouchStart:function(t,e){this.$refs["audio".concat(e)][0].currentTime=parseInt(this.datas[e].maxTime*(t/100)),this.$refs["audio".concat(e)][0].play()},onLoadedmetadata:function(t,e){t.target.duration&&this.$set(this.datas[e],"maxTime",parseInt(t.target.duration))},onTimeupdate:function(t,e){this.currentTime=t.target.currentTime;var i=parseInt(this.currentTime/this.datas[e].maxTime*100);this.sliderTime=i>=100?100:i},startPlayOrPause:function(t,e){var i=this;return Object(r["a"])(Object(s["a"])().mark((function a(){var n,r;return Object(s["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,i.checkPrivilege(t.id);case 2:if(n=a.sent,0!=n.result){a.next=6;break}return Object(o["a"])(n.msg),a.abrupt("return");case 6:if(!t.has_one_article_pay){a.next=10;break}if(t.has_one_record){a.next=10;break}return i.$router.push(i.fun.getUrl("payList",{id:t.id})),a.abrupt("return");case 10:for(i.playInd!=e&&(i.postStart=!1),i.sliderShow||(i.sliderShow=!0),i.playInd=e,r=0;r<i.datas.length;r++)r==e?i.$refs["audio".concat(e)][0].onplay?i.pause(e):i.play(e):(i.$set(i.datas[r],"playStatus",!1),i.$refs["audio".concat(r)][0].pause());case 14:case"end":return a.stop()}}),a)})))()},checkPrivilege:function(t){return new Promise((function(e,i){$http.get("plugin.article.api.article.get-article",{article_id:t}).then((function(t){t.result,e(t)}),(function(t){}))}))},endedMethod:function(){this.postStart=!1},play:function(t){this.$refs["audio".concat(t)][0].play(),this.startPostMethod()},pause:function(t){this.$refs["audio".concat(t)][0].pause(),this.postStart=!0},onPause:function(t){this.datas.length>0&&this.$set(this.datas[t],"playStatus",!1)},onPlay:function(t){this.$set(this.datas[t],"playStatus",!0)},shareTap:function(t){this.$dialog.alert({message:"请点击右上角微信分享"});var e=this.fun.getKeyByMid(),i=this.fun.getSiteRoot()+"/addons/yun_shop/?menu#/VoiceDetail/"+t.id+"?i="+this.fun.getKeyByI()+"&mid="+e;this.$route.query.taskID&&(i+="&taskID=".concat(this.$route.query.taskID,"&taskDay=").concat(this.$route.query.taskDay,"&task_type=article")),this.fun.wxShare("",{},{link:i,title:t.title,imgUrl:t.thumb,description:t.desc},(function(t){}))},toEssay:function(){this.$router.push(this.fun.getUrl("payEssay"))},tapClose:function(){this.sliderShow=!1},initData:function(){this.page=1,this.total_page=0,this.isLoadMore=!0,this.datas=[],this.sliderShow=!1,this.sliderTime=0},startPostMethod:function(){var t=this;0==this.postStart&&$http.get("plugin.article.api.article.clickAudioViews",{article_id:this.datas[this.playInd].id}).then((function(e){1==e.result&&t.$set(t.datas[t.playInd],"virtual_audio_views",e.data.virtual_audio_views)}),(function(t){}))},getScrollTop:function(){var t=0;return l&&l.scrollTop?t=l.scrollTop:d&&(t=d.scrollTop),t},getClientHeight:function(){var t=0;return t=d.clientHeight&&l.clientHeight?Math.min(d.clientHeight,l.clientHeight):Math.max(d.clientHeight,l.clientHeight),t},getScrollHeight:function(){return Math.max(d.scrollHeight,l.scrollHeight)},handleScroll:function(){this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()&&this.isLoadMore&&this.getMoreData()},searchArt:function(){this.getNetData()},enterSearch:function(t){13===t.keyCode&&(t.preventDefault(),this.getNetData())},getNetData:function(t){var e=this,i=this;this.fun.getKey("class_id")&&t&&(this.id=this.fun.getKey("class_id"));var a={category_id:this.id,keyword:encodeURIComponent(this.searchText),page:1};$http.get("plugin.article.api.article.get-articles",a,"获取中").then((function(a){if(1==a.result){if(e.noNotice=!1,i.total_page=a.data.articles.last_page,i.total_page||(i.total_page=0),i.isLoadMore=!0,a.data.categories.length<=0&&(e.noNotice=!0),i.title=a.data.title,i.datas=a.data.articles.data,i.categories=a.data.categories,i.fun.setWXTitle(a.data.title),i.article_pay=a.data.article_pay,e.fun.getKey("class_id")&&t)for(var n=0;n<e.categories.length;n++)e.categories[n].id==e.fun.getKey("class_id")&&(i.active=n+1,e.$refs.act.resize())}else Object(o["a"])(a.msg),e.noNotice=!0}),(function(t){}))},getMoreData:function(t){var e=this;if(e.isLoadMore=!1,!(this.page>=this.total_page)){this.page=this.page+1;var i={category_id:this.id,keyword:this.searchText,page:this.page,is_decorate:!1};$http.get("plugin.article.api.article.get-articles",i,"加载中").then((function(t){if(1!==t.result)return e.page=e.page-1,void(e.isLoadMore=!1);e.isLoadMore=!0,e.total_page=t.data.articles.last_page,e.datas=e.datas.concat(t.data.articles.data)}),(function(t){}))}},toNoticeInfo:function(t){t.has_one_article_pay?t.has_one_record?1==t.type?this.$route.query.taskID?this.$router.push(this.fun.getUrl("VoiceDetail",{article_id:t.id},{taskID:this.$route.query.taskID,taskDay:this.$route.query.taskDay,task_type:"article"})):this.$router.push(this.fun.getUrl("VoiceDetail",{article_id:t.id})):this.$route.query.taskID?this.$router.push(this.fun.getUrl("articleContent",{id:t.id},{taskID:this.$route.query.taskID,taskDay:this.$route.query.taskDay,task_type:"article"})):this.$router.push(this.fun.getUrl("articleContent",{id:t.id})):this.$router.push(this.fun.getUrl("payList",{id:t.id})):1==t.type?this.$route.query.taskID?this.$router.push(this.fun.getUrl("VoiceDetail",{article_id:t.id},{taskID:this.$route.query.taskID,taskDay:this.$route.query.taskDay,task_type:"article"})):this.$router.push(this.fun.getUrl("VoiceDetail",{article_id:t.id})):this.$route.query.taskID?this.$router.push(this.fun.getUrl("articleContent",{id:t.id},{taskID:this.$route.query.taskID,taskDay:this.$route.query.taskDay,task_type:"article"})):this.$router.push(this.fun.getUrl("articleContent",{id:t.id}))},onClick:function(t,e){this.initData(),this.id=0==t?0:this.categories[t-1].id,this.getNetData()}},components:{cTitle:c["a"]}},u=f,p=u,h=(i("4293"),i("2877")),b=Object(h["a"])(p,a,n,!1,null,"f98f500c",null);e["default"]=b.exports},a8b8:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'.slider[data-v-f98f500c]{width:100%;margin-top:.625rem;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;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none}.slider .sliderBox[data-v-f98f500c]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.slider .iconclose[data-v-f98f500c]{margin-left:.9375rem;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}.custom-button[data-v-f98f500c]{width:13px;height:13px;color:#fff;text-align:center;background-color:#ee0a24;border-radius:100px}#notice[data-v-f98f500c]{padding-bottom:3.1rem}#notice .content .tab_box[data-v-f98f500c]{background:#fff;position:relative}#notice .content .tab_box .tab_list[data-v-f98f500c]{height:44px;line-height:44px;border-bottom:1px solid #ebebeb;overflow-x:hidden;overflow-y:hidden;-webkit-transition-timing-function:cubic-bezier(.075,.82,.165,1);transition-timing-function:cubic-bezier(.075,.82,.165,1);-webkit-transition-duration:.3s;transition-duration:.3s;font-size:18px}#notice .content .new_box[data-v-f98f500c]{background:#fff;padding:0 .9375rem}#notice .content .new_box .new_list[data-v-f98f500c]{border-bottom:.0625rem solid #ebebeb;padding:.9375rem 0}#notice .content .new_box .new_list .miain[data-v-f98f500c]{position:relative}#notice .content .new_box .new_list .miain[data-v-f98f500c],#notice .content .new_box .new_list .title[data-v-f98f500c]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#notice .content .new_box .new_list .title[data-v-f98f500c]{width:13.5625rem;text-align:left;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}#notice .content .new_box .new_list .title .title_a[data-v-f98f500c]{font-size:18px;line-height:1.75rem;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}#notice .content .new_box .new_list .title .title_a .pay-money[data-v-f98f500c]{width:2.125rem;height:1.125rem;border-radius:.3125rem;border:.0625rem solid #ff2c29;display:inline-block;text-align:center;line-height:1.125rem;vertical-align:text-top;font-size:12px;color:#ff2c29}#notice .content .new_box .new_list .title .title_v[data-v-f98f500c]{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;color:#867e7e;font-size:.3125rem}#notice .content .new_box .new_list .title .title_v .audioShare[data-v-f98f500c],#notice .content .new_box .new_list .title .title_v .audioViews[data-v-f98f500c],#notice .content .new_box .new_list .title .title_v .time[data-v-f98f500c]{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;margin-right:.325rem}#notice .content .new_box .new_list .title .title_v .time[data-v-f98f500c]{line-height:22px}#notice .content .new_box .new_list .title .title_v .iconfont[data-v-f98f500c]{font-size:1.3rem;margin-right:.125rem}#notice .content .new_box .new_list .title .title_v .icon-seller-time[data-v-f98f500c]{font-size:1.1rem;margin-top:1px}#notice .content .new_box .new_list .title .title_v .icon-fontclass-bofang1[data-v-f98f500c]{font-size:.7rem}#notice .content .new_box .new_list .title .title_b[data-v-f98f500c]{font-size:14px;color:#8c8c8c;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:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#notice .content .new_box .new_list .title .title_b .sort[data-v-f98f500c]{text-overflow:ellipsis;overflow:hidden;width:8rem;white-space:nowrap}#notice .content .new_box .new_list .img[data-v-f98f500c]{width:7.0625rem;height:auto;background:#f2f2f2;overflow:hidden;background-size:cover;position:relative}#notice .content .new_box .new_list .img .posimg[data-v-f98f500c]{position:absolute;top:0;left:0;width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#notice .content .new_box .new_list .img .posimg .van-icon-pause[data-v-f98f500c],#notice .content .new_box .new_list .img .posimg .van-icon-play[data-v-f98f500c]{font-size:2.5rem;color:#fff}#notice .content .new_box .new_list .img img[data-v-f98f500c]{width:100%;height:100%}#notice .noNotice[data-v-f98f500c]{padding:20px 0}#notice .btn[data-v-f98f500c]{width:4.5rem;height:4.5rem;background-color:#ff2c29;-webkit-box-shadow:0 0 .5rem 0 rgba(237,11,11,.48);box-shadow:0 0 .5rem 0 rgba(237,11,11,.48);border:.0625rem solid #f51f27;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:#fff;font-size:12px;position:fixed;right:1rem;bottom:15%;border-radius:50%;padding:0 .5rem}#notice .btn i[data-v-f98f500c]{font-size:36px}.search[data-v-f98f500c]{height:2.875rem;line-height:2.875rem;position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;overflow:hidden;background:#fff}.search .back[data-v-f98f500c]{width:2.8125rem}.search .back i[data-v-f98f500c]{line-height:2.875rem;font-size:1.5rem}.search .search-box[data-v-f98f500c]{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:85%;margin-top:.5rem;padding:0 .625rem;background-color:#f2f2f2;height:1.75rem;line-height:1.75rem;border-radius:.875rem}.search .search-box #search-form[data-v-f98f500c]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;margin-right:.5rem}.search .search-box input[data-v-f98f500c]{width:100%;line-height:1.75rem;border:none;color:#333}.search .search-box i[data-v-f98f500c]{-webkit-box-flex:0;-webkit-flex:0 0 1.5rem;-ms-flex:0 0 1.5rem;flex:0 0 1.5rem}.search[data-v-f98f500c]:after{height:1px;position:absolute;z-index:0;bottom:0;left:0;content:"";width:100%;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(50%,#f5f5f5),color-stop(0,transparent));background-image:-webkit-linear-gradient(bottom,#f5f5f5 50%,transparent 0);background-image:linear-gradient(0deg,#f5f5f5 50%,transparent 0)}',""]),t.exports=e},ea90:function(t,e,i){var a=i("a8b8");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("499e").default;n("5b725dd4",a,!0,{sourceMap:!1,shadowMode:!1})}}]); |