1 |
- import{C as l}from"./index.df1d74f7.js";import{P as o}from"./index.bff75964.js";import{r as n}from"./index.a559d154.js";import{i as p,b as r}from"./icon_vip_default.803a2c38.js";import{d,c as t,a as s,am as f,x as i,T as u,an as a}from"./vendor.af53403a.js";var w=d({name:"MyFans",data(){return{pageInfo:{limit:12,page:1,total:0,page_size:[12,24,48,60]},list:[],loading:!1,dataShow:!1}},mounted(){this.getList()},methods:{async getList(){this.loading=!0;try{const{data:e}=await n.post("/api-website/teacher/queryMyFans",{requestType:"json",data:{page:this.pageInfo.page,rows:this.pageInfo.limit}});this.list=e.rows||[],this.pageInfo.total=e.total,e.total<=0&&(this.dataShow=!0)}catch{}this.dataShow?this.loading=!1:setTimeout(()=>{this.loading=!1},200)}},render(){return t("div",{class:"rounded-md overflow-hidden"},[t("div",{class:"text-2xl font-semibold text-black leading-none px-6 py-5 "},[s("\u6211\u7684\u7C89\u4E1D")]),t("div",{class:!this.dataShow&&"pt-4"},[t(f,{loading:this.loading,animated:!0,class:" w-full m-auto px-[14px] flex",count:4},{default:()=>[t("div",{class:"flex flex-wrap px-3"},[this.list.map(e=>t("div",{class:"basis-1/4 "},[t("div",{class:"w-[158px] rounded-[10px] pt-10 pb-7 mb-4 m-auto flex items-center justify-center flex-col user-shadow relative"},[t("div",{class:"bg-[#FFE7CF] absolute left-2.5 top-2.5 text-[#AB5400] text-xs py-0.5 px-2 rounded-[10px]"},[s("\u5B66\u751F")]),t("div",{class:"flex flex-col items-center"},[t(i,{src:e.avatar,class:"w-12 h-12 rounded-full border-2 border-[#2DC7AA]"},null),t(i,{src:e.isVip>0?p:r,class:"h-7 -mt-4"},null)]),t("p",{class:"text-base text-[#333] font-semibold leading-tight pb-5 pt-2 text-center max-w-[120px] whitespace-nowrap overflow-hidden text-ellipsis"},[e.userName]),t("p",{class:"h-6"},[e.subjectName&&t(u,{effect:"dark",color:"#E0FEF9",round:!0,style:{borderColor:"#E0FEF9",color:"#1B967E",margin:"0 4px"}},{default:()=>[e.subjectName]})])])]))])],template:()=>t("div",{class:"w-[158px] rounded-[10px] pt-10 pb-7 mb-4 m-auto flex items-center justify-center flex-col user-shadow relative"},[t(a,{variant:"circle",style:{width:"48px",height:"48px"}},null),t(a,{variant:"h3",style:{width:"50%",marginTop:"8px",marginBottom:"20px"}},null),t(a,{variant:"p",style:{width:"60%",marginTop:"6px"}},null)])})]),t(o,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":e=>this.pageInfo.page=e,limit:this.pageInfo.limit,"onUpdate:limit":e=>this.pageInfo.limit=e,pageSizes:this.pageInfo.page_size,pagination:this.getList},null),this.dataShow&&t(l,null,null)])}});export{w as default};
|