teacher-elegant.f5300f3b.js 5.3 KB

1
  1. var u=Object.defineProperty;var i=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var r=(s,e,a)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a,n=(s,e)=>{for(var a in e||(e={}))f.call(e,a)&&r(s,a,e[a]);if(i)for(var a of i(e))_.call(e,a)&&r(s,a,e[a]);return s};import{C as p}from"./index.a8c40b91.js";import{C as g}from"./index.7a1345f8.js";import{S as b}from"./index.264e172e.js";import{s as c,r as l}from"./index.72370eea.js";import{d as S,a as t,S as j,I as v,v as I,q as h,b as m,w as N,P as U}from"./vendor.6251acf1.js";/* empty css *//* empty css *//* empty css */import{O as L}from"./organ-search.3f17214c.js";import{i as C}from"./icon_teacher.2c3a434a.js";import{b as w}from"./bars.4f1962a6.js";/* empty css *//* empty css *//* empty css */const x="_classHeader_1fm8r_1",y="_label_1fm8r_9",D="_elegant_1fm8r_21",T="_itemBg_1fm8r_27",H="_tedeoItem_1fm8r_36",k="_teCover_1fm8r_44",F="_teSection_1fm8r_51",P="_teTitle_1fm8r_54",V="_info_1fm8r_59",B="_teUserInfo_1fm8r_64",O="_teUserLogo_1fm8r_71",q="_teUserName_1fm8r_78",E="_teUserNum_1fm8r_82",z="_searchContainer_1fm8r_85",A="_item_1fm8r_27",$="_searchItem_1fm8r_94",M="_title_1fm8r_98",R="_content_1fm8r_106",G="_searchFollow_1fm8r_112",J="_active_1fm8r_116",K="_searchLive_1fm8r_120",Q="_active2_1fm8r_124",W="_searchDefault_1fm8r_128",X="_star_1fm8r_138",Y="_video_1fm8r_141",Z="_living_1fm8r_150",ee="_animation_1fm8r_167";var o={classHeader:x,"teacher-elegant":"_teacher-elegant_1fm8r_4",label:y,elegant:D,itemBg:T,tedeoItem:H,teCover:k,teSection:F,teTitle:P,info:V,teUserInfo:B,teUserLogo:O,teUserName:q,teUserNum:E,searchContainer:z,item:A,searchItem:$,title:M,content:R,searchFollow:G,active:J,searchLive:K,active2:Q,searchDefault:W,star:X,video:Y,living:Z,animation:ee};function te(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!N(s)}var ge=S({data(){return{searchStatus:!1,openStatus:!1,subjectList:[],params:{username:"",page:1,subjectId:null,subjectName:""},dataShow:!0,loading:!1,finished:!1,list:[]}},async mounted(){var e,a;const s=sessionStorage.getItem("elegantSubjectId");sessionStorage.removeItem("teacherHomeTabs"),sessionStorage.removeItem("elegantSubjectId"),this.params.subjectId=s||((e=c.user.data)==null?void 0:e.subjectId)||null,this.params.subjectName=((a=c.user.data)==null?void 0:a.subjectName)||"";try{const d=await l.get("/api-student/subject/subjectSelect");this.subjectList=d.data||[]}catch{}await this.getList()},computed:{filterDot(){return!!this.params.subjectId}},methods:{async getList(){try{const s=this.params,e=await l.post("/api-student/teacher/stylePage",{data:n({},s)});console.log(e),this.loading=!1;const a=e.data||{};if(this.list.length>0&&a.pageNo===1)return;this.list=this.list.concat(a.rows||[]),this.finished=a.pageNo>=a.totalPage,this.params.page=a.pageNo+1,this.dataShow=this.list.length>0,console.log(this.list)}catch{this.dataShow=!1,this.finished=!0}},onSort(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.searchStatus=!1,this.getList(),sessionStorage.setItem("elegantSubjectId",this.params.subjectId)},onSearch(s){this.params.username=s,this.onSort()},onDetail(s){this.$router.push({path:"/teacherHome",query:{teacherId:s.userId}})}},render(){let s;return t("div",{class:o["teacher-elegant"]},[t(j,{offsetTop:0,position:"top"},{default:()=>[t(p,{class:o.classHeader,border:!1,background:"transparent",isFixed:!1},null),t(b,{placeholder:"\u8BF7\u8F93\u5165\u8001\u5E08\u540D\u79F0",onSearch:this.onSearch},{left:()=>t("div",{class:o.label,onClick:()=>{this.searchStatus=!this.searchStatus,this.openStatus=!this.openStatus}},[this.params.subjectName,t(v,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])})]}),this.dataShow?t(I,{loading:this.loading,"onUpdate:loading":e=>this.loading=e,finished:this.finished,finishedText:" ",immediateCheck:!1,class:[o.elegant],onLoad:this.getList},te(s=this.list.map(e=>t("div",{class:o.tedeoItem},[t("div",{class:o.itemBg,onClick:()=>{this.onDetail(e)}},null),t("div",{class:o.teCover},[t("video",{width:"100%",class:o.video},[t("source",{src:e.videoUrl+"#t=1,3",type:"video/mp4"},null)]),e.living===1&&t("div",{class:o.living},[t(h,{src:w,class:o.animation},null),t("span",null,[m("\u64AD\u653E\u4E2D")])])]),t("div",{class:o.teSection},[t("div",{class:[o.teTitle,"van-ellipsis"]},[e.lessonName]),t("div",{class:o.info},[t("div",{class:o.teUserInfo},[t(h,{src:e.avatar||C,class:o.teUserLogo},null),t("span",{class:[o.teUserName,"van-hairline--right"]},[(e==null?void 0:e.username)||`\u6E38\u5BA2${(e==null?void 0:e.userId)||""}`])]),t("span",{class:o.teUserNum},[e.browse,m("\u6D4F\u89C8")])])])])))?s:{default:()=>[s]}):t(g,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u8001\u5E08\u98CE\u91C7"},null),t(U,{show:this.searchStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.searchStatus=!1,onClosed:()=>this.openStatus=!1},{default:()=>[this.openStatus&&t(L,{subjectList:this.subjectList,onSort:this.onSort,modelValue:this.params.subjectId,"onUpdate:modelValue":e=>this.params.subjectId=e,subjectName:this.params.subjectName,"onUpdate:subjectName":e=>this.params.subjectName=e},null)]})])}});export{ge as default};