!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===c.pageNo)){a.next=9;break}return a.abrupt("return");case 9:e.list=e.list.concat(c.rows||[]),e.finished=c.pageNo>=c.totalPage,e.params.page=c.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:k.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,O.get("/api-student/teacher/starOrUnStar",{params:{userId:e.userId,starStatus:0}});case 3:I("取消关注成功"),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=x(t.membershipStartTime).valueOf(),i=x(t.membershipEndTime).valueOf(),c=x().valueOf();a=c>=n&&c<=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 E("div",{class:_.teacherFollow},[E(N,{position:"top",offsetTop:0},{default:function(){return[E(V,{onSearch:a.onSearch},null)]}}),this.dataShow?E(R,{class:_.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 E("div",{class:[_.headerCount,_.headerFollow],onClick:function(t){t.stopPropagation(),sessionStorage.removeItem("teacherHomeTabs"),a.$router.push({path:"/teacherHome",query:{teacherId:e.userId,tabs:"single"}})}},[E("div",{class:_.followContainer},[E("div",{class:_.teacherContent},[E("div",{class:_.teacherIcon,onClick:function(t){1===e.liveFlag&&(t.stopPropagation(),P({api:"joinLiveRoom",content:{roomId:e.roomUid,teacherId:e.userId}}))}},[E(F,{class:[_.avatar,a.checkBadge("VIP",e.teacher)&&_.avatarActive],round:!0,src:e.avatar||D,fit:"cover"},null),1===e.liveFlag?E("p",{class:[_.liveTag,_.liveTagFollow]},[L("直播中")]):E(F,{class:_.teacherIconVip,src:a.checkBadge("VIP",e.teacher)?H("vip_active.png"):H("vip_default.png")},null)])]),E("div",null,[E("div",{class:_.teacherInfo},[E("div",{class:_.teacherInfoName},[e.userName||"游客".concat(e.userId||"")]),a.checkBadge("DEGREE",e.teacher)&&E("img",{src:U},null),a.checkBadge("TEACHER",e.teacher)&&E("img",{src:A},null)]),E("div",{class:_.piNameSubject},[E("div",{class:_.subjectList},[a.getSubjectNameList(e.subjectName).map((function(e){return E("span",{class:_.subject},[e])}))])])])]),E("div",{class:_.teacherHonor},[E("div",null,[L("勋章:")]),E("div",{class:_.teacherIcons},[E(F,{class:_.iconOther,src:a.checkBadge("STYLE",e.teacher)?H("cert_active.png"):H("cert_default.png")},null),E(F,{class:_.iconOther,src:a.checkBadge("VIDEO",e.teacher)?H("video_active.png"):H("video_default.png")},null),E(F,{class:_.iconOther,src:a.checkBadge("LIVE",e.teacher)?H("live_active.png"):H("live_default.png")},null),E(F,{class:_.iconOther,src:a.checkBadge("MUSIC",e.teacher)?H("music_active.png"):H("music_default.png")},null)]),E("div",{class:_.score},[L("评分: ")]),E("div",{class:_.level},[e.starGrade?E(B,{readonly:!0,modelValue:e.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):E("span",{style:{fontSize:"12px",color:"#999999"}},[L("暂无评分")])])]),E("div",{class:[_["teacher-bottom"],_.followFans]},[E("div",{class:_["teacher-data"]},[E("div",{class:_["teacher-data_item"]},[L("粉丝 "),E("span",null,[e.fansNum||0])]),E("div",{class:_["teacher-data_item"]},[L("已上课时 "),E("span",null,[e.expTime||0])])]),E("div",{class:_.unlinkeBtn,onClick:function(t){t.stopPropagation(),a.onUnLike(e)}},[L("取消关注")])])])})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)?e:{default:function(){return[e]}})):E(T,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无关注"},null)])}}))}}}))}();