teacher-home.2c718a29.js 48 KB

1
  1. import{i as Dt,a as kt,b as Et,_ as O,c as Y,d as G,e as U,f as R,g as z,h as q,j as W,k as J,l as K,m as Q,n as X,o as Z,p as tt,q as et,r as st,s as at,t as it,u as ot,v as nt,w as rt,x as ct,y as lt,z as ut,A as ht,B as dt,C as pt,D as mt,E as gt,F as Ft}from"./vip_default.ded3438c.js";import{_ as _t}from"./icon_video.60a71a50.js";import{d as y,U as wt,V as xt,j as e,N as Bt,w as l,y as d,g as _,bd as E,T as ft,D as L,F as m,A as c,aS as F,B as I,C as w,$ as St,n as H,Y as vt,i as Vt,b5 as At}from"./ResizeObserver.es.39b48a47.js";import{C as $t}from"./index.970ad07b.js";import"./index.608320e9.js";import"./index.0e35d2fb.js";import{T as Mt,a as D}from"./index.5d4d28cc.js";import{C as Ct}from"./index.5fcaa617.js";import{A as Tt}from"./index.b6a283d2.js";import{C as v}from"./index.db115763.js";import{C as bt}from"./index.9f5e14d1.js";import{S as jt}from"./index.c88884de.js";import{T as Lt}from"./index.34ac729a.js";import{o as g}from"./orderStatus.fbc0ddaf.js";import{t as Nt}from"./tradeOrder.c5307744.js";import{L as Pt}from"./index.6c529ad4.js";import{I as P}from"./index.fcbcb027.js";import{a as Ht,b as Ot}from"./index.dc19bc54.js";import{R as Yt}from"./index.6a000ecc.js";import{i as Gt}from"./icon_teacher.40b6f077.js";import{u as Ut}from"./hooks.6df65925.js";import{F as Rt}from"./index.428ab1a8.js";import zt from"./index.0962fc25.js";import"./use-id.b004ff17.js";import"./use-tab-status.bcc0c503.js";import"./use-refs.07204da6.js";import"./index.b8eefd8d.js";import"./index.78ed3721.js";import"./utils.eda083a9.js";import"./index.1f05bcbc.js";import"./index.e10a1ae2.js";import"./select-tag.c133608d.js";import"./index.0a093430.js";import"./index.3c44a6d7.js";import"./index.926ca9c5.js";import"./index.a256e876.js";import"./music.27f3de35.js";import"./select-subject.5a3e156f.js";import"./index.fbd2c321.js";import"./icon_uploader.21a85a4d.js";import"./icon-xin.797feb04.js";import"./icon_album.4957b8e0.js";import"./icon_album_active.cb923735.js";import"./icon_exquisite.01ddc5aa.js";import"./icon_music_active.f55820b3.js";import"./icon-play.bc9e7aab.js";import"./index.e90d2179.js";const qt="_bgImg_6z94a_33",Wt="_bg_6z94a_33",Jt="_teacherHeader_6z94a_51",Kt="_singleSection_6z94a_55",Qt="_btnType_6z94a_60",Xt="_btn2_6z94a_63",Zt="_btn1_6z94a_64",te="_singleContent_6z94a_89",ee="_fansPopup_6z94a_99";var b={"teacher-record":"_teacher-record_6z94a_1",bgImg:qt,bg:Wt,teacherHeader:Jt,singleSection:Kt,btnType:Qt,btn2:Xt,btn1:Zt,singleContent:te,fansPopup:ee};const se="_tipSection_1i68p_1",ae="_practice_1i68p_7",ie="_group_1i68p_11",oe="_price_1i68p_23",ne="_rTag_1i68p_40",re="_tag_1i68p_43",ce="_selectPopup_1i68p_47",le="_selectContainer_1i68p_52",ue="_rTitle_1i68p_55",he="_selectPopupContent_1i68p_58",de="_desc_1i68p_61",pe="_times_1i68p_62",me="_selectBtn_1i68p_73",ge="_btn_1i68p_78",_e="_protocol_1i68p_97",fe="_arrangeCell_1i68p_101",be="_fixedBtn_1i68p_107";var r={tipSection:se,practice:ae,group:ie,price:oe,rTag:ne,tag:re,selectPopup:ce,selectContainer:le,rTitle:ue,selectPopupContent:he,desc:de,times:pe,selectBtn:me,btn:ge,protocol:_e,arrangeCell:fe,fixedBtn:be};const ve="_tipSection_19emr_1",Ie="_iconCross_19emr_7",ye="_tipTitle_19emr_15",Se="_tipContent_19emr_28",Ce="_tipFooter_19emr_35";var k={tipSection:ve,iconCross:Ie,tipTitle:ye,tipContent:Se,tipFooter:Ce},x=y({name:"tips",props:{title:{type:String,default:""},content:{type:String,default:""},type:{type:String,default:""},btnTxt:{type:String,default:"\u4E0D\u518D\u63D0\u9192"}},emits:["close","confirm"],setup(t,{emit:a}){const s=wt(!0);console.log(t.type,"1212");const o=()=>{const i=localStorage.getItem("teacher_home_local"),u=i?JSON.parse(i):{};return console.log(u[t.type]),!!u[t.type]},n=()=>{const i=localStorage.getItem("teacher_home_local"),u=i?JSON.parse(i):{};u[t.type]=1,localStorage.setItem("teacher_home_local",JSON.stringify(u))};return xt(()=>{s.value=!o()}),()=>s.value?e("div",{class:k.tipSection},[e(Bt,{class:k.iconCross,onClick:()=>{a("close"),s.value=!1},name:"cross"},null),e("div",{class:k.tipTitle},[e("img",{src:Dt},null),t.title]),e("div",{class:k.tipContent},[t.content]),e("div",{class:k.tipFooter,onClick:()=>{a("confirm"),n(),s.value=!1}},[t.btnTxt])]):""}}),Te=y({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,freeMinutes:0,id:null,subjectName:"",subjectId:0},courseNum:4,calendarStatus:!1,calendarList:[],selectCourseList:[],coursePlanStatus:!1,selectStatus:!1,coursePlanList:[],calendarDate:l().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,groupType:"PRACTICE"}})).data||[];if(s.length>0){const o=this.subjectId||((t=_.user.data)==null?void 0:t.subjectId),i=s.find(C=>C.subjectId===Number(o))||s[0],{subjectName:u,subjectPrice:S,courseMinutes:B,subjectId:V,id:A,freeMinutes:$}=i;this.subjectInfo={subjectPrice:S,id:A,freeMinutes:$,courseMinutes:B,subjectName:u,subjectId:V},s.forEach(C=>{C.name=C.subjectName}),this.teacherSubjectList=s,this.getList(),this.onBuy(!0),this.settingStatus=!0;const M=await d.post("/api-teacher/open/appVersion",{data:{platform:_.platformType==="STUDENT"?"ios-student":"ios-teacher",version:_.version}});this.settingStatus=!M.data.check}else this.settingStatus=!1;this.loadDataStatus=!1}catch{this.loadDataStatus=!1}},computed:{showSelectList(){let a=[...this.selectCourseList];return a.forEach(s=>{s.title=l(s.startTime).format("YYYY-MM-DD")+" "+E(l(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){ft("\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{const s=t||l().add(1,"day").toDate();let o={day:l(s).format("DD"),month:l(s).format("MM"),year:l(s).format("YYYY")};const i=(await d.post("/api-student/courseSchedule/createPracticeCourseCalendar",{data:{...o,teacherSubjectPriceId:this.subjectInfo.id,studentId:(a=_.user.data)==null?void 0:a.userId,teacherId:this.teacherId}})).data||[];let u={};i.forEach(S=>{u[S.date]=S}),this.calendarList=u,this.calendarStatus=i.length>0}catch{}},onSelectDay(t){const a=t||[];let s=[...this.selectCourseList];a.forEach(n=>{!s.some(u=>u.startTime===n.startTime)&&s.push({...n})});let o=[];s.forEach(n=>{a.some(u=>u.startTime===n.startTime)&&o.push(n)}),o.sort((n,i)=>n.startTime>i.startTime?1:n.startTime<i.startTime?-1:0),console.log(o,"list"),this.selectCourseList=[...o]},onCloseTag(t){L.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(n=>{a.push({startTime:n.startTime,endTime:n.endTime})}),((await d.post("/api-student/courseGroup/lockCourseToCache",{data:{courseFreeMinutes:this.subjectInfo.freeMinutes,courseNum:this.courseNum,courseType:"PRACTICE",loop:this.selectType==="noEnough"?1:0,teacherId:this.teacherId,timeList:[...a]}})).data||[]).forEach((n,i)=>{this.coursePlanList[i]={...this.coursePlanList[i],startTime:n.startTime,endTime:n.endTime,classNum:i+1}}),this.coursePlanStatus=!0,this.selectStatus=!0,t&&t()}catch(a){const s=a.message;L.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}}),s=this.subjectInfo,o=[...this.coursePlanList];o.forEach(i=>{i.classDate=l(i.startTime).format("YYYY-MM-DD"),i.title=`${l(i.startTime).format("YYYY-MM-DD")} ${E(l(i.startTime).day())} ${l(i.startTime).format("HH:mm")}~${l(i.endTime).format("HH:mm")}`}),g.orderObject.orderType="PRACTICE",g.orderObject.orderName=s.subjectName+"\u8DA3\u7EA0\u8BFE",g.orderObject.orderDesc=s.subjectName+"\u8DA3\u7EA0\u8BFE",g.orderObject.actualPrice=Number((this.courseNum*s.subjectPrice).toFixed(2)),g.orderObject.orderNo="",g.orderObject.orderList=[{orderType:"PRACTICE",goodsName:s.subjectName+"\u8DA3\u7EA0\u8BFE",courseGroupName:s.subjectName+"\u8DA3\u7EA0\u8BFE",courseIntroduce:s.subjectName+"\u8DA3\u7EA0\u8BFE",subjectId:s.subjectId,singleCourseMinutes:s.courseMinutes,teacherSubjectPriceId:s.id,courseNum:this.courseNum,coursePrice:(this.courseNum*s.subjectPrice).toFixed(2),price:(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 n=a.data;n?L.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()=>{Nt(n,this.routerTo)}).catch(()=>{L.close(),this.cancelPayment(n.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(m,null,[e("div",{class:r.tipSection},[e(x,{type:"PRACTICE",title:"\u4EC0\u4E48\u662F\u8DA3\u7EA0\u8BFE\uFF1F",content:"\u8DA3\u7EA0\u8BFE\u4EE5\u4E00\u5BF9\u4E00\u4E13\u5C5E\u3001\u9AD8\u5EA6\u9488\u5BF9\u6027\u7684\u5F62\u5F0F\u8FDB\u884C\uFF0C\u6BCF\u6B21\u8BFE\u7A0B\u65F6\u957F\u4E3A25\u5206\u949F\u3002\u672C\u8BFE\u7A0B\u4E13\u4E3A\u89E3\u51B3\u5B66\u751F\u65E5\u5E38\u7EC3\u4E60\u4E2D\u7684\u7591\u95EE\u4E0E\u8BEF\u533A\u8BBE\u8BA1\uFF0C\u5C24\u5176\u9002\u5408\u90A3\u4E9B\u5728\u81EA\u6211\u7EC3\u4E60\u540E\u611F\u5230\u56F0\u60D1\u6216\u4E0D\u786E\u5B9A\u81EA\u5DF1\u65B9\u6CD5\u662F\u5426\u6B63\u786E\u7684\u5B66\u751F\u3002\u4E0D\u540C\u4E8E\u4F20\u7EDF\u7684\u6559\u5B66\u6A21\u5F0F\uFF0C\u8DA3\u7EA0\u8BFE\u4E0D\u4FA7\u91CD\u4E8E\u65B0\u77E5\u8BC6\u6216\u65B0\u6280\u80FD\u7684\u4F20\u6388\uFF0C\u800C\u662F\u5168\u5FC3\u5168\u610F\u81F4\u529B\u4E8E\u68C0\u67E5\u5B66\u751F\u73B0\u6709\u7684\u7EC3\u4E60\u6210\u679C\uFF0C\u5E76\u53CA\u65F6\u7EA0\u6B63\u5176\u4E2D\u51FA\u73B0\u7684\u95EE\u9898\u3002\u8FD9\u79CD\u65B9\u5F0F\u4E0D\u4EC5\u6709\u52A9\u4E8E\u5B66\u751F\u5DE9\u56FA\u5DF2\u638C\u63E1\u7684\u77E5\u8BC6\u548C\u6280\u80FD\uFF0C\u8FD8\u80FD\u6709\u6548\u9632\u6B62\u9519\u8BEF\u4E60\u60EF\u7684\u5F62\u6210\u548C\u53D1\u5C55\uFF0C\u4E3A\u4ED6\u4EEC\u4ECA\u540E\u7684\u5B66\u4E60\u6253\u4E0B\u66F4\u52A0\u575A\u5B9E\u7684\u57FA\u7840\u3002"},null)]),!this.loadDataStatus&&(this.settingStatus?e(m,null,[e("div",{class:r.practice},[e(bt,{class:r.group,border:!1},{default:()=>[e(v,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:this.subjectInfo.subjectName,onClick:()=>this.subjectStatus=!0},null),this.subjectInfo.subjectPrice>0&&e(v,{title:"\u8DA3\u7EA0\u8BFE\u6536\u8D39"},{default:()=>e("div",{class:r.price},[e("span",null,[c("\xA5"),this.$filters.moneyFormat(this.subjectInfo.subjectPrice)]),c("/"),this.subjectInfo.courseMinutes,c("\u5206\u949F")])}),e(v,{title:"\u8BFE\u65F6\u6570"},{default:()=>e(jt,{modelValue:this.courseNum,"onUpdate:modelValue":t=>this.courseNum=t,theme:"round",max:12,min:4,buttonSize:22,onChange:()=>{this.selectCourseList=[]}},null)})]}),this.calendarStatus&&e("div",{class:r.group},[e(Ct,{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)]),this.showSelectList.length>0&&e(v,{class:[r.arrangeCell]},{title:()=>e("div",{class:r.rTitle},[e("span",null,[c("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>e("div",{class:r.rTag},[this.showSelectList.map(t=>e(m,null,[e(Lt,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:r.tag,onClose:()=>this.onCloseTag(t)},{default:()=>[t.title]}),e("br",null,null)]))])}),e(F,{show:this.selectStatus,class:r.selectPopup},{default:()=>[e("div",{class:r.selectContainer},[e("div",{class:r.rTitle},[e("span",null,[c("\u63D0\u793A")])]),e("div",{class:r.selectPopupContent},[e("p",{class:r.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:r.times},[this.coursePlanList.map(t=>e("span",null,[l(t.startTime||new Date).format("YYYY-MM-DD")," ",l(t.startTime||new Date).format("HH:mm"),c("~"),l(t.endTime||new Date).format("HH:mm")]))])]),e("div",{class:r.selectBtn},[e(I,{class:r.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:r.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[c("\u786E\u8BA4")]})])])]}),e(Tt,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:t=>{const{subjectName:a,subjectPrice:s,courseMinutes:o,id:n,subjectId:i,freeMinutes:u}=t;this.subjectInfo={subjectPrice:s,id:n,freeMinutes:u,courseMinutes:o,subjectName:a,subjectId:i},this.subjectStatus=!1}},null)]),e("div",{class:["btnGroup",r.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[e(I,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[c("\u786E\u8BA4\u7EA6\u8BFE")]})])]):e(w,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u8DA3\u7EA0\u8BFE"},null))])}});const je="_liveList_15t4o_1",Le="_liCover_15t4o_4",Ne="_liContent_15t4o_9",Pe="_liTitle_15t4o_15",De="_users_15t4o_21",ke="_user_15t4o_21",Ee="_lean_15t4o_42",Fe="_buyNum_15t4o_47",we="_num_15t4o_48",xe="_price_15t4o_52",Be="_priceNum_15t4o_56",Ve="_label_15t4o_65",Ae="_liveGroup_15t4o_70",$e="_liveTop_15t4o_77",Me="_iconLive_15t4o_81",He="_liveCenter_15t4o_92",Oe="_subjectName_15t4o_96",Ye="_timerString_15t4o_107",Ge="_tips_15t4o_113";var p={liveList:je,liCover:Le,liContent:Ne,liTitle:Pe,users:De,user:ke,lean:Ee,buyNum:Fe,num:we,price:xe,priceNum:Be,label:Ve,liveGroup:Ae,liveTop:$e,iconLive:Me,liveCenter:He,subjectName:Oe,timerString:Ye,tips:Ge};function Ue(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!St(t)}var Re=y({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 a=l(t||new Date),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{const t={...this.params};_.version&&(t.version=_.version||"",t.platform="ios-student");const a=await d.post("/api-student/courseGroup/queryPageCourseGroup",{data:{...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(m,null,[e(x,{type:"LIVE",class:p.tips,title:"\u4EC0\u4E48\u662F\u76F4\u64AD\u8BFE\uFF1F",content:"\u76F4\u64AD\u8BFE\u662F\u73B0\u4EE3\u6559\u80B2\u9886\u57DF\u4E2D\u4E00\u79CD\u5E7F\u53D7\u6B22\u8FCE\u7684\u8BFE\u7A0B\u5F62\u5F0F\uFF0C\u5B83\u96C6\u5B9E\u65F6\u4E92\u52A8\u3001\u591A\u5A92\u4F53\u5C55\u793A\u548C\u9AD8\u5EA6\u4FBF\u5229\u6027\u4E8E\u4E00\u4F53\uFF0C\u4E3A\u5B66\u4E60\u8005\u5E26\u6765\u4E86\u72EC\u7279\u4E14\u4E30\u5BCC\u7684\u5B66\u4E60\u4F53\u9A8C\u3002\u7279\u522B\u662F\u5728\u7BA1\u4E50\u76F4\u64AD\u8BFE\u4E2D\uFF0C\u6559\u5E08\u53EF\u4EE5\u901A\u8FC7\u64AD\u653E\u7ECF\u5178\u97F3\u4E50\u4F5C\u54C1\uFF0C\u52A0\u6DF1\u5B66\u751F\u5BF9\u97F3\u4E50\u4E4B\u7F8E\u7684\u611F\u77E5\u4E0E\u7406\u89E3\u3002\u5BF9\u4E8E\u90A3\u4E9B\u9700\u8981\u5177\u4F53\u64CD\u4F5C\u6F14\u793A\u7684\u6559\u5B66\u5185\u5BB9\uFF0C\u76F4\u64AD\u8BFE\u80FD\u591F\u63D0\u4F9B\u6E05\u6670\u76F4\u89C2\u7684\u89C6\u89D2\uFF0C\u8BA9\u6559\u5E08\u7684\u6BCF\u4E00\u4E2A\u52A8\u4F5C\u7EC6\u8282\u90FD\u5C55\u73B0\u5728\u5B66\u751F\u9762\u524D\uFF0C\u786E\u4FDD\u5B66\u4E60\u6548\u679C\u3002\u76F4\u64AD\u8BFE\u7A0B\u7684\u5185\u5BB9\u56F4\u7ED5\u7279\u5B9A\u4E3B\u9898\u7CBE\u5FC3\u8BBE\u8BA1\uFF0C\u65E8\u5728\u6EE1\u8DB3\u4E0D\u540C\u5B66\u4E60\u8005\u7684\u9700\u6C42\uFF0C\u4FC3\u8FDB\u77E5\u8BC6\u4E0E\u6280\u80FD\u7684\u6709\u6548\u4F20\u9012\u3002"},null),this.dataShow?e(Pt,{class:p.liveList,loading:this.loading,"onUpdate:loading":a=>this.loading=a,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},Ue(t=this.list.map(a=>e(bt,{class:p.liveGroup,border:!1,onClick:()=>this.onDetail(a)},{default:()=>[e("div",{class:p.liveTop},[e("img",{src:kt,class:p.iconLive},null),e("span",null,[c("\u5F00\u8BFE\u65F6\u95F4\uFF1A "),this.formatTime(a.salesStartDate),c(" ")])]),e("div",{class:p.liveCenter},[e(P,{class:p.liCover,src:a.backgroundPic,fit:"cover"},null),e("span",{class:p.subjectName},[a==null?void 0:a.subjectName])]),e("div",{class:p.liContent},[e("div",{class:[p.liTitle,"van-ellipsis"]},[a.courseGroupName]),e("div",{class:p.users},[e("div",{class:p.lean},[e("span",{class:p.num},[a.studentCount,c("\u4EBA\u5B66\u4E60")])]),e("div",{class:p.price},[a.coursePrice>0&&e(m,null,[e("span",{class:p.priceNum},[e("i",null,[c("\xA5")]),this.$filters.moneyFormat(a.coursePrice)])]),e("span",{class:p.label},[a.coursePrice>0&&"/",a.courseNum,c("\u8BFE\u65F6")])])])])]})))?t:{default:()=>[t]}):e(w,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const ze="_videoItem_1h9f5_1",qe="_viCover_1h9f5_11",We="_viSection_1h9f5_18",Je="_viTitle_1h9f5_22",Ke="_viUserNum_1h9f5_29",Qe="_viPrice_1h9f5_37",Xe="_priceNum_1h9f5_44",Ze="_tags_1h9f5_53",ts="_label_1h9f5_56",es="_subjectName_1h9f5_66";var f={videoItem:ze,viCover:qe,viSection:We,viTitle:Je,viUserNum:Ke,viPrice:Qe,priceNum:Xe,tags:Ze,label:ts,subjectName:es},ss=y({name:"VideoItem",props:{item:Object,onClick:{type:Function,default:t=>{}}},render(){const t=this.item;return e("div",{class:f.videoItem,onClick:()=>{this.onClick(t)}},[e("div",{style:{position:"relative",flexShrink:0}},[e(P,{class:f.viCover,fit:"cover",src:t==null?void 0:t.lessonCoverUrl},null),e("span",{class:f.subjectName},[t==null?void 0:t.lessonSubjectName])]),e("div",{class:f.viSection},[e("div",{class:[f.viTitle,"van-ellipsis"]},[t==null?void 0:t.lessonName]),e("div",{class:f.tags},[(t==null?void 0:t.musicNum)>0?e("span",{class:f.label},[t==null?void 0:t.musicNum,c("\u9996\u66F2\u76EE")]):"",(t==null?void 0:t.lessonCount)>0?e("span",{class:f.label},[t==null?void 0:t.lessonCount,c("\u8BFE\u65F6")]):""]),e("div",{class:f.viPrice},[e("div",{class:f.viUserNum},[t==null?void 0:t.countStudent,c("\u4EBA\u5B66\u4E60")]),e("span",{class:f.priceNum},[t.payType==="VIP"?e("span",{style:{color:"#C76E21"}},[c("\u4F1A\u5458")]):e(m,null,[(t==null?void 0:t.lessonPrice)>0&&e(m,null,[e("i",null,[c("\uFFE5")]),t==null?void 0:t.lessonPrice]),(t==null?void 0:t.lessonPrice)<=0&&t.auditVersion!==0&&e(m,null,[e("i",null,[c("\uFFE5")]),c("0")]),(t==null?void 0:t.lessonPrice)<=0&&t.auditVersion===0&&e("span",{style:{color:"#20BEA0"}},[c("\u514D\u8D39")])])])])])])}});const as="_videoList_15ff1_1",is="_tips_15ff1_12";var It={videoList:as,tips:is};function os(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!St(t)}var ns=y({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};_.version&&(t.version=_.version||"",t.platform="ios-student");const a=await d.post("/api-student/videoLesson/selectGroup",{data:{...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(m,null,[e(x,{type:"VIDEO",class:It.tips,title:"\u4EC0\u4E48\u662F\u89C6\u9891\u8BFE\uFF1F",content:"\u89C6\u9891\u8BFE\u662F\u7531\u6559\u5E08\u4E8B\u5148\u7CBE\u5FC3\u51C6\u5907\u5E76\u5F55\u5236\u7684\u8BFE\u7A0B\u5185\u5BB9\u3002\u6559\u5E08\u4F9D\u636E\u6559\u5B66\u5927\u7EB2\u548C\u76EE\u6807\uFF0C\u7CFB\u7EDF\u89C4\u5212\u6BCF\u4E00\u8282\u89C6\u9891\u7684\u4E3B\u9898\u4E0E\u5185\u5BB9\uFF0C\u786E\u4FDD\u6559\u5B66\u7684\u8FDE\u8D2F\u6027\u548C\u5B8C\u6574\u6027\u3002\u5728\u5F55\u5236\u8FC7\u7A0B\u4E2D\uFF0C\u91C7\u7528\u4E13\u4E1A\u8BBE\u5907\u5982\u9AD8\u6E05\u6444\u50CF\u673A\u548C\u5F55\u5C4F\u8F6F\u4EF6\uFF0C\u4FDD\u969C\u89C6\u9891\u753B\u8D28\u6E05\u6670\u3001\u97F3\u9891\u8D28\u91CF\u4F18\u826F\u3002\u89C6\u9891\u8BFE\u4E3A\u5B66\u751F\u63D0\u4F9B\u4E86\u6781\u5927\u7684\u5B66\u4E60\u7075\u6D3B\u6027\uFF0C\u4ED6\u4EEC\u53EF\u4EE5\u4F9D\u636E\u4E2A\u4EBA\u7684\u65F6\u95F4\u5B89\u6392\u81EA\u7531\u9009\u62E9\u5B66\u4E60\u65F6\u95F4\uFF0C\u4E0D\u53D7\u5730\u70B9\u9650\u5236\u3002\u7279\u522B\u9002\u7528\u4E8E\u7CFB\u7EDF\u5316\u5B66\u4E60\u4F53\u7CFB\u7684\u5185\u5BB9\uFF0C\u89C6\u9891\u8BFE\u80FD\u591F\u5E2E\u52A9\u5B66\u751F\u6309\u90E8\u5C31\u73ED\u5730\u638C\u63E1\u77E5\u8BC6\uFF0C\u5B9E\u73B0\u81EA\u4E3B\u9AD8\u6548\u5B66\u4E60\u3002"},null),this.dataShow?e(Pt,{class:It.videoList,loading:this.loading,"onUpdate:loading":a=>this.loading=a,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},os(t=this.list.map(a=>e(ss,{item:a,onClick:this.onDetail},null)))?t:{default:()=>[t]}):e(w,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}});const rs="_headerContent_gt9yb_1",cs="_teacherContent_gt9yb_5",ls="_teacherUs_gt9yb_10",us="_teacherIcon_gt9yb_14",hs="_avatar_gt9yb_18",ds="_avatarActive_gt9yb_26",ps="_teacherIconVip_gt9yb_30",ms="_teacherInfo_gt9yb_37",gs="_teacherInfoName_gt9yb_42",_s="_teacherHonor_gt9yb_56",fs="_score_gt9yb_65",bs="_headerCount_gt9yb_68",vs="_teacherOperation_gt9yb_75",Is="_btn_gt9yb_88",ys="_btnStar_gt9yb_100",Ss="_subjectSection_gt9yb_104",Cs="_iconCert_gt9yb_114",Ts="_followFans_gt9yb_118",js="_iconVip_gt9yb_157",Ls="_iconOther_gt9yb_161",Ns="_teacherCert_gt9yb_177",Ps="_teacherLast_gt9yb_181",Ds="_subjectList_gt9yb_188",ks="_piNameSubject_gt9yb_199",Es="_subject_gt9yb_104",Fs="_rTitle_gt9yb_219",ws="_liveTag_gt9yb_232",xs="_teacherName_gt9yb_240",Bs="_teacherIcons_gt9yb_248",Vs="_teaherPopup_gt9yb_252",As="_teacherIconWrap_gt9yb_257",$s="_teacherIconItem_gt9yb_263",Ms="_teacherIconItemTop_gt9yb_266",Hs="_teacherIconTitle_gt9yb_276",Os="_teacherIconDes_gt9yb_281",Ys="_closeIcon_gt9yb_288",Gs="_liveList_gt9yb_296",Us="_headerFollow_gt9yb_299",Rs="_unlinkeBtn_gt9yb_333",zs="_followContainer_gt9yb_340";var h={headerContent:rs,teacherContent:cs,teacherUs:ls,teacherIcon:us,avatar:hs,avatarActive:ds,teacherIconVip:ps,teacherInfo:ms,teacherInfoName:gs,teacherHonor:_s,score:fs,headerCount:bs,teacherOperation:vs,btn:Is,btnStar:ys,subjectSection:Ss,"teacher-bottom":"_teacher-bottom_gt9yb_109",iconCert:Cs,followFans:Ts,"teacher-data":"_teacher-data_gt9yb_121","teacher-data_item":"_teacher-data_item_gt9yb_126",iconVip:js,iconOther:Ls,"teacher-info":"_teacher-info_gt9yb_166","teacher-name":"_teacher-name_gt9yb_169",teacherCert:Ns,teacherLast:Ps,subjectList:Ds,piNameSubject:ks,subject:Es,rTitle:Fs,liveTag:ws,teacherName:xs,teacherIcons:Bs,teaherPopup:Vs,teacherIconWrap:As,teacherIconItem:$s,teacherIconItemTop:Ms,teacherIconTitle:Hs,teacherIconDes:Os,closeIcon:Ys,liveList:Gs,headerFollow:Us,unlinkeBtn:Rs,followContainer:zs};const N=t=>{const a=`../images/${t}`;return{"../images/cert_active.png":O,"../images/cert_default.png":Y,"../images/follow_bg.png":G,"../images/head_bg.png":U,"../images/icon-add-star.png":R,"../images/icon-add.png":z,"../images/icon-cert.png":q,"../images/icon-chat.png":W,"../images/icon-close.png":J,"../images/icon-live.png":K,"../images/icon-message.png":Q,"../images/icon-small-live.png":X,"../images/icon1.png":Z,"../images/icon2.png":tt,"../images/icon3.png":et,"../images/icon_fans.png":st,"../images/icon_subject.png":at,"../images/icon_subject1.png":it,"../images/icon_video.png":_t,"../images/live_active.png":ot,"../images/live_bg.png":nt,"../images/live_default.png":rt,"../images/music_active.png":ct,"../images/music_default.png":lt,"../images/svip_active.png":ut,"../images/teacher-icon.png":ht,"../images/video_active.png":dt,"../images/video_default.png":pt,"../images/vip_active.png":mt,"../images/vip_default.png":gt}[a].default};var qs=y({name:"teacher-header",props:{userInfo:{type:Object,default:()=>({})},teacherId:{type:String||Number,default:""}},emits:["star"],data(){return{iconShow:!1}},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?this.userInfo.fansNum+1:this.userInfo.fansNum-1;this.$emit("star",{isStar:t,fansNum:a<=0?0:a})}catch{}},checkBadge(t){var o,n,i;let a=!1;const{userInfo:s}=this;switch(t){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":s.tag&&(a=s.tag.indexOf(t)>-1);break;case"VIP":a=((o=s.userVip)==null?void 0:o.vipType)==="VIP";break;case"SVIP":a=((n=s.userVip)==null?void 0:n.vipType)==="SVIP"||((i=s.userVip)==null?void 0:i.vipType)==="PERMANENT_SVIP";break;default:a=!1;break}return a},openTeacherIcon(){this.iconShow=!0}},render(){return e(m,null,[e("div",{class:h.headerContent},[e("div",{class:h.headerCount},[e("div",{class:h.teacherContent},[e("div",{class:h.teacherIcon,onClick:()=>{this.userInfo.liveing===1&&H({api:"joinLiveRoom",content:{roomId:this.userInfo.roomUid,teacherId:this.userInfo.userId}})}},[e(P,{class:[h.avatar,(this.checkBadge("SVIP")||this.checkBadge("VIP"))&&h.avatarActive],round:!0,src:this.userInfo.heardUrl||Gt,fit:"cover"},null),this.userInfo.liveing===1&&e("img",{src:Et,class:h.liveTag},null),(this.checkBadge("SVIP")||this.checkBadge("VIP"))&&e(P,{class:h.teacherIconVip,src:this.checkBadge("SVIP")?N("svip_active.png"):this.checkBadge("VIP")?N("vip_active.png"):""},null)]),e("div",{class:h.teacherUs},[e("div",{class:h.teacherInfo},[e("div",{class:h.teacherInfoName},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.userId||""}`]),e("div",{class:h.teacherHonor},[e("div",{class:h.level},[this.starGrade?e(Yt,{readonly:!0,modelValue:this.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):""])])]),e("div",{class:h["teacher-bottom"]},[e("img",{src:N("icon-cert.png"),class:h.iconCert},null),e("div",{class:h["teacher-data"]},[e("div",{class:h["teacher-data_item"]},[c("\u7C89\u4E1D "),e("span",null,[this.userInfo.fansNum||0])]),e("div",{class:h["teacher-data_item"]},[c("\u5DF2\u4E0A\u8BFE\u65F6 "),e("span",null,[this.userInfo.expTime||0])])])])])]),e("div",{class:h.piNameSubject},[e(P,{class:h.subjectSection,src:N("icon_subject1.png"),fit:"contain"},null),e("div",{class:h.subjectList},[this.subjectNameList.map(t=>e("span",{class:h.subject},[t]))])]),e("div",{class:h.teacherOperation},[e(I,{type:"primary",size:"small",class:[h.btn,!this.userInfo.isStar&&h.btnStar],onClick:this.onStart},{default:()=>[this.userInfo.isStar?e("img",{src:N("icon-add-star.png")},null):e("img",{src:N("icon-add.png")},null),this.userInfo.isStar?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]}),e(I,{type:"primary",size:"small",class:h.btn,onClick:()=>{H({api:"joinChatGroup",content:{type:"single",id:this.userInfo.imUserId}})}},{default:()=>[e("img",{src:N("icon-message.png")},null),c("\u804A\u5929")]})])])])])}}),Ws=y({name:"VIP_COURSE",props:{userInfo:{type:Object,default:{}}},data(){const t=this.$route.query;return{teacherId:t.teacherId,subjectId:t.subjectId,teacherSubjectList:[],subjectStatus:!1,subjectInfo:{freeMinutes:0,subjectPrice:0,courseMinutes:0,id:null,subjectName:"",subjectId:0},courseNum:4,calendarStatus:!1,calendarList:[],selectCourseList:[],coursePlanStatus:!1,selectStatus:!1,coursePlanList:[],calendarDate:l().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,groupType:"VIP"}})).data||[];if(s.length>0){const o=this.subjectId||((t=_.user.data)==null?void 0:t.subjectId),i=s.find(C=>C.subjectId===Number(o))||s[0],{subjectName:u,subjectPrice:S,courseMinutes:B,subjectId:V,id:A,freeMinutes:$}=i;this.subjectInfo={subjectPrice:S,freeMinutes:$,id:A,courseMinutes:B,subjectName:u,subjectId:V},s.forEach(C=>{C.name=C.subjectName}),this.teacherSubjectList=s,this.getList(),this.onBuy(!0),this.settingStatus=!0;const M=await d.post("/api-teacher/open/appVersion",{data:{platform:_.platformType==="STUDENT"?"ios-student":"ios-teacher",version:_.version}});this.settingStatus=!M.data.check}else this.settingStatus=!1;this.loadDataStatus=!1}catch{this.loadDataStatus=!1}},computed:{showSelectList(){let a=[...this.selectCourseList];return a.forEach(s=>{s.title=l(s.startTime).format("YYYY-MM-DD")+" "+E(l(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){ft("\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{const s=t||l().add(1,"day").toDate();let o={day:l(s).format("DD"),month:l(s).format("MM"),year:l(s).format("YYYY")};const i=(await d.post("/api-student/courseSchedule/createPracticeCourseCalendar",{data:{...o,teacherSubjectPriceId:this.subjectInfo.id,studentId:(a=_.user.data)==null?void 0:a.userId,teacherId:this.teacherId}})).data||[];let u={};i.forEach(S=>{u[S.date]=S}),this.calendarList=u,this.calendarStatus=i.length>0}catch{}},onSelectDay(t){const a=t||[];let s=[...this.selectCourseList];a.forEach(n=>{!s.some(u=>u.startTime===n.startTime)&&s.push({...n})});let o=[];s.forEach(n=>{a.some(u=>u.startTime===n.startTime)&&o.push(n)}),o.sort((n,i)=>n.startTime>i.startTime?1:n.startTime<i.startTime?-1:0),console.log(o,"list"),this.selectCourseList=[...o]},onCloseTag(t){L.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(n=>{a.push({startTime:n.startTime,endTime:n.endTime})}),((await d.post("/api-student/courseGroup/lockCourseToCache",{data:{courseFreeMinutes:this.subjectInfo.freeMinutes,courseNum:this.courseNum,courseType:"VIP",loop:this.selectType==="noEnough"?1:0,teacherId:this.teacherId,timeList:[...a]}})).data||[]).forEach((n,i)=>{this.coursePlanList[i]={...this.coursePlanList[i],startTime:n.startTime,endTime:n.endTime,classNum:i+1}}),this.coursePlanStatus=!0,this.selectStatus=!0,t&&t()}catch(a){const s=a.message;L.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:"VIP_COURSE",bizId:this.teacherId}}),s=this.subjectInfo,o=[...this.coursePlanList];o.forEach(i=>{i.classDate=l(i.startTime).format("YYYY-MM-DD"),i.title=`${l(i.startTime).format("YYYY-MM-DD")} ${E(l(i.startTime).day())} ${l(i.startTime).format("HH:mm")}~${l(i.endTime).format("HH:mm")}`}),g.orderObject.orderType="VIP_COURSE",g.orderObject.orderName=s.subjectName+"VIP\u5B9A\u5236\u8BFE",g.orderObject.orderDesc=s.subjectName+"VIP\u5B9A\u5236\u8BFE",g.orderObject.actualPrice=Number((this.courseNum*s.subjectPrice).toFixed(2)),g.orderObject.orderNo="",g.orderObject.orderList=[{orderType:"VIP_COURSE",goodsName:s.subjectName+"VIP\u5B9A\u5236\u8BFE",courseGroupName:s.subjectName+"VIP\u5B9A\u5236\u8BFE",courseIntroduce:s.subjectName+"VIP\u5B9A\u5236\u8BFE",subjectId:s.subjectId,singleCourseMinutes:s.courseMinutes,teacherSubjectPriceId:s.id,courseNum:this.courseNum,coursePrice:(this.courseNum*s.subjectPrice).toFixed(2),price:(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 n=a.data;n?L.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()=>{Nt(n,this.routerTo)}).catch(()=>{L.close(),this.cancelPayment(n.orderNo)}):!t&&this.routerTo()}catch{}},routerTo(){this.$router.push({path:"/orderDetail",query:{orderType:"VIP_COURSE"}})},async cancelPayment(t){try{await d.post("/api-student/userOrder/orderCancel",{data:{orderNo:t}})}catch{}}},render(){return e(m,null,[e("div",{class:r.tipSection},[e(x,{type:"LIVE_COURSE",title:"\u4EC0\u4E48\u662FVIP\u5B9A\u5236\u8BFE\uFF1F",content:"VIP\u5B9A\u5236\u8BFE\u7A0B\u91C7\u7528\u4E00\u5BF9\u4E00\u4E13\u5C5E\u6388\u8BFE\u6A21\u5F0F\uFF0C\u6BCF\u8282\u8BFE\u65F6\u957F\u4E3A45\u5206\u949F\u3002\u8BFE\u7A0B\u5185\u5BB9\u6839\u636E\u5B66\u751F\u7684\u5177\u4F53\u9700\u6C42\u91CF\u8EAB\u6253\u9020\uFF0C\u65E8\u5728\u5168\u9762\u63D0\u5347\u5B66\u751F\u7684\u4E2A\u4EBA\u6280\u80FD\u4E0E\u8868\u73B0\u3002\u4E0D\u8BBA\u662F\u5E0C\u671B\u5728\u4E50\u5668\u6F14\u594F\u6280\u5DE7\u4E0A\u53D6\u5F97\u7A81\u7834\uFF0C\u5982\u63D0\u9AD8\u6307\u6CD5\u7CBE\u51C6\u5EA6\u3001\u6C14\u606F\u63A7\u5236\u80FD\u529B\u6216\u8282\u594F\u638C\u63E1\u7B49\uFF1B\u8FD8\u662F\u4E3A\u5373\u5C06\u5230\u6765\u7684\u91CD\u8981\u6D3B\u52A8\u3001\u6BD4\u8D5B\u6216\u8003\u7EA7\u505A\u5145\u5206\u51C6\u5907\uFF0C\u6211\u4EEC\u90FD\u80FD\u63D0\u4F9B\u9AD8\u5EA6\u5339\u914D\u7684\u6559\u5B66\u65B9\u6848\u3002\u6B64\u5916\uFF0C\u6559\u5B66\u8FDB\u5EA6\u5C06\u6839\u636E\u6BCF\u4F4D\u5B66\u5458\u7684\u5B66\u4E60\u5438\u6536\u60C5\u51B5\u7075\u6D3B\u8C03\u6574\uFF0C\u786E\u4FDD\u6BCF\u4E2A\u4EBA\u90FD\u80FD\u5728\u6700\u9002\u5408\u81EA\u5DF1\u7684\u8282\u594F\u4E2D\u7A33\u6B65\u524D\u8FDB\uFF0C\u624E\u5B9E\u63D0\u5347\u4E2A\u4EBA\u80FD\u529B\u3002"},null)]),!this.loadDataStatus&&(this.settingStatus?e(m,null,[e("div",{class:r.practice},[e(bt,{class:r.group,border:!1},{default:()=>[e(v,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:this.subjectInfo.subjectName,onClick:()=>this.subjectStatus=!0},null),this.subjectInfo.subjectPrice>0&&e(v,{title:"VIP\u5B9A\u5236\u8BFE\u6536\u8D39"},{default:()=>e("div",{class:r.price},[e("span",null,[c("\xA5"),this.$filters.moneyFormat(this.subjectInfo.subjectPrice)]),c("/"),this.subjectInfo.courseMinutes,c("\u5206\u949F")])}),e(v,{title:"\u8BFE\u65F6\u6570"},{default:()=>e(jt,{modelValue:this.courseNum,"onUpdate:modelValue":t=>this.courseNum=t,theme:"round",max:12,min:4,buttonSize:22,onChange:()=>{this.selectCourseList=[]}},null)})]}),this.calendarStatus&&e("div",{class:r.group},[e(Ct,{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)]),this.showSelectList.length>0&&e(v,{class:[r.arrangeCell]},{title:()=>e("div",{class:r.rTitle},[e("span",null,[c("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>e("div",{class:r.rTag},[this.showSelectList.map(t=>e(m,null,[e(Lt,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:r.tag,onClose:()=>this.onCloseTag(t)},{default:()=>[t.title]}),e("br",null,null)]))])}),e(F,{show:this.selectStatus,class:r.selectPopup},{default:()=>[e("div",{class:r.selectContainer},[e("div",{class:r.rTitle},[e("span",null,[c("\u63D0\u793A")])]),e("div",{class:r.selectPopupContent},[e("p",{class:r.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:r.times},[this.coursePlanList.map(t=>e("span",null,[l(t.startTime||new Date).format("YYYY-MM-DD")," ",l(t.startTime||new Date).format("HH:mm"),c("~"),l(t.endTime||new Date).format("HH:mm")]))])]),e("div",{class:r.selectBtn},[e(I,{class:r.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:r.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[c("\u786E\u8BA4")]})])])]}),e(Tt,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:t=>{const{subjectName:a,subjectPrice:s,courseMinutes:o,id:n,subjectId:i,freeMinutes:u}=t;this.subjectInfo={subjectPrice:s,freeMinutes:u,id:n,courseMinutes:o,subjectName:a,subjectId:i},this.subjectStatus=!1}},null)]),e("div",{class:["btnGroup",r.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[e(I,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[c("\u786E\u8BA4\u7EA6\u8BFE")]})])]):e(w,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653EVIP\u5B9A\u5236\u8BFE"},null))])}});const Js="_filterTitle_cir06_1",Ks="_fansGroup_cir06_9",Qs="_introduce_cir06_19",Xs="_fansImage_cir06_25",Zs="_fansTitle_cir06_31",ta="_joinContainer_cir06_37",ea="_joinText_cir06_40";var j={filterTitle:Js,fansGroup:Ks,introduce:Qs,fansImage:Xs,fansTitle:Zs,joinContainer:ta,joinText:ea};const sa=t=>{const a=`../images/${t}`;return{"../images/cert_active.png":O,"../images/cert_default.png":Y,"../images/follow_bg.png":G,"../images/head_bg.png":U,"../images/icon-add-star.png":R,"../images/icon-add.png":z,"../images/icon-cert.png":q,"../images/icon-chat.png":W,"../images/icon-close.png":J,"../images/icon-live.png":K,"../images/icon-message.png":Q,"../images/icon-small-live.png":X,"../images/icon1.png":Z,"../images/icon2.png":tt,"../images/icon3.png":et,"../images/icon_fans.png":st,"../images/icon_subject.png":at,"../images/icon_subject1.png":it,"../images/icon_video.png":_t,"../images/live_active.png":ot,"../images/live_bg.png":nt,"../images/live_default.png":rt,"../images/music_active.png":ct,"../images/music_default.png":lt,"../images/svip_active.png":ut,"../images/teacher-icon.png":ht,"../images/video_active.png":dt,"../images/video_default.png":pt,"../images/vip_active.png":mt,"../images/vip_default.png":gt}[a].default};var aa=y({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}}),ft("\u7533\u8BF7\u6210\u529F"),this.desc="",this.onClose&&this.onClose(this.item.id)}catch{}}},render(){return e(m,null,[e("div",{class:[j.filterTitle,"van-hairline--bottom"]},[c("\u7533\u8BF7\u5165\u7FA4")]),e("div",{class:j.joinContainer},[e(v,{center:!0,class:j.fansGroup,border:!1},{icon:()=>e(P,{src:this.item.img||sa("icon_fans.png"),fit:"cover",class:j.fansImage},null),title:()=>e("div",{class:j.fansTitle},[e("div",{class:j.title},[this.item.name]),e("p",{class:["van-ellipsis",j.introduce]},[this.item.introduce])])}),e(Rt,{type:"textarea",class:j.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:()=>[c("\u786E\u8BA4")]})])])}});const ia="_fansSection_x9kaa_1",oa="_fansBg_x9kaa_6",na="_noFans_x9kaa_9",ra="_fansList_x9kaa_16",ca="_fansGroup_x9kaa_22",la="_fansImage_x9kaa_50",ua="_fansTitle_x9kaa_57",ha="_title_x9kaa_62",da="_introduce_x9kaa_66";var T={fansSection:ia,fansBg:oa,noFans:na,fansList:ra,fansGroup:ca,fansImage:la,fansTitle:ua,title:ha,introduce:da},pa="./assets/fans-bg.fa43239b.png",ma=y({name:"fans-list",props:{fansList:{type:Array,default:()=>[]}},emits:["confirm"],setup(t,{emit:a}){const s=async o=>{if(!o.hasWaitAuditFlag&&!o.existFlag){a("confirm",o);return}o.existFlag&&H({api:"joinChatGroup",content:{type:"multi",id:o.id}})};return()=>e("div",{class:T.fansSection},[e("img",{src:pa,class:T.fansBg},null),t.fansList&&t.fansList.length>0?e("div",{class:T.fansList},[t.fansList.map(o=>e(v,{center:!0,class:T.fansGroup,border:!1},{icon:()=>e(P,{src:o.img||Ft,fit:"cover",class:T.fansImage},null),title:()=>e("div",{class:T.fansTitle},[e("div",{class:[T.title,"van-ellipsis"]},[o.name]),e("p",{class:["van-ellipsis",T.introduce]},[o.introduce])]),default:()=>e(I,{type:"primary",size:"small",round:!0,disabled:o.hasWaitAuditFlag,onClick:()=>s(o)},{default:()=>[o.existFlag?"\u53BB\u804A\u5929":"",o.hasWaitAuditFlag?"\u5BA1\u6838\u4E2D":"",!o.hasWaitAuditFlag&&!o.existFlag?"\u7533\u8BF7\u5165\u7FA4":""]})}))]):e("div",{class:T.noFans},[c("\u6682\u65F6\u8FD8\u6CA1\u6709\u7C89\u4E1D\u7FA4\u54E6\uFF01")])])}});const yt=t=>{const a=`./images/${t}`;return{"./images/cert_active.png":O,"./images/cert_default.png":Y,"./images/follow_bg.png":G,"./images/head_bg.png":U,"./images/icon-add-star.png":R,"./images/icon-add.png":z,"./images/icon-cert.png":q,"./images/icon-chat.png":W,"./images/icon-close.png":J,"./images/icon-live.png":K,"./images/icon-message.png":Q,"./images/icon-small-live.png":X,"./images/icon1.png":Z,"./images/icon2.png":tt,"./images/icon3.png":et,"./images/icon_fans.png":st,"./images/icon_subject.png":at,"./images/icon_subject1.png":it,"./images/icon_video.png":_t,"./images/live_active.png":ot,"./images/live_bg.png":nt,"./images/live_default.png":rt,"./images/music_active.png":ct,"./images/music_default.png":lt,"./images/svip_active.png":ut,"./images/teacher-icon.png":ht,"./images/video_active.png":dt,"./images/video_default.png":pt,"./images/vip_active.png":mt,"./images/vip_default.png":gt}[a].default};var ci=y({name:"teacherHome",data(){const t=sessionStorage.getItem("teacherHomeTabs")||"",a=this.$route.query;return{teacherId:a.teacherId,tabs:t||a.tabs||"vip",userInfo:{},background:"rgba(55, 205, 177, 0)",headColor:"#fff",height:"auto",tabsHeight:0,stickyHeightNum:0,backIconColor:"white",homeContaiterHeight:"",fansStatus:!1,fansList:[],chatItem:{},chatStatus:!1}},async mounted(){postMessage({api:"setStatusBarTextColor",content:{statusBarTextColor:!0}}),this.$nextTick(()=>{const{height:t}=vt(document.querySelector(".van-tabs__wrap"));this.tabsHeight=t,this.stickyHeight()});try{const t=await d.get("/api-student/student/queryUserInfo");Vt(t.data)}catch{}this.getTeacherDetail(),At("webViewOnResume",()=>{this.getTeacherDetail()}),Ht(document,"scroll",t=>{const{y:a}=Ot();a.value>52?(this.headColor="#000",this.background="#fff",this.backIconColor="black"):(this.background="transparent",this.headColor="#fff",this.backIconColor="white")}),Ut("\u8001\u5E08\u98CE\u91C7")},methods:{stickyHeight(){var a;let t=0;this.height==="auto"?t=this.tabsHeight:t=this.height+this.tabsHeight,this.stickyHeightNum=t,(a=this.$refs.musicListRef)==null||a.updateStickyHeight(t)},async getTeacherDetail(){try{const t=await d.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=t.data}catch{}},async getFansList(){try{const t=await d.post("/api-student/imGroup/queryTeacherGroup",{data:{type:"FAN",createUserId:this.teacherId}});this.fansList=t.data||[]}catch{}},onItemClick(t){this.$router.push({path:"/music-detail",query:{id:t.id}})}},render(){return e("div",{class:b["teacher-record"]},[e("div",{ref:"headers"},[e($t,{hideHeader:!1,background:this.background,border:!1,color:this.headColor,backIconColor:this.backIconColor,onHeaderBack:()=>{this.$nextTick(()=>{const{height:t}=vt(this.$refs.headers);this.height=Math.floor(t),this.stickyHeight()})}},null)]),e("img",{class:b.bgImg,src:this.userInfo.heardUrl},null),e("div",{class:b.bg,style:{paddingTop:this.height+"px"}},null),e("div",{class:b.teacherHeader},[e(qs,{userInfo:this.userInfo,teacherId:this.teacherId,onStar:t=>{this.userInfo.isStar=t.isStar,this.userInfo.fansNum=t.fansNum}},null),e("div",{class:b.singleSection},[e("div",{class:b.btnType},[e("div",{class:b.btn1,onClick:()=>{this.$router.push({path:"/teacher-style",query:{teacherId:this.teacherId}})}},[e("img",{src:yt("icon1.png")},null),c("\u4E2A\u4EBA\u98CE\u91C7")]),e("div",{class:b.btn2,onClick:async()=>{this.fansList.length<=0&&await this.getFansList(),this.fansStatus=!0}},[e("img",{src:yt("icon2.png")},null),c("\u7C89\u4E1D\u7FA4")])]),this.userInfo.introduction&&e("div",{class:b.singleContent},[this.userInfo.introduction])])]),e(Mt,{color:"var(--van-primary)",background:"#f8f9fc",shrink:!0,lineWidth:44,sticky:!0,offsetTop:this.height,active:this.tabs,"onUpdate:active":t=>this.tabs=t,onChange:()=>{sessionStorage.setItem("teacherHomeTabs",this.tabs)}},{default:()=>[e(D,{title:"VIP\u5B9A\u5236\u8BFE",name:"vip"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="vip"&&e(Ws,{userInfo:this.userInfo},null)])]}),e(D,{title:"\u8DA3\u7EA0\u8BFE",name:"practice"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="practice"&&e(Te,{userInfo:this.userInfo},null)])]}),e(D,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[e("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="live"&&e(Re,null,null)])]}),e(D,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[this.tabs==="video"&&e(ns,null,null)]}),e(D,{title:"\u4E50\u8C31",name:"music"},{default:()=>[this.tabs==="music"&&e(zt,{hideSearch:!0,onlySearch:!0,myself:!0,height:this.stickyHeightNum,ref:"musicListRef",onItemClick:this.onItemClick,teacherId:this.teacherId},null)]})]}),e(F,{show:this.fansStatus,class:b.fansPopup,closeable:!0,onClose:()=>this.fansStatus=!1},{default:()=>[e(ma,{fansList:this.fansList,onConfirm:t=>{this.chatStatus=!0,this.chatItem=t}},null)]}),e(F,{show:this.chatStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.chatStatus=!1},{default:()=>[e(aa,{item:this.chatItem,onClose:t=>{this.fansList.forEach(a=>{a.id===t&&(a.hasWaitAuditFlag=!0)}),this.chatStatus=!1}},null)]})])}});export{ci as default,yt as getAssetsHomeFile};