1 |
- import{_ as l,c as h,d as p,e as d,f as g,g as f,h as u,j as m,k as b,l as v,m as I,n as S,o as C,p as T,q as j,r as w,s as L,t as k,u as N,v as V,w as F,x as P,y,z as E,A as B,B as D,C as A,D as O,E as H}from"./vip_default.7099e014.js";import{_ as x}from"./icon_video.f8e50d61.js";import{d as U,y as i,D as M,T as R,j as a,n as q,A as n,C as $,$ as W}from"./ResizeObserver.es.b7226882.js";import{I as r}from"./index.20c0f4c5.js";import{L as z}from"./index.9fec2202.js";import{i as G}from"./icon_teacher.40b6f077.js";import{S as Y}from"./index.521acd0b.js";import{C as J}from"./index.969bba7f.js";import{T as K}from"./index.1743594f.js";import"./use-tab-status.db1f6d2e.js";import"./index.40f703b6.js";import"./index.021f1c7b.js";import"./use-id.5d5e6e63.js";import"./index.1eaf642c.js";const Q="_headerContent_fdpo8_1",X="_teacherContent_fdpo8_7",Z="_teacherIcon_fdpo8_12",ee="_avatar_fdpo8_17",ae="_avatarActive_fdpo8_25",te="_teacherIconVip_fdpo8_29",oe="_teacherInfo_fdpo8_36",se="_teacherInfoName_fdpo8_41",ce="_teacherHonor_fdpo8_55",ne="_score_fdpo8_65",_e="_headerCount_fdpo8_68",ie="_teacherOperation_fdpo8_76",re="_btn_fdpo8_79",le="_btnStar_fdpo8_83",he="_subjectSection_fdpo8_87",pe="_followFans_fdpo8_98",de="_iconVip_fdpo8_134",ge="_iconOther_fdpo8_138",fe="_teacherCert_fdpo8_154",ue="_teacherLast_fdpo8_158",me="_subjectList_fdpo8_165",be="_piNameSubject_fdpo8_175",ve="_subject_fdpo8_87",Ie="_rTitle_fdpo8_194",Se="_liveTag_fdpo8_207",Ce="_teacherName_fdpo8_223",Te="_teacherIcons_fdpo8_231",je="_teaherPopup_fdpo8_235",we="_teacherIconWrap_fdpo8_240",Le="_teacherIconItem_fdpo8_246",ke="_teacherIconItemTop_fdpo8_249",Ne="_teacherIconTitle_fdpo8_259",Ve="_teacherIconDes_fdpo8_264",Fe="_closeIcon_fdpo8_271",Pe="_liveList_fdpo8_279",ye="_headerFollow_fdpo8_282",Ee="_unlinkeBtn_fdpo8_316",Be="_followContainer_fdpo8_323";var t={headerContent:Q,teacherContent:X,teacherIcon:Z,avatar:ee,avatarActive:ae,teacherIconVip:te,teacherInfo:oe,teacherInfoName:se,teacherHonor:ce,score:ne,headerCount:_e,teacherOperation:ie,btn:re,btnStar:le,subjectSection:he,"teacher-bottom":"_teacher-bottom_fdpo8_92",followFans:pe,"teacher-data":"_teacher-data_fdpo8_101","teacher-data_item":"_teacher-data_item_fdpo8_106",iconVip:de,iconOther:ge,"teacher-info":"_teacher-info_fdpo8_143","teacher-name":"_teacher-name_fdpo8_146",teacherCert:fe,teacherLast:ue,subjectList:me,piNameSubject:be,subject:ve,rTitle:Ie,liveTag:Se,teacherName:Ce,teacherIcons:Te,teaherPopup:je,teacherIconWrap:we,teacherIconItem:Le,teacherIconItemTop:ke,teacherIconTitle:Ne,teacherIconDes:Ve,closeIcon:Fe,liveList:Pe,headerFollow:ye,unlinkeBtn:Ee,followContainer:Be};function De(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!W(o)}const _=o=>{const e=`./images/${o}`;return{"./images/cert_active.png":l,"./images/cert_default.png":h,"./images/follow_bg.png":p,"./images/head_bg.png":d,"./images/icon-add-star.png":g,"./images/icon-add.png":f,"./images/icon-cert.png":u,"./images/icon-chat.png":m,"./images/icon-close.png":b,"./images/icon-live.png":v,"./images/icon-message.png":I,"./images/icon-small-live.png":S,"./images/icon1.png":C,"./images/icon2.png":T,"./images/icon3.png":j,"./images/icon_fans.png":w,"./images/icon_subject.png":L,"./images/icon_subject1.png":k,"./images/icon_video.png":x,"./images/live_active.png":N,"./images/live_bg.png":V,"./images/live_default.png":F,"./images/music_active.png":P,"./images/music_default.png":y,"./images/svip_active.png":E,"./images/teacher-icon.png":B,"./images/video_active.png":D,"./images/video_default.png":A,"./images/vip_active.png":O,"./images/vip_default.png":H}[e].default};var Ke=U({name:"teacher-follow",data(){return{userInfo:{},starGrade:0,subjectNameList:[],list:[],dataShow:!0,loading:!1,finished:!1,params:{username:"",page:1,rows:20}}},mounted(){this.getList()},methods:{getSubjectNameList(o){return o.split(",")||[]},onSearch(o){this.params.username=o,this.onSort()},onSort(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},async getList(){try{const o=this.params,e=await i.post("/api-student/student/queryMyFollow",{data:{...o}});this.loading=!1;const s=e.data||{};if(this.list.length>0&&s.pageNo===1)return;this.list=this.list.concat(s.rows||[]),this.finished=s.pageNo>=s.totalPage,this.params.page=s.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}},async onUnLike(o){M.confirm({message:"\u786E\u5B9A\u53D6\u6D88\u5173\u6CE8\u5417\uFF1F",confirmButtonColor:"var(--van-primary)"}).then(async()=>{try{await i.get("/api-student/teacher/starOrUnStar",{params:{userId:o.userId,starStatus:0}}),R("\u53D6\u6D88\u5173\u6CE8\u6210\u529F"),setTimeout(()=>{this.onSort()},1e3)}catch{}})},checkBadge(o,e,s){let c=!1;switch(o){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":e.tag&&(c=e.tag.indexOf(o)>-1);break;case"VIP":c=s==="VIP";break;case"SVIP":c=s==="SVIP"||s==="PERMANENT_SVIP";break;case"DEGREE":c=!!e.degreeFlag;break;case"TEACHER":c=!!e.teacherFlag;break;default:c=!1;break}return c}},render(){let o;return a("div",{class:t.teacherFollow},[a(K,{position:"top"},{default:()=>[a(J,{border:!1,isFixed:!1},null),a(Y,{onSearch:this.onSearch},null)]}),this.dataShow?a(z,{class:t.liveList,loading:this.loading,"onUpdate:loading":e=>this.loading=e,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},De(o=this.list.map(e=>a("div",{class:[t.headerCount,t.headerFollow],onClick:s=>{s.stopPropagation(),sessionStorage.removeItem("teacherHomeTabs"),this.$router.push({path:"/teacherHome",query:{teacherId:e.userId,tabs:"single"}})}},[a("div",{class:t.followContainer},[a("div",{class:t.teacherContent},[a("div",{class:t.teacherIcon,onClick:s=>{e.liveFlag===1&&(s.stopPropagation(),q({api:"joinLiveRoom",content:{roomId:e.roomUid,teacherId:e.userId}}))}},[a(r,{class:[t.avatar,(this.checkBadge("VIP",e.teacher,e.vipType)||this.checkBadge("SVIP",e.teacher,e.vipType))&&t.avatarActive],round:!0,src:e.avatar||G,fit:"cover"},null),e.liveFlag===1?a("p",{class:[t.liveTag,t.liveTagFollow]},[n("\u76F4\u64AD\u4E2D")]):(this.checkBadge("SVIP",e.teacher,e.vipType)||this.checkBadge("VIP",e.teacher,e.vipType))&&a(r,{class:t.teacherIconVip,src:this.checkBadge("SVIP",e.teacher,e.vipType)?_("svip_active.png"):this.checkBadge("VIP",e.teacher,e.vipType)?_("vip_active.png"):_("vip_default.png")},null)])]),a("div",null,[a("div",{class:t.teacherInfo},[a("div",{class:t.teacherInfoName},[e.userName||`\u6E38\u5BA2${e.userId||""}`])]),a("div",{class:t.piNameSubject},[a("div",{class:t.subjectList},[this.getSubjectNameList(e.subjectName).map(s=>a("span",{class:t.subject},[s]))])])])]),a("div",{class:[t["teacher-bottom"],t.followFans]},[a("div",{class:t["teacher-data"]},[a("div",{class:t["teacher-data_item"]},[n("\u7C89\u4E1D "),a("span",null,[e.fansNum||0])]),a("div",{class:t["teacher-data_item"]},[n("\u5DF2\u4E0A\u8BFE\u65F6 "),a("span",null,[e.expTime||0])])]),a("div",{class:t.unlinkeBtn,onClick:s=>{s.stopPropagation(),this.onUnLike(e)}},[n("\u53D6\u6D88\u5173\u6CE8")])])])))?o:{default:()=>[o]}):a($,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5173\u6CE8"},null)])}});export{Ke as default,_ as getAssetsHomeFile};
|