1 |
- var X=Object.defineProperty,Z=Object.defineProperties;var ee=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var O=(t,s,a)=>s in t?X(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,y=(t,s)=>{for(var a in s||(s={}))te.call(s,a)&&O(t,a,s[a]);if(M)for(var a of M(s))se.call(s,a)&&O(t,a,s[a]);return t},A=(t,s)=>Z(t,ee(s));import{_ as L,a as w,b as D,c as N,d as P,e as k,s as n}from"./teacher-header.module.f4968209.js";import{C as ae}from"./index.bd345f92.js";import{d as _,T as H,a as e,F as b,j as r,q as p,I as f,m as ie,B as I,u as C,x as $,P as B,g as u,D as F,C as Y,O as re,z as oe,A as ne,w as z,t as ce,v as le,G as ue,H as S}from"./vendor.def6ee74.js";/* empty css *//* empty css *//* empty css */import{S as E}from"./index.53a15658.js";import{C as de}from"./index.081a1ee9.js";import{r as d,p as G,s as U,k as V,C as q,l as he}from"./index.7f5ed133.js";/* empty css *//* empty css *//* empty css */import{C as me}from"./index.ae0e18e1.js";/* empty css *//* empty css *//* empty css *//* empty css */import{o as j}from"./orderStatus.0381a88d.js";import{t as pe}from"./tradeOrder.eb0ad28c.js";/* empty css */import{i as fe}from"./icon_timer2.563d016a.js";import{i as R}from"./icon_teacher.40b6f077.js";import{i as ge}from"./icon_success.e258b59c.js";import{V as _e}from"./video-item.2405f641.js";import be from"./index.8e9fbcf7.js";import{m as ve}from"./music.f876d3f5.js";import{u as Ie,a as ye}from"./index.00c3cfa1.js";/* empty css */import{t as je,m as Ce}from"./teacher_cert.5c45c8b4.js";/* empty css */import"./index.376fb8f6.js";import"./index.49db5262.js";import"./select-tag.f4d7c9a8.js";/* empty css *//* empty css */import"./index.926ca9c5.js";import"./init-user-icon.d5c3c464.js";import"./favorite.9bdf4305.js";const Se="_teacherHeader_1ssti_19";var W={"teacher-record":"_teacher-record_1ssti_1",teacherHeader:Se};const Te="_single_14ksn_1",xe="_introduction_14ksn_4",Le="_videoList_14ksn_10",we="_itemBg_14ksn_16",De="_videoItem_14ksn_25",Ne="_video_14ksn_10",Pe="_fansGroup_14ksn_55",ke="_fansImage_14ksn_71",Fe="_fansTitle_14ksn_77",Ae="_videoGroup_14ksn_83";var m={single:Te,introduction:xe,videoList:Le,itemBg:we,videoItem:De,"icon-upload":"_icon-upload_14ksn_34",video:Ne,fansGroup:Pe,fansImage:ke,fansTitle:Fe,videoGroup:Ae};const $e="_filterTitle_cir06_1",Be="_fansGroup_cir06_9",Ee="_introduce_cir06_19",Ge="_fansImage_cir06_25",qe="_fansTitle_cir06_31",Me="_joinContainer_cir06_37",Oe="_joinText_cir06_40";var v={filterTitle:$e,fansGroup:Be,introduce:Ee,fansImage:Ge,fansTitle:qe,joinContainer:Me,joinText:Oe};const He=t=>{const s=`../images/${t}`;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 Ye=_({name:"joinChat",props:{item:{type:Object,default:{}},onClose:{type:Function,default:t=>{}}},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}}),H("\u7533\u8BF7\u6210\u529F"),this.desc="",this.onClose&&this.onClose(this.item.id)}catch{}}},render(){return e(b,null,[e("div",{class:[v.filterTitle,"van-hairline--bottom"]},[r("\u7533\u8BF7\u5165\u7FA4")]),e("div",{class:v.joinContainer},[e(p,{center:!0,class:v.fansGroup,border:!1},{icon:()=>e(f,{src:this.item.img||He("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(ie,{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(I,{type:"primary",block:!0,round:!0,style:{width:"70%",margin:"0 auto"},onClick:this.onJoinChat},{default:()=>[r("\u786E\u8BA4")]})])])}}),ze="./assets/icon_upload_poster.67e87476.png";function Ue(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!$(t)}const J=t=>{const s=`../images/${t}`;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 Ve=_({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 d.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&&G({api:"joinChatGroup",content:{type:"multi",id:t.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 t;const s=this.userInfo;return e("div",{class:m.single},[e(E,{icon:"personal",title:"\u4E2A\u4EBA\u98CE\u91C7",size:24,border:!1},{default:()=>[e("p",{class:m.introduction},[s.introduction])]}),s.styleVideo&&s.styleVideo.length>0&&e(E,{icon:"elegant",title:"\u8001\u5E08\u98CE\u91C7",size:24,border:!1},{default:()=>[e("div",{class:m.videoList},[s.styleVideo.map(a=>e("div",{class:m.videoItem},[e("div",{class:m.itemBg,onClick:()=>{this.videoStatus=!0,this.isAddBrowse=!0,this.videoItem=a}},null),e(C,{class:m["icon-upload"],name:J("icon_video.png"),size:26},null),e(f,{src:ze,fit:"cover"},null)]))])]}),this.fansList&&this.fansList.length>0&&e(E,{icon:"fans",title:"\u7C89\u4E1D\u7FA4",size:24,border:!1},Ue(t=this.fansList.map(a=>e(p,{center:!0,class:m.fansGroup},{icon:()=>e(f,{src:a.img||J("icon_fans.png"),fit:"cover",class:m.fansImage},null),title:()=>e("div",{class:m.fansTitle},[e("div",{class:m.title},[a.name]),e("p",{class:"van-ellipsis"},[a.introduce])]),default:()=>e(I,{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(B,{show:this.chatStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.chatStatus=!1},{default:()=>[e(Ye,{item:this.chatItem,onClose:a=>{this.fansList.forEach(i=>{i.id===a&&(i.hasWaitAuditFlag=!0)}),this.chatStatus=!1}},null)]}),e(B,{show:this.videoStatus,round:!0,class:m.videoGroup,closeable:!0,onClose:()=>{this.videoStatus=!1,this.isAddBrowse=!1}},{default:()=>{var a;return[this.videoStatus&&e(de,{playsinline:!0,onPlay:this.onPlay,src:((a=this.videoItem)==null?void 0:a.videoUrl)+"#t=0.1"},null)]}})])}});const Re="_practice_xjmim_1",We="_group_xjmim_5",Je="_price_xjmim_10",Ke="_rTag_xjmim_27",Qe="_tag_xjmim_30",Xe="_selectPopup_xjmim_34",Ze="_selectContainer_xjmim_39",et="_rTitle_xjmim_42",tt="_selectPopupContent_xjmim_45",st="_desc_xjmim_48",at="_times_xjmim_49",it="_selectBtn_xjmim_60",rt="_btn_xjmim_65",ot="_protocol_xjmim_84",nt="_arrangeCell_xjmim_88",ct="_fixedBtn_xjmim_94";var l={practice:Re,group:We,price:Je,rTag:Ke,tag:Qe,selectPopup:Xe,selectContainer:Ze,rTitle:et,selectPopupContent:tt,desc:st,times:at,selectBtn:it,btn:rt,protocol:ot,arrangeCell:nt,fixedBtn:ct},lt=_({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 d.get("/api-student/courseSchedule/getTeacherSubjectPrice",{params:{teacherId:this.teacherId}});this.loadDataStatus=!1;const a=s.data||[];if(a.length>0){const i=this.subjectId||((t=U.user.data)==null?void 0:t.subjectId),o=a.find(x=>x.subjectId===Number(i))||a[0],{subjectName:g,subjectPrice:T,courseMinutes:K,subjectId:Q}=o;this.subjectInfo={subjectPrice:T,courseMinutes:K,subjectName:g,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){H("\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 i={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:A(y({},i),{studentId:(s=U.user.data)==null?void 0:s.userId,teacherId:this.teacherId})})).data||[];let g={};o.forEach(T=>{g[T.date]=T}),this.calendarList=g,this.calendarStatus=o.length>0}catch{}},onSelectDay(t){const s=t||[];let a=[...this.selectCourseList];s.forEach(i=>{!a.some(o=>o.startTime===i.startTime)&&a.push(y({},i))}),a.forEach(i=>{const c=s.some(g=>g.startTime===i.startTime),o=s.findIndex(g=>g.startTime===i.startTime);!c&&a.splice(o,1)}),a.sort((i,c)=>i.startTime>c.startTime?1:i.startTime<c.startTime?-1:0),this.selectCourseList=[...a]},onCloseTag(t){F.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(c=>{s.push({startTime:c.startTime,endTime:c.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((c,o)=>{this.coursePlanList[o]=A(y({},this.coursePlanList[o]),{startTime:c.startTime,endTime:c.endTime,classNum:o+1})}),this.coursePlanStatus=!0,this.selectStatus=!0,t&&t()}catch(s){const a=s.message;F.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 d.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"PRACTICE",bizId:this.teacherId}}),a=this.subjectInfo,i=[...this.coursePlanList];i.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")}`}),j.orderObject.orderType="PRACTICE",j.orderObject.orderName=a.subjectName+"\u966A\u7EC3\u8BFE",j.orderObject.orderDesc=a.subjectName+"\u966A\u7EC3\u8BFE",j.orderObject.actualPrice=Number((this.courseNum*a.subjectPrice).toFixed(2)),j.orderObject.orderNo="",j.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:i}];const c=s.data;c?F.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()=>{pe(c,this.routerTo)}).catch(()=>{F.close(),this.cancelPayment(c.orderNo)}):!t&&this.routerTo()}catch{}},routerTo(){this.$router.push({path:"/orderDetail",query:{orderType:"PRACTICE"}})},async cancelPayment(t){try{await d.post("/api-student/userOrder/orderCancel",{data:{orderNo:t}})}catch{}}},render(){return e(b,null,[!this.loadDataStatus&&(this.settingStatus?e(b,null,[e("div",{class:l.practice},[e(Y,{class:l.group,border:!1},{default:()=>[e(p,{title:"\u966A\u7EC3\u8BFE\u6536\u8D39"},{default:()=>e("div",{class:l.price},[e("span",null,[r("\xA5"),this.$filters.moneyFormat(this.subjectInfo.subjectPrice)]),r("/"),this.subjectInfo.courseMinutes,r("\u5206\u949F")])}),e(p,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:this.subjectInfo.subjectName,onClick:()=>this.subjectStatus=!0},null),e(p,{title:"\u8BFE\u65F6\u6570"},{default:()=>e(re,{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(me,{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(p,{class:[l.arrangeCell]},{title:()=>e("div",{class:l.rTitle},[e("span",null,[r("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>e("div",{class:l.rTag},[this.showSelectList.map(t=>e(b,null,[e(oe,{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(B,{show:this.selectStatus,class:l.selectPopup},{default:()=>[e("div",{class:l.selectContainer},[e("div",{class:l.rTitle},[e("span",null,[r("\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"),r("~"),u(t.endTime||new Date).format("HH:mm")]))])]),e("div",{class:l.selectBtn},[e(I,{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(I,{class:l.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[r("\u786E\u8BA4")]})])])]}),e(ne,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:t=>{const{subjectName:s,subjectPrice:a,courseMinutes:i,subjectId:c}=t;this.subjectInfo={subjectPrice:a,courseMinutes:i,subjectName:s,subjectId:c},this.subjectStatus=!1}},null)]),e("div",{class:["btnGroup",l.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[e(I,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[r("\u786E\u8BA4\u7EA6\u8BFE")]})])]):e(q,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u966A\u7EC3\u8BFE"},null))])}});const ut="_liveList_1qowf_1",dt="_liCover_1qowf_4",ht="_liContent_1qowf_10",mt="_liTitle_1qowf_13",pt="_avatar_1qowf_22",ft="_liUserInfo_1qowf_29",gt="_userInfo_1qowf_30",_t="_num_1qowf_42",bt="_buyNum_1qowf_45",vt="_price_1qowf_51",It="_liveGroup_1qowf_59",yt="_subjectName_1qowf_64";var h={liveList:ut,liCover:dt,liContent:ht,liTitle:mt,avatar:pt,liUserInfo:ft,userInfo:gt,num:_t,buyNum:bt,price:vt,liveGroup:It,subjectName:yt};function jt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!$(t)}var Ct=_({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{let t=this.params;const s=await d.post("/api-student/courseGroup/queryPageCourseGroup",{data:y({},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(b,null,[this.dataShow?e(z,{class:h.liveList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},jt(t=this.list.map(s=>e(Y,{class:h.liveGroup,border:!1,onClick:()=>this.onDetail(s)},{default:()=>[e(p,null,{icon:()=>e("div",{style:{position:"relative"}},[e(f,{class:h.liCover,src:s.backgroundPic,fit:"cover"},null),e("span",{class:h.subjectName},[s==null?void 0:s.subjectName])]),title:()=>e("div",{class:h.liContent},[e("div",{class:[h.liTitle,"van-ellipsis"]},[s.courseGroupName]),e("div",{class:h.liUserInfo},[e("div",{class:[h.userInfo,"van-hairline--right"]},[e(f,{class:h.avatar,fit:"cover",src:s.avatar||R},null),e("p",null,[r("\u8001\u5E08\uFF1A"),s.teacherName||`\u6E38\u5BA2${s.teacherId}`])]),s.existBuy===1?e("span",{class:h.buyNum},[e(C,{name:ge,size:"15"},null),r("\u5DF2\u8D2D\u4E70")]):e("span",{class:h.num},[s.studentCount,r("\u4EBA\u5DF2\u8D2D\u4E70")])])])}),e(p,{titleStyle:{color:"#666666",fontSize:"13px"}},{title:()=>e("span",{style:{display:"flex",alignItems:"center",fontSize:"13px"}},[e(C,{name:fe,size:"16",style:{marginRight:"5px"}},null),this.formatTime(s.salesStartDate)]),default:()=>e("div",{class:h.price},[e("span",null,[r("\xA5"),this.$filters.moneyFormat(s.coursePrice)]),r("/"),s.courseNum,r("\u8BFE\u65F6")])})]})))?t:{default:()=>[t]}):e(q,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const St="_videoList_1yf9v_1";var Tt={videoList:St};function xt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!$(t)}var Lt=_({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{let t=this.params;const s=await d.post("/api-student/videoLesson/selectGroup",{data:y({},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(b,null,[this.dataShow?e(z,{class:Tt.videoList,loading:this.loading,"onUpdate:loading":s=>this.loading=s,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},xt(t=this.list.map(s=>e(_e,{item:s,onClick:this.onDetail},null)))?t:{default:()=>[t]}):e(q,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}}),wt=_({name:"music",data(){return{teacherId:this.$route.query.teacherId,list:[],dataShow:!1,loading:!1,finished:!1,params:{page:1,rows:20}}},methods:{onItemClick(t){ve(t,s=>{this.$router.push({path:s,query:{orderType:"MUSIC"}})})}},render(){return e(b,null,[e(be,{hideSearch:!0,onItemClick:this.onItemClick,teacherId:this.teacherId},null)])}});const Dt=t=>{const s=`../images/${t}`;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 Nt=_({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:t}=this.userInfo;return Number(t)||0}},methods:{async onStart(){try{const t=this.userInfo.isStar?0:1;await d.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{}}},render(){return e(b,null,[e("div",{class:n.headerContent},[e("div",{class:n.headerCount},[e(p,{class:n["open-teacher-info"],border:!1,center:!0},{default:()=>[e("div",{class:n["teacher-info"]},[e("div",{class:n["teacher-name"]},[e("div",{class:n.teacherCert},[e("span",{style:{display:"inline-block"}},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.userId||""}`]),this.userInfo.entryFlag===1&&e(f,{class:n.cert,src:je},null),this.userInfo.musicianFlag===1&&e(f,{class:n.cert,src:Ce},null)])]),e("div",{class:n.level},[this.starGrade?e(ce,{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"}},[r("\u6682\u65E0\u8BC4\u5206")])])])],icon:()=>e("div",{style:{position:"relative",lineHeight:0},onClick:()=>{this.userInfo.liveing===1&&G({api:"joinLiveRoom",content:{roomId:this.userInfo.roomUid,teacherId:this.userInfo.userId}})}},[e(f,{class:n.userLogo,src:this.userInfo.heardUrl||R,fit:"cover"},null),this.userInfo.liveing===1&&e("p",{class:n.liveTag},[r("\u76F4\u64AD\u4E2D")])])}),e("p",{class:n.piNameSubject},[e(f,{class:n.subjectSection,src:Dt("icon_subject.png"),fit:"contain"},null),e("div",{class:n.subjectList},[this.subjectNameList.map(t=>e("span",{class:n.subject},[t]))])]),e("div",{class:n["teacher-bottom"]},[e("div",{class:n["teacher-data"]},[e("div",{class:n["teacher-data_item"]},[r("\u7C89\u4E1D "),e("span",null,[this.userInfo.fansNum||0])]),e("div",{class:n["teacher-data_item"]},[r("\u5DF2\u4E0A\u8BFE\u65F6 "),e("span",null,[this.userInfo.expTime||0])])]),e("div",{class:n.teacherOperation},[e(I,{type:"primary",size:"small",plain:!!this.userInfo.isStar,round:!0,style:{padding:"6px 12px"},onClick:this.onStart},{default:()=>[!this.userInfo.isStar&&e(C,{name:"plus"},null),this.userInfo.isStar?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]}),e(I,{type:"primary",size:"small",round:!0,style:{padding:"6px 12px",marginLeft:"5px"},onClick:()=>{G({api:"joinChatGroup",content:{type:"single",id:this.teacherId}})}},{default:()=>[e(C,{name:"chat-o",style:{marginRight:"3px"}},null),r("\u804A\u5929")]})])])])])])}});const gs=t=>{const s=`./images/${t}`;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 _s=_({name:"teacherHome",data(){const t=sessionStorage.getItem("teacherHomeTabs")||"",s=this.$route.query;return{teacherId:s.teacherId,tabs:t||s.tabs||"single",userInfo:{},background:"transparent",height:"auto"}},async created(){},async mounted(){this.getTeacherDetail(),he("webViewOnResume",()=>{this.getTeacherDetail()}),Ie(document,"scroll",t=>{const{y:s}=ye();s.value>45?this.background="#37cdb1":this.background="transparent"})},methods:{async getTeacherDetail(){try{const t=await d.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=t.data}catch{}}},render(){return e("div",{class:W["teacher-record"]},[e("div",{class:W.teacherHeader},[e("div",{ref:"headers"},[e(ae,{background:this.background,border:!1,color:"#fff",backIconColor:"white",onHeaderBack:()=>{this.$nextTick(()=>{const{height:t}=le(this.$refs.headers);this.height=t})}},null)]),e(Nt,{userInfo:this.userInfo,teacherId:this.teacherId},null)]),e(ue,{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(S,{title:"\u4E2A\u4EBA\u98CE\u91C7",name:"single"},{default:()=>[this.tabs==="single"&&e(Ve,{userInfo:this.userInfo},null)]}),e(S,{title:"\u966A\u7EC3\u8BFE",name:"practice"},{default:()=>[this.tabs==="practice"&&e(lt,{userInfo:this.userInfo},null)]}),e(S,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[this.tabs==="live"&&e(Ct,null,null)]}),e(S,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[this.tabs==="video"&&e(Lt,null,null)]}),e(S,{title:"\u4E50\u8C31",name:"music"},{default:()=>[this.tabs==="music"&&e(wt,null,null)]})]})])}});export{_s as default,gs as getAssetsHomeFile};
|