| 1 |
- var X=Object.defineProperty,Z=Object.defineProperties;var ee=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var E=(t,a,s)=>a in t?X(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,I=(t,a)=>{for(var s in a||(a={}))te.call(a,s)&&E(t,s,a[s]);if(G)for(var s of G(a))se.call(a,s)&&E(t,s,a[s]);return t},q=(t,a)=>Z(t,ee(a));import{_ as L,a as w,b as N,c as D,d as z,e as P,s as M}from"./teacher-home.module.f0831b2b.js";import{C as ae}from"./index.33c26d32.js";import{d as _,T as k,a as e,F as g,b as n,t as p,q as b,m as ie,B as y,I as j,x as F,P as $,h as u,D as C,C as Y,Y as oe,z as re,A as ne,w as H,u as ce,v as le,G as ue,H as S}from"./vendor.372dc65e.js";/* empty css *//* empty css *//* empty css */import{S as A}from"./index.154d3cfd.js";import{C as de}from"./index.1c550cd4.js";import{r as d,p as U,s as V,k as O}from"./index.84d59606.js";/* empty css *//* empty css *//* empty css */import{C as he}from"./index.5ed809fd.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{o as T}from"./orderStatus.3c16fe86.js";import{C as B}from"./index.75b00e65.js";/* empty css */import{i as me}from"./icon_timer2.563d016a.js";import{i as R}from"./icon_teacher.2c3a434a.js";import{i as pe}from"./icon_success.e258b59c.js";import{V as fe}from"./video-item.f9c0d7ae.js";import _e from"./index.5766f57d.js";import{a as ge,b as be}from"./index.406b9d83.js";/* empty css */import{t as ve,m as ye}from"./teacher_cert.5c45c8b4.js";/* empty css */import"./index.da09e935.js";import"./item.8cb8443f.js";import"./index.926ca9c5.js";import"./init-user-icon.d5c3c464.js";import"./favorite.9bdf4305.js";import"./select-tag.dc3f52d8.js";/* empty css *//* empty css */const Ie="_single_14ksn_1",je="_introduction_14ksn_4",Ce="_videoList_14ksn_10",Se="_itemBg_14ksn_16",Te="_videoItem_14ksn_25",xe="_video_14ksn_10",Le="_fansGroup_14ksn_55",we="_fansImage_14ksn_71",Ne="_fansTitle_14ksn_77",De="_videoGroup_14ksn_83";var h={single:Ie,introduction:je,videoList:Ce,itemBg:Se,videoItem:Te,"icon-upload":"_icon-upload_14ksn_34",video:xe,fansGroup:Le,fansImage:we,fansTitle:Ne,videoGroup:De};const ze="_filterTitle_cir06_1",Pe="_fansGroup_cir06_9",qe="_introduce_cir06_19",ke="_fansImage_cir06_25",Fe="_fansTitle_cir06_31",$e="_joinContainer_cir06_37",Ae="_joinText_cir06_40";var v={filterTitle:ze,fansGroup:Pe,introduce:qe,fansImage:ke,fansTitle:Fe,joinContainer:$e,joinText:Ae};const Be=t=>{const a=`../images/${t}`;return{"../images/follow_bg.png":L,"../images/head_bg.png":w,"../images/icon_fans.png":N,"../images/icon_subject.png":D,"../images/icon_video.png":z,"../images/live_bg.png":P}[a].default};var Ge=_({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",desc:this.desc}}),k("\u7533\u8BF7\u6210\u529F"),this.desc="",this.onClose&&this.onClose(this.item.id)}catch{}}},render(){return e(g,null,[e("div",{class:[v.filterTitle,"van-hairline--bottom"]},[n("\u7533\u8BF7\u5165\u7FA4")]),e("div",{class:v.joinContainer},[e(p,{center:!0,class:v.fansGroup,border:!1},{icon:()=>e(b,{src:this.item.img||Be("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(y,{type:"primary",block:!0,round:!0,style:{width:"70%",margin:"0 auto"},onClick:this.onJoinChat},{default:()=>[n("\u786E\u8BA4")]})])])}});function Ee(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!F(t)}const W=t=>{const a=`../images/${t}`;return{"../images/follow_bg.png":L,"../images/head_bg.png":w,"../images/icon_fans.png":N,"../images/icon_subject.png":D,"../images/icon_video.png":z,"../images/live_bg.png":P}[a].default};var Me=_({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&&U({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 a=this.userInfo;return e("div",{class:h.single},[e(A,{icon:"personal",title:"\u4E2A\u4EBA\u98CE\u91C7",size:24,border:!1},{default:()=>[e("p",{class:h.introduction},[a.introduction])]}),a.styleVideo&&a.styleVideo.length>0&&e(A,{icon:"elegant",title:"\u8001\u5E08\u98CE\u91C7",size:24,border:!1},{default:()=>[e("div",{class:h.videoList},[a.styleVideo.map(s=>e("div",{class:h.videoItem},[e("div",{class:h.itemBg,onClick:()=>{this.videoStatus=!0,this.isAddBrowse=!0,this.videoItem=s}},null),e(j,{class:h["icon-upload"],name:W("icon_video.png"),size:26},null),e("video",{width:"100%",class:h.video},[e("source",{src:s.videoUrl+"#t=1,4",type:"video/mp4"},null)])]))])]}),this.fansList&&this.fansList.length>0&&e(A,{icon:"fans",title:"\u7C89\u4E1D\u7FA4",size:24,border:!1},Ee(t=this.fansList.map(s=>e(p,{center:!0,class:h.fansGroup},{icon:()=>e(b,{src:s.img||W("icon_fans.png"),fit:"cover",class:h.fansImage},null),title:()=>e("div",{class:h.fansTitle},[e("div",{class:h.title},[s.name]),e("p",{class:"van-ellipsis"},[s.introduce])]),default:()=>e(y,{type:"primary",size:"small",round:!0,disabled:s.hasWaitAuditFlag,onClick:()=>this.onDetail(s)},{default:()=>[s.existFlag?"\u53BB\u804A\u5929":"",s.hasWaitAuditFlag?"\u5BA1\u6838\u4E2D":"",!s.hasWaitAuditFlag&&!s.existFlag?"\u7533\u8BF7\u5165\u7FA4":""]})})))?t:{default:()=>[t]}),e($,{show:this.chatStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.chatStatus=!1},{default:()=>[e(Ge,{item:this.chatItem,onClose:s=>{this.fansList.forEach(o=>{o.id===s&&(o.hasWaitAuditFlag=!0)}),this.chatStatus=!1}},null)]}),e($,{show:this.videoStatus,round:!0,class:h.videoGroup,closeable:!0,onClose:()=>{this.videoStatus=!1,this.isAddBrowse=!1}},{default:()=>{var s;return[this.videoStatus&&e(de,{playsinline:!0,onPlay:this.onPlay,src:(s=this.videoItem)==null?void 0:s.videoUrl},null)]}})])}});const Ye="_practice_xjmim_1",He="_group_xjmim_5",Ue="_price_xjmim_10",Ve="_rTag_xjmim_27",Oe="_tag_xjmim_30",Re="_selectPopup_xjmim_34",We="_selectContainer_xjmim_39",Je="_rTitle_xjmim_42",Ke="_selectPopupContent_xjmim_45",Qe="_desc_xjmim_48",Xe="_times_xjmim_49",Ze="_selectBtn_xjmim_60",et="_btn_xjmim_65",tt="_protocol_xjmim_84",st="_arrangeCell_xjmim_88",at="_fixedBtn_xjmim_94";var c={practice:Ye,group:He,price:Ue,rTag:Ve,tag:Oe,selectPopup:Re,selectContainer:We,rTitle:Je,selectPopupContent:Ke,desc:Qe,times:Xe,selectBtn:Ze,btn:et,protocol:tt,arrangeCell:st,fixedBtn:at},it=_({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:new Date,settingStatus:!0}},async mounted(){var t;try{const s=(await d.get("/api-student/courseSchedule/getTeacherSubjectPrice",{params:{teacherId:this.teacherId}})).data||[];if(s.length>0){const o=this.subjectId||((t=V.user.data)==null?void 0:t.subjectId),r=s.find(x=>x.subjectId===Number(o))||s[0],{subjectName:f,subjectPrice:J,courseMinutes:K,subjectId:Q}=r;this.subjectInfo={subjectPrice:J,courseMinutes:K,subjectName:f,subjectId:Q},s.forEach(x=>{x.name=x.subjectName}),this.teacherSubjectList=s,this.getList(),this.onBuy(!0),this.settingStatus=!0}else this.settingStatus=!1}catch{}},computed:{showSelectList(){let a=[...this.selectCourseList];return a.forEach(s=>{s.title=u(s.startTime).format("YYYY-MM-DD")+" "+O(u(s.startTime).day())+" "+s.start+"~"+s.end}),a},selectType(){return this.selectCourseList.length<this.courseNum?"noEnough":"enough"}},methods:{async onSubmit(){if(this.selectCourseList.length<=0){k("\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 a;try{let s={day:u(t||new Date).format("DD"),month:u(t||new Date).format("MM"),year:u(t||new Date).format("YYYY")};const i=(await d.post("/api-student/courseSchedule/createPracticeCourseCalendar",{data:q(I({},s),{studentId:(a=V.user.data)==null?void 0:a.userId,teacherId:this.teacherId})})).data||[];let r={};i.forEach(f=>{r[f.date]=f}),this.calendarList=r,this.calendarStatus=i.length>0}catch{}},onSelectDay(t){const a=t||[];let s=[...this.selectCourseList];a.forEach(o=>{!s.some(r=>r.startTime===o.startTime)&&s.push(I({},o))}),s.forEach(o=>{const i=a.some(f=>f.startTime===o.startTime),r=a.findIndex(f=>f.startTime===o.startTime);!i&&s.splice(r,1)}),s.sort((o,i)=>o.startTime>i.startTime?1:o.startTime<i.startTime?-1:0),this.selectCourseList=[...s]},onCloseTag(t){C.confirm({title:"\u63D0\u793A",message:"\u60A8\u662F\u5426\u8981\u5220\u9664\u8BE5\u9009\u62E9\u7684\u8BFE\u7A0B\uFF1F",confirmButtonColor:"var(--van-primary)"}).then(()=>{const a=this.selectCourseList.findIndex(s=>s.startTime===t.startTime);this.selectCourseList.splice(a,1)})},async _lookCourse(t){try{let a=[];this.selectCourseList.forEach(i=>{a.push({startTime:i.startTime,endTime:i.endTime})}),((await d.post("/api-teacher/courseGroup/lockCourseToCache",{data:{courseNum:this.courseNum,courseType:"PRACTICE",loop:this.selectType==="noEnough"?1:0,teacherId:this.teacherId,timeList:[...a]}})).data||[]).forEach((i,r)=>{this.coursePlanList[r]=q(I({},this.coursePlanList[r]),{startTime:i.startTime,endTime:i.endTime,classNum:r+1})}),this.coursePlanStatus=!0,this.selectStatus=!0,t&&t()}catch(a){const s=a.message;C.alert({title:"\u63D0\u793A",confirmButtonColor:"var(--van-primary)",message:s}).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 a=await d.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"PRACTICE",bizId:this.teacherId}});T.orderType="PRACTICE";const s=this.subjectInfo,o=[...this.coursePlanList];o.forEach(r=>{r.classDate=u(r.startTime).format("YYYY-MM-DD"),r.title=`${u(r.startTime).format("YYYY-MM-DD")} ${O(u(r.startTime).day())} ${u(r.startTime).format("HH:mm")}~${u(r.endTime).format("HH:mm")}`}),T.practiceInfo={courseGroupName:s.subjectName+"\u966A\u7EC3\u8BFE",courseIntroduce:s.subjectName+"\u966A\u7EC3\u8BFE",subjectId:s.subjectId,singleCourseMinutes:s.courseMinutes,courseNum:this.courseNum,coursePrice:(this.courseNum*s.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:o};const i=a.data;i?C.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()=>{T.orderInfo={orderNo:i.orderNo,actualPrice:i.actualPrice,payStatus:!0},this.routerTo()}).catch(()=>{C.close(),this.cancelPayment(i.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(g,null,[this.settingStatus?e(g,null,[e("div",{class:c.practice},[e(Y,{class:c.group,border:!1},{default:()=>[e(p,{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(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(oe,{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(he,{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:[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(g,null,[e(re,{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($,{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(ne,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:t=>{const{subjectName:a,subjectPrice:s,courseMinutes:o,subjectId:i}=t;this.subjectInfo={subjectPrice:s,courseMinutes:o,subjectName:a,subjectId:i},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(B,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u966A\u7EC3\u8BFE"},null)])}});const ot="_liveList_1qowf_1",rt="_liCover_1qowf_4",nt="_liContent_1qowf_10",ct="_liTitle_1qowf_13",lt="_avatar_1qowf_22",ut="_liUserInfo_1qowf_29",dt="_userInfo_1qowf_30",ht="_num_1qowf_42",mt="_buyNum_1qowf_45",pt="_price_1qowf_51",ft="_liveGroup_1qowf_59",_t="_subjectName_1qowf_64";var m={liveList:ot,liCover:rt,liContent:nt,liTitle:ct,avatar:lt,liUserInfo:ut,userInfo:dt,num:ht,buyNum:mt,price:pt,liveGroup:ft,subjectName:_t};function gt(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!F(t)}var bt=_({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 a=u(t||new Date);const s=["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"];return a.format("YYYY-MM-DD")+`(${s[a.day()]})`},async getList(){try{let t=this.params;const a=await d.post("/api-student/courseGroup/queryPageCourseGroup",{data:I({},t)});this.loading=!1;const s=a.data||{};if(this.list.length>0&&s.pageNo===1)return;this.list=this.list.concat(s.rows||[]),this.finished=s.pageNo>=s.totalPage,this.params.page=s.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(g,null,[this.dataShow?e(H,{class:m.liveList,loading:this.loading,"onUpdate:loading":a=>this.loading=a,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},gt(t=this.list.map(a=>e(Y,{class:m.liveGroup,border:!1,onClick:()=>this.onDetail(a)},{default:()=>[e(p,null,{icon:()=>e("div",{style:{position:"relative"}},[e(b,{class:m.liCover,src:a.backgroundPic,fit:"cover"},null),e("span",{class:m.subjectName},[a==null?void 0:a.subjectName])]),title:()=>e("div",{class:m.liContent},[e("div",{class:[m.liTitle,"van-ellipsis"]},[a.courseGroupName]),e("div",{class:m.liUserInfo},[e("div",{class:[m.userInfo,"van-hairline--right"]},[e(b,{class:m.avatar,fit:"cover",src:a.avatar||R},null),e("p",null,[n("\u8001\u5E08\uFF1A"),a.teacherName||`\u6E38\u5BA2${a.teacherId}`])]),a.existBuy===1?e("span",{class:m.buyNum},[e(j,{name:pe,size:"15"},null),n("\u5DF2\u8D2D\u4E70")]):e("span",{class:m.num},[a.studentCount,n("\u4EBA\u5DF2\u8D2D\u4E70")])])])}),e(p,{titleStyle:{color:"#666666",fontSize:"13px"}},{title:()=>e("span",{style:{display:"flex",alignItems:"center",fontSize:"13px"}},[e(j,{name:me,size:"16",style:{marginRight:"5px"}},null),this.formatTime(a.salesStartDate)]),default:()=>e("div",{class:m.price},[e("span",null,[n("\xA5"),this.$filters.moneyFormat(a.coursePrice)]),n("/"),a.courseNum,n("\u8BFE\u65F6")])})]})))?t:{default:()=>[t]}):e(B,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const vt="_videoList_1yf9v_1";var yt={videoList:vt};function It(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!F(t)}var jt=_({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 a=await d.post("/api-student/videoLesson/selectGroup",{data:I({},t)});this.loading=!1;const s=a.data||{};if(this.list.length>0&&s.pageNo===1)return;this.list=this.list.concat(s.rows||[]),this.finished=s.pageNo>=s.totalPage,this.params.page=s.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(g,null,[this.dataShow?e(H,{class:yt.videoList,loading:this.loading,"onUpdate:loading":a=>this.loading=a,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},It(t=this.list.map(a=>e(fe,{item:a,onClick:this.onDetail},null)))?t:{default:()=>[t]}):e(B,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}}),Ct=_({name:"music",data(){return{teacherId:this.$route.query.teacherId,list:[],dataShow:!1,loading:!1,finished:!1,params:{page:1,rows:20}}},methods:{onItemClick(t){if(!t.play&&t.chargeType==="VIP"){C.confirm({title:"\u63D0\u793A",message:"\u60A8\u8FD8\u4E0D\u662F\u4F1A\u5458\uFF0C\u662F\u5426\u52A0\u5165\u4F1A\u5458\uFF1F",confirmButtonColor:"var(--van-primary)"}).then(()=>{this.$router.push("/memberCenter")});return}else!t.play&&t.chargeType==="CHARGE"&&(T.orderType="MUSIC",T.musicInfo=t,this.$router.push({path:"/orderDetail",query:{orderType:"MUSIC"}}))}},render(){return e(g,null,[e(_e,{hideSearch:!0,onItemClick:this.onItemClick,teacherId:this.teacherId},null)])}});const St="_headerContent_1azqz_1",Tt="_teacherFollow_1azqz_6",xt="_headerCount_1azqz_10",Lt="_headerFollow_1azqz_20",wt="_userLogo_1azqz_29",Nt="_level_1azqz_35",Dt="_subjectSection_1azqz_38",zt="_cert_1azqz_82",Pt="_teacherCert_1azqz_100",qt="_piNameSubject_1azqz_104",kt="_subject_1azqz_38",Ft="_rTitle_1azqz_121";var l={headerContent:St,teacherFollow:Tt,headerCount:xt,headerFollow:Lt,"open-teacher-info":"_open-teacher-info_1azqz_24",userLogo:wt,level:Nt,subjectSection:Dt,"teacher-bottom":"_teacher-bottom_1azqz_44","teacher-data":"_teacher-data_1azqz_50","teacher-data_item":"_teacher-data_item_1azqz_55",cert:zt,"teacher-info":"_teacher-info_1azqz_89","teacher-name":"_teacher-name_1azqz_92",teacherCert:Pt,piNameSubject:qt,subject:kt,rTitle:Ft};const $t=t=>{const a=`../images/${t}`;return{"../images/follow_bg.png":L,"../images/head_bg.png":w,"../images/icon_fans.png":N,"../images/icon_subject.png":D,"../images/icon_video.png":z,"../images/live_bg.png":P}[a].default};var At=_({name:"teacher-header",props:{userInfo:{type:Object,default:{}},teacherId:{type:String||Number,default:""}},computed:{subjectNameList(){const a=this.userInfo.subjectName;return a?a.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}});const a=t?"\u5173\u6CE8\u6210\u529F":"\u5DF2\u53D6\u6D88\u5173\u6CE8";this.userInfo.isStar=t;let s=t?this.userInfo.fansNum+1:this.userInfo.fansNum-1;this.userInfo.fansNum=s<=0?0:s,k(a)}catch{}}},render(){return e(g,null,[e("div",{class:l.headerContent},[e("div",{class:l.headerCount},[e(p,{class:l["open-teacher-info"],border:!1,center:!0},{default:()=>[e("div",{class:l["teacher-info"]},[e("div",{class:l["teacher-name"]},[e("div",{class:l.teacherCert},[e("span",{style:{display:"inline-block"}},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.userId||""}`]),this.userInfo.entryFlag===1&&e(b,{class:l.cert,src:ve},null),this.userInfo.musicianFlag===1&&e(b,{class:l.cert,src:ye},null)])]),e("div",{class:l.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"}},[n("\u6682\u65E0\u8BC4\u5206")])])])],icon:()=>e(b,{class:l.userLogo,src:this.userInfo.heardUrl||R,fit:"cover"},null)}),e("p",{class:l.piNameSubject},[e(b,{class:l.subjectSection,src:$t("icon_subject.png"),fit:"contain"},null),this.subjectNameList.map(t=>e("span",{class:l.subject},[t]))]),e("div",{class:l["teacher-bottom"]},[e("div",{class:l["teacher-data"]},[e("div",{class:l["teacher-data_item"]},[n("\u7C89\u4E1D "),e("span",null,[this.userInfo.fansNum||0])]),e("div",{class:l["teacher-data_item"]},[n("\u5DF2\u4E0A\u8BFE\u65F6 "),e("span",null,[this.userInfo.expTime||0])])]),e("div",{class:l.teacherOperation},[e(y,{type:"primary",size:"small",plain:!!this.userInfo.isStar,round:!0,style:{padding:"6px 12px"},onClick:this.onStart},{default:()=>[!this.userInfo.isStar&&e(j,{name:"plus"},null),this.userInfo.isStar?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]}),e(y,{type:"primary",size:"small",round:!0,style:{padding:"6px 12px",marginLeft:"5px"},onClick:()=>{U({api:"joinChatGroup",content:{type:"single",id:this.teacherId}})}},{default:()=>[e(j,{name:"chat-o",style:{marginRight:"3px"}},null),n("\u804A\u5929")]})])])])])])}});const Cs=t=>{const a=`./images/${t}`;return{"./images/follow_bg.png":L,"./images/head_bg.png":w,"./images/icon_fans.png":N,"./images/icon_subject.png":D,"./images/icon_video.png":z,"./images/live_bg.png":P}[a].default};var Ss=_({name:"teacherHome",data(){const t=sessionStorage.getItem("teacherHomeTabs")||"",a=this.$route.query;return{teacherId:a.teacherId,tabs:t||a.tabs||"single",userInfo:{},background:"transparent",height:"auto"}},async created(){try{const t=await d.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=t.data}catch{}},mounted(){const{height:t}=le(this.$refs.headers);this.height=t,ge(document,"scroll",a=>{const{y:s}=be();s.value>45?this.background="#37cdb1":this.background="transparent"})},render(){return e("div",{class:M["teacher-record"]},[e("div",{class:M.teacherHeader},[e("div",{ref:"headers"},[e(ae,{background:this.background,border:!1,color:"#fff",backIconColor:"white"},null)]),e(At,{userInfo:this.userInfo,teacherId:this.teacherId},null)]),e(ue,{color:"var(--van-primary)",background:"#f8f9fc",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:()=>[e(Me,{userInfo:this.userInfo},null)]}),e(S,{title:"\u966A\u7EC3\u8BFE",name:"practice"},{default:()=>[e(it,{userInfo:this.userInfo},null)]}),e(S,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[e(bt,null,null)]}),e(S,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[e(jt,null,null)]}),e(S,{title:"\u4E50\u8C31",name:"music"},{default:()=>[e(Ct,null,null)]})]})])}});export{Ss as default,Cs as getAssetsHomeFile};
|