teacher-follow.e5371450.js 7.5 KB

1
  1. import{_ as l,c as p,d as h,e as d,f as g,g as f,h as u,j as m,k as v,l as b,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 F,w as V,x as y,y as P,z as E,A as B,B as D,C as A,D as O,E as x}from"./vip_default.ded3438c.js";import{_ as H}from"./icon_video.60a71a50.js";import{d as R,y as i,D as U,T as M,j as a,n as q,A as n,C as z,$ as G}from"./ResizeObserver.es.39b48a47.js";import{I as r}from"./index.fcbcb027.js";import{L as $}from"./index.6c529ad4.js";import{R as W}from"./index.6a000ecc.js";import{i as Y}from"./icon_teacher.40b6f077.js";import{S as J}from"./index.e10a1ae2.js";import{C as K}from"./index.970ad07b.js";import{T as Q}from"./index.e90d2179.js";import"./use-tab-status.bcc0c503.js";import"./use-refs.07204da6.js";import"./index.db115763.js";import"./index.428ab1a8.js";import"./use-id.b004ff17.js";import"./index.dc19bc54.js";const X="_headerContent_fdpo8_1",Z="_teacherContent_fdpo8_7",ee="_teacherIcon_fdpo8_12",ae="_avatar_fdpo8_17",te="_avatarActive_fdpo8_25",oe="_teacherIconVip_fdpo8_29",se="_teacherInfo_fdpo8_36",ce="_teacherInfoName_fdpo8_41",ne="_teacherHonor_fdpo8_55",_e="_score_fdpo8_65",ie="_headerCount_fdpo8_68",re="_teacherOperation_fdpo8_76",le="_btn_fdpo8_79",pe="_btnStar_fdpo8_83",he="_subjectSection_fdpo8_87",de="_followFans_fdpo8_98",ge="_iconVip_fdpo8_134",fe="_iconOther_fdpo8_138",ue="_teacherCert_fdpo8_154",me="_teacherLast_fdpo8_158",ve="_subjectList_fdpo8_165",be="_piNameSubject_fdpo8_175",Ie="_subject_fdpo8_87",Se="_rTitle_fdpo8_194",Ce="_liveTag_fdpo8_207",Te="_teacherName_fdpo8_223",je="_teacherIcons_fdpo8_231",we="_teaherPopup_fdpo8_235",Le="_teacherIconWrap_fdpo8_240",ke="_teacherIconItem_fdpo8_246",Ne="_teacherIconItemTop_fdpo8_249",Fe="_teacherIconTitle_fdpo8_259",Ve="_teacherIconDes_fdpo8_264",ye="_closeIcon_fdpo8_271",Pe="_liveList_fdpo8_279",Ee="_headerFollow_fdpo8_282",Be="_unlinkeBtn_fdpo8_316",De="_followContainer_fdpo8_323";var t={headerContent:X,teacherContent:Z,teacherIcon:ee,avatar:ae,avatarActive:te,teacherIconVip:oe,teacherInfo:se,teacherInfoName:ce,teacherHonor:ne,score:_e,headerCount:ie,teacherOperation:re,btn:le,btnStar:pe,subjectSection:he,"teacher-bottom":"_teacher-bottom_fdpo8_92",followFans:de,"teacher-data":"_teacher-data_fdpo8_101","teacher-data_item":"_teacher-data_item_fdpo8_106",iconVip:ge,iconOther:fe,"teacher-info":"_teacher-info_fdpo8_143","teacher-name":"_teacher-name_fdpo8_146",teacherCert:ue,teacherLast:me,subjectList:ve,piNameSubject:be,subject:Ie,rTitle:Se,liveTag:Ce,teacherName:Te,teacherIcons:je,teaherPopup:we,teacherIconWrap:Le,teacherIconItem:ke,teacherIconItemTop:Ne,teacherIconTitle:Fe,teacherIconDes:Ve,closeIcon:ye,liveList:Pe,headerFollow:Ee,unlinkeBtn:Be,followContainer:De};function Ae(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!G(o)}const _=o=>{const e=`./images/${o}`;return{"./images/cert_active.png":l,"./images/cert_default.png":p,"./images/follow_bg.png":h,"./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":v,"./images/icon-live.png":b,"./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":H,"./images/live_active.png":N,"./images/live_bg.png":F,"./images/live_default.png":V,"./images/music_active.png":y,"./images/music_default.png":P,"./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":x}[e].default};var Ze=R({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){U.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}}),M("\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(Q,{position:"top"},{default:()=>[a(K,{border:!1,isFixed:!1},null),a(J,{onSearch:this.onSearch},null)]}),this.dataShow?a($,{class:t.liveList,loading:this.loading,"onUpdate:loading":e=>this.loading=e,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},Ae(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||Y,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.teacherHonor},[a("div",{class:t.score},[n("\u8BC4\u5206: ")]),a("div",{class:t.level},[e.starGrade?a(W,{readonly:!0,modelValue:e.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):a("span",{style:{fontSize:"12px",color:"#999999"}},[n("\u6682\u65E0\u8BC4\u5206")])])]),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(z,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5173\u6CE8"},null)])}});export{Ze as default,_ as getAssetsHomeFile};