1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,a,i,c){try{var s=e[i](c),o=s.value}catch(u){return void n(u)}s.done?t(o):Promise.resolve(o).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var c=e.apply(t,n);function s(e){r(c,a,i,s,o,"next",e)}function o(e){r(c,a,i,s,o,"throw",e)}s(void 0)}))}}System.register(["./teacher-header.module-legacy.66e929d5.js","./index-legacy.dc694a0c.js","./index-legacy.0c69c28d.js","./index-legacy.8b7e287e.js","./index-legacy.a465b12d.js","./index-legacy.1b582b3f.js","./index-legacy.fa508478.js","./index-legacy.650bb098.js","./icon_teacher-legacy.00e7cdce.js","./teacher_cert-legacy.f997e14c.js","./function-call-legacy.114240f8.js","./use-tab-status-legacy.bece62ce.js","./use-refs-legacy.71136552.js","./index-legacy.892064fa.js"],(function(e){"use strict";var n,r,i,c,s,o,u,l,f,d,g,p,h,m,b,v,y,j,w,x,O,S,k,L;return{setters:[function(e){n=e.s,r=e._,i=e.a,c=e.b,s=e.c,o=e.d,u=e.e},function(e){l=e.d,f=e.b,d=e.T,g=e.i,p=e.w,h=e.p,m=e.L,b=e.ak,v=e.C},function(e){y=e.C},function(){},function(){},function(e){j=e.I},function(e){w=e.L},function(e){x=e.R},function(e){O=e.i},function(e){S=e.t,k=e.m},function(e){L=e.D},function(){},function(){},function(){}],execute:function(){var _=e("getAssetsHomeFile",(function(e){var t="./images/".concat(e);return{"./images/follow_bg.png":r,"./images/head_bg.png":i,"./images/icon_fans.png":c,"./images/icon_subject.png":s,"./images/icon_video.png":o,"./images/live_bg.png":u}[t].default}));e("default",l({name:"teacher-follow",data:function(){return{userInfo:{},starGrade:0,subjectNameList:[],list:[],dataShow:!0,loading:!1,finished:!1,params:{page:1,rows:20}}},mounted:function(){this.getList()},methods:{getSubjectNameList:function(e){return e.split(",")||[]},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 a(regeneratorRuntime.mark((function n(){var r,a,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r=e.params,n.next=4,f.post("/api-student/student/queryMyFollow",{data:t({},r)});case 4:if(a=n.sent,e.loading=!1,i=a.data||{},!(e.list.length>0&&1===i.pageNo)){n.next=9;break}return n.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,n.next=19;break;case 15:n.prev=15,n.t0=n.catch(0),e.dataShow=!1,e.finished=!0;case 19:case"end":return n.stop()}}),n,null,[[0,15]])})))()},onUnLike:function(e){var t=this;return a(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:L.confirm({message:"确定取消关注吗?",confirmButtonColor:"var(--van-primary)"}).then(a(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,f.get("/api-student/teacher/starOrUnStar",{params:{userId:e.userId,starStatus:0}});case 3:d("取消关注成功"),setTimeout((function(){t.onSort()}),1e3),n.next=9;break;case 7:n.prev=7,n.t0=n.catch(0);case 9:case"end":return n.stop()}}),n,null,[[0,7]])}))));case 1:case"end":return n.stop()}}),n)})))()}},render:function(){var e,t,r=this;return g("div",{class:n.teacherFollow},[this.dataShow?g(w,{class:n.liveList,loading:this.loading,"onUpdate:loading":function(e){return r.loading=e},immediateCheck:!1,finished:this.finished,finishedText:"没有更多了"},(t=e=this.list.map((function(e){return g("div",{class:[n.headerCount,n.headerFollow]},[g(y,{class:n["open-teacher-info"],border:!1,center:!0},{default:function(){return[g("div",{class:n["teacher-info"]},[g("div",{class:n["teacher-name"]},[g("div",{class:n.teacherCert},[g("span",{style:{display:"inline-block"}},[e.userName||"游客".concat(e.userId||"")]),1===e.entryFlag&&g(j,{class:n.cert,src:S},null),1===e.musicianFlag&&g(j,{class:n.cert,src:k},null)])]),g("div",{class:n.level},[e.starGrade?g(x,{readonly:!0,modelValue:e.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):g("span",{style:{fontSize:"12px",color:"#999999"}},[p("暂无评分")])])])]},icon:function(){return g("div",{style:{position:"relative",lineHeight:0}},[g(j,{class:n.userLogo,src:e.avatar||O,fit:"cover"},null),1===e.liveFlag&&g("p",{class:n.liveTag,onClick:function(){h({api:"joinLiveRoom",content:{roomId:e.roomUid,teacherId:e.userId}})}},[p("直播中")])])},"right-icon":function(){return g(m,{name:"like",color:"#FF6363",size:18,onClick:function(){r.onUnLike(e)}},null)}}),g("p",{class:n.piNameSubject},[g(j,{class:n.subjectSection,src:_("icon_subject.png"),fit:"contain"},null),r.getSubjectNameList(e.subjectName).map((function(e){return g("span",{class:n.subject},[e])}))]),g("div",{class:n["teacher-bottom"]},[g("div",{class:n["teacher-data"]},[g("div",{class:n["teacher-data_item"]},[p("粉丝 "),g("span",null,[e.fansNum||0])]),g("div",{class:n["teacher-data_item"]},[p("已上课时 "),g("span",null,[e.expTime||0])])])])])})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)?e:{default:function(){return[e]}})):g(v,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无关注"},null)])}}))}}}))}();
|