teacher-home.a6bc1547.js 29 KB

1
  1. var ue=Object.defineProperty,de=Object.defineProperties;var he=Object.getOwnPropertyDescriptors;var ee=Object.getOwnPropertySymbols;var me=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var te=(e,s,a)=>s in e?ue(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,j=(e,s)=>{for(var a in s||(s={}))me.call(s,a)&&te(e,a,s[a]);if(ee)for(var a of ee(s))pe.call(s,a)&&te(e,a,s[a]);return e},R=(e,s)=>de(e,he(s));import{_ as k,a as D,b as w,c as P,d as E,e as B,f as F,g as $,h as A,i as G,j as U,k as O,l as q,m as M,n as Y,o as H,s as i}from"./teacher-header.module.3a4153d7.js";import{C as fe}from"./index.f88b47ff.js";import{d as v,T as se,a as t,F as g,j as o,C as b,I as d,p as ge,B as C,u as V,x as W,P as J,g as u,D as z,k as ae,O as _e,z as ve,A as be,w as ie,t as Ie,v as je,G as ye,H as L}from"./vendor.7fdfd452.js";/* empty css *//* empty css *//* empty css */import{S as K}from"./index.4b159732.js";import{C as Ce}from"./index.6f3e6dff.js";import{r as h,p as Q,s as S,l as oe,C as X,m as Se}from"./index.b7ae686a.js";/* empty css *//* empty css *//* empty css */import{i as Te}from"./icon_upload_poster.81da3a98.js";import{C as Le}from"./index.3c9162ad.js";/* empty css *//* empty css *//* empty css *//* empty css */import{o as T}from"./orderStatus.1437da3a.js";import{t as xe}from"./tradeOrder.b6e60b94.js";/* empty css */import{i as Ne}from"./icon_timer2.5fb1750d.js";import{i as Z}from"./icon_teacher.40b6f077.js";import ke from"./index.3c0d4928.js";import{m as De}from"./music.e2b55985.js";import{u as we,a as Pe}from"./index.b20f766b.js";/* empty css *//* empty css *//* empty css */import"./index.ca0cb872.js";import"./index.17e611e1.js";import"./item.355e83a2.js";import"./index.926ca9c5.js";import"./init-user-icon.9c46bc7a.js";import"./favorite.37fa42aa.js";import"./index.4651ffe3.js";import"./browser.ebb85846.js";import"./select-tag.6af2e205.js";/* empty css *//* empty css */import"./index.module.a12d3897.js";import"./index.339fc024.js";const Ee="_teacherHeader_1ssti_19";var re={"teacher-record":"_teacher-record_1ssti_1",teacherHeader:Ee};const Be="_single_14ksn_1",Fe="_introduction_14ksn_4",$e="_videoList_14ksn_10",Ae="_itemBg_14ksn_16",Ge="_videoItem_14ksn_25",Ue="_video_14ksn_10",Oe="_fansGroup_14ksn_55",qe="_fansImage_14ksn_71",Me="_fansTitle_14ksn_77",Ye="_videoGroup_14ksn_83";var p={single:Be,introduction:Fe,videoList:$e,itemBg:Ae,videoItem:Ge,"icon-upload":"_icon-upload_14ksn_34",video:Ue,fansGroup:Oe,fansImage:qe,fansTitle:Me,videoGroup:Ye};const He="_filterTitle_cir06_1",Ve="_fansGroup_cir06_9",ze="_introduce_cir06_19",Re="_fansImage_cir06_25",We="_fansTitle_cir06_31",Je="_joinContainer_cir06_37",Ke="_joinText_cir06_40";var y={filterTitle:He,fansGroup:Ve,introduce:ze,fansImage:Re,fansTitle:We,joinContainer:Je,joinText:Ke};const Qe=e=>{const s=`../images/${e}`;return{"../images/cert_active.png":k,"../images/cert_default.png":D,"../images/follow_bg.png":w,"../images/head_bg.png":P,"../images/icon_fans.png":E,"../images/icon_subject.png":B,"../images/icon_video.png":F,"../images/live_active.png":$,"../images/live_bg.png":A,"../images/live_default.png":G,"../images/music_active.png":U,"../images/music_default.png":O,"../images/video_active.png":q,"../images/video_default.png":M,"../images/vip_active.png":Y,"../images/vip_default.png":H}[s].default};var Xe=v({name:"joinChat",props:{item:{type:Object,default:{}},onClose:{type:Function,default:e=>{}}},data(){return{desc:""}},methods:{async onJoinChat(){try{await h.post("/api-student/imGroupMemberAudit/apply",{data:{groupId:this.item.id,auditStatus:"AUDITING",roleType:"STUDENT",desc:this.desc}}),se("\u7533\u8BF7\u6210\u529F"),this.desc="",this.onClose&&this.onClose(this.item.id)}catch{}}},render(){return t(g,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(d,{src:this.item.img||Qe("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(ge,{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 Ze(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!W(e)}const ne=e=>{const s=`../images/${e}`;return{"../images/cert_active.png":k,"../images/cert_default.png":D,"../images/follow_bg.png":w,"../images/head_bg.png":P,"../images/icon_fans.png":E,"../images/icon_subject.png":B,"../images/icon_video.png":F,"../images/live_active.png":$,"../images/live_bg.png":A,"../images/live_default.png":G,"../images/music_active.png":U,"../images/music_default.png":O,"../images/video_active.png":q,"../images/video_default.png":M,"../images/vip_active.png":Y,"../images/vip_default.png":H}[s].default};var et=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 h.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&&Q({api:"joinChatGroup",content:{type:"multi",id:e.id}})},async onPlay(){try{if(!this.isAddBrowse)return;await h.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:p.single},[t(K,{icon:"personal",title:"\u4E2A\u4EBA\u4ECB\u7ECD",size:24,border:!1},{default:()=>[t("p",{class:p.introduction},[s.introduction])]}),s.styleVideo&&s.styleVideo.length>0&&t(K,{icon:"elegant",title:"\u8001\u5E08\u98CE\u91C7",size:24,border:!1},{default:()=>[t("div",{class:p.videoList},[s.styleVideo.map(a=>t("div",{class:p.videoItem},[t("div",{class:p.itemBg,onClick:()=>{this.videoStatus=!0,this.isAddBrowse=!0,this.videoItem=a}},null),t(V,{class:p["icon-upload"],name:ne("icon_video.png"),size:26},null),t(d,{src:a.cover||Te,fit:"cover"},null)]))])]}),this.fansList&&this.fansList.length>0&&t(K,{icon:"fans",title:"\u7C89\u4E1D\u7FA4",size:24,border:!1},Ze(e=this.fansList.map(a=>t(b,{center:!0,class:p.fansGroup,border:!1},{icon:()=>t(d,{src:a.img||ne("icon_fans.png"),fit:"cover",class:p.fansImage},null),title:()=>t("div",{class:p.fansTitle},[t("div",{class:p.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(J,{show:this.chatStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.chatStatus=!1},{default:()=>[t(Xe,{item:this.chatItem,onClose:a=>{this.fansList.forEach(l=>{l.id===a&&(l.hasWaitAuditFlag=!0)}),this.chatStatus=!1}},null)]}),t(J,{show:this.videoStatus,round:!0,class:p.videoGroup,closeable:!0,onClose:()=>{this.videoStatus=!1,this.isAddBrowse=!1}},{default:()=>{var a;return[this.videoStatus&&t(Ce,{playsinline:!0,onPlay:this.onPlay,src:((a=this.videoItem)==null?void 0:a.videoUrl)+"#t=0.1"},null)]}})])}});const tt="_practice_xjmim_1",st="_group_xjmim_5",at="_price_xjmim_10",it="_rTag_xjmim_27",ot="_tag_xjmim_30",rt="_selectPopup_xjmim_34",nt="_selectContainer_xjmim_39",ct="_rTitle_xjmim_42",lt="_selectPopupContent_xjmim_45",ut="_desc_xjmim_48",dt="_times_xjmim_49",ht="_selectBtn_xjmim_60",mt="_btn_xjmim_65",pt="_protocol_xjmim_84",ft="_arrangeCell_xjmim_88",gt="_fixedBtn_xjmim_94";var c={practice:tt,group:st,price:at,rTag:it,tag:ot,selectPopup:rt,selectContainer:nt,rTitle:ct,selectPopupContent:lt,desc:ut,times:dt,selectBtn:ht,btn:mt,protocol:pt,arrangeCell:ft,fixedBtn:gt},_t=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:u().add(1,"day").toDate(),settingStatus:!0,loadDataStatus:!0}},async mounted(){var e;try{this.loadDataStatus=!0;const s=await h.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),n=a.find(N=>N.subjectId===Number(l))||a[0],{subjectName:I,subjectPrice:x,courseMinutes:ce,subjectId:le}=n;this.subjectInfo={subjectPrice:x,courseMinutes:ce,subjectName:I,subjectId:le},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=u(a.startTime).format("YYYY-MM-DD")+" "+oe(u(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){se("\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||u().add(1,"day").toDate();let l={day:u(a).format("DD"),month:u(a).format("MM"),year:u(a).format("YYYY")};const n=(await h.post("/api-student/courseSchedule/createPracticeCourseCalendar",{data:R(j({},l),{studentId:(s=S.user.data)==null?void 0:s.userId,teacherId:this.teacherId})})).data||[];let I={};n.forEach(x=>{I[x.date]=x}),this.calendarList=I,this.calendarStatus=n.length>0}catch{}},onSelectDay(e){const s=e||[];let a=[...this.selectCourseList];s.forEach(r=>{!a.some(I=>I.startTime===r.startTime)&&a.push(j({},r))});let l=[];a.forEach(r=>{s.some(I=>I.startTime===r.startTime)&&l.push(r)}),l.sort((r,n)=>r.startTime>n.startTime?1:r.startTime<n.startTime?-1:0),console.log(l,"list"),this.selectCourseList=[...l]},onCloseTag(e){z.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(r=>{s.push({startTime:r.startTime,endTime:r.endTime})}),((await h.post("/api-student/courseGroup/lockCourseToCache",{data:{courseNum:this.courseNum,courseType:"PRACTICE",loop:this.selectType==="noEnough"?1:0,teacherId:this.teacherId,timeList:[...s]}})).data||[]).forEach((r,n)=>{this.coursePlanList[n]=R(j({},this.coursePlanList[n]),{startTime:r.startTime,endTime:r.endTime,classNum:n+1})}),this.coursePlanStatus=!0,this.selectStatus=!0,e&&e()}catch(s){const a=s.message;z.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 h.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"PRACTICE",bizId:this.teacherId}}),a=this.subjectInfo,l=[...this.coursePlanList];l.forEach(n=>{n.classDate=u(n.startTime).format("YYYY-MM-DD"),n.title=`${u(n.startTime).format("YYYY-MM-DD")} ${oe(u(n.startTime).day())} ${u(n.startTime).format("HH:mm")}~${u(n.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 r=s.data;r?z.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()=>{xe(r,this.routerTo)}).catch(()=>{z.close(),this.cancelPayment(r.orderNo)}):!e&&this.routerTo()}catch{}},routerTo(){this.$router.push({path:"/orderDetail",query:{orderType:"PRACTICE"}})},async cancelPayment(e){try{await h.post("/api-student/userOrder/orderCancel",{data:{orderNo:e}})}catch{}}},render(){return t(g,null,[!this.loadDataStatus&&(this.settingStatus?t(g,null,[t("div",{class:c.practice},[t(ae,{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(_e,{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(Le,{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(g,null,[t(ve,{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(J,{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,[u(e.startTime||new Date).format("YYYY-MM-DD")," ",u(e.startTime||new Date).format("HH:mm"),o("~"),u(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(be,{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:r}=e;this.subjectInfo={subjectPrice:a,courseMinutes:l,subjectName:s,subjectId:r},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(X,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u966A\u7EC3\u8BFE"},null))])}});const vt="_liveList_1qowf_1",bt="_liCover_1qowf_4",It="_liContent_1qowf_10",jt="_liTitle_1qowf_13",yt="_avatar_1qowf_22",Ct="_liUserInfo_1qowf_29",St="_userInfo_1qowf_30",Tt="_num_1qowf_42",Lt="_buyNum_1qowf_45",xt="_price_1qowf_51",Nt="_liveGroup_1qowf_59",kt="_subjectName_1qowf_64";var m={liveList:vt,liCover:bt,liContent:It,liTitle:jt,avatar:yt,liUserInfo:Ct,userInfo:St,num:Tt,buyNum:Lt,price:xt,liveGroup:Nt,subjectName:kt};function Dt(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!W(e)}var wt=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=u(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 h.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(g,null,[this.dataShow?t(ie,{class:m.liveList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},Dt(e=this.list.map(s=>t(ae,{class:m.liveGroup,border:!1,onClick:()=>this.onDetail(s)},{default:()=>[t(b,null,{icon:()=>t("div",{style:{position:"relative"}},[t(d,{class:m.liCover,src:s.backgroundPic,fit:"cover"},null),t("span",{class:m.subjectName},[s==null?void 0:s.subjectName])]),title:()=>t("div",{class:m.liContent},[t("div",{class:[m.liTitle,"van-ellipsis"]},[s.courseGroupName]),t("div",{class:m.liUserInfo},[t("div",{class:[m.userInfo,"van-hairline--right"]},[t(d,{class:m.avatar,fit:"cover",src:s.avatar||Z},null),t("p",null,[o("\u8001\u5E08\uFF1A"),s.teacherName||`\u6E38\u5BA2${s.teacherId}`])]),s.existBuy===1?t("span",{class:m.buyNum},[o("\u5DF2\u8D2D\u4E70")]):t("span",{class:m.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(V,{name:Ne,size:"16",style:{marginRight:"5px"}},null),this.formatTime(s.salesStartDate)]),default:()=>t("div",{class:m.price},[s.coursePrice>0&&t(g,null,[t("span",null,[o("\xA5"),this.$filters.moneyFormat(s.coursePrice)]),o("/")]),s.courseNum,o("\u8BFE\u65F6")])})]})))?e:{default:()=>[e]}):t(X,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const Pt="_videoItem_ck7bl_1",Et="_viCover_ck7bl_8",Bt="_viSection_ck7bl_13",Ft="_viTitle_ck7bl_16",$t="_viUserInfo_ck7bl_21",At="_viUserLogo_ck7bl_28",Gt="_viUserName_ck7bl_35",Ut="_viUserNum_ck7bl_39",Ot="_viPrice_ck7bl_42",qt="_subjectName_ck7bl_47";var _={videoItem:Pt,viCover:Et,viSection:Bt,viTitle:Ft,viUserInfo:$t,viUserLogo:At,viUserName:Gt,viUserNum:Ut,viPrice:Ot,subjectName:qt},Mt=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(d,{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(d,{src:(e==null?void 0:e.avatar)||Z,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(g,null,[o("\uFFE5"),e==null?void 0:e.lessonPrice,o("/")]),e==null?void 0:e.lessonCount,o("\u8BFE\u65F6")])])])}});const Yt="_videoList_1yf9v_1";var Ht={videoList:Yt};function Vt(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!W(e)}var zt=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 h.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(g,null,[this.dataShow?t(ie,{class:Ht.videoList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},Vt(e=this.list.map(s=>t(Mt,{item:s,onClick:this.onDetail},null)))?e:{default:()=>[e]}):t(X,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}}),Rt=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){De(e,s=>{this.$router.push({path:s,query:{orderType:"MUSIC"}})})}},render(){return t(g,null,[t(ke,{hideSearch:!0,onItemClick:this.onItemClick,teacherId:this.teacherId},null)])}});const f=e=>{const s=`../images/${e}`;return{"../images/cert_active.png":k,"../images/cert_default.png":D,"../images/follow_bg.png":w,"../images/head_bg.png":P,"../images/icon_fans.png":E,"../images/icon_subject.png":B,"../images/icon_video.png":F,"../images/live_active.png":$,"../images/live_bg.png":A,"../images/live_default.png":G,"../images/music_active.png":U,"../images/music_default.png":O,"../images/video_active.png":q,"../images/video_default.png":M,"../images/vip_active.png":Y,"../images/vip_default.png":H}[s].default};var Wt=v({name:"teacher-header",props:{userInfo:{type:Object,default:{}},teacherId:{type:String||Number,default:""}},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 h.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}},render(){return t(g,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(d,{class:i.iconVip,src:this.checkBadge("VIP")?f("vip_active.png"):f("vip_default.png")},null),t(d,{class:i.iconOther,src:this.checkBadge("STYLE")?f("cert_active.png"):f("cert_default.png")},null),t(d,{class:i.iconOther,src:this.checkBadge("VIDEO")?f("video_active.png"):f("video_default.png")},null),t(d,{class:i.iconOther,src:this.checkBadge("LIVE")?f("live_active.png"):f("live_default.png")},null),t(d,{class:i.iconOther,src:this.checkBadge("MUSIC")?f("music_active.png"):f("music_default.png")},null)])]),t("div",{class:i.level},[this.starGrade?t(Ie,{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&&Q({api:"joinLiveRoom",content:{roomId:this.userInfo.roomUid,teacherId:this.userInfo.userId}})}},[t(d,{class:i.userLogo,src:this.userInfo.heardUrl||Z,fit:"cover"},null),this.userInfo.liveing===1&&t("p",{class:i.liveTag},[o("\u76F4\u64AD\u4E2D")])])}),t("p",{class:i.piNameSubject},[t(d,{class:i.subjectSection,src:f("icon_subject.png"),fit:"contain"},null),t("div",{class:i.subjectList},[this.subjectNameList.map(e=>t("span",{class:i.subject},[e]))])]),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(V,{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:()=>{Q({api:"joinChatGroup",content:{type:"single",id:this.teacherId}})}},{default:()=>[t(V,{name:"chat-o",style:{marginRight:"3px"}},null),o("\u804A\u5929")]})])])])])])}});const Gs=e=>{const s=`./images/${e}`;return{"./images/cert_active.png":k,"./images/cert_default.png":D,"./images/follow_bg.png":w,"./images/head_bg.png":P,"./images/icon_fans.png":E,"./images/icon_subject.png":B,"./images/icon_video.png":F,"./images/live_active.png":$,"./images/live_bg.png":A,"./images/live_default.png":G,"./images/music_active.png":U,"./images/music_default.png":O,"./images/video_active.png":q,"./images/video_default.png":M,"./images/vip_active.png":Y,"./images/vip_default.png":H}[s].default};var Us=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(),Se("webViewOnResume",()=>{this.getTeacherDetail()}),we(document,"scroll",e=>{const{y:s}=Pe();s.value>45?this.background="#37cdb1":this.background="transparent"})},methods:{async getTeacherDetail(){try{const e=await h.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=e.data}catch{}}},render(){return t("div",{class:re["teacher-record"]},[t("div",{class:re.teacherHeader},[t("div",{ref:"headers"},[t(fe,{background:this.background,border:!1,color:"#fff",backIconColor:"white",onHeaderBack:()=>{this.$nextTick(()=>{const{height:e}=je(this.$refs.headers);this.height=e})}},null)]),t(Wt,{userInfo:this.userInfo,teacherId:this.teacherId},null)]),t(ye,{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(et,{userInfo:this.userInfo},null)]}),t(L,{title:"\u966A\u7EC3\u8BFE",name:"practice"},{default:()=>[this.tabs==="practice"&&t(_t,{userInfo:this.userInfo},null)]}),t(L,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[this.tabs==="live"&&t(wt,null,null)]}),t(L,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[this.tabs==="video"&&t(zt,null,null)]}),t(L,{title:"\u4E50\u8C31",name:"music"},{default:()=>[this.tabs==="music"&&t(Rt,null,null)]})]})])}});export{Us as default,Gs as getAssetsHomeFile};