import{C as l}from"./index.efc59234.js";import{P as n}from"./index.af9fb1a7.js";import{r as i,x as p}from"./index.e7df140d.js";import{i as r,b as d}from"./icon_vip.406f7897.js";import{d as c,l as f,f as u,c as e,a,aw as h,K as o,ax as s}from"./vendor.bd44ab8f.js";const x="_removeBtn_n5kjp_1";var g={removeBtn:x},F=c({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 i.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)},onRemove(t){f.confirm("\u786E\u5B9A\u79FB\u9664\u8BE5\u7C89\u4E1D\u5417?","\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{try{await i.post("/api-teacher/teacher/delFans/"+t.userId),await p(),u.success("\u79FB\u9664\u6210\u529F"),this.pageInfo.page=1,this.getList()}catch{}})}},render(){return e("div",{class:"rounded-md overflow-hidden"},[e("div",{class:"text-2xl font-semibold text-black leading-none px-6 py-5 "},[a("\u6211\u7684\u7C89\u4E1D")]),e("div",{class:!this.dataShow&&"pt-4"},[e(h,{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]"},[a("\u5B66\u751F")]),e("div",{class:"flex flex-col items-center",style:"position: relative"},[e(o,{src:t.avatar,class:["w-12 h-12 rounded-full border-2 border-[#FFFFFF]",t.vipType!=="NORMAL"?t.vipType==="VIP"?"border-[#FADA9B]":"border-[#F0AF88]":""]},null),t.vipType&&t.vipType!=="NORMAL"&&e(o,{style:"position: absolute;bottom: -5px; height: 18px;",src:t.vipType==="VIP"?r:d,class:"-mt-4"},null)]),e("p",{class:"text-base text-[#333] font-semibold leading-tight pb-1 pt-2 text-center max-w-[120px] whitespace-nowrap overflow-hidden text-ellipsis",title:t.userName},[t.userName]),e("p",{class:"h-6"},[t.subjectName&&e("span",{style:"font-size: 12px;color: #777777;"},[t.subjectName])]),e("p",null,[e("span",{class:g.removeBtn,onClick:()=>this.onRemove(t)},[a("\u79FB\u9664")])])])]))])],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(s,{variant:"circle",style:{width:"48px",height:"48px"}},null),e(s,{variant:"h3",style:{width:"50%",marginTop:"8px",marginBottom:"20px"}},null),e(s,{variant:"p",style:{width:"60%",marginTop:"6px"}},null)])})]),e(n,{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{F as default};
