1 |
- import{C as l}from"./index.2d005e3b.js";import{P as o}from"./index.df62445e.js";import{r as n}from"./index.1f84bfe1.js";import{i as r,b as d}from"./icon_vip_default.803a2c38.js";import{d as p,c as t,a as s,aj as f,x as i,T as u,ak as a}from"./vendor.9f3c6e4d.js";var b=p({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?r:d,class:"h-7 -mt-4"},null)]),t("p",{class:"text-base text-[#333] font-semibold leading-tight pb-5 pt-2 text-center"},[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{b as default};
|