special.0a5d60a7.js 2.2 KB

1
  1. import{d as o,g as l,w as r,j as s,C as n,Z as h}from"./index.e6d6174e.js";import{C as p}from"./index.af99cf22.js";import{L as c}from"./index.f904775d.js";import{S as m}from"./index.9093bc60.js";import{I as d}from"./index.67c54471.js";import{C as f}from"./index.4aea64de.js";import{S as u}from"./index.c42f80e3.js";import{u as g}from"./hooks.00b5b341.js";import"./use-tab-status.e9ba8498.js";import"./index.17d70acf.js";import"./use-id.f239f36f.js";const S="_title_tzijm_1",v="_time_tzijm_4",y="_imgCover_tzijm_9";var e={title:S,time:v,imgCover:y};function C(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!h(t)}var D=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{let t=this.params;const i=await r.post("/api-cms/news/page",{data:{...t}});this.loading=!1;const a=i.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:e.special},[s(m,{offsetTop:0,position:"top",class:"mb12"},{default:()=>[s(u,{onSearch:this.onSearch},null)]}),this.dataShow?s(c,{class:e.videoList,loading:this.loading,"onUpdate:loading":i=>this.loading=i,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},C(t=this.list.map(i=>s(f,{inset:!0,class:"mb12",onClick:()=>{this.onDetail(i)}},{default:()=>[s(p,{title:i.title,titleClass:["van-ellipsis",e.title]},{label:()=>s("div",{class:e.label},[s("div",{class:e.time},[i.createTime]),s(d,{class:e.imgCover,src:i.coverImage,fit:"cover"},null)])})]})))?t:{default:()=>[t]}):s(n,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5185\u5BB9"},null)])}});export{D as default};