index-legacy.ffd34e8b.js 6.9 KB

1
  1. !function(){function e(e,t,n,i,a,s,r){try{var o=e[s](r),c=o.value}catch(u){return void n(u)}o.done?t(c):Promise.resolve(c).then(i,a)}function t(t){return function(){var n=this,i=arguments;return new Promise((function(a,s){var r=t.apply(n,i);function o(t){e(r,a,s,o,c,"next",t)}function c(t){e(r,a,s,o,c,"throw",t)}o(void 0)}))}}System.register(["./index-legacy.230f240a.js","./index-legacy.11d27a41.js","./index-legacy.508ebce0.js","./music_default-legacy.6b7937c5.js","./icon_timer-legacy.7864608d.js","./icon_vip_default-legacy.b19d529c.js","./index2-legacy.f2f80c5a.js","./index2-legacy.44e7e3da.js","./index2-legacy.38115259.js"],(function(e){"use strict";var n,i,a,s,r,o,c,u,l,f,p,g,d,m,h,v,x,b,_,w,y,k,j,I,E,L,S,F,O,B,T,C,U,z,R,V;return{setters:[function(e){n=e.C},function(e){i=e.P},function(e){a=e.d,s=e.aN,r=e.b,o=e.bi,c=e.bg,u=e.c,l=e.a,f=e.bD,p=e.az,g=e.aZ,d=e.bf,m=e.F},function(e){h=e._,v=e.a,x=e.b,b=e.c,_=e.d,w=e.e,y=e.f,k=e.g,j=e.h,I=e.i,E=e.j,L=e.k,S=e.l,F=e.m,O=e.n,B=e.o},function(e){T=e._},function(e){C=e._,U=e.a},function(e){z=e.E},function(e){R=e.E,V=e.a},function(){}],execute:function(){var P=function(e){var t="../../user-info/images/".concat(e);return Object.assign({"../../user-info/images/course_bg.png":h,"../../user-info/images/entry_active.png":v,"../../user-info/images/entry_default.png":x,"../../user-info/images/icon_cert.png":b,"../../user-info/images/icon_cert_default.png":_,"../../user-info/images/icon_king.png":w,"../../user-info/images/icon_live.png":y,"../../user-info/images/icon_live_default.png":k,"../../user-info/images/icon_member.png":j,"../../user-info/images/icon_member_default.png":I,"../../user-info/images/icon_music.png":E,"../../user-info/images/icon_music_default.png":L,"../../user-info/images/icon_timer.png":T,"../../user-info/images/icon_video.png":S,"../../user-info/images/icon_video_default.png":F,"../../user-info/images/icon_vip.png":C,"../../user-info/images/icon_vip_default.png":U,"../../user-info/images/music_active.png":O,"../../user-info/images/music_default.png":B})[t].default},D=a({name:"item",props:{item:{type:Object,default:{}},getList:{type:Function,default:function(){}}},computed:{subjects:function(){return this.item.subjectName.split(",")||[]}},methods:{onUnLike:function(){var e=this;return t(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:s.confirm("确定取消关注吗?","提示").then(t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.get("/api-website/student/starOrUnStar",{params:{userId:e.item.userId,starStatus:0}});case 3:o.success("取消关注成功"),e.getList(),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])}))));case 1:case"end":return n.stop()}}),n)})))()},checkBadge:function(e){var t=!1,n=this.item.teacher;switch(e){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":n&&n.tag&&(t=n.tag.indexOf(e)>-1);break;case"VIP":if(n.membershipStartTime&&n.membershipEndTime){var i=c(n.membershipStartTime).valueOf(),a=c(n.membershipEndTime).valueOf(),s=c().valueOf();t=s>=i&&s<=a}else t=!1;break;default:t=!1}return t}},render:function(){var e=this.item;return u("div",{class:"w-[334px] rounded-[10px] mb-4 m-auto user-shadow relative"},[u("div",{class:"bg-[#CFF2FF] absolute right-4 top-5 text-[#0089B9] text-xs py-0.5 px-2 rounded-[10px]"},[l("老师")]),u("div",{class:"p-[18px] flex"},[u(f,{src:e.avatar||p,class:"w-12 h-12 rounded-full border-2 border-[#2DC7AA] object-cover"},null),u("div",{class:"flex flex-col pl-5"},[u("p",{class:"text-base text-[#333] font-semibold leading-tight pb-0"},[e.userName]),u("div",{class:"flex items-center"},[u(f,{src:this.checkBadge("VIP")?P("icon_vip.png"):P("icon_vip_default.png"),class:"h-7 -ml-1"},null),u("img",{src:this.checkBadge("STYLE")?P("icon_cert.png"):P("icon_cert_default.png"),class:"h-[26px] px-1"},null),u("img",{src:this.checkBadge("VIDEO")?P("icon_video.png"):P("icon_video_default.png"),class:"h-[26px] px-1"},null),u("img",{src:this.checkBadge("LIVE")?P("icon_live.png"):P("icon_live_default.png"),class:"h-[26px] px-1"},null),u("img",{src:this.checkBadge("MUSIC")?P("icon_music.png"):P("icon_music_default.png"),class:"h-[26px] px-1"},null)])])]),u("p",{class:"mx-4 mb-3"},[this.subjects.map((function(e){return u(z,{effect:"dark",size:"small",color:"#E0FEF9",round:!0,style:{borderColor:"#E0FEF9",color:"#1B967E",margin:"0 4px 8px"}},"function"==typeof(t=e)||"[object Object]"===Object.prototype.toString.call(t)&&!d(t)?e:{default:function(){return[e]}});var t}))]),u("div",{class:"border-[#E7E6E6] border-t block mx-2.5 pt-1 pb-2 text-center"},[u(g,{type:"text",plain:!0,size:"small",class:"!bg-white !text-[#999999] hover:!text-[#FF8B00]",onClick:this.onUnLike},{default:function(){return[l("取消关注")]}})])])}}),M=a({name:"list",data:function(){return{pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},list:[],loading:!1,dataShow:!1}},mounted:function(){this.getList()},methods:{getList:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.prev=1,t.next=4,r.post("/api-website/student/queryMyFollow",{requestType:"json",data:{page:e.pageInfo.page,rows:e.pageInfo.limit}});case 4:n=t.sent,i=n.data,e.list=i.rows||[],e.pageInfo.total=i.total,i.total<=0&&(e.dataShow=!0),t.next=13;break;case 11:t.prev=11,t.t0=t.catch(1);case 13:e.dataShow?e.loading=!1:setTimeout((function(){e.loading=!1}),200);case 14:case"end":return t.stop()}}),t,null,[[1,11]])})))()}},render:function(){var e=this;return u(m,null,[u("div",{class:"px-3 pt-5"},[u(R,{loading:this.loading,animated:!0,class:"w-full m-auto flex flex-wrap",count:2},{default:function(){return[u("div",{class:"flex flex-wrap"},[e.list.map((function(t){return u("div",{class:"basis-1/2"},[u(D,{item:t,getList:e.getList},null)])}))])]},template:function(){return u("div",{class:"w-[334px] rounded-[10px] p-[18px] flex mb-4 m-auto flex-col user-shadow relative"},[u("div",{class:"flex w-full"},[u(V,{variant:"circle",style:{width:"48px",height:"48px"}},null),u("div",{class:"flex flex-1 flex-col pl-5"},[u(V,{variant:"h3",style:{width:"50%",marginBottom:"8px"}},null),u(V,{variant:"p",style:{width:"60%"}},null)])]),u(V,{variant:"p",style:{width:"60%",marginTop:"6px"}},null)])}})]),this.dataShow&&u(n,null,null),u(i,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":function(t){return e.pageInfo.page=t},limit:this.pageInfo.limit,"onUpdate:limit":function(t){return e.pageInfo.limit=t},pageSizes:this.pageInfo.page_size,pagination:this.getList},null)])}});e("default",a({name:"my-follow",data:function(){return{active:"MYFOLLOW"}},render:function(){return u("div",{class:"rounded-md overflow-hidden"},[u("div",{class:"text-2xl font-semibold text-black leading-none px-6 py-5 "},[l("关注的老师")]),u(M,null,null)])}}))}}}))}();