!function(){function e(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function t(t){for(var n=1;n0&&1===r.pageNo)){a.next=9;break}return a.abrupt("return");case 9:e.list=e.list.concat(r.rows||[]),e.finished=r.pageNo>=r.totalPage,e.params.page=r.pageNo+1,e.dataShow=e.list.length>0,a.next=19;break;case 15:a.prev=15,a.t0=a.catch(0),e.dataShow=!1,e.finished=!0;case 19:case"end":return a.stop()}}),a,null,[[0,15]])})))()},onUnLike:function(e){var t=this;return i(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:I.confirm({message:"确定取消关注吗?",confirmButtonColor:"var(--van-primary)"}).then(i(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,k.get("/api-student/teacher/starOrUnStar",{params:{userId:e.userId,starStatus:0}});case 3:x("取消关注成功"),setTimeout((function(){t.onSort()}),1e3),a.next=9;break;case 7:a.prev=7,a.t0=a.catch(0);case 9:case"end":return a.stop()}}),a,null,[[0,7]])}))));case 1:case"end":return a.stop()}}),a)})))()},checkBadge:function(e,t){var a=!1;switch(e){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":t.tag&&(a=t.tag.indexOf(e)>-1);break;case"VIP":if(t.membershipStartTime&&t.membershipEndTime){var n=E(t.membershipStartTime).valueOf(),i=E(t.membershipEndTime).valueOf(),r=E().valueOf();a=r>=n&&r<=i}else a=!1;break;case"DEGREE":a=!!t.degreeFlag;break;case"TEACHER":a=!!t.teacherFlag;break;default:a=!1}return a}},render:function(){var e,t,a=this;return P("div",{class:w.teacherFollow},[P(D,{position:"top",offsetTop:0},{default:function(){return[P(z,{border:!1},null),P(U,{onSearch:a.onSearch},null)]}}),this.dataShow?P(B,{class:w.liveList,loading:this.loading,"onUpdate:loading":function(e){return a.loading=e},immediateCheck:!1,finished:this.finished,finishedText:"没有更多了"},(t=e=this.list.map((function(e){return P("div",{class:[w.headerCount,w.headerFollow],onClick:function(t){t.stopPropagation(),sessionStorage.removeItem("teacherHomeTabs"),a.$router.push({path:"/teacherHome",query:{teacherId:e.userId,tabs:"single"}})}},[P("div",{class:w.followContainer},[P("div",{class:w.teacherContent},[P("div",{class:w.teacherIcon,onClick:function(t){1===e.liveFlag&&(t.stopPropagation(),L({api:"joinLiveRoom",content:{roomId:e.roomUid,teacherId:e.userId}}))}},[P(F,{class:[w.avatar,a.checkBadge("VIP",e.teacher)&&w.avatarActive],round:!0,src:e.avatar||V,fit:"cover"},null),1===e.liveFlag?P("p",{class:[w.liveTag,w.liveTagFollow]},[T("直播中")]):P(F,{class:w.teacherIconVip,src:a.checkBadge("VIP",e.teacher)?G("vip_active.png"):G("vip_default.png")},null)])]),P("div",null,[P("div",{class:w.teacherInfo},[P("div",{class:w.teacherInfoName},[e.userName||"游客".concat(e.userId||"")]),a.checkBadge("DEGREE",e.teacher)&&P("img",{src:A},null),a.checkBadge("TEACHER",e.teacher)&&P("img",{src:H},null)]),P("div",{class:w.piNameSubject},[P("div",{class:w.subjectList},[a.getSubjectNameList(e.subjectName).map((function(e){return P("span",{class:w.subject},[e])}))])])])]),P("div",{class:w.teacherHonor},[P("div",null,[T("勋章:")]),P("div",{class:w.teacherIcons},[P(F,{class:w.iconOther,src:a.checkBadge("STYLE",e.teacher)?G("cert_active.png"):G("cert_default.png")},null),P(F,{class:w.iconOther,src:a.checkBadge("VIDEO",e.teacher)?G("video_active.png"):G("video_default.png")},null),P(F,{class:w.iconOther,src:a.checkBadge("LIVE",e.teacher)?G("live_active.png"):G("live_default.png")},null),P(F,{class:w.iconOther,src:a.checkBadge("MUSIC",e.teacher)?G("music_active.png"):G("music_default.png")},null)]),P("div",{class:w.score},[T("评分: ")]),P("div",{class:w.level},[e.starGrade?P(N,{readonly:!0,modelValue:e.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):P("span",{style:{fontSize:"12px",color:"#999999"}},[T("暂无评分")])])]),P("div",{class:[w["teacher-bottom"],w.followFans]},[P("div",{class:w["teacher-data"]},[P("div",{class:w["teacher-data_item"]},[T("粉丝 "),P("span",null,[e.fansNum||0])]),P("div",{class:w["teacher-data_item"]},[T("已上课时 "),P("span",null,[e.expTime||0])])]),P("div",{class:w.unlinkeBtn,onClick:function(t){t.stopPropagation(),a.onUnLike(e)}},[T("取消关注")])])])})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!R(t)?e:{default:function(){return[e]}})):P(C,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无关注"},null)])}}))}}}))}();