index.9e7c3822.js 3.8 KB

1
  1. import{d as f,P as h,S as p,j as e,A as c,C as I,aS as g,y as l}from"./ResizeObserver.es.39b48a47.js";import{C as U}from"./index.970ad07b.js";import{I as i}from"./index.fcbcb027.js";import{i as d}from"./icon_teacher.40b6f077.js";import{i as v}from"./icon_upload_poster.81da3a98.js";import{T as S}from"./index.e90d2179.js";import{i as _}from"./icon_video.60a71a50.js";import{C}from"./index.1aca6fb4.js";import"./index.dc19bc54.js";/* empty css */import"./tcplayer.v4.8.0.min.3b1de996.js";const w="_elegant_1o7v1_1",y="_line_1o7v1_6",B="_tedeoItem_1o7v1_9",N="_teCover_1o7v1_9",L="_itemBg_1o7v1_12",V="_iconVideo_1o7v1_33",T="_teSection_1o7v1_51",A="_teTitle_1o7v1_54",D="_info_1o7v1_59",b="_teUserInfo_1o7v1_64",F="_teUserLogo_1o7v1_71",P="_teUserName_1o7v1_78",k="_teUserNum_1o7v1_82",x="_videoGroup_1o7v1_86",G="_searchContainer_1o7v1_98",q="_item_1o7v1_12",$="_searchItem_1o7v1_107",H="_title_1o7v1_111",R="_content_1o7v1_119",j="_searchFollow_1o7v1_125",z="_active_1o7v1_129",M="_searchLive_1o7v1_133",E="_active2_1o7v1_137",J="_searchDefault_1o7v1_141",K="_star_1o7v1_151",O="_video_1o7v1_86",Q="_living_1o7v1_163",W="_animation_1o7v1_180";var o={elegant:w,line:y,tedeoItem:B,teCover:N,itemBg:L,iconVideo:V,teSection:T,teTitle:A,info:D,teUserInfo:b,teUserLogo:F,teUserName:P,teUserNum:k,videoGroup:x,searchContainer:G,item:q,searchItem:$,title:H,content:R,searchFollow:j,active:z,searchLive:M,active2:E,searchDefault:J,star:K,video:O,living:Q,animation:W},le=f({name:"teacher-style",setup(){const u=h(),s=p({videoStatus:!1,videoItem:{},isAddBrowse:!1,dataShow:!1,teacherId:u.query.teacherId,list:[],userInfo:{}});(async()=>{s.dataShow=!0;try{const{data:t}=await l.get("/api-student/teacher/queryTeacherHome",{params:{userId:s.teacherId}});s.userInfo=t,s.list=t.styleVideo||[],s.dataShow=s.list.length>0}catch{}})();const m=async()=>{try{if(!s.isAddBrowse)return;await l.get("/api-student/teacher/addVideoBrowse",{hideLoading:!0,params:{videoId:s.videoItem.id}}),s.isAddBrowse=!1}catch{}};return()=>e("div",{class:o["teacher-elegant"]},[e(S,null,{default:()=>[e(U,{border:!1,background:"#f6f8f9",isFixed:!1},null)]}),s.dataShow?e("div",{class:[o.elegant]},[e("div",{class:o.line},[s.list.map((t,n)=>{var a,r;return n%2===0&&e("div",{class:o.tedeoItem},[e("div",{class:o.itemBg,onClick:()=>{s.videoStatus=!0,s.isAddBrowse=!0,s.videoItem=t}},null),e("img",{class:o.iconVideo,src:_},null),e("div",{class:o.teCover},[e(i,{src:t.cover||v,fit:"cover"},null)]),e("div",{class:o.teSection},[e("div",{class:o.info},[e("div",{class:o.teUserInfo},[e(i,{src:((a=s.userInfo)==null?void 0:a.heardUrl)||d,class:o.teUserLogo},null),e("span",{class:[o.teUserName,"van-hairline--right van-ellipsis"]},[((r=s.userInfo)==null?void 0:r.username)||`\u6E38\u5BA2${(t==null?void 0:t.userId)||""}`])]),e("span",{class:o.teUserNum},[t.browse,c("\u6D4F\u89C8")])])])])})]),e("div",{class:o.line},[s.list.map((t,n)=>{var a,r;return n%2===1&&e("div",{class:o.tedeoItem},[e("div",{class:o.itemBg,onClick:()=>{s.videoStatus=!0,s.isAddBrowse=!0,s.videoItem=t}},null),e("img",{class:o.iconVideo,src:_},null),e("div",{class:o.teCover},[e(i,{src:t.cover||v,fit:"cover"},null)]),e("div",{class:o.teSection},[e("div",{class:o.info},[e("div",{class:o.teUserInfo},[e(i,{src:((a=s.userInfo)==null?void 0:a.heardUrl)||d,class:o.teUserLogo},null),e("span",{class:[o.teUserName,"van-hairline--right van-ellipsis"]},[((r=s.userInfo)==null?void 0:r.username)||`\u6E38\u5BA2${(t==null?void 0:t.userId)||""}`])]),e("span",{class:o.teUserNum},[t.browse,c("\u6D4F\u89C8")])])])])})])]):e(I,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u8001\u5E08\u98CE\u91C7"},null),e(g,{show:s.videoStatus,round:!0,class:o.videoGroup,closeable:!0,onClose:()=>{s.videoStatus=!1,s.isAddBrowse=!1}},{default:()=>{var t;return[s.videoStatus&&e(C,{playsinline:!0,onPlay:m,src:(t=s.videoItem)==null?void 0:t.videoUrl},null)]}})])}});export{le as default};