|
|
var e=Object.defineProperty,t=Object.prototype.hasOwnProperty,a=Object.getOwnPropertySymbols,s=Object.prototype.propertyIsEnumerable,o=(t,a,s)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,i=(e,i)=>{for(var r in i||(i={}))t.call(i,r)&&o(e,r,i[r]);if(a)for(var r of a(i))s.call(i,r)&&o(e,r,i[r]);return e};import{_ as r}from"./returnBar.35b6215f.js";import{c as l}from"./tool.8db46c9c.js";import{_ as n}from"./riqi@2x.1c2733e9.js";import{_ as c}from"./yuedu@2x.d38a68c1.js";import{B as d,x as u,v as p,T as h,G as m,p as g,m as b,c as y,t as T,F as v,q as x,s as f,w as C,r as I,o as S,u as L,M as P}from"./vendor.269b2875.js";import"./pinlun@2x.628190cf.js";import"./paixu@2x.fd1743af.js";const k={components:{ReturnBar:r},setup(){const{proxy:e}=d(),t=u({topTitle:"阅刊",tabList:[],TabCur:0,classId:"",pageIndex:1,hasNextPage:!1,markRec:!0,themeList:[],listStyle:{paddingTop:0,height:0},totalPages:0,isTryOutLogin:!0});p((()=>{t.isTryOutLogin=!localStorage.getItem("isTryout");let e=document.querySelector(".status").offsetHeight;t.listStyle.paddingTop=e+"px",t.listStyle.height=window.screen.height-e+"px",a()}));let a=()=>{const t=e;t.$http.get(t.$API.GETSECCLASS,{params:{code:"theme"}}).then((e=>{if(200==e.type){let a=e.data;a.unshift({name:"全部",id:""}),a.unshift({name:"推荐",id:""}),t.tabList=a,s()}else h(e.content)})).catch((e=>{}))},s=()=>{const t=e;t.$http.get(t.$API.GETTHEMEPAGES,{params:{IsDel:!1,isTJ:t.markRec,ClassId:t.classId,Where:"",Order:"Date_desc",pageIndex:t.pageIndex,pageSize:10}}).then((e=>{if(200==e.type){let a=e.data;t.hasNextPage=e.hasNextPage,t.totalPages=e.pages,t.pageIndex<=1?t.themeList=a:t.themeList=t.themeList.concat(a)}else h(e.content)})).catch((e=>{}))},o=()=>{const t=e;if("推荐"!=t.tabList[t.TabCur].name&&0!=t.TabCur&&t.hasNextPage){if(t.pageIndex++,t.pageIndex>t.totalPages)return!1;s()}};return i(i({},m(t)),{tabChange:()=>{const t=e;"推荐"==t.tabList[t.TabCur].name&&0==t.TabCur?t.markRec=!0:t.markRec=!1,t.pageIndex=1,t.hasNextPage=!0,t.classId=t.tabList[t.TabCur].id,document.querySelector(".exhibition").scrollTop=0,window.scrollTo(0,0),s()},GetclassList:a,GetApproachListPages:s,viewMore:()=>{const t=e;document.querySelector(".exhibition").scrollTop=0,window.scrollTo(0,0),t.TabCur=1,t.markRec=!1,t.pageIndex=1,t.classId="",t.hasNextPage=!0,s()},listenScroll:e=>{let t=e.srcElement?e.srcElement:e.target;t.scrollTop+t.offsetHeight>t.scrollHeight-100&&o()},addMoreData:o,tojourneyDeatil:(t,a,s)=>{const o=e;let i={Id:s};o.$http.put(o.$API.UPCLICKNUM,i).then((e=>{})),location.href="/ReadPageDetail?url="+t+"&title="+a},toSearch:()=>{e.$router.push({path:"/searchBook",query:{tablist:5}})},cutTime:l})}},w=C("data-v-253788b0");g("data-v-253788b0");const j={class:"box"},O={class:"status"},R={class:"exhibitionbottom"},E={class:"datebox"},N={style:{color:"#333"}},M=T("img",{class:"rqimg1",src:n},null,-1),q=T("img",{class:"ydimg1",src:c},null,-1),$={key:0,class:"NoMore"},_=T("div",{class:"viewmore"},"查看更多",-1);b();const A=w(((e,t,a,s,o,i)=>{const r=I("ReturnBar"),l=I("van-tab"),n=I("van-tabs");return S(),y("div",j,[T("div",O,[T(r,{topTitle:e.topTitle,isTryOutLogin:e.isTryOutLogin,onToSearch:s.toSearch},null,8,["topTitle","isTryOutLogin","onToSearch"]),T(n,{onChange:s.tabChange,active:e.TabCur,"onUpdate:active":t[1]||(t[1]=t=>e.TabCur=t),"title-inactive-color":"#666","title-active-color":"#333333",color:"#0499f8","swipe-threshold":"4"},{default:w((()=>[(S(!0),y(v,null,x(e.tabList,((e,t)=>(S(),y(l,{key:t,title:e.name},null,8,["title"])))),128))])),_:1},8,["onChange","active"])]),T("div",{class:"exhibition",style:e.listStyle,onScroll:t[3]||(t[3]=(...e)=>s.listenScroll&&s.listenScroll(...e))},[(S(!0),y(v,null,x(e.themeList,((e,t)=>(S(),y("div",{class:"exhibitionitem",key:t,onClick:t=>s.tojourneyDeatil(e.themeUrl,e.title,e.id)},[T("div",{class:"exhibitionimg",style:{"background-image":"url("+e.cover+")"}},null,4),T("div",R,[T("h4",null,L(e.title),1),T("div",E,[T("div",N,[M,P(" "+L(s.cutTime(e.isCreatedate)),1)]),T("div",null,[q,P(" "+L(e.numCheck),1)])])])],8,["onClick"])))),128
|