var u=Object.defineProperty;var r=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var n=(a,s,i)=>s in a?u(a,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[s]=i,c=(a,s)=>{for(var i in s||(s={}))h.call(s,i)&&n(a,i,s[i]);if(r)for(var i of r(s))g.call(s,i)&&n(a,i,s[i]);return a};import{s as t,_ as p,a as m,b as f,c as _,d as b,e as v}from"./teacher-header.module.1c868ff5.js";import{d as j,D as S,T as y,a as e,w,q as F,I as o,t as L,j as l,u as C,x as N}from"./vendor.a0144ce9.js";/* empty css               *//* empty css               *//* empty css               *//* empty css               */import{i as x}from"./icon_teacher.40b6f077.js";import{t as I,m as T}from"./teacher_cert.545c524a.js";import{r as d,p as k,C as D}from"./index.3d95a92c.js";function E(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!N(a)}const U=a=>{const s=`./images/${a}`;return{"./images/follow_bg.png":p,"./images/head_bg.png":m,"./images/icon_fans.png":f,"./images/icon_subject.png":_,"./images/icon_video.png":b,"./images/live_bg.png":v}[s].default};var P=j({name:"teacher-follow",data(){return{userInfo:{},starGrade:0,subjectNameList:[],list:[],dataShow:!0,loading:!1,finished:!1,params:{page:1,rows:20}}},mounted(){this.getList()},methods:{getSubjectNameList(a){return a.split(",")||[]},onSort(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},async getList(){try{let a=this.params;const s=await d.post("/api-student/student/queryMyFollow",{data:c({},a)});this.loading=!1;const i=s.data||{};if(this.list.length>0&&i.pageNo===1)return;this.list=this.list.concat(i.rows||[]),this.finished=i.pageNo>=i.totalPage,this.params.page=i.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}},async onUnLike(a){S.confirm({message:"\u786E\u5B9A\u53D6\u6D88\u5173\u6CE8\u5417\uFF1F",confirmButtonColor:"var(--van-primary)"}).then(async()=>{try{await d.get("/api-student/teacher/starOrUnStar",{params:{userId:a.userId,starStatus:0}}),y("\u53D6\u6D88\u5173\u6CE8\u6210\u529F"),setTimeout(()=>{this.onSort()},1e3)}catch{}})}},render(){let a;return e("div",{class:t.teacherFollow},[this.dataShow?e(w,{class:t.liveList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},E(a=this.list.map(s=>e("div",{class:[t.headerCount,t.headerFollow]},[e(F,{class:t["open-teacher-info"],border:!1,center:!0},{default:()=>[e("div",{class:t["teacher-info"]},[e("div",{class:t["teacher-name"]},[e("div",{class:t.teacherCert},[e("span",{style:{display:"inline-block"}},[s.userName||`\u6E38\u5BA2${s.userId||""}`]),s.entryFlag===1&&e(o,{class:t.cert,src:I},null),s.musicianFlag===1&&e(o,{class:t.cert,src:T},null)])]),e("div",{class:t.level},[s.starGrade?e(L,{readonly:!0,modelValue:s.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):e("span",{style:{fontSize:"12px",color:"#999999"}},[l("\u6682\u65E0\u8BC4\u5206")])])])],icon:()=>e("div",{style:{position:"relative",lineHeight:0}},[e(o,{class:t.userLogo,src:s.avatar||x,fit:"cover"},null),s.liveFlag===1&&e("p",{class:t.liveTag,onClick:()=>{k({api:"joinLiveRoom",content:{roomId:s.roomUid,teacherId:s.userId}})}},[l("\u76F4\u64AD\u4E2D")])]),"right-icon":()=>e(C,{name:"like",color:"#FF6363",size:18,onClick:()=>{this.onUnLike(s)}},null)}),e("p",{class:t.piNameSubject},[e(o,{class:t.subjectSection,src:U("icon_subject.png"),fit:"contain"},null),this.getSubjectNameList(s.subjectName).map(i=>e("span",{class:t.subject},[i]))]),e("div",{class:t["teacher-bottom"]},[e("div",{class:t["teacher-data"]},[e("div",{class:t["teacher-data_item"]},[l("\u7C89\u4E1D "),e("span",null,[s.fansNum||0])]),e("div",{class:t["teacher-data_item"]},[l("\u5DF2\u4E0A\u8BFE\u65F6 "),e("span",null,[s.expTime||0])])])])])))?a:{default:()=>[a]}):e(D,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5173\u6CE8"},null)])}});export{P as default,U as getAssetsHomeFile};
