You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
3.0 KiB

1 year ago
  1. 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,r=(e,r)=>{for(var i in r||(r={}))t.call(r,i)&&o(e,i,r[i]);if(a)for(var i of a(r))s.call(r,i)&&o(e,i,r[i]);return e};import{x as i,K as c,c as l,t as n,u as b,s as d,o as u,v as p,G as m,A as f,M as v,r as C,F as y,q as g,B as h}from"./vendor.269b2875.js";import{_ as k}from"./yuewen-xiala@2x.837e4162.js";const w={props:{toastmassage:{type:String,default:""},iftshow:{type:Number,default:0}},setup(e){const t=i({timer:null,ifs:!1});return c((()=>e.iftshow),((e,a)=>{t.ifs=!0})),c((()=>t.ifs),((e,a)=>{let s=t;clearTimeout(s.timer),s.timer=null,s.timer=setTimeout((function(){s.ifs=!1}),1500)})),{data:t}}},T={key:0,class:"tishi-di"},S={class:"tishi"};w.render=function(e,t,a,s,o,r){return s.data.ifs?(u(),l("div",T,[n("div",S,b(a.toastmassage),1)])):d("",!0)};const H={name:"listTab",components:{aitoast:w},props:{listWrapRef:Object,isScroll:Boolean,flagTabName:String},setup(e,t){const{proxy:a}=h(),s=i({TabCur:0,isHot:!1,tabList:[],typeCode:""});p((()=>{o()}));let o=()=>{const t=a;switch(e.flagTabName){case"ebook":t.typeCode="ebook";break;case"doc":t.typeCode="doc";break;case"news":t.typeCode="news";break;case"vr":t.typeCode="vr";break;case"video":t.typeCode="video"}let s={code:t.typeCode};t.$http.get(t.$API.GETSECCLASS,{params:s}).then((e=>{if(200==e.type){let a=e.data;a.unshift({name:"全部",id:""}),t.tabList=a,c()}else t.iftshow++,t.toastmassage=e.content})).catch((e=>{}))},c=()=>{const s=a;let o=s.tabList[s.TabCur].id,r=s.isHot?"Hot":"Date_desc";switch(e.flagTabName){case"ebook":t.emit("GetBookBasePages",o,r,1);break;case"doc":t.emit("SearchDoc",o,r,1);break;case"news":t.emit("GetNews",o,r,1);break;case"vr":r=s.isHot?"Hot":"new",t.emit("GetVRPages",o,r,1);break;case"video":r=s.isHot?"Hot":"new",t.emit("GetVideoPages",o,r,1)}};return r(r({},m(s)),{tabChange:()=>{e.listWrapRef.scrollTop=0,window.scrollTo(0,0),c()},breadcrumbChange:t=>{a.isHot=t,e.listWrapRef.scrollTop=0,window.scrollTo(0,0),c()},SearchDoc:c,GetSecClass:o})}},j={key:1,class:"breadcrumb"},G=n("img",{src:k,class:"ciala"},null,-1);H.render=function(e,t,a,s,o,r){const i=C("van-tab"),c=C("van-tabs");return u(),l("div",null,[a.isScroll?(u(),l(c,{key:0,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"},{default:f((()=>[(u(!0),l(y,null,g(e.tabList,((e,t)=>(u(),l(i,{key:t,title:e.name},null,8,["title"])))),128))])),_:1},8,["onChange","active"])):d("",!0),a.isScroll?(u(),l("div",j,[n("div",{class:{on:!e.isHot},onClick:t[2]||(t[2]=e=>s.breadcrumbChange(!1))},"最新",2),n("div",{class:{on:e.isHot},onClick:t[3]||(t[3]=e=>s.breadcrumbChange(!0))},"人气",2)])):d("",!0),a.isScroll?d("",!0):(u(),l("div",{key:2,class:"breadcrumb2",onClick:t[4]||(t[4]=e=>a.isScroll=!0)},[v(b(e.tabList[e.TabCur].name)+" · "+b(e.isHot?"人气":"最新")+" ",1),G]))])};export{H as _};