teacher-follow-legacy.d37e303f.js 15 KB

1
  1. !function(){function e(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function t(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?e(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t,a,o,r,i,n){try{var c=e[i](n),_=c.value}catch(d){return void a(d)}c.done?t(_):Promise.resolve(_).then(o,r)}function r(e){return function(){var t=this,a=arguments;return new Promise((function(r,i){var n=e.apply(t,a);function c(e){o(n,r,i,c,_,"next",e)}function _(e){o(n,r,i,c,_,"throw",e)}c(void 0)}))}}var i=document.createElement("style");i.innerHTML='._headerContent_fdpo8_1{padding-top:1.06667rem;padding-bottom:.53333rem;min-height:2.66667rem;position:relative}._teacherContent_fdpo8_7{display:flex;justify-content:space-between;flex-shrink:0}._teacherIcon_fdpo8_12{position:relative;margin-top:-1.01333rem;line-height:0}._teacherIcon_fdpo8_12 ._avatar_fdpo8_17{position:relative;width:2.08rem;height:2.08rem;box-sizing:border-box;border:.05333rem solid #fff;background-color:#fff}._teacherIcon_fdpo8_12 ._avatarActive_fdpo8_25{border-color:#f0af88;background-color:#f0af88}._teacherIcon_fdpo8_12 ._teacherIconVip_fdpo8_29{position:absolute;bottom:0;right:-.32rem;width:1.04rem;height:.48rem}._teacherInfo_fdpo8_36{display:flex;align-items:center;padding:.37333rem 0}._teacherInfo_fdpo8_36 ._teacherInfoName_fdpo8_41{font-size:.53333rem;font-weight:500;color:#1a1a1a;max-width:4rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._teacherInfo_fdpo8_36>img{margin-left:.26667rem;width:1.04rem;height:.42667rem}._teacherHonor_fdpo8_55{display:flex;align-items:center;font-size:.32rem;line-height:.42667rem;color:#666;font-weight:500;padding-bottom:.32rem;padding-top:.26667rem}._teacherHonor_fdpo8_55 ._score_fdpo8_65{margin-left:0}._headerCount_fdpo8_68{width:calc(100% - .74667rem);padding:.32rem;margin:0 auto;background-color:#fff;border-radius:.26667rem;box-sizing:border-box}._teacherOperation_fdpo8_76 .van-button{height:.74667rem}._teacherOperation_fdpo8_76 ._btn_fdpo8_79{padding:.08rem .32rem .02667rem;min-width:1.65333rem}._teacherOperation_fdpo8_76 ._btnStar_fdpo8_83{color:#f18400;border-color:#f18400}._subjectSection_fdpo8_87{margin-right:.26667rem;max-width:1.81333rem;box-sizing:content-box}._teacher-bottom_fdpo8_92{padding:.8rem 0 0;display:flex;align-items:center;justify-content:space-between}._followFans_fdpo8_98{padding-top:.26667rem!important}._teacher-data_fdpo8_101{display:flex;align-items:center;justify-content:space-between}._teacher-data_fdpo8_101 ._teacher-data_item_fdpo8_106{font-size:.37333rem;color:#333;position:relative}._teacher-data_fdpo8_101 ._teacher-data_item_fdpo8_106 span{font-weight:500;color:#000;font-size:.53333rem;margin-left:.13333rem}._teacher-data_fdpo8_101 ._teacher-data_item_fdpo8_106:after{content:" ";display:inline-block;position:absolute;right:0;top:.05333rem;width:.02667rem;height:.42667rem;background:#ebebeb}._teacher-data_fdpo8_101 ._teacher-data_item_fdpo8_106:first-child{padding-right:.4rem;margin-right:.4rem}._teacher-data_fdpo8_101 ._teacher-data_item_fdpo8_106:last-child:after{display:none}._iconVip_fdpo8_134{width:.90667rem!important;margin-right:.13333rem}._iconOther_fdpo8_138{margin-left:.16rem;width:.48rem;height:.48rem}._teacher-info_fdpo8_143{margin-left:.21333rem}._teacher-info_fdpo8_143 ._teacher-name_fdpo8_146{font-size:.48rem;font-weight:500;color:#1a1a1a;padding-bottom:.16rem;display:flex;justify-content:space-between}._teacher-info_fdpo8_143 ._teacher-name_fdpo8_146 ._teacherCert_fdpo8_154{display:flex;align-items:center}._teacher-info_fdpo8_143 ._teacher-name_fdpo8_146 ._teacherLast_fdpo8_158{display:inline-block;max-width:3.2rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._subjectList_fdpo8_165::-webkit-scrollbar{display:none}._subjectList_fdpo8_165{overflow:auto;width:6.8rem;display:flex;flex-wrap:nowrap}._piNameSubject_fdpo8_175{display:flex;align-items:center}._piNameSubject_fdpo8_175 ._subject_fdpo8_87{display:flex;align-items:center;margin-left:.10667rem;background:#effbf9;border-radius:.21333rem;font-size:.32rem;line-height:.42667rem;color:#2dc7aa;padding:0 .13333rem;white-space:nowrap}._piNameSubject_fdpo8_175 ._subject_fdpo8_87:first-child{margin-left:0}._rTitle_fdpo8_194{display:flex;align-items:center}._rTitle_fdpo8_194:before{margin-right:.21333rem;content:" ";display:inline-block;width:.10667rem;height:.37333rem;background:#2dc7aa;border-radius:.08rem}._liveTag_fdpo8_207{position:absolute;bottom:0;left:50%;transform:translate(-50%);line-height:.42667rem;background:#ff6363;border-radius:.53333rem;text-align:center;color:#fff;font-size:.26667rem;font-weight:500;padding:.05333rem 0;width:60%;z-index:10}._teacherName_fdpo8_223{display:inline-block;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:2.66667rem}._teacherIcons_fdpo8_231{display:flex;align-items:center}._teaherPopup_fdpo8_235{background:transparent;width:7.36rem;overflow:initial}._teacherIconWrap_fdpo8_240{padding:1.33333rem .58667rem .58667rem;background-color:#fff;border-radius:0 0 .26667rem .26667rem;margin-top:-.66667rem}._teacherIconItem_fdpo8_246{margin-bottom:.42667rem}._teacherIconItem_fdpo8_246 ._teacherIconItemTop_fdpo8_249{display:flex;align-items:center;margin-bottom:.26667rem}._teacherIconItem_fdpo8_246 .van-image{margin-right:.21333rem;width:.64rem;height:.64rem}._teacherIconItem_fdpo8_246 ._teacherIconTitle_fdpo8_259{font-size:.42667rem;font-weight:700;color:#333}._teacherIconItem_fdpo8_246 ._teacherIconDes_fdpo8_264{font-size:.32rem;line-height:.42667rem;font-weight:400;padding-left:.08rem;color:#666}._closeIcon_fdpo8_271{position:absolute;bottom:-1.44rem;left:50%;transform:translate(-50%);width:.96rem;height:.96rem}._liveList_fdpo8_279{padding:.32rem 0}._liveList_fdpo8_279 ._headerFollow_fdpo8_282{margin-bottom:.32rem}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._teacherIcon_fdpo8_12{margin:0 .26667rem 0 0}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._score_fdpo8_65{margin-left:.26667rem}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._teacherIconVip_fdpo8_29{left:50%;right:initial;transform:translate(-50%);bottom:-.16rem}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._liveTag_fdpo8_207{width:80%}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._avatar_fdpo8_17{width:1.6rem;height:1.6rem}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._piNameSubject_fdpo8_175{align-items:flex-start}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._subjectList_fdpo8_165{flex-wrap:wrap}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._subject_fdpo8_87{margin:.05333rem .13333rem .08rem 0}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._teacher-bottom_fdpo8_92{padding-top:.64rem}._liveList_fdpo8_279 ._headerFollow_fdpo8_282 ._unlinkeBtn_fdpo8_316{font-size:.32rem;color:#ff6363;border:.02667rem solid #ff6363;padding:.13333rem .26667rem;border-radius:.53333rem}._followContainer_fdpo8_323{display:flex;align-items:flex-start}\n',document.head.appendChild(i),System.register(["./vip_default-legacy.86f429a8.js","./icon_video-legacy.31c6241e.js","./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.4a75d877.js","./index-legacy.c07bb851.js","./index-legacy.58a98508.js","./icon_teacher-legacy.42ba77b1.js","./index-legacy.897f3849.js","./index-legacy.87bcd48f.js","./index-legacy.4f8bc5f4.js","./use-tab-status-legacy.1f35f332.js","./use-refs-legacy.82f31dee.js","./index-legacy.610f0a70.js","./index-legacy.78ce4f6b.js","./use-id-legacy.54528695.js","./index-legacy.bbc2b10e.js"],(function(e){"use strict";var a,o,i,n,c,_,d,s,f,p,l,m,h,g,u,b,v,w,I,y,j,x,S,k,L,O,T,P,C,F,N,V,z,E,B,R,D,A,H,U,M,G,q,W,$,Y;return{setters:[function(e){a=e._,o=e.c,i=e.d,n=e.e,c=e.f,_=e.g,d=e.h,s=e.j,f=e.k,p=e.l,l=e.m,m=e.n,h=e.o,g=e.p,u=e.q,b=e.r,v=e.s,w=e.t,I=e.u,y=e.v,j=e.w,x=e.x,S=e.y,k=e.z,L=e.A,O=e.B,T=e.C,P=e.D,C=e.E},function(e){F=e._},function(e){N=e.d,V=e.y,z=e.D,E=e.T,B=e.j,R=e.n,D=e.A,A=e.C,H=e.$},function(e){U=e.I},function(e){M=e.L},function(e){G=e.R},function(e){q=e.i},function(e){W=e.S},function(e){$=e.C},function(e){Y=e.T},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var J={headerContent:"_headerContent_fdpo8_1",teacherContent:"_teacherContent_fdpo8_7",teacherIcon:"_teacherIcon_fdpo8_12",avatar:"_avatar_fdpo8_17",avatarActive:"_avatarActive_fdpo8_25",teacherIconVip:"_teacherIconVip_fdpo8_29",teacherInfo:"_teacherInfo_fdpo8_36",teacherInfoName:"_teacherInfoName_fdpo8_41",teacherHonor:"_teacherHonor_fdpo8_55",score:"_score_fdpo8_65",headerCount:"_headerCount_fdpo8_68",teacherOperation:"_teacherOperation_fdpo8_76",btn:"_btn_fdpo8_79",btnStar:"_btnStar_fdpo8_83",subjectSection:"_subjectSection_fdpo8_87","teacher-bottom":"_teacher-bottom_fdpo8_92",followFans:"_followFans_fdpo8_98","teacher-data":"_teacher-data_fdpo8_101","teacher-data_item":"_teacher-data_item_fdpo8_106",iconVip:"_iconVip_fdpo8_134",iconOther:"_iconOther_fdpo8_138","teacher-info":"_teacher-info_fdpo8_143","teacher-name":"_teacher-name_fdpo8_146",teacherCert:"_teacherCert_fdpo8_154",teacherLast:"_teacherLast_fdpo8_158",subjectList:"_subjectList_fdpo8_165",piNameSubject:"_piNameSubject_fdpo8_175",subject:"_subject_fdpo8_87",rTitle:"_rTitle_fdpo8_194",liveTag:"_liveTag_fdpo8_207",teacherName:"_teacherName_fdpo8_223",teacherIcons:"_teacherIcons_fdpo8_231",teaherPopup:"_teaherPopup_fdpo8_235",teacherIconWrap:"_teacherIconWrap_fdpo8_240",teacherIconItem:"_teacherIconItem_fdpo8_246",teacherIconItemTop:"_teacherIconItemTop_fdpo8_249",teacherIconTitle:"_teacherIconTitle_fdpo8_259",teacherIconDes:"_teacherIconDes_fdpo8_264",closeIcon:"_closeIcon_fdpo8_271",liveList:"_liveList_fdpo8_279",headerFollow:"_headerFollow_fdpo8_282",unlinkeBtn:"_unlinkeBtn_fdpo8_316",followContainer:"_followContainer_fdpo8_323"};var K=e("getAssetsHomeFile",(function(e){var t="./images/".concat(e);return{"./images/cert_active.png":a,"./images/cert_default.png":o,"./images/follow_bg.png":i,"./images/head_bg.png":n,"./images/icon-add-star.png":c,"./images/icon-add.png":_,"./images/icon-cert.png":d,"./images/icon-chat.png":s,"./images/icon-close.png":f,"./images/icon-live.png":p,"./images/icon-message.png":l,"./images/icon-small-live.png":m,"./images/icon1.png":h,"./images/icon2.png":g,"./images/icon3.png":u,"./images/icon_fans.png":b,"./images/icon_subject.png":v,"./images/icon_subject1.png":w,"./images/icon_video.png":F,"./images/live_active.png":I,"./images/live_bg.png":y,"./images/live_default.png":j,"./images/music_active.png":x,"./images/music_default.png":S,"./images/svip_active.png":k,"./images/teacher-icon.png":L,"./images/video_active.png":O,"./images/video_default.png":T,"./images/vip_active.png":P,"./images/vip_default.png":C}[t].default}));e("default",N({name:"teacher-follow",data:function(){return{userInfo:{},starGrade:0,subjectNameList:[],list:[],dataShow:!0,loading:!1,finished:!1,params:{username:"",page:1,rows:20}}},mounted:function(){this.getList()},methods:{getSubjectNameList:function(e){return e.split(",")||[]},onSearch:function(e){this.params.username=e,this.onSort()},onSort:function(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},getList:function(){var e=this;return r(regeneratorRuntime.mark((function a(){var o,r,i;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,o=e.params,a.next=4,V.post("/api-student/student/queryMyFollow",{data:t({},o)});case 4:if(r=a.sent,e.loading=!1,i=r.data||{},!(e.list.length>0&&1===i.pageNo)){a.next=9;break}return a.abrupt("return");case 9:e.list=e.list.concat(i.rows||[]),e.finished=i.pageNo>=i.totalPage,e.params.page=i.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 r(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:z.confirm({message:"确定取消关注吗?",confirmButtonColor:"var(--van-primary)"}).then(r(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,V.get("/api-student/teacher/starOrUnStar",{params:{userId:e.userId,starStatus:0}});case 3:E("取消关注成功"),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,a){var o=!1;switch(e){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":t.tag&&(o=t.tag.indexOf(e)>-1);break;case"VIP":o="VIP"===a;break;case"SVIP":o="SVIP"===a||"PERMANENT_SVIP"===a;break;case"DEGREE":o=!!t.degreeFlag;break;case"TEACHER":o=!!t.teacherFlag;break;default:o=!1}return o}},render:function(){var e,t,a=this;return B("div",{class:J.teacherFollow},[B(Y,{position:"top"},{default:function(){return[B($,{border:!1,isFixed:!1},null),B(W,{onSearch:a.onSearch},null)]}}),this.dataShow?B(M,{class:J.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 B("div",{class:[J.headerCount,J.headerFollow],onClick:function(t){t.stopPropagation(),sessionStorage.removeItem("teacherHomeTabs"),a.$router.push({path:"/teacherHome",query:{teacherId:e.userId,tabs:"single"}})}},[B("div",{class:J.followContainer},[B("div",{class:J.teacherContent},[B("div",{class:J.teacherIcon,onClick:function(t){1===e.liveFlag&&(t.stopPropagation(),R({api:"joinLiveRoom",content:{roomId:e.roomUid,teacherId:e.userId}}))}},[B(U,{class:[J.avatar,(a.checkBadge("VIP",e.teacher,e.vipType)||a.checkBadge("SVIP",e.teacher,e.vipType))&&J.avatarActive],round:!0,src:e.avatar||q,fit:"cover"},null),1===e.liveFlag?B("p",{class:[J.liveTag,J.liveTagFollow]},[D("直播中")]):(a.checkBadge("SVIP",e.teacher,e.vipType)||a.checkBadge("VIP",e.teacher,e.vipType))&&B(U,{class:J.teacherIconVip,src:a.checkBadge("SVIP",e.teacher,e.vipType)?K("svip_active.png"):a.checkBadge("VIP",e.teacher,e.vipType)?K("vip_active.png"):K("vip_default.png")},null)])]),B("div",null,[B("div",{class:J.teacherInfo},[B("div",{class:J.teacherInfoName},[e.userName||"游客".concat(e.userId||"")])]),B("div",{class:J.piNameSubject},[B("div",{class:J.subjectList},[a.getSubjectNameList(e.subjectName).map((function(e){return B("span",{class:J.subject},[e])}))])])])]),B("div",{class:J.teacherHonor},[B("div",{class:J.score},[D("评分: ")]),B("div",{class:J.level},[e.starGrade?B(G,{readonly:!0,modelValue:e.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):B("span",{style:{fontSize:"12px",color:"#999999"}},[D("暂无评分")])])]),B("div",{class:[J["teacher-bottom"],J.followFans]},[B("div",{class:J["teacher-data"]},[B("div",{class:J["teacher-data_item"]},[D("粉丝 "),B("span",null,[e.fansNum||0])]),B("div",{class:J["teacher-data_item"]},[D("已上课时 "),B("span",null,[e.expTime||0])])]),B("div",{class:J.unlinkeBtn,onClick:function(t){t.stopPropagation(),a.onUnLike(e)}},[D("取消关注")])])])})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!H(t)?e:{default:function(){return[e]}})):B(A,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无关注"},null)])}}))}}}))}();