import{d as o,g as l,x as r,j as s,C as n,Z as h}from"./index.3bfa6a0e.js";import{C as p}from"./index.79997a38.js";import{L as c}from"./index.0a290e73.js";import{S as m}from"./index.6bd4dfa5.js";import{I as d}from"./index.0fd5538f.js";import{C as f}from"./index.85c8c2f7.js";import{S as u}from"./index.8a87fb9c.js";import{u as g}from"./hooks.435f47d5.js";import{C as S}from"./index.645e7ddc.js";import"./use-tab-status.c0d730a9.js";import"./index.983bfd1a.js";import"./use-id.7c44c16f.js";const C="_title_tzijm_1",v="_time_tzijm_4",y="_imgCover_tzijm_9";var i={title:C,time:v,imgCover:y};function w(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!h(t)}var U=o({name:"special",data(){const t=this.$route.query;return{list:[],dataShow:!0,loading:!1,finished:!1,params:{search:"",type:t.type||1,platformType:l.platformType,page:1,rows:20}}},async mounted(){g("\u70ED\u95E8\u8D44\u8BAF")},methods:{async getList(){try{const t=this.params,e=await r.post("/api-cms/news/page",{data:{...t}});this.loading=!1;const a=e.data||{};if(this.list.length>0&&a.pageNo===1)return;this.list=this.list.concat(a.rows||[]),this.finished=a.pageNo>=a.totalPage,this.params.page=a.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}},onSearch(t){this.params.search=t,this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},onDetail(t){t.linkUrl?window.location.href=t.linkUrl:this.$router.push({path:"specialDetail",query:{id:t.id}})}},render(){let t;return s("div",{class:i.special},[s(m,{offsetTop:0,position:"top",class:"mb12"},{default:()=>[s(S,{border:!1},null),s(u,{onSearch:this.onSearch},null)]}),this.dataShow?s(c,{class:i.videoList,loading:this.loading,"onUpdate:loading":e=>this.loading=e,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},w(t=this.list.map(e=>s(f,{inset:!0,class:"mb12",onClick:()=>{this.onDetail(e)}},{default:()=>[s(p,{title:e.title,titleClass:["van-ellipsis",i.title]},{label:()=>s("div",{class:i.label},[s("div",{class:i.time},[e.createTime]),s(d,{class:i.imgCover,src:e.coverImage,fit:"cover"},null)])})]})))?t:{default:()=>[t]}):s(n,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5185\u5BB9"},null)])}});export{U as default};
