1 |
- import{_ as P,a as k,b as x,c as B,d as E,e as F,f as A,g as z,h as $,i as G,j as H,k as M,l as O,m as V,n as Y,o as q,p as U,q as R,r as W,s as i,I as re}from"./teacher-header.module.374e6712.js";import{d as I,w as p,T as te,j as e,z as n,B as y,F as f,n as X,M as ne,aR as w,Z,u,g as S,b6 as Q,D,C as K,b0 as ce,X as le}from"./index.e6d6174e.js";import{C as ue}from"./index.045f03fd.js";import"./index.9093bc60.js";import"./index.b4a53c6a.js";import{T as de,a as T}from"./index.54627972.js";import{S as J}from"./index.884a0e76.js";import{C as he}from"./index.4a53da74.js";import{C as b}from"./index.af99cf22.js";import{I as h}from"./index.67c54471.js";import{F as me}from"./index.17d70acf.js";import{i as pe}from"./icon_upload_poster.81da3a98.js";import{C as ge}from"./index.33f2da56.js";import{A as fe}from"./index.8ec5fd1e.js";import{C as se}from"./index.4aea64de.js";import{S as _e}from"./index.36f208b2.js";import{T as ve}from"./index.05f2b7dd.js";import{o as C}from"./orderStatus.fea01d83.js";import{t as be}from"./tradeOrder.d6463377.js";import{L as ae}from"./index.f904775d.js";import{V as Ie}from"./video-item.589f57ee.js";import ye from"./index.7d22abf0.js";import{u as Ce,a as Se}from"./index.684ca989.js";import{R as Te}from"./index.9fec9f0d.js";import{i as je}from"./icon_teacher.40b6f077.js";import{I as Le,a as De}from"./icon-jiaozi.20e415ca.js";import{u as Ne}from"./hooks.00b5b341.js";import"./index.d8c651bf.js";import"./use-height.8140ea04.js";import"./use-id.f239f36f.js";import"./use-tab-status.e9ba8498.js";import"./use-refs.eb803454.js";import"./plyr.623e6d1e.js";import"./index.bcc8eff6.js";import"./index.cdab6a82.js";import"./utils.5fa3f1eb.js";import"./index.68f32c85.js";import"./index.c42f80e3.js";import"./select-tag.3f6ab952.js";import"./index.3d7e5752.js";import"./index.d92a5aca.js";import"./index.926ca9c5.js";import"./index.c67b3500.js";import"./index.module.7b815a85.js";import"./music.ce788382.js";import"./select-subject.5521b320.js";import"./index.311acfa6.js";import"./icon_uploader.9f387137.js";import"./icon-xin.df8ab2d7.js";import"./icon_album.fa329df6.js";import"./icon_album_active.ce98b2a8.js";import"./icon_exquisite.69e33c80.js";import"./icon_music_active.3b316ab8.js";import"./icon-play.bc9e7aab.js";const we="_bgImg_nb6q8_22",Pe="_bg_nb6q8_22",ke="_teacherHeader_nb6q8_40";var N={"teacher-record":"_teacher-record_nb6q8_1",bgImg:we,bg:Pe,teacherHeader:ke};const xe="_single_1fc0b_1",Be="_introduction_1fc0b_4",Ee="_videoList_1fc0b_10",Fe="_itemBg_1fc0b_16",Ae="_videoItem_1fc0b_25",ze="_video_1fc0b_10",$e="_fansGroup_1fc0b_55",Ge="_fansImage_1fc0b_71",He="_fansTitle_1fc0b_77",Me="_title_1fc0b_83",Oe="_videoGroup_1fc0b_86";var g={single:xe,introduction:Be,videoList:Ee,itemBg:Fe,videoItem:Ae,"icon-upload":"_icon-upload_1fc0b_34",video:ze,fansGroup:$e,fansImage:Ge,fansTitle:He,title:Me,videoGroup:Oe};const Ve="_filterTitle_cir06_1",Ye="_fansGroup_cir06_9",qe="_introduce_cir06_19",Ue="_fansImage_cir06_25",Re="_fansTitle_cir06_31",We="_joinContainer_cir06_37",Je="_joinText_cir06_40";var v={filterTitle:Ve,fansGroup:Ye,introduce:qe,fansImage:Ue,fansTitle:Re,joinContainer:We,joinText:Je};const Xe=t=>{const s=`../images/${t}`;return{"../images/cert_active.png":P,"../images/cert_default.png":k,"../images/follow_bg.png":x,"../images/head_bg.png":B,"../images/icon-chat.png":E,"../images/icon-close.png":F,"../images/icon_fans.png":A,"../images/icon_subject.png":z,"../images/icon_video.png":$,"../images/live_active.png":G,"../images/live_bg.png":H,"../images/live_default.png":M,"../images/music_active.png":O,"../images/music_default.png":V,"../images/teacher-icon.png":Y,"../images/video_active.png":q,"../images/video_default.png":U,"../images/vip_active.png":R,"../images/vip_default.png":W}[s].default};var Ze=I({name:"joinChat",props:{item:{type:Object,default:{}},onClose:{type:Function,default:t=>{}}},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}}),te("\u7533\u8BF7\u6210\u529F"),this.desc="",this.onClose&&this.onClose(this.item.id)}catch{}}},render(){return e(f,null,[e("div",{class:[v.filterTitle,"van-hairline--bottom"]},[n("\u7533\u8BF7\u5165\u7FA4")]),e("div",{class:v.joinContainer},[e(b,{center:!0,class:v.fansGroup,border:!1},{icon:()=>e(h,{src:this.item.img||Xe("icon_fans.png"),fit:"cover",class:v.fansImage},null),title:()=>e("div",{class:v.fansTitle},[e("div",{class:v.title},[this.item.name]),e("p",{class:["van-ellipsis",v.introduce]},[this.item.introduce])])}),e(me,{type:"textarea",class:v.joinText,rows:2,maxlength:200,modelValue:this.desc,"onUpdate:modelValue":t=>this.desc=t,placeholder:"\u8BF7\u586B\u5199\u60A8\u7684\u5165\u7FA4\u7533\u8BF7\uFF0C\u4F1A\u66F4\u5FEB\u7684\u88AB\u901A\u8FC7\u5594\uFF5E"},null)]),e("div",{class:"btnGroup"},[e(y,{type:"primary",block:!0,round:!0,style:{width:"70%",margin:"0 auto"},onClick:this.onJoinChat},{default:()=>[n("\u786E\u8BA4")]})])])}});function Ke(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Z(t)}const ee=t=>{const s=`../images/${t}`;return{"../images/cert_active.png":P,"../images/cert_default.png":k,"../images/follow_bg.png":x,"../images/head_bg.png":B,"../images/icon-chat.png":E,"../images/icon-close.png":F,"../images/icon_fans.png":A,"../images/icon_subject.png":z,"../images/icon_video.png":$,"../images/live_active.png":G,"../images/live_bg.png":H,"../images/live_default.png":M,"../images/music_active.png":O,"../images/music_default.png":V,"../images/teacher-icon.png":Y,"../images/video_active.png":q,"../images/video_default.png":U,"../images/vip_active.png":R,"../images/vip_default.png":W}[s].default};var Qe=I({name:"single",props:{userInfo:{type:Object,default:{}}},data(){const t=this.$route.query;return{videoStatus:!1,chatStatus:!1,teacherId:t.teacherId,fansList:[],chatItem:{},videoItem:{},isAddBrowse:!1}},async mounted(){try{const t=await p.post("/api-student/imGroup/queryTeacherGroup",{data:{type:"FAN",createUserId:this.teacherId}});this.fansList=t.data||[]}catch{}},methods:{async onDetail(t){if(!t.hasWaitAuditFlag&&!t.existFlag){this.chatStatus=!0,this.chatItem=t;return}t.existFlag&&X({api:"joinChatGroup",content:{type:"multi",id:t.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 t;const s=this.userInfo;return e("div",{class:g.single},[s.introduction&&e(J,{icon:"personal",title:"\u4E2A\u4EBA\u4ECB\u7ECD",size:24,border:!1},{default:()=>[e("p",{class:g.introduction},[s.introduction])]}),s.styleVideo&&s.styleVideo.length>0&&e(J,{icon:"elegant",title:"\u8001\u5E08\u98CE\u91C7",size:24,border:!1},{default:()=>[e("div",{class:g.videoList},[s.styleVideo.map(a=>e("div",{class:g.videoItem},[e("div",{class:g.itemBg,onClick:()=>{this.videoStatus=!0,this.isAddBrowse=!0,this.videoItem=a}},null),e(ne,{class:g["icon-upload"],name:ee("icon_video.png"),size:26},null),e(h,{src:a.cover||pe,fit:"cover"},null)]))])]}),this.fansList&&this.fansList.length>0&&e(J,{icon:"fans",title:"\u7C89\u4E1D\u7FA4",size:24,border:!1},Ke(t=this.fansList.map(a=>e(b,{center:!0,class:g.fansGroup,border:!1},{icon:()=>e(h,{src:a.img||ee("icon_fans.png"),fit:"cover",class:g.fansImage},null),title:()=>e("div",{class:g.fansTitle},[e("div",{class:[g.title,"van-ellipsis"]},[a.name]),e("p",{class:"van-ellipsis"},[a.introduce])]),default:()=>e(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":""]})})))?t:{default:()=>[t]}),e(w,{show:this.chatStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.chatStatus=!1},{default:()=>[e(Ze,{item:this.chatItem,onClose:a=>{this.fansList.forEach(l=>{l.id===a&&(l.hasWaitAuditFlag=!0)}),this.chatStatus=!1}},null)]}),e(w,{show:this.videoStatus,round:!0,class:g.videoGroup,closeable:!0,onClose:()=>{this.videoStatus=!1,this.isAddBrowse=!1}},{default:()=>{var a;return[this.videoStatus&&e(he,{playsinline:!0,onPlay:this.onPlay,src:((a=this.videoItem)==null?void 0:a.videoUrl)+"#t=0.1"},null)]}})])}});const et="_practice_xjmim_1",tt="_group_xjmim_5",st="_price_xjmim_10",at="_rTag_xjmim_27",it="_tag_xjmim_30",ot="_selectPopup_xjmim_34",rt="_selectContainer_xjmim_39",nt="_rTitle_xjmim_42",ct="_selectPopupContent_xjmim_45",lt="_desc_xjmim_48",ut="_times_xjmim_49",dt="_selectBtn_xjmim_60",ht="_btn_xjmim_65",mt="_protocol_xjmim_84",pt="_arrangeCell_xjmim_88",gt="_fixedBtn_xjmim_94";var c={practice:et,group:tt,price:st,rTag:at,tag:it,selectPopup:ot,selectContainer:rt,rTitle:nt,selectPopupContent:ct,desc:lt,times:ut,selectBtn:dt,btn:ht,protocol:mt,arrangeCell:pt,fixedBtn:gt},ft=I({name:"practice",props:{userInfo:{type:Object,default:{}}},data(){const t=this.$route.query;return{teacherId:t.teacherId,subjectId:t.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 t;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||((t=S.user.data)==null?void 0:t.subjectId),r=a.find(L=>L.subjectId===Number(l))||a[0],{subjectName:_,subjectPrice:j,courseMinutes:ie,subjectId:oe}=r;this.subjectInfo={subjectPrice:j,courseMinutes:ie,subjectName:_,subjectId:oe},a.forEach(L=>{L.name=L.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")+" "+Q(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){te("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4");return}if(this.selectCourseList.length<this.courseNum){this.selectStatus=!0;return}await this._lookCourse()},async getList(t){var s;try{const a=t||u().add(1,"day").toDate();let l={day:u(a).format("DD"),month:u(a).format("MM"),year:u(a).format("YYYY")};const r=(await p.post("/api-student/courseSchedule/createPracticeCourseCalendar",{data:{...l,studentId:(s=S.user.data)==null?void 0:s.userId,teacherId:this.teacherId}})).data||[];let _={};r.forEach(j=>{_[j.date]=j}),this.calendarList=_,this.calendarStatus=r.length>0}catch{}},onSelectDay(t){const s=t||[];let a=[...this.selectCourseList];s.forEach(o=>{!a.some(_=>_.startTime===o.startTime)&&a.push({...o})});let l=[];a.forEach(o=>{s.some(_=>_.startTime===o.startTime)&&l.push(o)}),l.sort((o,r)=>o.startTime>r.startTime?1:o.startTime<r.startTime?-1:0),console.log(l,"list"),this.selectCourseList=[...l]},onCloseTag(t){D.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===t.startTime);this.selectCourseList.splice(s,1)})},async _lookCourse(t){try{let s=[];this.selectCourseList.forEach(o=>{s.push({startTime:o.startTime,endTime:o.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((o,r)=>{this.coursePlanList[r]={...this.coursePlanList[r],startTime:o.startTime,endTime:o.endTime,classNum:r+1}}),this.coursePlanStatus=!0,this.selectStatus=!0,t&&t()}catch(s){const a=s.message;D.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 t=this.coursePlanStatus;await this._lookCourse(()=>{t&&(this.selectStatus=!1,this.onBuy())})},async onBuy(t){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=u(r.startTime).format("YYYY-MM-DD"),r.title=`${u(r.startTime).format("YYYY-MM-DD")} ${Q(u(r.startTime).day())} ${u(r.startTime).format("HH:mm")}~${u(r.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 o=s.data;o?D.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()=>{be(o,this.routerTo)}).catch(()=>{D.close(),this.cancelPayment(o.orderNo)}):!t&&this.routerTo()}catch{}},routerTo(){this.$router.push({path:"/orderDetail",query:{orderType:"PRACTICE"}})},async cancelPayment(t){try{await p.post("/api-student/userOrder/orderCancel",{data:{orderNo:t}})}catch{}}},render(){return e(f,null,[!this.loadDataStatus&&(this.settingStatus?e(f,null,[e("div",{class:c.practice},[e(se,{class:c.group,border:!1},{default:()=>[this.subjectInfo.subjectPrice>0&&e(b,{title:"\u966A\u7EC3\u8BFE\u6536\u8D39"},{default:()=>e("div",{class:c.price},[e("span",null,[n("\xA5"),this.$filters.moneyFormat(this.subjectInfo.subjectPrice)]),n("/"),this.subjectInfo.courseMinutes,n("\u5206\u949F")])}),e(b,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:this.subjectInfo.subjectName,onClick:()=>this.subjectStatus=!0},null),e(b,{title:"\u8BFE\u65F6\u6570"},{default:()=>e(_e,{modelValue:this.courseNum,"onUpdate:modelValue":t=>this.courseNum=t,theme:"round",max:12,min:1,buttonSize:22,onChange:()=>{this.selectCourseList=[]}},null)})]}),this.calendarStatus&&e("div",{class:c.group},[e(ge,{selectList:this.selectCourseList,list:this.calendarList,maxDays:this.courseNum,nextMonth:t=>this.getList(t),prevMonth:t=>this.getList(t),selectDay:this.onSelectDay,calendarDate:this.calendarDate,"onUpdate:calendarDate":t=>this.calendarDate=t},null)]),e(b,{class:[c.arrangeCell]},{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(f,null,[e(ve,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:c.tag,onClose:()=>this.onCloseTag(t)},{default:()=>[t.title]}),e("br",null,null)]))])}),e(w,{show:this.selectStatus,class:c.selectPopup},{default:()=>[e("div",{class:c.selectContainer},[e("div",{class:c.rTitle},[e("span",null,[n("\u63D0\u793A")])]),e("div",{class:c.selectPopupContent},[e("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&&e("p",{class:c.times},[this.coursePlanList.map(t=>e("span",null,[u(t.startTime||new Date).format("YYYY-MM-DD")," ",u(t.startTime||new Date).format("HH:mm"),n("~"),u(t.endTime||new Date).format("HH:mm")]))])]),e("div",{class:c.selectBtn},[e(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"]}),e(y,{class:c.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[n("\u786E\u8BA4")]})])])]}),e(fe,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:t=>{const{subjectName:s,subjectPrice:a,courseMinutes:l,subjectId:o}=t;this.subjectInfo={subjectPrice:a,courseMinutes:l,subjectName:s,subjectId:o},this.subjectStatus=!1}},null)]),e("div",{class:["btnGroup",c.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[e(y,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[n("\u786E\u8BA4\u7EA6\u8BFE")]})])]):e(K,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u966A\u7EC3\u8BFE"},null))])}});const _t="_liveList_zp23z_1",vt="_liCover_zp23z_4",bt="_liContent_zp23z_10",It="_liTitle_zp23z_17",yt="_buyNum_zp23z_25",Ct="_num_zp23z_26",St="_price_zp23z_30",Tt="_priceNum_zp23z_34",jt="_label_zp23z_43",Lt="_liveGroup_zp23z_46",Dt="_subjectName_zp23z_51",Nt="_timerString_zp23z_62";var m={liveList:_t,liCover:vt,liContent:bt,liTitle:It,buyNum:yt,num:Ct,price:St,priceNum:Tt,label:jt,liveGroup:Lt,subjectName:Dt,timerString:Nt};function wt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Z(t)}var Pt=I({name:"live",data(){const t=this.$route.query;return{list:[],dataShow:!0,loading:!1,finished:!1,params:{teacherId:t.teacherId,groupStatus:"APPLY",page:1,rows:20}}},mounted(){this.getList()},methods:{formatTime(t){let s=u(t||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 t={...this.params};S.version&&(t.version=S.version||"",t.platform="ios-student");const s=await p.post("/api-student/courseGroup/queryPageCourseGroup",{data:{...t}});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(t){this.$router.push({path:"/liveDetail",query:{groupId:t.courseGroupId}})}},render(){let t;return e(f,null,[this.dataShow?e(ae,{class:m.liveList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},wt(t=this.list.map(s=>e(se,{class:m.liveGroup,border:!1,onClick:()=>this.onDetail(s)},{default:()=>[e(b,{style:{paddingTop:"19px",paddingBottom:"19px"}},{icon:()=>e("div",{style:{position:"relative",lineHeight:"0"}},[e(h,{class:m.liCover,src:s.backgroundPic,fit:"cover"},null),e("span",{class:m.subjectName},[s==null?void 0:s.subjectName])]),title:()=>e("div",{class:m.liContent},[e("div",{class:[m.liTitle,"van-ellipsis"]},[s.courseGroupName]),e("div",{class:m.price},[s.coursePrice>0&&e(f,null,[e("span",{class:m.priceNum},[e("i",null,[n("\xA5")]),this.$filters.moneyFormat(s.coursePrice)])]),e("span",{class:m.label},[s.coursePrice>0&&"/",s.courseNum,n("\u8BFE\u65F6")])])])}),e(b,{titleStyle:{color:"#666666",fontSize:"13px"}},{title:()=>e("span",{class:m.timerString},[this.formatTime(s.salesStartDate)]),default:()=>e("div",null,[s.existBuy===1?e("span",{class:m.buyNum},[n("\u5DF2\u8D2D\u4E70")]):e("span",{class:m.num},[s.studentCount,n("\u4EBA\u5DF2\u8D2D\u4E70")])])})]})))?t:{default:()=>[t]}):e(K,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const kt="_videoList_1yf9v_1";var xt={videoList:kt};function Bt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Z(t)}var Et=I({name:"VideoList",data(){const t=this.$route.query;return{list:[],dataShow:!0,loading:!1,finished:!1,params:{teacherId:t.teacherId,page:1,rows:20}}},mounted(){this.getList()},methods:{async getList(){try{const t={...this.params};S.version&&(t.version=S.version||"",t.platform="ios-student");const s=await p.post("/api-student/videoLesson/selectGroup",{data:{...t}});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(t){this.$router.push({path:"/videoDetail",query:{groupId:t.id}})}},render(){let t;return e(f,null,[this.dataShow?e(ae,{class:xt.videoList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},Bt(t=this.list.map(s=>e(Ie,{item:s,onClick:this.onDetail},null)))?t:{default:()=>[t]}):e(K,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}}),Ft=I({name:"music",data(){return{teacherId:this.$route.query.teacherId,list:[],dataShow:!1,loading:!1,finished:!1,params:{page:1,rows:20}}},methods:{onItemClick(t){this.$router.push({path:"/music-detail",query:{id:t.id}})}},render(){return e(f,null,[e(ye,{hideSearch:!0,myself:!0,onItemClick:this.onItemClick,teacherId:this.teacherId},null)])}});const d=t=>{const s=`../images/${t}`;return{"../images/cert_active.png":P,"../images/cert_default.png":k,"../images/follow_bg.png":x,"../images/head_bg.png":B,"../images/icon-chat.png":E,"../images/icon-close.png":F,"../images/icon_fans.png":A,"../images/icon_subject.png":z,"../images/icon_video.png":$,"../images/live_active.png":G,"../images/live_bg.png":H,"../images/live_default.png":M,"../images/music_active.png":O,"../images/music_default.png":V,"../images/teacher-icon.png":Y,"../images/video_active.png":q,"../images/video_default.png":U,"../images/vip_active.png":R,"../images/vip_default.png":W}[s].default};var At=I({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:t}=this.userInfo;return Number(t)||0}},methods:{async onStart(){try{const t=this.userInfo.isStar?0:1;await p.get("/api-student/teacher/starOrUnStar",{params:{userId:this.teacherId,starStatus:t}}),this.userInfo.isStar=t;let s=t?this.userInfo.fansNum+1:this.userInfo.fansNum-1;this.userInfo.fansNum=s<=0?0:s}catch{}},checkBadge(t){let s=!1;const{userInfo:a}=this;switch(t){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":a.tag&&(s=a.tag.indexOf(t)>-1);break;case"VIP":s=a.isVip>0;break;default:s=!1;break}return s},openTeacherIcon(){this.iconShow=!0}},render(){const t=[{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 e(f,null,[e("div",{class:i.headerContent},[e("div",{class:i.headerCount},[e("div",{class:i.teacherContent},[e("div",{class:i.teacherIcon,onClick:()=>{this.userInfo.liveing===1&&X({api:"joinLiveRoom",content:{roomId:this.userInfo.roomUid,teacherId:this.userInfo.userId}})}},[e(h,{class:[i.avatar,this.checkBadge("VIP")&&i.avatarActive],round:!0,src:this.userInfo.heardUrl||je,fit:"cover"},null),this.userInfo.liveing===1&&e("p",{class:i.liveTag},[n("\u76F4\u64AD\u4E2D")]),e(h,{class:i.teacherIconVip,src:this.checkBadge("VIP")?d("vip_active.png"):d("vip_default.png")},null)]),e("div",{class:i.teacherOperation},[e(y,{type:"primary",size:"small",plain:!0,round:!0,class:[i.btn,this.userInfo.isStar?i.btnStar:""],onClick:this.onStart},{default:()=>[this.userInfo.isStar?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]}),e(y,{type:"primary",size:"small",round:!0,style:{marginLeft:"5px"},class:i.btn,icon:re,onClick:()=>{X({api:"joinChatGroup",content:{type:"single",id:this.userInfo.imUserId}})}},{default:()=>[n("\u804A\u5929")]})])]),e("div",{class:i.teacherInfo},[e("div",{class:i.teacherInfoName},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.userId||""}`]),this.userInfo.degreeFlag?e("img",{src:Le},null):null,this.userInfo.teacherFlag?e("img",{src:De},null):null]),e("div",{class:i.teacherHonor},[e("div",null,[n("\u52CB\u7AE0\uFF1A")]),e("div",{class:i.teacherIcons,onClick:this.openTeacherIcon},[e(h,{class:i.iconOther,src:this.checkBadge("STYLE")?d("cert_active.png"):d("cert_default.png")},null),e(h,{class:i.iconOther,src:this.checkBadge("VIDEO")?d("video_active.png"):d("video_default.png")},null),e(h,{class:i.iconOther,src:this.checkBadge("LIVE")?d("live_active.png"):d("live_default.png")},null),e(h,{class:i.iconOther,src:this.checkBadge("MUSIC")?d("music_active.png"):d("music_default.png")},null)]),e("div",{class:i.score},[n("\u8BC4\u5206\uFF1A")]),e("div",{class:i.level},[this.starGrade?e(Te,{readonly:!0,modelValue:this.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):e("span",{style:{fontSize:"12px",color:"#999999"}},[n("\u6682\u65E0\u8BC4\u5206")])])]),e("div",{class:i.piNameSubject},[e(h,{class:i.subjectSection,src:d("icon_subject.png"),fit:"contain"},null),e("div",{class:i.subjectList},[this.subjectNameList.map(s=>e("span",{class:i.subject},[s]))])]),e("div",{class:i["teacher-bottom"]},[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(w,{class:i.teaherPopup,show:this.iconShow,"onUpdate:show":s=>this.iconShow=s},{default:()=>[e(h,{src:d("teacher-icon.png")},null),e("div",{class:i.teacherIconWrap},[t.map(s=>e("div",{class:i.teacherIconItem},[e("div",{class:i.teacherIconItemTop},[e(h,{src:d(s.icon)},null),e("div",{class:i.teacherIconTitle},[s.title])]),e("div",{class:i.teacherIconDes},[s.des])]))]),e(h,{onClick:()=>this.iconShow=!1,class:i.closeIcon,src:d("icon-close.png")},null)]})])}});const zs=t=>{const s=`./images/${t}`;return{"./images/cert_active.png":P,"./images/cert_default.png":k,"./images/follow_bg.png":x,"./images/head_bg.png":B,"./images/icon-chat.png":E,"./images/icon-close.png":F,"./images/icon_fans.png":A,"./images/icon_subject.png":z,"./images/icon_video.png":$,"./images/live_active.png":G,"./images/live_bg.png":H,"./images/live_default.png":M,"./images/music_active.png":O,"./images/music_default.png":V,"./images/teacher-icon.png":Y,"./images/video_active.png":q,"./images/video_default.png":U,"./images/vip_active.png":R,"./images/vip_default.png":W}[s].default};var $s=I({name:"teacherHome",data(){const t=sessionStorage.getItem("teacherHomeTabs")||"",s=this.$route.query;return{teacherId:s.teacherId,tabs:t||s.tabs||"single",userInfo:{},background:"rgba(55, 205, 177, 0)",headColor:"#fff",height:"auto",backIconColor:"white",homeContaiterHeight:""}},async created(){},async mounted(){this.getTeacherDetail(),ce("webViewOnResume",()=>{this.getTeacherDetail()}),Ce(document,"scroll",t=>{const{y:s}=Se();s.value>52?(this.headColor="#000",this.background="#fff",this.backIconColor="black"):(this.background="transparent",this.headColor="#fff",this.backIconColor="white")}),Ne("\u8FBE\u4EBA\u98CE\u91C7")},methods:{async getTeacherDetail(){try{const t=await p.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=t.data}catch{}}},render(){return e("div",{class:N["teacher-record"]},[e("div",{ref:"headers"},[e(ue,{background:this.background,border:!1,color:this.headColor,backIconColor:this.backIconColor,onHeaderBack:()=>{this.$nextTick(()=>{const{height:t}=le(this.$refs.headers);this.height=t})}},null)]),e("img",{class:N.bgImg,src:this.userInfo.heardUrl},null),e("div",{class:N.bg},null),e("div",{class:N.teacherHeader},[e(At,{userInfo:this.userInfo,teacherId:this.teacherId},null)]),e(de,{color:"var(--van-primary)",background:"#f8f9fc",shrink:!0,lineWidth:20,sticky:!0,offsetTop:this.height,active:this.tabs,"onUpdate:active":t=>this.tabs=t,onChange:()=>{sessionStorage.setItem("teacherHomeTabs",this.tabs)}},{default:()=>[e(T,{title:"\u4E2A\u4EBA\u98CE\u91C7",name:"single"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="single"&&e(Qe,{userInfo:this.userInfo},null)])]}),e(T,{title:"\u966A\u7EC3\u8BFE",name:"practice"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="practice"&&e(ft,{userInfo:this.userInfo},null)])]}),e(T,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="live"&&e(Pt,null,null)])]}),e(T,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="video"&&e(Et,null,null)])]}),e(T,{title:"\u4E50\u8C31",name:"music"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="music"&&e(Ft,null,null)])]})]})])}});export{$s as default,zs as getAssetsHomeFile};
|