1 |
- import{_ as k,a as D,b as x,c as B,d as E,e as A,f as F,g as $,h as z,i as G,j as H,k as V,l as M,m as O,n as Y,o as q,p as U,q as R,r as W,s as J,t as i,I as ne}from"./teacher-header.module.efb16aa2.js";import{d as I,y as p,T as se,j as e,A as n,B as y,F as f,n as K,N as ce,aS as w,$ as Q,w as u,g as S,bd as ee,D as N,C as Z,b5 as le,Y as ue}from"./ResizeObserver.es.f28023e0.js";import{C as de}from"./index.bd375ca9.js";import"./index.b0753b8c.js";import"./index.966d1893.js";import{T as he,a as T}from"./index.aa87c0e3.js";import{S as X}from"./index.07a2a95f.js";import{C as me}from"./index.070305bf.js";import{C as b}from"./index.3b2e70c8.js";import{I as h}from"./index.7a1af785.js";import{F as pe}from"./index.975e8f79.js";import{i as ge}from"./icon_upload_poster.81da3a98.js";import{C as fe}from"./index.6368a0f3.js";import{A as _e}from"./index.f1def79c.js";import{C as ae}from"./index.2a22730e.js";import{S as ve}from"./index.7e7497a9.js";import{T as be}from"./index.af901340.js";import{o as C}from"./orderStatus.00354bd8.js";import{t as Ie}from"./tradeOrder.02449ce4.js";import{L as ie}from"./index.79f59946.js";import{V as ye}from"./video-item.a497b6e6.js";import Ce from"./index.7ce263ff.js";import{a as Se,b as Te}from"./index.9a41251d.js";import{R as je}from"./index.0874dacb.js";import{i as Le}from"./icon_teacher.40b6f077.js";import{I as Ne,a as Pe}from"./icon-jiaozi.20e415ca.js";import{u as we}from"./hooks.19957bf3.js";import"./use-id.cc14bbe9.js";import"./use-tab-status.653933d8.js";import"./use-refs.b4f9d723.js";/* empty css */import"./tcplayer.v4.8.0.min.97e1acba.js";/* empty css */import"./index.c6c54752.js";import"./index.a7d88791.js";import"./utils.6e3cf8f8.js";import"./index.eb1d9d01.js";import"./index.8b5ee282.js";import"./index.22776016.js";import"./select-tag.89981fc2.js";import"./index.b5553db8.js";import"./index.49ee134a.js";import"./index.926ca9c5.js";import"./index.3bbba552.js";import"./music.96a1c334.js";import"./select-subject.c9c8869a.js";import"./index.9f739f31.js";import"./icon_uploader.5826c51d.js";import"./icon-xin.575e2987.js";import"./icon_album.eca1da54.js";import"./icon_album_active.a67a159e.js";import"./icon_exquisite.7cf228c5.js";import"./icon_music_active.5a84cf57.js";import"./icon-play.bc9e7aab.js";import"./index.787d69a0.js";const ke="_bgImg_nb6q8_22",De="_bg_nb6q8_22",xe="_teacherHeader_nb6q8_40";var P={"teacher-record":"_teacher-record_nb6q8_1",bgImg:ke,bg:De,teacherHeader:xe};const Be="_single_14o39_1",Ee="_introduction_14o39_4",Ae="_videoList_14o39_10",Fe="_itemBg_14o39_16",$e="_videoItem_14o39_25",ze="_video_14o39_10",Ge="_fansGroup_14o39_55",He="_fansImage_14o39_71",Ve="_fansTitle_14o39_77",Me="_title_14o39_83",Oe="_videoGroup_14o39_86";var g={single:Be,introduction:Ee,videoList:Ae,itemBg:Fe,videoItem:$e,"icon-upload":"_icon-upload_14o39_34",video:ze,fansGroup:Ge,fansImage:He,fansTitle:Ve,title:Me,videoGroup:Oe};const Ye="_filterTitle_cir06_1",qe="_fansGroup_cir06_9",Ue="_introduce_cir06_19",Re="_fansImage_cir06_25",We="_fansTitle_cir06_31",Je="_joinContainer_cir06_37",Xe="_joinText_cir06_40";var v={filterTitle:Ye,fansGroup:qe,introduce:Ue,fansImage:Re,fansTitle:We,joinContainer:Je,joinText:Xe};const Ke=t=>{const s=`../images/${t}`;return{"../images/cert_active.png":k,"../images/cert_default.png":D,"../images/follow_bg.png":x,"../images/head_bg.png":B,"../images/icon-chat.png":E,"../images/icon-close.png":A,"../images/icon_fans.png":F,"../images/icon_subject.png":$,"../images/icon_video.png":z,"../images/live_active.png":G,"../images/live_bg.png":H,"../images/live_default.png":V,"../images/music_active.png":M,"../images/music_default.png":O,"../images/svip_active.png":Y,"../images/teacher-icon.png":q,"../images/video_active.png":U,"../images/video_default.png":R,"../images/vip_active.png":W,"../images/vip_default.png":J}[s].default};var Qe=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}}),se("\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||Ke("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(pe,{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 Ze(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Q(t)}const te=t=>{const s=`../images/${t}`;return{"../images/cert_active.png":k,"../images/cert_default.png":D,"../images/follow_bg.png":x,"../images/head_bg.png":B,"../images/icon-chat.png":E,"../images/icon-close.png":A,"../images/icon_fans.png":F,"../images/icon_subject.png":$,"../images/icon_video.png":z,"../images/live_active.png":G,"../images/live_bg.png":H,"../images/live_default.png":V,"../images/music_active.png":M,"../images/music_default.png":O,"../images/svip_active.png":Y,"../images/teacher-icon.png":q,"../images/video_active.png":U,"../images/video_default.png":R,"../images/vip_active.png":W,"../images/vip_default.png":J}[s].default};var et=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&&K({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(X,{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(X,{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(ce,{class:g["icon-upload"],name:te("icon_video.png"),size:26},null),e(h,{src:a.cover||ge,fit:"cover"},null)]))])]}),this.fansList&&this.fansList.length>0&&e(X,{icon:"fans",title:"\u7C89\u4E1D\u7FA4",size:24,border:!1},Ze(t=this.fansList.map(a=>e(b,{center:!0,class:g.fansGroup,border:!1},{icon:()=>e(h,{src:a.img||te("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(Qe,{item:this.chatItem,onClose:a=>{this.fansList.forEach(c=>{c.id===a&&(c.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(me,{playsinline:!0,onPlay:this.onPlay,src:(a=this.videoItem)==null?void 0:a.videoUrl},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",gt="_arrangeCell_xjmim_88",ft="_fixedBtn_xjmim_94";var l={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:gt,fixedBtn:ft},_t=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 c=this.subjectId||((t=S.user.data)==null?void 0:t.subjectId),r=a.find(L=>L.subjectId===Number(c))||a[0],{subjectName:_,subjectPrice:j,courseMinutes:oe,subjectId:re}=r;this.subjectInfo={subjectPrice:j,courseMinutes:oe,subjectName:_,subjectId:re},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")+" "+ee(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(t){var s;try{const a=t||u().add(1,"day").toDate();let c={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:{...c,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 c=[];a.forEach(o=>{s.some(_=>_.startTime===o.startTime)&&c.push(o)}),c.sort((o,r)=>o.startTime>r.startTime?1:o.startTime<r.startTime?-1:0),console.log(c,"list"),this.selectCourseList=[...c]},onCloseTag(t){N.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;N.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,c=[...this.coursePlanList];c.forEach(r=>{r.classDate=u(r.startTime).format("YYYY-MM-DD"),r.title=`${u(r.startTime).format("YYYY-MM-DD")} ${ee(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:c}];const o=s.data;o?N.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()=>{Ie(o,this.routerTo)}).catch(()=>{N.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:l.practice},[e(ae,{class:l.group,border:!1},{default:()=>[this.subjectInfo.subjectPrice>0&&e(b,{title:"\u966A\u7EC3\u8BFE\u6536\u8D39"},{default:()=>e("div",{class:l.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(ve,{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:l.group},[e(fe,{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:[l.arrangeCell]},{title:()=>e("div",{class:l.rTitle},[e("span",null,[n("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>e("div",{class:l.rTag},[this.showSelectList.map(t=>e(f,null,[e(be,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:l.tag,onClose:()=>this.onCloseTag(t)},{default:()=>[t.title]}),e("br",null,null)]))])}),e(w,{show:this.selectStatus,class:l.selectPopup},{default:()=>[e("div",{class:l.selectContainer},[e("div",{class:l.rTitle},[e("span",null,[n("\u63D0\u793A")])]),e("div",{class:l.selectPopupContent},[e("p",{class:l.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:l.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:l.selectBtn},[e(y,{class:l.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:l.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[n("\u786E\u8BA4")]})])])]}),e(_e,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:t=>{const{subjectName:s,subjectPrice:a,courseMinutes:c,subjectId:o}=t;this.subjectInfo={subjectPrice:a,courseMinutes:c,subjectName:s,subjectId:o},this.subjectStatus=!1}},null)]),e("div",{class:["btnGroup",l.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[e(y,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[n("\u786E\u8BA4\u7EA6\u8BFE")]})])]):e(Z,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u966A\u7EC3\u8BFE"},null))])}});const vt="_liveList_zp23z_1",bt="_liCover_zp23z_4",It="_liContent_zp23z_10",yt="_liTitle_zp23z_17",Ct="_buyNum_zp23z_25",St="_num_zp23z_26",Tt="_price_zp23z_30",jt="_priceNum_zp23z_34",Lt="_label_zp23z_43",Nt="_liveGroup_zp23z_46",Pt="_subjectName_zp23z_51",wt="_timerString_zp23z_62";var m={liveList:vt,liCover:bt,liContent:It,liTitle:yt,buyNum:Ct,num:St,price:Tt,priceNum:jt,label:Lt,liveGroup:Nt,subjectName:Pt,timerString:wt};function kt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Q(t)}var Dt=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){const s=u(t||new Date),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(ie,{class:m.liveList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},kt(t=this.list.map(s=>e(ae,{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("\u5B66\u4E60")]):e("span",{class:m.num},[s.studentCount,n("\u4EBA\u5B66\u4E60")])])})]})))?t:{default:()=>[t]}):e(Z,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const xt="_videoList_1yf9v_1";var Bt={videoList:xt};function Et(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Q(t)}var At=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(ie,{class:Bt.videoList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},Et(t=this.list.map(s=>e(ye,{item:s,onClick:this.onDetail},null)))?t:{default:()=>[t]}):e(Z,{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(Ce,{hideSearch:!0,myself:!0,onItemClick:this.onItemClick,teacherId:this.teacherId},null)])}});const d=t=>{const s=`../images/${t}`;return{"../images/cert_active.png":k,"../images/cert_default.png":D,"../images/follow_bg.png":x,"../images/head_bg.png":B,"../images/icon-chat.png":E,"../images/icon-close.png":A,"../images/icon_fans.png":F,"../images/icon_subject.png":$,"../images/icon_video.png":z,"../images/live_active.png":G,"../images/live_bg.png":H,"../images/live_default.png":V,"../images/music_active.png":M,"../images/music_default.png":O,"../images/svip_active.png":Y,"../images/teacher-icon.png":q,"../images/video_active.png":U,"../images/video_default.png":R,"../images/vip_active.png":W,"../images/vip_default.png":J}[s].default};var $t=I({name:"teacher-header",props:{userInfo:{type:Object,default:()=>({})},teacherId:{type:String||Number,default:""}},emits:["star"],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}});const s=t?this.userInfo.fansNum+1:this.userInfo.fansNum-1;this.$emit("star",{isStar:t,fansNum:s<=0?0:s})}catch{}},checkBadge(t){var c,o,r;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=((c=a.userVip)==null?void 0:c.vipType)==="VIP";break;case"SVIP":s=((o=a.userVip)==null?void 0:o.vipType)==="SVIP"||((r=a.userVip)==null?void 0:r.vipType)==="PERMANENT_SVIP";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&&K({api:"joinLiveRoom",content:{roomId:this.userInfo.roomUid,teacherId:this.userInfo.userId}})}},[e(h,{class:[i.avatar,(this.checkBadge("SVIP")||this.checkBadge("VIP"))&&i.avatarActive],round:!0,src:this.userInfo.heardUrl||Le,fit:"cover"},null),this.userInfo.liveing===1&&e("p",{class:i.liveTag},[n("\u76F4\u64AD\u4E2D")]),(this.checkBadge("SVIP")||this.checkBadge("VIP"))&&e(h,{class:i.teacherIconVip,src:this.checkBadge("SVIP")?d("svip_active.png"):this.checkBadge("VIP")?d("vip_active.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:ne,onClick:()=>{K({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:Ne},null):null,this.userInfo.teacherFlag?e("img",{src:Pe},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(je,{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 Gs=t=>{const s=`./images/${t}`;return{"./images/cert_active.png":k,"./images/cert_default.png":D,"./images/follow_bg.png":x,"./images/head_bg.png":B,"./images/icon-chat.png":E,"./images/icon-close.png":A,"./images/icon_fans.png":F,"./images/icon_subject.png":$,"./images/icon_video.png":z,"./images/live_active.png":G,"./images/live_bg.png":H,"./images/live_default.png":V,"./images/music_active.png":M,"./images/music_default.png":O,"./images/svip_active.png":Y,"./images/teacher-icon.png":q,"./images/video_active.png":U,"./images/video_default.png":R,"./images/vip_active.png":W,"./images/vip_default.png":J}[s].default};var Hs=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(),le("webViewOnResume",()=>{this.getTeacherDetail()}),Se(document,"scroll",t=>{const{y:s}=Te();s.value>52?(this.headColor="#000",this.background="#fff",this.backIconColor="black"):(this.background="transparent",this.headColor="#fff",this.backIconColor="white")}),we("\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:P["teacher-record"]},[e("div",{ref:"headers"},[e(de,{background:this.background,border:!1,color:this.headColor,backIconColor:this.backIconColor,onHeaderBack:()=>{this.$nextTick(()=>{const{height:t}=ue(this.$refs.headers);this.height=t})}},null)]),e("img",{class:P.bgImg,src:this.userInfo.heardUrl},null),e("div",{class:P.bg},null),e("div",{class:P.teacherHeader},[e($t,{userInfo:this.userInfo,teacherId:this.teacherId,onStar:t=>{this.userInfo.isStar=t.isStar,this.userInfo.fansNum=t.fansNum}},null)]),e(he,{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(et,{userInfo:this.userInfo},null)])]}),e(T,{title:"\u966A\u7EC3\u8BFE",name:"practice"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="practice"&&e(_t,{userInfo:this.userInfo},null)])]}),e(T,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="live"&&e(Dt,null,null)])]}),e(T,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="video"&&e(At,null,null)])]}),e(T,{title:"\u4E50\u8C31",name:"music"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="music"&&e(Ft,null,null)])]})]})])}});export{Hs as default,Gs as getAssetsHomeFile};
|