teacher-home.f345a11c.js 26 KB

1
  1. var X=Object.defineProperty,Z=Object.defineProperties;var tt=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var et=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var H=(e,s,a)=>s in e?X(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,b=(e,s)=>{for(var a in s||(s={}))et.call(s,a)&&H(e,a,s[a]);if(O)for(var a of O(s))st.call(s,a)&&H(e,a,s[a]);return e},E=(e,s)=>Z(e,tt(s));import{_ as L,a as w,b as D,c as N,d as P,e as k,s as r}from"./teacher-header.module.1c868ff5.js";import{C as at}from"./index.dcafb79b.js";import{d as v,T as Y,a as t,F as p,j as n,q as f,I as g,m as it,B as y,u as F,x as $,P as B,g as u,D as A,C as U,O as rt,z as ot,A as nt,w as z,t as ct,v as lt,G as ut,H as S}from"./vendor.a0144ce9.js";/* empty css *//* empty css *//* empty css */import{S as G}from"./index.f4e1cfd8.js";import{C as dt}from"./index.3d2b859b.js";import{r as d,p as q,s as j,k as V,C as M,l as ht}from"./index.1a2e0425.js";/* empty css *//* empty css *//* empty css */import{C as mt}from"./index.6b5c8453.js";/* empty css *//* empty css *//* empty css *//* empty css */import{o as C}from"./orderStatus.243cb96a.js";import{t as pt}from"./tradeOrder.1cc7fdfa.js";/* empty css */import{i as ft}from"./icon_timer2.563d016a.js";import{i as R}from"./icon_teacher.40b6f077.js";import{V as gt}from"./video-item.279fcc47.js";import _t from"./index.79bb05d9.js";import{m as bt}from"./music.22be2898.js";import{u as vt,a as It}from"./index.28b40a59.js";/* empty css */import{t as yt,m as jt}from"./teacher_cert.545c524a.js";/* empty css *//* empty css */import"./index.376fb8f6.js";import"./index.ccfa57ee.js";import"./item.d97833cd.js";import"./index.926ca9c5.js";import"./init-user-icon.d5c3c464.js";import"./favorite.9bdf4305.js";import"./select-tag.e82b6736.js";/* empty css *//* empty css */import"./index.module.64874bae.js";import"./index.339fc024.js";const Ct="_teacherHeader_1ssti_19";var W={"teacher-record":"_teacher-record_1ssti_1",teacherHeader:Ct};const St="_single_14ksn_1",Tt="_introduction_14ksn_4",xt="_videoList_14ksn_10",Lt="_itemBg_14ksn_16",wt="_videoItem_14ksn_25",Dt="_video_14ksn_10",Nt="_fansGroup_14ksn_55",Pt="_fansImage_14ksn_71",kt="_fansTitle_14ksn_77",Ft="_videoGroup_14ksn_83";var m={single:St,introduction:Tt,videoList:xt,itemBg:Lt,videoItem:wt,"icon-upload":"_icon-upload_14ksn_34",video:Dt,fansGroup:Nt,fansImage:Pt,fansTitle:kt,videoGroup:Ft};const At="_filterTitle_cir06_1",Et="_fansGroup_cir06_9",$t="_introduce_cir06_19",Bt="_fansImage_cir06_25",Gt="_fansTitle_cir06_31",qt="_joinContainer_cir06_37",Mt="_joinText_cir06_40";var I={filterTitle:At,fansGroup:Et,introduce:$t,fansImage:Bt,fansTitle:Gt,joinContainer:qt,joinText:Mt};const Ot=e=>{const s=`../images/${e}`;return{"../images/follow_bg.png":L,"../images/head_bg.png":w,"../images/icon_fans.png":D,"../images/icon_subject.png":N,"../images/icon_video.png":P,"../images/live_bg.png":k}[s].default};var Ht=v({name:"joinChat",props:{item:{type:Object,default:{}},onClose:{type:Function,default:e=>{}}},data(){return{desc:""}},methods:{async onJoinChat(){try{await d.post("/api-student/imGroupMemberAudit/apply",{data:{groupId:this.item.id,auditStatus:"AUDITING",roleType:"STUDENT",desc:this.desc}}),Y("\u7533\u8BF7\u6210\u529F"),this.desc="",this.onClose&&this.onClose(this.item.id)}catch{}}},render(){return t(p,null,[t("div",{class:[I.filterTitle,"van-hairline--bottom"]},[n("\u7533\u8BF7\u5165\u7FA4")]),t("div",{class:I.joinContainer},[t(f,{center:!0,class:I.fansGroup,border:!1},{icon:()=>t(g,{src:this.item.img||Ot("icon_fans.png"),fit:"cover",class:I.fansImage},null),title:()=>t("div",{class:I.fansTitle},[t("div",{class:I.title},[this.item.name]),t("p",{class:["van-ellipsis",I.introduce]},[this.item.introduce])])}),t(it,{type:"textarea",class:I.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(y,{type:"primary",block:!0,round:!0,style:{width:"70%",margin:"0 auto"},onClick:this.onJoinChat},{default:()=>[n("\u786E\u8BA4")]})])])}}),Yt="./assets/icon_upload_poster.67e87476.png";function Ut(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!$(e)}const J=e=>{const s=`../images/${e}`;return{"../images/follow_bg.png":L,"../images/head_bg.png":w,"../images/icon_fans.png":D,"../images/icon_subject.png":N,"../images/icon_video.png":P,"../images/live_bg.png":k}[s].default};var zt=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 d.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 d.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:m.single},[t(G,{icon:"personal",title:"\u4E2A\u4EBA\u4ECB\u7ECD",size:24,border:!1},{default:()=>[t("p",{class:m.introduction},[s.introduction])]}),s.styleVideo&&s.styleVideo.length>0&&t(G,{icon:"elegant",title:"\u8001\u5E08\u98CE\u91C7",size:24,border:!1},{default:()=>[t("div",{class:m.videoList},[s.styleVideo.map(a=>t("div",{class:m.videoItem},[t("div",{class:m.itemBg,onClick:()=>{this.videoStatus=!0,this.isAddBrowse=!0,this.videoItem=a}},null),t(F,{class:m["icon-upload"],name:J("icon_video.png"),size:26},null),t(g,{src:Yt,fit:"cover"},null)]))])]}),this.fansList&&this.fansList.length>0&&t(G,{icon:"fans",title:"\u7C89\u4E1D\u7FA4",size:24,border:!1},Ut(e=this.fansList.map(a=>t(f,{center:!0,class:m.fansGroup,border:!1},{icon:()=>t(g,{src:a.img||J("icon_fans.png"),fit:"cover",class:m.fansImage},null),title:()=>t("div",{class:m.fansTitle},[t("div",{class:m.title},[a.name]),t("p",{class:"van-ellipsis"},[a.introduce])]),default:()=>t(y,{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(B,{show:this.chatStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.chatStatus=!1},{default:()=>[t(Ht,{item:this.chatItem,onClose:a=>{this.fansList.forEach(l=>{l.id===a&&(l.hasWaitAuditFlag=!0)}),this.chatStatus=!1}},null)]}),t(B,{show:this.videoStatus,round:!0,class:m.videoGroup,closeable:!0,onClose:()=>{this.videoStatus=!1,this.isAddBrowse=!1}},{default:()=>{var a;return[this.videoStatus&&t(dt,{playsinline:!0,onPlay:this.onPlay,src:((a=this.videoItem)==null?void 0:a.videoUrl)+"#t=0.1"},null)]}})])}});const Vt="_practice_xjmim_1",Rt="_group_xjmim_5",Wt="_price_xjmim_10",Jt="_rTag_xjmim_27",Kt="_tag_xjmim_30",Qt="_selectPopup_xjmim_34",Xt="_selectContainer_xjmim_39",Zt="_rTitle_xjmim_42",te="_selectPopupContent_xjmim_45",ee="_desc_xjmim_48",se="_times_xjmim_49",ae="_selectBtn_xjmim_60",ie="_btn_xjmim_65",re="_protocol_xjmim_84",oe="_arrangeCell_xjmim_88",ne="_fixedBtn_xjmim_94";var c={practice:Vt,group:Rt,price:Wt,rTag:Jt,tag:Kt,selectPopup:Qt,selectContainer:Xt,rTitle:Zt,selectPopupContent:te,desc:ee,times:se,selectBtn:ae,btn:ie,protocol:re,arrangeCell:oe,fixedBtn:ne},ce=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 d.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=j.user.data)==null?void 0:e.subjectId),o=a.find(x=>x.subjectId===Number(l))||a[0],{subjectName:_,subjectPrice:T,courseMinutes:K,subjectId:Q}=o;this.subjectInfo={subjectPrice:T,courseMinutes:K,subjectName:_,subjectId:Q},a.forEach(x=>{x.name=x.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")+" "+V(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){Y("\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 o=(await d.post("/api-student/courseSchedule/createPracticeCourseCalendar",{data:E(b({},l),{studentId:(s=j.user.data)==null?void 0:s.userId,teacherId:this.teacherId})})).data||[];let _={};o.forEach(T=>{_[T.date]=T}),this.calendarList=_,this.calendarStatus=o.length>0}catch{}},onSelectDay(e){const s=e||[];let a=[...this.selectCourseList];s.forEach(i=>{!a.some(_=>_.startTime===i.startTime)&&a.push(b({},i))});let l=[];a.forEach(i=>{s.some(_=>_.startTime===i.startTime)&&l.push(i)}),l.sort((i,o)=>i.startTime>o.startTime?1:i.startTime<o.startTime?-1:0),console.log(l,"list"),this.selectCourseList=[...l]},onCloseTag(e){A.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(i=>{s.push({startTime:i.startTime,endTime:i.endTime})}),((await d.post("/api-student/courseGroup/lockCourseToCache",{data:{courseNum:this.courseNum,courseType:"PRACTICE",loop:this.selectType==="noEnough"?1:0,teacherId:this.teacherId,timeList:[...s]}})).data||[]).forEach((i,o)=>{this.coursePlanList[o]=E(b({},this.coursePlanList[o]),{startTime:i.startTime,endTime:i.endTime,classNum:o+1})}),this.coursePlanStatus=!0,this.selectStatus=!0,e&&e()}catch(s){const a=s.message;A.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 d.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"PRACTICE",bizId:this.teacherId}}),a=this.subjectInfo,l=[...this.coursePlanList];l.forEach(o=>{o.classDate=u(o.startTime).format("YYYY-MM-DD"),o.title=`${u(o.startTime).format("YYYY-MM-DD")} ${V(u(o.startTime).day())} ${u(o.startTime).format("HH:mm")}~${u(o.endTime).format("HH:mm")}`}),C.orderObject.orderType="PRACTICE",C.orderObject.orderName=a.subjectName+"\u966A\u7EC3\u8BFE",C.orderObject.orderDesc=a.subjectName+"\u966A\u7EC3\u8BFE",C.orderObject.actualPrice=Number((this.courseNum*a.subjectPrice).toFixed(2)),C.orderObject.orderNo="",C.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 i=s.data;i?A.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()=>{pt(i,this.routerTo)}).catch(()=>{A.close(),this.cancelPayment(i.orderNo)}):!e&&this.routerTo()}catch{}},routerTo(){this.$router.push({path:"/orderDetail",query:{orderType:"PRACTICE"}})},async cancelPayment(e){try{await d.post("/api-student/userOrder/orderCancel",{data:{orderNo:e}})}catch{}}},render(){return t(p,null,[!this.loadDataStatus&&(this.settingStatus?t(p,null,[t("div",{class:c.practice},[t(U,{class:c.group,border:!1},{default:()=>[this.subjectInfo.subjectPrice>0&&t(f,{title:"\u966A\u7EC3\u8BFE\u6536\u8D39"},{default:()=>t("div",{class:c.price},[t("span",null,[n("\xA5"),this.$filters.moneyFormat(this.subjectInfo.subjectPrice)]),n("/"),this.subjectInfo.courseMinutes,n("\u5206\u949F")])}),t(f,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:this.subjectInfo.subjectName,onClick:()=>this.subjectStatus=!0},null),t(f,{title:"\u8BFE\u65F6\u6570"},{default:()=>t(rt,{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(mt,{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(f,{class:[c.arrangeCell]},{title:()=>t("div",{class:c.rTitle},[t("span",null,[n("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>t("div",{class:c.rTag},[this.showSelectList.map(e=>t(p,null,[t(ot,{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(B,{show:this.selectStatus,class:c.selectPopup},{default:()=>[t("div",{class:c.selectContainer},[t("div",{class:c.rTitle},[t("span",null,[n("\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"),n("~"),u(e.endTime||new Date).format("HH:mm")]))])]),t("div",{class:c.selectBtn},[t(y,{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(y,{class:c.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[n("\u786E\u8BA4")]})])])]}),t(nt,{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:i}=e;this.subjectInfo={subjectPrice:a,courseMinutes:l,subjectName:s,subjectId:i},this.subjectStatus=!1}},null)]),t("div",{class:["btnGroup",c.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[t(y,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[n("\u786E\u8BA4\u7EA6\u8BFE")]})])]):t(M,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u966A\u7EC3\u8BFE"},null))])}});const le="_liveList_1qowf_1",ue="_liCover_1qowf_4",de="_liContent_1qowf_10",he="_liTitle_1qowf_13",me="_avatar_1qowf_22",pe="_liUserInfo_1qowf_29",fe="_userInfo_1qowf_30",ge="_num_1qowf_42",_e="_buyNum_1qowf_45",be="_price_1qowf_51",ve="_liveGroup_1qowf_59",Ie="_subjectName_1qowf_64";var h={liveList:le,liCover:ue,liContent:de,liTitle:he,avatar:me,liUserInfo:pe,userInfo:fe,num:ge,buyNum:_e,price:be,liveGroup:ve,subjectName:Ie};function ye(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!$(e)}var je=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=b({},this.params);j.version&&(e.version=j.version||"",e.platform="ios-student");const s=await d.post("/api-student/courseGroup/queryPageCourseGroup",{data:b({},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(p,null,[this.dataShow?t(z,{class:h.liveList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},ye(e=this.list.map(s=>t(U,{class:h.liveGroup,border:!1,onClick:()=>this.onDetail(s)},{default:()=>[t(f,null,{icon:()=>t("div",{style:{position:"relative"}},[t(g,{class:h.liCover,src:s.backgroundPic,fit:"cover"},null),t("span",{class:h.subjectName},[s==null?void 0:s.subjectName])]),title:()=>t("div",{class:h.liContent},[t("div",{class:[h.liTitle,"van-ellipsis"]},[s.courseGroupName]),t("div",{class:h.liUserInfo},[t("div",{class:[h.userInfo,"van-hairline--right"]},[t(g,{class:h.avatar,fit:"cover",src:s.avatar||R},null),t("p",null,[n("\u8001\u5E08\uFF1A"),s.teacherName||`\u6E38\u5BA2${s.teacherId}`])]),s.existBuy===1?t("span",{class:h.buyNum},[n("\u5DF2\u8D2D\u4E70")]):t("span",{class:h.num},[s.studentCount,n("\u4EBA\u5DF2\u8D2D\u4E70")])])])}),t(f,{titleStyle:{color:"#666666",fontSize:"13px"}},{title:()=>t("span",{style:{display:"flex",alignItems:"center",fontSize:"13px"}},[t(F,{name:ft,size:"16",style:{marginRight:"5px"}},null),this.formatTime(s.salesStartDate)]),default:()=>t("div",{class:h.price},[s.coursePrice>0&&t(p,null,[t("span",null,[n("\xA5"),this.$filters.moneyFormat(s.coursePrice)]),n("/")]),s.courseNum,n("\u8BFE\u65F6")])})]})))?e:{default:()=>[e]}):t(M,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const Ce="_videoList_1yf9v_1";var Se={videoList:Ce};function Te(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!$(e)}var xe=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=b({},this.params);j.version&&(e.version=j.version||"",e.platform="ios-student");const s=await d.post("/api-student/videoLesson/selectGroup",{data:b({},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(p,null,[this.dataShow?t(z,{class:Se.videoList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},Te(e=this.list.map(s=>t(gt,{item:s,onClick:this.onDetail},null)))?e:{default:()=>[e]}):t(M,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}}),Le=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){bt(e,s=>{this.$router.push({path:s,query:{orderType:"MUSIC"}})})}},render(){return t(p,null,[t(_t,{hideSearch:!0,onItemClick:this.onItemClick,teacherId:this.teacherId},null)])}});const we=e=>{const s=`../images/${e}`;return{"../images/follow_bg.png":L,"../images/head_bg.png":w,"../images/icon_fans.png":D,"../images/icon_subject.png":N,"../images/icon_video.png":P,"../images/live_bg.png":k}[s].default};var De=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 d.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{}}},render(){return t(p,null,[t("div",{class:r.headerContent},[t("div",{class:r.headerCount},[t(f,{class:r["open-teacher-info"],border:!1,center:!0},{default:()=>[t("div",{class:r["teacher-info"]},[t("div",{class:r["teacher-name"]},[t("div",{class:r.teacherCert},[t("span",{style:{display:"inline-block"}},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.userId||""}`]),this.userInfo.entryFlag===1&&t(g,{class:r.cert,src:yt},null),this.userInfo.musicianFlag===1&&t(g,{class:r.cert,src:jt},null)])]),t("div",{class:r.level},[this.starGrade?t(ct,{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"}},[n("\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(g,{class:r.userLogo,src:this.userInfo.heardUrl||R,fit:"cover"},null),this.userInfo.liveing===1&&t("p",{class:r.liveTag},[n("\u76F4\u64AD\u4E2D")])])}),t("p",{class:r.piNameSubject},[t(g,{class:r.subjectSection,src:we("icon_subject.png"),fit:"contain"},null),t("div",{class:r.subjectList},[this.subjectNameList.map(e=>t("span",{class:r.subject},[e]))])]),t("div",{class:r["teacher-bottom"]},[t("div",{class:r["teacher-data"]},[t("div",{class:r["teacher-data_item"]},[n("\u7C89\u4E1D "),t("span",null,[this.userInfo.fansNum||0])]),t("div",{class:r["teacher-data_item"]},[n("\u5DF2\u4E0A\u8BFE\u65F6 "),t("span",null,[this.userInfo.expTime||0])])]),t("div",{class:r.teacherOperation},[t(y,{type:"primary",size:"small",plain:!!this.userInfo.isStar,round:!0,class:r.btn,onClick:this.onStart},{default:()=>[!this.userInfo.isStar&&t(F,{name:"plus"},null),this.userInfo.isStar?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]}),t(y,{type:"primary",size:"small",round:!0,style:{marginLeft:"5px"},class:r.btn,onClick:()=>{q({api:"joinChatGroup",content:{type:"single",id:this.teacherId}})}},{default:()=>[t(F,{name:"chat-o",style:{marginRight:"3px"}},null),n("\u804A\u5929")]})])])])])])}});const bs=e=>{const s=`./images/${e}`;return{"./images/follow_bg.png":L,"./images/head_bg.png":w,"./images/icon_fans.png":D,"./images/icon_subject.png":N,"./images/icon_video.png":P,"./images/live_bg.png":k}[s].default};var vs=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(),ht("webViewOnResume",()=>{this.getTeacherDetail()}),vt(document,"scroll",e=>{const{y:s}=It();s.value>45?this.background="#37cdb1":this.background="transparent"})},methods:{async getTeacherDetail(){try{const e=await d.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=e.data}catch{}}},render(){return t("div",{class:W["teacher-record"]},[t("div",{class:W.teacherHeader},[t("div",{ref:"headers"},[t(at,{background:this.background,border:!1,color:"#fff",backIconColor:"white",onHeaderBack:()=>{this.$nextTick(()=>{const{height:e}=lt(this.$refs.headers);this.height=e})}},null)]),t(De,{userInfo:this.userInfo,teacherId:this.teacherId},null)]),t(ut,{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(S,{title:"\u4E2A\u4EBA\u98CE\u91C7",name:"single"},{default:()=>[this.tabs==="single"&&t(zt,{userInfo:this.userInfo},null)]}),t(S,{title:"\u966A\u7EC3\u8BFE",name:"practice"},{default:()=>[this.tabs==="practice"&&t(ce,{userInfo:this.userInfo},null)]}),t(S,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[this.tabs==="live"&&t(je,null,null)]}),t(S,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[this.tabs==="video"&&t(xe,null,null)]}),t(S,{title:"\u4E50\u8C31",name:"music"},{default:()=>[this.tabs==="music"&&t(Le,null,null)]})]})])}});export{vs as default,bs as getAssetsHomeFile};