teacher-elegant.7035a29a.js 4.8 KB

1
  1. var u=Object.defineProperty;var i=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var r=(t,e,a)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,n=(t,e)=>{for(var a in e||(e={}))p.call(e,a)&&r(t,a,e[a]);if(i)for(var a of i(e))_.call(e,a)&&r(t,a,e[a]);return t};import{C as m}from"./index.6b925c2b.js";import{C as f}from"./index.f61578bb.js";import{S as g}from"./index.39e153a3.js";import{s as c,r as l}from"./index.b3da22a8.js";import{d as v,a as s,S as b,z as S,q as h,b as d,y,P as j}from"./vendor.415f94b5.js";/* empty css *//* empty css *//* empty css */import{O as I}from"./organ-search.087de81f.js";import{i as N}from"./icon_teacher.2c3a434a.js";import{b as U}from"./bars.4f1962a6.js";/* empty css *//* empty css *//* empty css */const L="_classHeader_p4y6r_1",C="_elegant_p4y6r_9",w="_itemBg_p4y6r_15",x="_tedeoItem_p4y6r_24",T="_teCover_p4y6r_32",D="_teSection_p4y6r_39",H="_teTitle_p4y6r_42",F="_info_p4y6r_47",V="_teUserInfo_p4y6r_52",k="_teUserLogo_p4y6r_59",B="_teUserName_p4y6r_66",O="_teUserNum_p4y6r_70",P="_searchContainer_p4y6r_73",q="_item_p4y6r_15",A="_searchItem_p4y6r_82",E="_title_p4y6r_86",z="_content_p4y6r_94",$="_searchFollow_p4y6r_100",M="_active_p4y6r_104",R="_searchLive_p4y6r_108",G="_active2_p4y6r_112",J="_searchDefault_p4y6r_116",K="_star_p4y6r_126",Q="_video_p4y6r_129",W="_living_p4y6r_138",X="_animation_p4y6r_155";var o={classHeader:L,elegant:C,itemBg:w,tedeoItem:x,teCover:T,teSection:D,teTitle:H,info:F,teUserInfo:V,teUserLogo:k,teUserName:B,teUserNum:O,searchContainer:P,item:q,searchItem:A,title:E,content:z,searchFollow:$,active:M,searchLive:R,active2:G,searchDefault:J,star:K,video:Q,living:W,animation:X};function Y(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!y(t)}var _e=v({data(){return{searchStatus:!1,openStatus:!1,subjectList:[],params:{username:"",page:1,subjectId:null,subjectName:""},dataShow:!0,loading:!1,finished:!1,list:[]}},async mounted(){var t,e;sessionStorage.removeItem("teacherHomeTabs"),this.params.subjectId=((t=c.user.data)==null?void 0:t.subjectId)||null,this.params.subjectName=((e=c.user.data)==null?void 0:e.subjectName)||"";try{const a=await l.get("/api-student/subject/subjectSelect");this.subjectList=a.data||[]}catch{}await this.getList()},methods:{async getList(){try{const t=this.params,e=await l.post("/api-student/teacher/stylePage",{data:n({},t)});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()},onSearch(t){this.params.username=t,this.onSort()},onDetail(t){this.$router.push({path:"/teacherHome",query:{teacherId:t.userId}})}},render(){let t;return s("div",{class:o["teacher-elegant"]},[s(b,{offsetTop:0},{default:()=>[s(m,{class:o.classHeader,border:!1,background:"transparent",isFixed:!1},null),s(g,{placeholder:"\u8BF7\u8F93\u5165\u8001\u5E08\u540D\u79F0",showAction:!0,onSearch:this.onSearch,onFilter:()=>{this.searchStatus=!this.searchStatus,this.openStatus=!this.openStatus}},null)]}),this.dataShow?s(S,{loading:this.loading,"onUpdate:loading":e=>this.loading=e,finished:this.finished,finishedText:" ",immediateCheck:!1,class:[o.elegant],onLoad:this.getList},Y(t=this.list.map(e=>s("div",{class:o.tedeoItem},[s("div",{class:o.itemBg,onClick:()=>{this.onDetail(e)}},null),s("div",{class:o.teCover},[s("video",{width:"100%",class:o.video},[s("source",{src:e.videoUrl+"#t=1,3",type:"video/mp4"},null)]),e.living===1&&s("div",{class:o.living},[s(h,{src:U,class:o.animation},null),s("span",null,[d("\u64AD\u653E\u4E2D")])])]),s("div",{class:o.teSection},[s("div",{class:[o.teTitle,"van-ellipsis"]},[e.lessonName]),s("div",{class:o.info},[s("div",{class:o.teUserInfo},[s(h,{src:e.avatar||N,class:o.teUserLogo},null),s("span",{class:[o.teUserName,"van-hairline--right"]},[(e==null?void 0:e.username)||`\u6E38\u5BA2${(e==null?void 0:e.userId)||""}`])]),s("span",{class:o.teUserNum},[e.browse,d("\u6D4F\u89C8")])])])])))?t:{default:()=>[t]}):s(f,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u8001\u5E08\u98CE\u91C7"},null),s(j,{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&&s(I,{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{_e as default};