teacher-home.7f139739.js 31 KB

1
  1. var he=Object.defineProperty,me=Object.defineProperties;var pe=Object.getOwnPropertyDescriptors;var se=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var ae=(e,s,a)=>s in e?he(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,j=(e,s)=>{for(var a in s||(s={}))ge.call(s,a)&&ae(e,a,s[a]);if(se)for(var a of se(s))fe.call(s,a)&&ae(e,a,s[a]);return e},K=(e,s)=>me(e,pe(s));import{_ as w,a as k,b as D,c as P,d as E,e as F,f as B,g as $,h as A,i as U,j as G,k as O,l as q,m as M,n as V,o as Y,p as H,q as z,s as i}from"./teacher-header.module.5b097c48.js";import{C as _e}from"./index.a72af9bc.js";import{d as v,T as ie,a as t,F as m,j as o,C as b,I as u,p as ve,B as C,u as R,x as Q,P as W,g as d,D as J,k as oe,O as be,z as Ie,A as je,w as ne,t as ye,v as Ce,G as Se,H as L}from"./vendor.5359187d.js";/* empty css *//* empty css *//* empty css */import{S as X}from"./index.b22658df.js";import{C as Te}from"./index.79e7db94.js";import{r as p,p as Z,s as S,l as re,C as ee,m as Le}from"./index.5ca8430c.js";/* empty css *//* empty css *//* empty css */import{i as xe}from"./icon_upload_poster.81da3a98.js";import{C as Ne}from"./index.27a4c73f.js";/* empty css *//* empty css *//* empty css *//* empty css */import{o as T}from"./orderStatus.df64f967.js";import{t as we}from"./tradeOrder.c45cb44f.js";/* empty css */import{i as ke}from"./icon_timer2.5fb1750d.js";import{i as te}from"./icon_teacher.40b6f077.js";import De from"./index.704d2de3.js";import{m as Pe}from"./music.3e9972c2.js";import{u as Ee,a as Fe}from"./index.15e00aed.js";/* empty css *//* empty css *//* empty css */import"./index.aec0a459.js";import"./index.f2adfb4e.js";import"./item.c267e45c.js";import"./index.926ca9c5.js";import"./init-user-icon.9c46bc7a.js";import"./favorite.cb69f4f9.js";import"./index.a583ecd6.js";import"./code-down-load.d9de9400.js";import"./logo.bcac726b.js";import"./browser.ebb85846.js";import"./select-tag.0a79835a.js";/* empty css *//* empty css */import"./index.module.da27480e.js";import"./select-subject.00148b6c.js";import"./index.339fc024.js";const Be="_teacherHeader_1ssti_19";var ce={"teacher-record":"_teacher-record_1ssti_1",teacherHeader:Be};const $e="_single_14ksn_1",Ae="_introduction_14ksn_4",Ue="_videoList_14ksn_10",Ge="_itemBg_14ksn_16",Oe="_videoItem_14ksn_25",qe="_video_14ksn_10",Me="_fansGroup_14ksn_55",Ve="_fansImage_14ksn_71",Ye="_fansTitle_14ksn_77",He="_videoGroup_14ksn_83";var f={single:$e,introduction:Ae,videoList:Ue,itemBg:Ge,videoItem:Oe,"icon-upload":"_icon-upload_14ksn_34",video:qe,fansGroup:Me,fansImage:Ve,fansTitle:Ye,videoGroup:He};const ze="_filterTitle_cir06_1",Re="_fansGroup_cir06_9",We="_introduce_cir06_19",Je="_fansImage_cir06_25",Ke="_fansTitle_cir06_31",Qe="_joinContainer_cir06_37",Xe="_joinText_cir06_40";var y={filterTitle:ze,fansGroup:Re,introduce:We,fansImage:Je,fansTitle:Ke,joinContainer:Qe,joinText:Xe};const Ze=e=>{const s=`../images/${e}`;return{"../images/cert_active.png":w,"../images/cert_default.png":k,"../images/follow_bg.png":D,"../images/head_bg.png":P,"../images/icon-close.png":E,"../images/icon_fans.png":F,"../images/icon_subject.png":B,"../images/icon_video.png":$,"../images/live_active.png":A,"../images/live_bg.png":U,"../images/live_default.png":G,"../images/music_active.png":O,"../images/music_default.png":q,"../images/teacher-icon.png":M,"../images/video_active.png":V,"../images/video_default.png":Y,"../images/vip_active.png":H,"../images/vip_default.png":z}[s].default};var et=v({name:"joinChat",props:{item:{type:Object,default:{}},onClose:{type:Function,default:e=>{}}},data(){return{desc:""}},methods:{async onJoinChat(){try{await p.post("/api-student/imGroupMemberAudit/apply",{data:{groupId:this.item.id,auditStatus:"AUDITING",roleType:"STUDENT",desc:this.desc}}),ie("\u7533\u8BF7\u6210\u529F"),this.desc="",this.onClose&&this.onClose(this.item.id)}catch{}}},render(){return t(m,null,[t("div",{class:[y.filterTitle,"van-hairline--bottom"]},[o("\u7533\u8BF7\u5165\u7FA4")]),t("div",{class:y.joinContainer},[t(b,{center:!0,class:y.fansGroup,border:!1},{icon:()=>t(u,{src:this.item.img||Ze("icon_fans.png"),fit:"cover",class:y.fansImage},null),title:()=>t("div",{class:y.fansTitle},[t("div",{class:y.title},[this.item.name]),t("p",{class:["van-ellipsis",y.introduce]},[this.item.introduce])])}),t(ve,{type:"textarea",class:y.joinText,rows:2,maxlength:200,modelValue:this.desc,"onUpdate:modelValue":e=>this.desc=e,placeholder:"\u8BF7\u586B\u5199\u60A8\u7684\u5165\u7FA4\u7533\u8BF7\uFF0C\u4F1A\u66F4\u5FEB\u7684\u88AB\u901A\u8FC7\u5594\uFF5E"},null)]),t("div",{class:"btnGroup"},[t(C,{type:"primary",block:!0,round:!0,style:{width:"70%",margin:"0 auto"},onClick:this.onJoinChat},{default:()=>[o("\u786E\u8BA4")]})])])}});function tt(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Q(e)}const le=e=>{const s=`../images/${e}`;return{"../images/cert_active.png":w,"../images/cert_default.png":k,"../images/follow_bg.png":D,"../images/head_bg.png":P,"../images/icon-close.png":E,"../images/icon_fans.png":F,"../images/icon_subject.png":B,"../images/icon_video.png":$,"../images/live_active.png":A,"../images/live_bg.png":U,"../images/live_default.png":G,"../images/music_active.png":O,"../images/music_default.png":q,"../images/teacher-icon.png":M,"../images/video_active.png":V,"../images/video_default.png":Y,"../images/vip_active.png":H,"../images/vip_default.png":z}[s].default};var st=v({name:"single",props:{userInfo:{type:Object,default:{}}},data(){const e=this.$route.query;return{videoStatus:!1,chatStatus:!1,teacherId:e.teacherId,fansList:[],chatItem:{},videoItem:{},isAddBrowse:!1}},async mounted(){try{const e=await p.post("/api-student/imGroup/queryTeacherGroup",{data:{type:"FAN",createUserId:this.teacherId}});this.fansList=e.data||[]}catch{}},methods:{async onDetail(e){if(!e.hasWaitAuditFlag&&!e.existFlag){this.chatStatus=!0,this.chatItem=e;return}e.existFlag&&Z({api:"joinChatGroup",content:{type:"multi",id:e.id}})},async onPlay(){try{if(!this.isAddBrowse)return;await p.get("/api-student/teacher/addVideoBrowse",{hideLoading:!0,params:{videoId:this.videoItem.id}}),this.isAddBrowse=!1}catch{}}},render(){let e;const s=this.userInfo;return t("div",{class:f.single},[t(X,{icon:"personal",title:"\u4E2A\u4EBA\u4ECB\u7ECD",size:24,border:!1},{default:()=>[t("p",{class:f.introduction},[s.introduction])]}),s.styleVideo&&s.styleVideo.length>0&&t(X,{icon:"elegant",title:"\u8001\u5E08\u98CE\u91C7",size:24,border:!1},{default:()=>[t("div",{class:f.videoList},[s.styleVideo.map(a=>t("div",{class:f.videoItem},[t("div",{class:f.itemBg,onClick:()=>{this.videoStatus=!0,this.isAddBrowse=!0,this.videoItem=a}},null),t(R,{class:f["icon-upload"],name:le("icon_video.png"),size:26},null),t(u,{src:a.cover||xe,fit:"cover"},null)]))])]}),this.fansList&&this.fansList.length>0&&t(X,{icon:"fans",title:"\u7C89\u4E1D\u7FA4",size:24,border:!1},tt(e=this.fansList.map(a=>t(b,{center:!0,class:f.fansGroup,border:!1},{icon:()=>t(u,{src:a.img||le("icon_fans.png"),fit:"cover",class:f.fansImage},null),title:()=>t("div",{class:f.fansTitle},[t("div",{class:f.title},[a.name]),t("p",{class:"van-ellipsis"},[a.introduce])]),default:()=>t(C,{type:"primary",size:"small",round:!0,disabled:a.hasWaitAuditFlag,onClick:()=>this.onDetail(a)},{default:()=>[a.existFlag?"\u53BB\u804A\u5929":"",a.hasWaitAuditFlag?"\u5BA1\u6838\u4E2D":"",!a.hasWaitAuditFlag&&!a.existFlag?"\u7533\u8BF7\u5165\u7FA4":""]})})))?e:{default:()=>[e]}),t(W,{show:this.chatStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.chatStatus=!1},{default:()=>[t(et,{item:this.chatItem,onClose:a=>{this.fansList.forEach(l=>{l.id===a&&(l.hasWaitAuditFlag=!0)}),this.chatStatus=!1}},null)]}),t(W,{show:this.videoStatus,round:!0,class:f.videoGroup,closeable:!0,onClose:()=>{this.videoStatus=!1,this.isAddBrowse=!1}},{default:()=>{var a;return[this.videoStatus&&t(Te,{playsinline:!0,onPlay:this.onPlay,src:((a=this.videoItem)==null?void 0:a.videoUrl)+"#t=0.1"},null)]}})])}});const at="_practice_xjmim_1",it="_group_xjmim_5",ot="_price_xjmim_10",nt="_rTag_xjmim_27",rt="_tag_xjmim_30",ct="_selectPopup_xjmim_34",lt="_selectContainer_xjmim_39",ut="_rTitle_xjmim_42",dt="_selectPopupContent_xjmim_45",ht="_desc_xjmim_48",mt="_times_xjmim_49",pt="_selectBtn_xjmim_60",gt="_btn_xjmim_65",ft="_protocol_xjmim_84",_t="_arrangeCell_xjmim_88",vt="_fixedBtn_xjmim_94";var c={practice:at,group:it,price:ot,rTag:nt,tag:rt,selectPopup:ct,selectContainer:lt,rTitle:ut,selectPopupContent:dt,desc:ht,times:mt,selectBtn:pt,btn:gt,protocol:ft,arrangeCell:_t,fixedBtn:vt},bt=v({name:"practice",props:{userInfo:{type:Object,default:{}}},data(){const e=this.$route.query;return{teacherId:e.teacherId,subjectId:e.subjectId,teacherSubjectList:[],subjectStatus:!1,subjectInfo:{subjectPrice:0,courseMinutes:0,subjectName:"",subjectId:0},courseNum:4,calendarStatus:!1,calendarList:[],selectCourseList:[],coursePlanStatus:!1,selectStatus:!1,coursePlanList:[],calendarDate:d().add(1,"day").toDate(),settingStatus:!0,loadDataStatus:!0}},async mounted(){var e;try{this.loadDataStatus=!0;const s=await p.get("/api-student/courseSchedule/getTeacherSubjectPrice",{params:{teacherId:this.teacherId}});this.loadDataStatus=!1;const a=s.data||[];if(a.length>0){const l=this.subjectId||((e=S.user.data)==null?void 0:e.subjectId),r=a.find(N=>N.subjectId===Number(l))||a[0],{subjectName:I,subjectPrice:x,courseMinutes:ue,subjectId:de}=r;this.subjectInfo={subjectPrice:x,courseMinutes:ue,subjectName:I,subjectId:de},a.forEach(N=>{N.name=N.subjectName}),this.teacherSubjectList=a,this.getList(),this.onBuy(!0),this.settingStatus=!0}else this.settingStatus=!1}catch{this.loadDataStatus=!1}},computed:{showSelectList(){let s=[...this.selectCourseList];return s.forEach(a=>{a.title=d(a.startTime).format("YYYY-MM-DD")+" "+re(d(a.startTime).day())+" "+a.start+"~"+a.end}),s},selectType(){return this.selectCourseList.length<this.courseNum?"noEnough":"enough"}},methods:{async onSubmit(){if(this.selectCourseList.length<=0){ie("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4");return}if(this.selectCourseList.length<this.courseNum){this.selectStatus=!0;return}await this._lookCourse()},async getList(e){var s;try{const a=e||d().add(1,"day").toDate();let l={day:d(a).format("DD"),month:d(a).format("MM"),year:d(a).format("YYYY")};const r=(await p.post("/api-student/courseSchedule/createPracticeCourseCalendar",{data:K(j({},l),{studentId:(s=S.user.data)==null?void 0:s.userId,teacherId:this.teacherId})})).data||[];let I={};r.forEach(x=>{I[x.date]=x}),this.calendarList=I,this.calendarStatus=r.length>0}catch{}},onSelectDay(e){const s=e||[];let a=[...this.selectCourseList];s.forEach(n=>{!a.some(I=>I.startTime===n.startTime)&&a.push(j({},n))});let l=[];a.forEach(n=>{s.some(I=>I.startTime===n.startTime)&&l.push(n)}),l.sort((n,r)=>n.startTime>r.startTime?1:n.startTime<r.startTime?-1:0),console.log(l,"list"),this.selectCourseList=[...l]},onCloseTag(e){J.confirm({title:"\u63D0\u793A",message:"\u60A8\u662F\u5426\u8981\u5220\u9664\u8BE5\u9009\u62E9\u7684\u8BFE\u7A0B\uFF1F",confirmButtonColor:"var(--van-primary)"}).then(()=>{const s=this.selectCourseList.findIndex(a=>a.startTime===e.startTime);this.selectCourseList.splice(s,1)})},async _lookCourse(e){try{let s=[];this.selectCourseList.forEach(n=>{s.push({startTime:n.startTime,endTime:n.endTime})}),((await p.post("/api-student/courseGroup/lockCourseToCache",{data:{courseNum:this.courseNum,courseType:"PRACTICE",loop:this.selectType==="noEnough"?1:0,teacherId:this.teacherId,timeList:[...s]}})).data||[]).forEach((n,r)=>{this.coursePlanList[r]=K(j({},this.coursePlanList[r]),{startTime:n.startTime,endTime:n.endTime,classNum:r+1})}),this.coursePlanStatus=!0,this.selectStatus=!0,e&&e()}catch(s){const a=s.message;J.alert({title:"\u63D0\u793A",confirmButtonColor:"var(--van-primary)",message:a}).then(()=>{this.getList(this.calendarDate||new Date),this.selectCourseList=[],this.selectStatus=!1})}},async onReset(){this.coursePlanStatus||this.selectType==="enough"?(this.selectStatus=!1,setTimeout(()=>{this.coursePlanList=[]},500)):this.selectType==="noEnough"&&(this.selectStatus=!1),setTimeout(()=>{this.coursePlanStatus=!1},500)},async onSure(){const e=this.coursePlanStatus;await this._lookCourse(()=>{e&&(this.selectStatus=!1,this.onBuy())})},async onBuy(e){try{const s=await p.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"PRACTICE",bizId:this.teacherId}}),a=this.subjectInfo,l=[...this.coursePlanList];l.forEach(r=>{r.classDate=d(r.startTime).format("YYYY-MM-DD"),r.title=`${d(r.startTime).format("YYYY-MM-DD")} ${re(d(r.startTime).day())} ${d(r.startTime).format("HH:mm")}~${d(r.endTime).format("HH:mm")}`}),T.orderObject.orderType="PRACTICE",T.orderObject.orderName=a.subjectName+"\u966A\u7EC3\u8BFE",T.orderObject.orderDesc=a.subjectName+"\u966A\u7EC3\u8BFE",T.orderObject.actualPrice=Number((this.courseNum*a.subjectPrice).toFixed(2)),T.orderObject.orderNo="",T.orderObject.orderList=[{orderType:"PRACTICE",goodsName:a.subjectName+"\u966A\u7EC3\u8BFE",courseGroupName:a.subjectName+"\u966A\u7EC3\u8BFE",courseIntroduce:a.subjectName+"\u966A\u7EC3\u8BFE",subjectId:a.subjectId,singleCourseMinutes:a.courseMinutes,courseNum:this.courseNum,coursePrice:(this.courseNum*a.subjectPrice).toFixed(2),teacherName:this.userInfo.username||`\u6E38\u5BA2${this.userInfo.userId||""}`,teacherId:this.userInfo.userId,starGrade:this.userInfo.starGrade,avatar:this.userInfo.heardUrl,classTime:l}];const n=s.data;n?J.confirm({title:"\u63D0\u793A",message:"\u60A8\u6709\u4E00\u4E2A\u672A\u652F\u4ED8\u7684\u8BA2\u5355\uFF0C\u662F\u5426\u7EE7\u7EED\u652F\u4ED8\uFF1F",confirmButtonColor:"#269a93",cancelButtonText:"\u53D6\u6D88\u8BA2\u5355",confirmButtonText:"\u7EE7\u7EED\u652F\u4ED8"}).then(async()=>{we(n,this.routerTo)}).catch(()=>{J.close(),this.cancelPayment(n.orderNo)}):!e&&this.routerTo()}catch{}},routerTo(){this.$router.push({path:"/orderDetail",query:{orderType:"PRACTICE"}})},async cancelPayment(e){try{await p.post("/api-student/userOrder/orderCancel",{data:{orderNo:e}})}catch{}}},render(){return t(m,null,[!this.loadDataStatus&&(this.settingStatus?t(m,null,[t("div",{class:c.practice},[t(oe,{class:c.group,border:!1},{default:()=>[this.subjectInfo.subjectPrice>0&&t(b,{title:"\u966A\u7EC3\u8BFE\u6536\u8D39"},{default:()=>t("div",{class:c.price},[t("span",null,[o("\xA5"),this.$filters.moneyFormat(this.subjectInfo.subjectPrice)]),o("/"),this.subjectInfo.courseMinutes,o("\u5206\u949F")])}),t(b,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:this.subjectInfo.subjectName,onClick:()=>this.subjectStatus=!0},null),t(b,{title:"\u8BFE\u65F6\u6570"},{default:()=>t(be,{modelValue:this.courseNum,"onUpdate:modelValue":e=>this.courseNum=e,theme:"round",max:12,min:1,buttonSize:22,onChange:()=>{this.selectCourseList=[]}},null)})]}),this.calendarStatus&&t("div",{class:c.group},[t(Ne,{selectList:this.selectCourseList,list:this.calendarList,maxDays:this.courseNum,nextMonth:e=>this.getList(e),prevMonth:e=>this.getList(e),selectDay:this.onSelectDay,calendarDate:this.calendarDate,"onUpdate:calendarDate":e=>this.calendarDate=e},null)]),t(b,{class:[c.arrangeCell]},{title:()=>t("div",{class:c.rTitle},[t("span",null,[o("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>t("div",{class:c.rTag},[this.showSelectList.map(e=>t(m,null,[t(Ie,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:c.tag,onClose:()=>this.onCloseTag(e)},{default:()=>[e.title]}),t("br",null,null)]))])}),t(W,{show:this.selectStatus,class:c.selectPopup},{default:()=>[t("div",{class:c.selectContainer},[t("div",{class:c.rTitle},[t("span",null,[o("\u63D0\u793A")])]),t("div",{class:c.selectPopupContent},[t("p",{class:c.desc},[this.selectType==="noEnough"&&!this.coursePlanStatus?"\u60A8\u6240\u9009\u62E9\u7684\u4E0A\u8BFE\u65F6\u95F4\u672A\u8FBE\u5230\u60A8\u8F93\u5165\u7684\u8BFE\u65F6\u6570\uFF0C\u7CFB\u7EDF\u6839\u636E\u5DF2\u9009\u65F6\u95F4\u5C06\u81EA\u52A8\u6309\u5468\u987A\u5EF6\u6392\u8BFE\u3002":"\u60A8\u5DF2\u9009\u62E9\u4EE5\u4E0B\u4E0A\u8BFE\u65F6\u95F4\u6BB5\uFF0C\u65F6\u95F4\u6BB5\u4F1A\u6682\u65F6\u9501\u5B9A\uFF0C\u9501\u5B9A\u671F\u95F4\u5B66\u5458\u4E0D\u53EF\u8D2D\u4E70\u8BE5\u65F6\u95F4\u6BB5\u8BFE\u7A0B\u3002"]),this.coursePlanList&&this.coursePlanList.length>0&&this.coursePlanStatus&&t("p",{class:c.times},[this.coursePlanList.map(e=>t("span",null,[d(e.startTime||new Date).format("YYYY-MM-DD")," ",d(e.startTime||new Date).format("HH:mm"),o("~"),d(e.endTime||new Date).format("HH:mm")]))])]),t("div",{class:c.selectBtn},[t(C,{class:c.btn,type:"primary",round:!0,block:!0,plain:!0,onClick:this.onReset},{default:()=>[this.selectType==="noEnough"?"\u7EE7\u7EED\u9009\u62E9":"\u91CD\u65B0\u9009\u62E9"]}),t(C,{class:c.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[o("\u786E\u8BA4")]})])])]}),t(je,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:e=>{const{subjectName:s,subjectPrice:a,courseMinutes:l,subjectId:n}=e;this.subjectInfo={subjectPrice:a,courseMinutes:l,subjectName:s,subjectId:n},this.subjectStatus=!1}},null)]),t("div",{class:["btnGroup",c.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[t(C,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[o("\u786E\u8BA4\u7EA6\u8BFE")]})])]):t(ee,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u966A\u7EC3\u8BFE"},null))])}});const It="_liveList_1qowf_1",jt="_liCover_1qowf_4",yt="_liContent_1qowf_10",Ct="_liTitle_1qowf_13",St="_avatar_1qowf_22",Tt="_liUserInfo_1qowf_29",Lt="_userInfo_1qowf_30",xt="_num_1qowf_42",Nt="_buyNum_1qowf_45",wt="_price_1qowf_51",kt="_liveGroup_1qowf_59",Dt="_subjectName_1qowf_64";var g={liveList:It,liCover:jt,liContent:yt,liTitle:Ct,avatar:St,liUserInfo:Tt,userInfo:Lt,num:xt,buyNum:Nt,price:wt,liveGroup:kt,subjectName:Dt};function Pt(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Q(e)}var Et=v({name:"live",data(){const e=this.$route.query;return{list:[],dataShow:!0,loading:!1,finished:!1,params:{teacherId:e.teacherId,groupStatus:"APPLY",page:1,rows:20}}},mounted(){this.getList()},methods:{formatTime(e){let s=d(e||new Date);const a=["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"];return s.format("YYYY-MM-DD")+`(${a[s.day()]})`},async getList(){try{const e=j({},this.params);S.version&&(e.version=S.version||"",e.platform="ios-student");const s=await p.post("/api-student/courseGroup/queryPageCourseGroup",{data:j({},e)});this.loading=!1;const a=s.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{this.dataShow=!1,this.finished=!0}},onDetail(e){this.$router.push({path:"/liveDetail",query:{groupId:e.courseGroupId}})}},render(){let e;return t(m,null,[this.dataShow?t(ne,{class:g.liveList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},Pt(e=this.list.map(s=>t(oe,{class:g.liveGroup,border:!1,onClick:()=>this.onDetail(s)},{default:()=>[t(b,null,{icon:()=>t("div",{style:{position:"relative"}},[t(u,{class:g.liCover,src:s.backgroundPic,fit:"cover"},null),t("span",{class:g.subjectName},[s==null?void 0:s.subjectName])]),title:()=>t("div",{class:g.liContent},[t("div",{class:[g.liTitle,"van-ellipsis"]},[s.courseGroupName]),t("div",{class:g.liUserInfo},[t("div",{class:[g.userInfo,"van-hairline--right"]},[t(u,{class:g.avatar,fit:"cover",src:s.avatar||te},null),t("p",null,[o("\u8001\u5E08\uFF1A"),s.teacherName||`\u6E38\u5BA2${s.teacherId}`])]),s.existBuy===1?t("span",{class:g.buyNum},[o("\u5DF2\u8D2D\u4E70")]):t("span",{class:g.num},[s.studentCount,o("\u4EBA\u5DF2\u8D2D\u4E70")])])])}),t(b,{titleStyle:{color:"#666666",fontSize:"13px"}},{title:()=>t("span",{style:{display:"flex",alignItems:"center",fontSize:"13px"}},[t(R,{name:ke,size:"16",style:{marginRight:"5px"}},null),this.formatTime(s.salesStartDate)]),default:()=>t("div",{class:g.price},[s.coursePrice>0&&t(m,null,[t("span",null,[o("\xA5"),this.$filters.moneyFormat(s.coursePrice)]),o("/")]),s.courseNum,o("\u8BFE\u65F6")])})]})))?e:{default:()=>[e]}):t(ee,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const Ft="_videoItem_ck7bl_1",Bt="_viCover_ck7bl_8",$t="_viSection_ck7bl_13",At="_viTitle_ck7bl_16",Ut="_viUserInfo_ck7bl_21",Gt="_viUserLogo_ck7bl_28",Ot="_viUserName_ck7bl_35",qt="_viUserNum_ck7bl_39",Mt="_viPrice_ck7bl_42",Vt="_subjectName_ck7bl_47";var _={videoItem:Ft,viCover:Bt,viSection:$t,viTitle:At,viUserInfo:Ut,viUserLogo:Gt,viUserName:Ot,viUserNum:qt,viPrice:Mt,subjectName:Vt},Yt=v({name:"VideoItem",props:{item:Object,onClick:{type:Function,default:e=>{}}},render(){const e=this.item;return t("div",{class:_.videoItem,onClick:()=>{this.onClick(e)}},[t("div",{style:{position:"relative"}},[t(u,{class:_.viCover,fit:"cover",src:e==null?void 0:e.lessonCoverUrl},null),t("span",{class:_.subjectName},[e==null?void 0:e.lessonSubjectName])]),t("div",{class:_.viSection},[t("div",{class:[_.viTitle,"van-ellipsis"]},[e==null?void 0:e.lessonName]),t("div",{class:_.viUserInfo},[t(u,{src:(e==null?void 0:e.avatar)||te,class:_.viUserLogo},null),t("span",{class:[_.viUserName,"van-hairline--right"]},[(e==null?void 0:e.userName)||`\u6E38\u5BA2${(e==null?void 0:e.teacherId)||""}`]),t("span",{class:_.viUserNum},[e==null?void 0:e.countStudent,o("\u4EBA\u5DF2\u8D2D\u4E70")])]),t("div",{class:_.viPrice},[(e==null?void 0:e.lessonPrice)>0&&t(m,null,[o("\uFFE5"),e==null?void 0:e.lessonPrice,o("/")]),(e==null?void 0:e.lessonPrice)<=0&&e.auditVersion!==0&&t(m,null,[o("\uFFE5"),0,o("/")]),(e==null?void 0:e.lessonPrice)<=0&&e.auditVersion===0&&t(m,null,[o("\u514D\u8D39/")]),e==null?void 0:e.lessonCount,o("\u8BFE\u65F6")])])])}});const Ht="_videoList_1yf9v_1";var zt={videoList:Ht};function Rt(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Q(e)}var Wt=v({name:"VideoList",data(){const e=this.$route.query;return{list:[],dataShow:!0,loading:!1,finished:!1,params:{teacherId:e.teacherId,page:1,rows:20}}},mounted(){this.getList()},methods:{async getList(){try{const e=j({},this.params);S.version&&(e.version=S.version||"",e.platform="ios-student");const s=await p.post("/api-student/videoLesson/selectGroup",{data:j({},e)});this.loading=!1;const a=s.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{this.dataShow=!1,this.finished=!0}},onDetail(e){this.$router.push({path:"/videoDetail",query:{groupId:e.id}})}},render(){let e;return t(m,null,[this.dataShow?t(ne,{class:zt.videoList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},Rt(e=this.list.map(s=>t(Yt,{item:s,onClick:this.onDetail},null)))?e:{default:()=>[e]}):t(ee,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}}),Jt=v({name:"music",data(){return{teacherId:this.$route.query.teacherId,list:[],dataShow:!1,loading:!1,finished:!1,params:{page:1,rows:20}}},methods:{onItemClick(e){Pe(e,s=>{this.$router.push({path:s,query:{orderType:"MUSIC"}})})}},render(){return t(m,null,[t(De,{hideSearch:!0,onItemClick:this.onItemClick,teacherId:this.teacherId},null)])}});const h=e=>{const s=`../images/${e}`;return{"../images/cert_active.png":w,"../images/cert_default.png":k,"../images/follow_bg.png":D,"../images/head_bg.png":P,"../images/icon-close.png":E,"../images/icon_fans.png":F,"../images/icon_subject.png":B,"../images/icon_video.png":$,"../images/live_active.png":A,"../images/live_bg.png":U,"../images/live_default.png":G,"../images/music_active.png":O,"../images/music_default.png":q,"../images/teacher-icon.png":M,"../images/video_active.png":V,"../images/video_default.png":Y,"../images/vip_active.png":H,"../images/vip_default.png":z}[s].default};var Kt=v({name:"teacher-header",props:{userInfo:{type:Object,default:{}},teacherId:{type:String||Number,default:""}},data(){return{iconShow:!1}},computed:{subjectNameList(){const s=this.userInfo.subjectName;return s?s.split(","):[]},starGrade(){const{starGrade:e}=this.userInfo;return Number(e)||0}},methods:{async onStart(){try{const e=this.userInfo.isStar?0:1;await p.get("/api-student/teacher/starOrUnStar",{params:{userId:this.teacherId,starStatus:e}}),this.userInfo.isStar=e;let s=e?this.userInfo.fansNum+1:this.userInfo.fansNum-1;this.userInfo.fansNum=s<=0?0:s}catch{}},checkBadge(e){let s=!1;const{userInfo:a}=this;switch(e){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":a.tag&&(s=a.tag.indexOf(e)>-1);break;case"VIP":s=a.isVip>0;break;default:s=!1;break}return s},openTeacherIcon(){this.iconShow=!0}},render(){const e=[{icon:"cert_active.png",title:"\u6F14\u594FMlog\u8FBE\u4EBA",des:"\u4E2A\u4EBA\u98CE\u91C7\u4E2D\u4E0A\u4F20\u8001\u5E08\u98CE\u91C7\u89C6\u9891\u5E76\u901A\u8FC7\u5BA1\u6838"},{icon:"video_active.png",title:"\u6559\u5B66\u89C6\u9891\u8FBE\u4EBA",des:"\u53D1\u5E03\u60A8\u5236\u4F5C\u7684\u6559\u5B66\u89C6\u9891\u8BFE\u7A0B\u5E76\u901A\u8FC7\u5BA1\u6838"},{icon:"live_active.png",title:"\u76F4\u64ADup\u8FBE\u4EBA",des:"\u8FBE\u5230\u5F00\u901A\u76F4\u64AD\u6743\u9650\u6807\u51C6\u5E76\u5F00\u901A\u76F4\u64AD\u529F\u80FD"},{icon:"music_active.png",title:"\u4E50\u8C31\u6B4C\u5355\u8FBE\u4EBA",des:"\u4E0A\u4F20\u60A8\u5236\u4F5C\u7684\u4E50\u8C31\u5E76\u901A\u8FC7\u5BA1\u6838"}];return t(m,null,[t("div",{class:i.headerContent},[t("div",{class:i.headerCount},[t(b,{class:i["open-teacher-info"],border:!1,center:!0},{default:()=>[t("div",{class:i["teacher-info"]},[t("div",{class:i["teacher-name"]},[t("div",{class:i.teacherCert},[t("span",{class:i.teacherLast},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.userId||""}`]),t(u,{class:i.iconVip,src:this.checkBadge("VIP")?h("vip_active.png"):h("vip_default.png")},null),t("div",{class:i.teacherIcons,onClick:this.openTeacherIcon},[t(u,{class:i.iconOther,src:this.checkBadge("STYLE")?h("cert_active.png"):h("cert_default.png")},null),t(u,{class:i.iconOther,src:this.checkBadge("VIDEO")?h("video_active.png"):h("video_default.png")},null),t(u,{class:i.iconOther,src:this.checkBadge("LIVE")?h("live_active.png"):h("live_default.png")},null),t(u,{class:i.iconOther,src:this.checkBadge("MUSIC")?h("music_active.png"):h("music_default.png")},null)])])]),t("div",{class:i.level},[this.starGrade?t(ye,{readonly:!0,modelValue:this.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):t("span",{style:{fontSize:"12px",color:"#999999"}},[o("\u6682\u65E0\u8BC4\u5206")])])])],icon:()=>t("div",{style:{position:"relative",lineHeight:0},onClick:()=>{this.userInfo.liveing===1&&Z({api:"joinLiveRoom",content:{roomId:this.userInfo.roomUid,teacherId:this.userInfo.userId}})}},[t(u,{class:i.userLogo,src:this.userInfo.heardUrl||te,fit:"cover"},null),this.userInfo.liveing===1&&t("p",{class:i.liveTag},[o("\u76F4\u64AD\u4E2D")])])}),t("p",{class:i.piNameSubject},[t(u,{class:i.subjectSection,src:h("icon_subject.png"),fit:"contain"},null),t("div",{class:i.subjectList},[this.subjectNameList.map(s=>t("span",{class:i.subject},[s]))])]),t("div",{class:i["teacher-bottom"]},[t("div",{class:i["teacher-data"]},[t("div",{class:i["teacher-data_item"]},[o("\u7C89\u4E1D "),t("span",null,[this.userInfo.fansNum||0])]),t("div",{class:i["teacher-data_item"]},[o("\u5DF2\u4E0A\u8BFE\u65F6 "),t("span",null,[this.userInfo.expTime||0])])]),t("div",{class:i.teacherOperation},[t(C,{type:"primary",size:"small",plain:!!this.userInfo.isStar,round:!0,class:i.btn,onClick:this.onStart},{default:()=>[!this.userInfo.isStar&&t(R,{name:"plus"},null),this.userInfo.isStar?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]}),t(C,{type:"primary",size:"small",round:!0,style:{marginLeft:"5px"},class:i.btn,onClick:()=>{Z({api:"joinChatGroup",content:{type:"single",id:this.teacherId}})}},{default:()=>[t(R,{name:"chat-o",style:{marginRight:"3px"}},null),o("\u804A\u5929")]})])])])]),t(W,{class:i.teaherPopup,show:this.iconShow,"onUpdate:show":s=>this.iconShow=s},{default:()=>[t(u,{src:h("teacher-icon.png")},null),t("div",{class:i.teacherIconWrap},[e.map(s=>t("div",{class:i.teacherIconItem},[t("div",{class:i.teacherIconItemTop},[t(u,{src:h(s.icon)},null),t("div",{class:i.teacherIconTitle},[s.title])]),t("div",{class:i.teacherIconDes},[s.des])]))]),t(u,{onClick:()=>this.iconShow=!1,class:i.closeIcon,src:h("icon-close.png")},null)]})])}});const Vs=e=>{const s=`./images/${e}`;return{"./images/cert_active.png":w,"./images/cert_default.png":k,"./images/follow_bg.png":D,"./images/head_bg.png":P,"./images/icon-close.png":E,"./images/icon_fans.png":F,"./images/icon_subject.png":B,"./images/icon_video.png":$,"./images/live_active.png":A,"./images/live_bg.png":U,"./images/live_default.png":G,"./images/music_active.png":O,"./images/music_default.png":q,"./images/teacher-icon.png":M,"./images/video_active.png":V,"./images/video_default.png":Y,"./images/vip_active.png":H,"./images/vip_default.png":z}[s].default};var Ys=v({name:"teacherHome",data(){const e=sessionStorage.getItem("teacherHomeTabs")||"",s=this.$route.query;return{teacherId:s.teacherId,tabs:e||s.tabs||"single",userInfo:{},background:"transparent",height:"auto"}},async created(){},async mounted(){this.getTeacherDetail(),Le("webViewOnResume",()=>{this.getTeacherDetail()}),Ee(document,"scroll",e=>{const{y:s}=Fe();s.value>45?this.background="#37cdb1":this.background="transparent"})},methods:{async getTeacherDetail(){try{const e=await p.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=e.data}catch{}}},render(){return t("div",{class:ce["teacher-record"]},[t("div",{class:ce.teacherHeader},[t("div",{ref:"headers"},[t(_e,{background:this.background,border:!1,color:"#fff",backIconColor:"white",onHeaderBack:()=>{this.$nextTick(()=>{const{height:e}=Ce(this.$refs.headers);this.height=e})}},null)]),t(Kt,{userInfo:this.userInfo,teacherId:this.teacherId},null)]),t(Se,{color:"var(--van-primary)",background:"#f8f9fc",shrink:!0,lineWidth:20,sticky:!0,offsetTop:this.height,active:this.tabs,"onUpdate:active":e=>this.tabs=e,onChange:()=>{sessionStorage.setItem("teacherHomeTabs",this.tabs)}},{default:()=>[t(L,{title:"\u4E2A\u4EBA\u98CE\u91C7",name:"single"},{default:()=>[this.tabs==="single"&&t(st,{userInfo:this.userInfo},null)]}),t(L,{title:"\u966A\u7EC3\u8BFE",name:"practice"},{default:()=>[this.tabs==="practice"&&t(bt,{userInfo:this.userInfo},null)]}),t(L,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[this.tabs==="live"&&t(Et,null,null)]}),t(L,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[this.tabs==="video"&&t(Wt,null,null)]}),t(L,{title:"\u4E50\u8C31",name:"music"},{default:()=>[this.tabs==="music"&&t(Jt,null,null)]})]})])}});export{Ys as default,Vs as getAssetsHomeFile};