teacher-home.91b04520.js 13 KB

1
  1. var N=Object.defineProperty,U=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var C=(t,s,a)=>s in t?N(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,m=(t,s)=>{for(var a in s||(s={}))H.call(s,a)&&C(t,a,s[a]);if(L)for(var a of L(s))z.call(s,a)&&C(t,a,s[a]);return t},j=(t,s)=>U(t,G(s));import{C as V}from"./index.7307ccaa.js";import{d as u,a as e,q as d,I as g,t as l,b as n,B as T,y as _,h as f,Q as B,C as x,U as M,F as A,x as q,z as v,T as E,S as Y,u as O,D as P,G as h}from"./vendor.896d3bff.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{i as R}from"./icon_teacher.2c3a434a.js";import{S as b}from"./index.891bf5d3.js";import{C as Z}from"./index.0cca8aff.js";import{s as k,r as p}from"./index.e321027a.js";/* empty css *//* empty css *//* empty css */import{C as y}from"./index.4c150c34.js";/* empty css */import{i as K}from"./icon_timer2.563d016a.js";import{V as $}from"./video-item.92a03596.js";/* empty css */var Q="./assets/head_bg.7e4b30d5.png",D=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Q}),J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAAXNSR0IArs4c6QAAAQJQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICBwcHDAwMFRUVGxsbHR0dIyMjJiYmKCgoKSkpLy8vOTk5Pj4+RUVFT09PWlpaW1tbZWVldHR0eHh4e3t7fHx8gYGBioqKmJiYoKCgq6ursLCwsrKytbW1urq6wcHBysrKysrK0tLS0dHR0tLS0tLS09PT2NjY3t7e4uLi4uLi4+Pj5+fn6urq6+vr7+/v8fHx8fHx8vLy8vLy9fX19/f3+fn5+/v7/Pz8/Pz8/f39/f39/v7+////////sFSKVgAAAFV0Uk5TAAMPExUYHh8rOjw+TlJTVlxeYmZnaWpqbG1vcXFzc3R1d3l7foGFhomPkZOUlpuhpq2ysrS5vsTFysvLzc3Q19rb3eHj5Onr7Ozu8PT2+fn6+/z9/vEW24oAAAGWSURBVEjHpZbldsMwDIXdlMLUxGNmXgcdM3RMrd7/VZZ16TY7puPdnz7+jhNJVxJCRRmm44ZxksSh65gGUlDZijChyCpLkLqHGfLqAqTiY478Cgcp2SnmKrVLLMYIsFABIyTVGEsUV2mm1sBSNWrUOwpMRhFvGTFWUvznv0oBVlTwG0MbK8v+yWmqDqX9LFN1sHr9ernEpfy83sjT+XcA6O6P86jvOqRqtAU9Pa5zIK/nBerwGHKdTrOpL6dY1NlJH4LnzQEWZGVQxIUALuYYUJQVAxZA8LY9VKQMZAohgJvFAmQiRwJBpzVC3XCQK4MA7pfJGy4K5RB0VogbIYoVIDgnDYISFahN3EjUoCMKUvm8uxnq8+SB6O6NYSoQ0pDfFrzlypL7sTtcqAhHUkZXC4yKNYUF+9IcZHnDEFnjbJZpwohhwsMcedrg+N1i2H0rz+cUr7OUGY1lop0hD2vcHuaxWhie3DlojvLbZZ3ZLMXy/9OWtQaA3qjRGmp641NvUOutBHrLh96ao7dQaa5umkui2jr6CZNcBOmsXp5jAAAAAElFTkSuQmCC",F=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:J});const W="_teacherHeader_b9lkl_7",X="_headerContent_b9lkl_12",ee="_headerCount_b9lkl_17",te="_userLogo_b9lkl_32",se="_piNameSubject_b9lkl_100",ae="_subject_b9lkl_104",ie="_rTitle_b9lkl_116";var i={"teacher-record":"_teacher-record_b9lkl_1",teacherHeader:W,headerContent:X,headerCount:ee,"open-teacher-info":"_open-teacher-info_b9lkl_27",userLogo:te,"teacher-bottom":"_teacher-bottom_b9lkl_43","teacher-data":"_teacher-data_b9lkl_49","teacher-data_item":"_teacher-data_item_b9lkl_54","teacher-info":"_teacher-info_b9lkl_81","teacher-name":"_teacher-name_b9lkl_84",piNameSubject:se,subject:ae,rTitle:ie};const ne="_single_aaack_1",oe="_introduction_aaack_4",re="_videoList_aaack_10",le="_videoItem_aaack_16",ce="_fansGroup_aaack_37",ue="_fansImage_aaack_53",de="_fansTitle_aaack_59";var r={single:ne,introduction:oe,videoList:re,videoItem:le,"icon-upload":"_icon-upload_aaack_25",fansGroup:ce,fansImage:ue,fansTitle:de};function he(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!_(t)}const pe=t=>{const s=`../images/${t}`;return{"../images/head_bg.png":D,"../images/icon_video.png":F}[s].default};var me=u({name:"single",props:{userInfo:{type:Object,default:{}}},render(){let t;const s=this.userInfo;return e("div",{class:r.single},[e(b,{icon:"personal",title:"\u4E2A\u4EBA\u98CE\u91C7",size:24,border:!1},{default:()=>[e("p",{class:r.introduction},[s.introduction])]}),s.styleVideo&&s.styleVideo.length>0&&e(b,{icon:"elegant",title:"\u8001\u5E08\u98CE\u91C7",size:24,border:!1},{default:()=>[e("div",{class:r.videoList},[s.styleVideo.map(a=>e("div",{class:r.videoItem},[e(d,{src:"https://daya.ks3-cn-beijing.ksyun.com/202204/T3JggS0.png",fit:"cover"},null),e(g,{class:r["icon-upload"],name:pe("icon_video.png"),size:26},null)]))])]}),e(b,{icon:"fans",title:"\u7C89\u4E1D\u7FA4",size:24,border:!1},he(t=[1,2,3].map(a=>e(l,{center:!0,class:r.fansGroup},{icon:()=>e(d,{src:"https://daya.ks3-cn-beijing.ksyun.com/202204/T3JggS0.png",fit:"cover",class:r.fansImage},null),title:()=>e("div",{class:r.fansTitle},[e("div",{class:r.title},[n("\u7AD6\u7B1B\u5B66\u4E60")]),e("p",{class:"van-ellipsis"},[n("\u674E\u8001\u5E08\u7AD6\u7B1B\u4EA4\u6D41\u7FA4\u674E\u8001\u5E08\u7AD6\u7B1B\u4EA4\u6D41\u7FA4")])]),default:()=>e(T,{type:"primary",size:"small",round:!0},{default:()=>[n("\u7533\u8BF7\u5165\u7FA4")]})})))?t:{default:()=>[t]})])}});const fe="_practice_1chlc_1",Ae="_group_1chlc_4",ge="_price_1chlc_9",_e="_arrangeCell_1chlc_18",ve="_rTitle_1chlc_24";var c={practice:fe,group:Ae,price:ge,arrangeCell:_e,rTitle:ve},be=u({name:"practice",data(){return{teacherId:this.$route.query.teacherId,showSelectList:[],calendarList:{},selectCourseList:[]}},mounted(){this.getList()},methods:{async getList(t){var s;try{console.log(k.user.data);let a={day:f(t||new Date).format("DD"),month:f(t||new Date).format("MM"),year:f(t||new Date).format("YYYY")};const w=(await p.post("/api-student/courseSchedule/createPracticeCourseCalendar",{data:j(m({},a),{studentId:(s=k.user.data)==null?void 0:s.id,teacherId:this.teacherId})})).data||[];let S={};w.forEach(I=>{S[I.date]=I}),this.calendarList=S}catch{}},onCloseTag(t){B.confirm({title:"\u63D0\u793A",message:"\u60A8\u662F\u5426\u8981\u5220\u9664\u8BE5\u9009\u62E9\u7684\u8BFE\u7A0B\uFF1F",confirmButtonColor:"var(--van-primary)"}).then(()=>{})}},render(){return e("div",{class:c.practice},[e(x,{class:c.group},{default:()=>[e(l,{title:"\u966A\u7EC3\u8BFE\u6536\u8D39"},{default:()=>e("div",{class:c.price},[e("span",null,[n("\xA540")]),n("/25\u5206\u949F")])}),e(l,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:"\u7AD6\u7B1B"},null),e(l,{title:"\u8BFE\u65F6\u6570"},{default:()=>e(M,{theme:"round",buttonSize:22},null)})]}),e("div",{class:c.group},[e(Z,{selectList:this.selectCourseList,list:this.calendarList,maxDays:5,nextMonth:t=>this.getList(t),prevMonth:t=>this.getList(t),selectDay:this.onSelectDay},null)]),e(l,{class:[c.arrangeCell,"mb12"]},{title:()=>e("div",{class:c.rTitle},[e("span",null,[n("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>e("div",{class:c.rTag},[this.showSelectList.map(t=>e(A,null,[e(q,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:c.tag,onClose:()=>this.onCloseTag(t)},{default:()=>[t.title]}),e("br",null,null)]))])})])}});const ye="_liveList_ants7_1",Se="_liCover_ants7_4",Ie="_liContent_ants7_10",Le="_liTitle_ants7_13",Ce="_avatar_ants7_22",je="_liUserInfo_ants7_29",Te="_userInfo_ants7_30",xe="_num_ants7_42",ke="_price_ants7_45",De="_liveGroup_ants7_53";var o={liveList:ye,liCover:Se,liContent:Ie,liTitle:Le,avatar:Ce,liUserInfo:je,userInfo:Te,num:xe,price:ke,liveGroup:De};function Fe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!_(t)}var we=u({name:"live",data(){return{list:[],dataShow:!0,loading:!1,finished:!1,params:{groupStatus:"APPLY",page:1,rows:20}}},mounted(){this.getList()},methods:{formatTime(t){let s=f(t||new Date);const a=["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"];return console.log(s.day()),s.format("YYYY-MM-DD")+`(${a[s.day()]})`},async getList(){try{let t=this.params;const a=(await p.post("/api-student/courseGroup/queryPageCourseGroup",{data:m({},t)})).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}catch{}},onDetail(t){this.$router.push({path:"/liveDetail",query:{groupId:t.courseGroupId}})}},render(){let t;return e(A,null,[this.dataShow?e(v,{class:o.liveList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},Fe(t=this.list.map(s=>e(x,{class:o.liveGroup,onClick:()=>this.onDetail(s)},{default:()=>[e(l,null,{icon:()=>e(d,{class:o.liCover,src:s.backgroundPic,fit:"cover"},null),title:()=>e("div",{class:o.liContent},[e("div",{class:[o.liTitle,"van-ellipsis"]},[s.courseGroupName]),e("div",{class:o.liUserInfo},[e("div",{class:[o.userInfo,"van-hairline--right"]},[e(d,{class:o.avatar,fit:"cover"},null),e("p",null,[n("\u8001\u5E08\uFF1A"),s.teacherName])]),e("span",{class:o.num},[s.studentCount,n("\u4EBA\u8D2D\u4E70")])])])}),e(l,{titleStyle:{color:"#666666",fontSize:"13px"}},{title:()=>e("span",{style:{display:"flex",alignItems:"center",fontSize:"13px"}},[e(g,{name:K,size:"16",style:{marginRight:"5px"}},null),this.formatTime(s.salesStartDate)]),default:()=>e("div",{class:o.price},[e("span",null,[n("\xA5"),this.$filters.moneyFormat(s.coursePrice)]),n("/"),s.courseNum,n("\u8BFE\u65F6")])})]})))?t:{default:()=>[t]}):e(y,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const Ne="_videoList_1yf9v_1";var Ue={videoList:Ne};function Ge(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!_(t)}var He=u({name:"VideoList",data(){return{list:[],dataShow:!0,loading:!1,finished:!1,params:{page:1,rows:20}}},mounted(){this.getList()},methods:{async getList(){try{let t=this.params;const a=(await p.post("/api-student/videoLesson/selectGroup",{data:m({},t)})).data||{};if(console.log(a),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}catch{}},onDetail(t){this.$router.push({path:"/videoDetail",query:{groupId:t.id}})}},render(){let t;return e(A,null,[this.dataShow?e(v,{class:Ue.videoList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},Ge(t=this.list.map(s=>e($,{item:s,onClick:this.onDetail},null)))?t:{default:()=>[t]}):e(y,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}}),ze=u({name:"music",data(){return{list:[],dataShow:!1,loading:!1,finished:!1,params:{page:1,rows:20}}},render(){return e(A,null,[this.dataShow?e(v,{loading:this.loading,"onUpdate:loading":t=>this.loading=t,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},null):e(y,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u4E50\u8C31"},null)])}});const ot=t=>{const s=`./images/${t}`;return{"./images/head_bg.png":D,"./images/icon_video.png":F}[s].default};var rt=u({name:"teacherHome",data(){const t=sessionStorage.getItem("teacherHomeTabs")||"",s=this.$route.query;return{teacherId:s.teacherId,tabs:t||s.tabs||"single",userInfo:{}}},async mounted(){try{const t=await p.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=t.data}catch{}},methods:{async onStart(){try{const t=this.userInfo.isStar?0:1;await p.get("/api-student/teacher/starOrUnStar",{params:{userId:this.teacherId,starStatus:t}});const s=t?"\u5173\u6CE8\u6210\u529F":"\u5DF2\u53D6\u6D88\u5173\u6CE8";this.userInfo.isStar=t;let a=t?this.userInfo.fansNum+1:this.userInfo.fansNum-1;this.userInfo.fansNum=a<=0?0:a,E(s)}catch{}}},render(){return e("div",{class:i["teacher-record"]},[e(Y,{position:"top",offsetTop:0},{default:()=>[e(V,{class:i.teacherHeader,background:"transparent",border:!1,color:"#fff",backIconColor:"white",isFixed:!1},{default:()=>e("div",{class:i.headerContent},[e("div",{class:i.headerCount},[e(l,{class:i["open-teacher-info"],border:!1},{default:()=>[e("div",{class:i["teacher-info"]},[e("div",{class:i["teacher-name"]},[this.userInfo.username]),e("p",{class:i.piNameSubject},[e("span",{class:i.subject},[this.userInfo.subjectName])])]),e("div",{class:i["teacher-desc"]},[e(T,{type:"primary",size:"mini",plain:!!this.userInfo.isStar,style:{borderRadius:"5px",padding:"5px 10px"},onClick:this.onStart},{default:()=>[!this.userInfo.isStar&&e(g,{name:"plus"},null),this.userInfo.isStar?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]})])],icon:()=>e(d,{class:i.userLogo,src:this.userInfo.heardUrl||R,fit:"cover"},null)}),e("div",{class:i["teacher-bottom"]},[e("div",{class:i.level},[e(O,{iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",modelValue:this.userInfo.starGrade,icon:"star_active",size:15},null)]),e("div",{class:i["teacher-data"]},[e("div",{class:i["teacher-data_item"]},[n("\u7C89\u4E1D "),e("span",null,[this.userInfo.fansNum||0])]),e("div",{class:i["teacher-data_item"]},[n("\u5DF2\u4E0A\u8BFE\u65F6 "),e("span",null,[this.userInfo.expTime||0])])])])])])}),e(P,{color:"var(--van-primary)",background:"#f8f9fc",lineWidth:20,active:this.tabs,"onUpdate:active":t=>this.tabs=t,onChange:()=>{sessionStorage.setItem("teacherHomeTabs",this.tabs)}},{default:()=>[e(h,{title:"\u4E2A\u4EBA\u98CE\u91C7",name:"single"},null),e(h,{title:"\u966A\u7EC3\u8BFE",name:"practice"},null),e(h,{title:"\u76F4\u64AD\u8BFE",name:"live"},null),e(h,{title:"\u89C6\u9891\u8BFE",name:"video"},null),e(h,{title:"\u4E50\u8C31",name:"music"},null)]})]}),e("div",{class:i.container},[this.tabs==="single"&&e(me,{userInfo:this.userInfo},null),this.tabs==="practice"&&e(be,null,null),this.tabs==="live"&&e(we,null,null),this.tabs==="video"&&e(He,null,null),this.tabs==="music"&&e(ze,null,null)])])}});export{rt as default,ot as getAssetsHomeFile};