index.3f0d52f7.js 2.5 KB

1
  1. import{C as l}from"./index.0e15f1fd.js";import{P as o}from"./index.7f33cffd.js";import{r as n}from"./index.ec43d267.js";import{i as p,b as r}from"./icon_vip_default.803a2c38.js";import{d,c as e,a as s,aj as f,x as i,T as u,ak as a}from"./vendor.1514baa4.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:t}=await n.post("/api-website/teacher/queryMyFans",{requestType:"json",data:{page:this.pageInfo.page,rows:this.pageInfo.limit}});this.list=t.rows||[],this.pageInfo.total=t.total,t.total<=0&&(this.dataShow=!0)}catch{}this.dataShow?this.loading=!1:setTimeout(()=>{this.loading=!1},200)}},render(){return e("div",{class:"rounded-md overflow-hidden"},[e("div",{class:"text-2xl font-semibold text-black leading-none px-6 py-5 "},[s("\u6211\u7684\u7C89\u4E1D")]),e("div",{class:!this.dataShow&&"pt-4"},[e(f,{loading:this.loading,animated:!0,class:" w-full m-auto px-[14px] flex",count:4},{default:()=>[e("div",{class:"flex flex-wrap px-3"},[this.list.map(t=>e("div",{class:"basis-1/4 "},[e("div",{class:"w-[158px] rounded-[10px] pt-10 pb-7 mb-4 m-auto flex items-center justify-center flex-col user-shadow relative"},[e("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")]),e("div",{class:"flex flex-col items-center"},[e(i,{src:t.avatar,class:"w-12 h-12 rounded-full border-2 border-[#2DC7AA]"},null),e(i,{src:t.isVip>0?p:r,class:"h-7 -mt-4"},null)]),e("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"},[t.userName]),e("p",{class:"h-6"},[t.subjectName&&e(u,{effect:"dark",color:"#E0FEF9",round:!0,style:{borderColor:"#E0FEF9",color:"#1B967E",margin:"0 4px"}},{default:()=>[t.subjectName]})])])]))])],template:()=>e("div",{class:"w-[158px] rounded-[10px] pt-10 pb-7 mb-4 m-auto flex items-center justify-center flex-col user-shadow relative"},[e(a,{variant:"circle",style:{width:"48px",height:"48px"}},null),e(a,{variant:"h3",style:{width:"50%",marginTop:"8px",marginBottom:"20px"}},null),e(a,{variant:"p",style:{width:"60%",marginTop:"6px"}},null)])})]),e(o,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":t=>this.pageInfo.page=t,limit:this.pageInfo.limit,"onUpdate:limit":t=>this.pageInfo.limit=t,pageSizes:this.pageInfo.page_size,pagination:this.getList},null),this.dataShow&&e(l,null,null)])}});export{w as default};