teacher-home.b2966bd9.js 47 KB

1
  1. import{i as Tt,_ as O,a as H,b as Y,c as G,d as U,e as R,f as q,g as W,h as J,j as K,k as Q,l as X,m as Z,n as tt,o as et,p as st,q as at,r as it,s as nt,t as ot,u as rt,v as ct,w as lt,x as ut,y as ht,z as dt,A as pt,B as Lt}from"./vip_default.b6a72844.js";import{d as b,U as Pt,V as Nt,j as t,N as xt,w as l,y as d,g,bd as k,T as mt,D as L,F as p,A as r,aS as E,B as v,C as w,$ as bt,n as $,b5 as Dt,Y as kt}from"./ResizeObserver.es.ee4910d8.js";import{C as Et}from"./index.d35351be.js";import"./index.ba8c8400.js";import"./index.400d59d6.js";import{T as wt,a as x}from"./index.24ef427a.js";import{C as It}from"./index.fa02f357.js";import{A as vt}from"./index.284dfb1e.js";import{C as f}from"./index.829b41eb.js";import{C as _t}from"./index.d1348f70.js";import{S as yt}from"./index.4893832b.js";import{T as St}from"./index.4b2f0ff4.js";import{a as _}from"./orderStatus.866193a0.js";import{t as jt}from"./tradeOrder.7b8ac681.js";import{L as Ct}from"./index.311c8f08.js";import{I as P}from"./index.0ab83cd1.js";import Ft from"./index.b29d1472.js";import{a as Bt,b as Vt}from"./index.6d3cd855.js";import{R as At}from"./index.c2ffbe0d.js";import{i as zt}from"./icon_teacher.40b6f077.js";import{u as Mt}from"./hooks.784d42b3.js";import{F as $t}from"./index.1fe483e1.js";import"./use-id.b04f83a2.js";import"./use-tab-status.da6cd902.js";import"./use-refs.c6e45b52.js";import"./index.a3e2911b.js";import"./index.7f82dc1b.js";import"./utils.ab7a0e0e.js";import"./index.c0f83cba.js";import"./index.03295ff3.js";import"./select-tag.b7d8b0b9.js";import"./index.465cd84a.js";import"./index.804c6354.js";import"./index.926ca9c5.js";import"./index.e338c738.js";import"./music.92c57701.js";import"./select-subject.c2ae0e81.js";import"./index.2e20aa9e.js";import"./icon_uploader.93248775.js";import"./icon-xin.a59bfaf1.js";import"./icon_album.9592f49b.js";import"./icon_album_active.25be6148.js";import"./icon_exquisite.858d352b.js";import"./icon_music_active.a468d335.js";import"./icon-play.bc9e7aab.js";import"./index.61b713fa.js";const Ot="_bgImg_siabx_33",Ht="_bg_siabx_33",Yt="_teacherHeader_siabx_51",Gt="_singleSection_siabx_55",Ut="_btnType_siabx_60",Rt="_btn2_siabx_63",qt="_btn1_siabx_64",Wt="_singleContent_siabx_89",Jt="_fansPopup_siabx_99";var I={"teacher-record":"_teacher-record_siabx_1",bgImg:Ot,bg:Ht,teacherHeader:Yt,singleSection:Gt,btnType:Ut,btn2:Rt,btn1:qt,singleContent:Wt,fansPopup:Jt};const Kt="_practice_rf5sk_1",Qt="_group_rf5sk_5",Xt="_price_rf5sk_17",Zt="_rTag_rf5sk_34",te="_tag_rf5sk_37",ee="_selectPopup_rf5sk_41",se="_selectContainer_rf5sk_46",ae="_rTitle_rf5sk_49",ie="_selectPopupContent_rf5sk_52",ne="_desc_rf5sk_55",oe="_times_rf5sk_56",re="_selectBtn_rf5sk_67",ce="_btn_rf5sk_72",le="_protocol_rf5sk_91",ue="_arrangeCell_rf5sk_95",he="_fixedBtn_rf5sk_101";var c={practice:Kt,group:Qt,price:Xt,rTag:Zt,tag:te,selectPopup:ee,selectContainer:se,rTitle:ae,selectPopupContent:ie,desc:ne,times:oe,selectBtn:re,btn:ce,protocol:le,arrangeCell:ue,fixedBtn:he};const de="_tipSection_19emr_1",pe="_iconCross_19emr_7",me="_tipTitle_19emr_15",_e="_tipContent_19emr_28",ge="_tipFooter_19emr_35";var D={tipSection:de,iconCross:pe,tipTitle:me,tipContent:_e,tipFooter:ge},F=b({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(e,{emit:a}){const s=Pt(!0);console.log(e.type,"1212");const o=()=>{const i=localStorage.getItem("teacher_home_local"),u=i?JSON.parse(i):{};return console.log(u[e.type]),!!u[e.type]},n=()=>{const i=localStorage.getItem("teacher_home_local"),u=i?JSON.parse(i):{};u[e.type]=1,localStorage.setItem("teacher_home_local",JSON.stringify(u))};return Nt(()=>{s.value=!o()}),()=>s.value?t("div",{class:D.tipSection},[t(xt,{class:D.iconCross,onClick:()=>{a("close"),s.value=!1},name:"cross"},null),t("div",{class:D.tipTitle},[t("img",{src:Tt},null),e.title]),t("div",{class:D.tipContent},[e.content]),t("div",{class:D.tipFooter,onClick:()=>{a("confirm"),n(),s.value=!1}},[e.btnTxt])]):""}}),fe=b({name:"practice",props:{userInfo:{type:Object,default:{}}},data(){const e=this.$route.query;return{teacherId:e.teacherId,subjectId:e.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 e;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 n=this.subjectId||((e=g.user.data)==null?void 0:e.subjectId),u=s.find(S=>S.subjectId===Number(n))||s[0],{subjectName:y,subjectPrice:B,courseMinutes:V,subjectId:A,id:z,freeMinutes:M}=u;this.subjectInfo={subjectPrice:B,id:z,freeMinutes:M,courseMinutes:V,subjectName:y,subjectId:A},s.forEach(S=>{S.name=S.subjectName}),this.teacherSubjectList=s,this.getList(),this.onBuy(!0),this.settingStatus=!0}else this.settingStatus=!1;const o=await d.post("/api-teacher/open/appVersion",{data:{platform:g.platformType==="STUDENT"?"ios-student":"ios-teacher",version:g.version}});this.settingStatus=!o.data.check,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")+" "+k(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){mt("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4");return}if(this.selectCourseList.length<this.courseNum){this.selectStatus=!0;return}await this._lookCourse()},async getList(e){var a;try{const s=e||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=g.user.data)==null?void 0:a.userId,teacherId:this.teacherId}})).data||[];let u={};i.forEach(y=>{u[y.date]=y}),this.calendarList=u,this.calendarStatus=i.length>0}catch{}},onSelectDay(e){const a=e||[];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(e){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===e.startTime);this.selectCourseList.splice(a,1)})},async _lookCourse(e){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,e&&e()}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 e=this.coursePlanStatus;await this._lookCourse(()=>{e&&(this.selectStatus=!1,this.onBuy())})},async onBuy(e){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")} ${k(l(i.startTime).day())} ${l(i.startTime).format("HH:mm")}~${l(i.endTime).format("HH:mm")}`}),_.orderObject.orderType="PRACTICE",_.orderObject.orderName=s.subjectName+"\u8DA3\u7EA0\u8BFE",_.orderObject.orderDesc=s.subjectName+"\u8DA3\u7EA0\u8BFE",_.orderObject.actualPrice=Number((this.courseNum*s.subjectPrice).toFixed(2)),_.orderObject.orderNo="",_.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),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()=>{jt(n,this.routerTo)}).catch(()=>{L.close(),this.cancelPayment(n.orderNo)}):!e&&this.routerTo()}catch{}},routerTo(){this.$router.push({path:"/orderDetail",query:{orderType:"PRACTICE"}})},async cancelPayment(e){try{await d.post("/api-student/userOrder/orderCancel",{data:{orderNo:e}})}catch{}}},render(){return t(p,null,[!this.loadDataStatus&&(this.settingStatus?t(p,null,[t("div",{class:c.practice},[t(F,{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),t(_t,{class:c.group,border:!1},{default:()=>[t(f,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:this.subjectInfo.subjectName,onClick:()=>this.subjectStatus=!0},null),this.subjectInfo.subjectPrice>0&&t(f,{title:"\u8DA3\u7EA0\u8BFE\u6536\u8D39"},{default:()=>t("div",{class:c.price},[t("span",null,[r("\xA5"),this.$filters.moneyFormat(this.subjectInfo.subjectPrice)]),r("/"),this.subjectInfo.courseMinutes,r("\u5206\u949F")])}),t(f,{title:"\u8BFE\u65F6\u6570"},{default:()=>t(yt,{modelValue:this.courseNum,"onUpdate:modelValue":e=>this.courseNum=e,theme:"round",max:12,min:1,buttonSize:22,onChange:()=>{this.selectCourseList=[]}},null)})]}),this.calendarStatus&&t("div",{class:c.group},[t(It,{selectList:this.selectCourseList,list:this.calendarList,maxDays:this.courseNum,nextMonth:e=>this.getList(e),prevMonth:e=>this.getList(e),selectDay:this.onSelectDay,calendarDate:this.calendarDate,"onUpdate:calendarDate":e=>this.calendarDate=e},null)]),this.showSelectList.length>0&&t(f,{class:[c.arrangeCell]},{title:()=>t("div",{class:c.rTitle},[t("span",null,[r("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>t("div",{class:c.rTag},[this.showSelectList.map(e=>t(p,null,[t(St,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:c.tag,onClose:()=>this.onCloseTag(e)},{default:()=>[e.title]}),t("br",null,null)]))])}),t(E,{show:this.selectStatus,class:c.selectPopup},{default:()=>[t("div",{class:c.selectContainer},[t("div",{class:c.rTitle},[t("span",null,[r("\u63D0\u793A")])]),t("div",{class:c.selectPopupContent},[t("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&&t("p",{class:c.times},[this.coursePlanList.map(e=>t("span",null,[l(e.startTime||new Date).format("YYYY-MM-DD")," ",l(e.startTime||new Date).format("HH:mm"),r("~"),l(e.endTime||new Date).format("HH:mm")]))])]),t("div",{class:c.selectBtn},[t(v,{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"]}),t(v,{class:c.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[r("\u786E\u8BA4")]})])])]}),t(vt,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:e=>{const{subjectName:a,subjectPrice:s,courseMinutes:o,id:n,subjectId:i,freeMinutes:u}=e;this.subjectInfo={subjectPrice:s,id:n,freeMinutes:u,courseMinutes:o,subjectName:a,subjectId:i},this.subjectStatus=!1}},null)]),t("div",{class:["btnGroup",c.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[t(v,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[r("\u786E\u8BA4\u7EA6\u8BFE")]})])]):t(w,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653E\u8DA3\u7EA0\u8BFE"},null))])}});const be="_liveList_16lst_1",Ie="_liCover_16lst_4",ve="_liContent_16lst_10",ye="_liTitle_16lst_17",Se="_buyNum_16lst_25",je="_num_16lst_26",Ce="_price_16lst_30",Te="_priceNum_16lst_34",Le="_label_16lst_43",Pe="_liveGroup_16lst_46",Ne="_subjectName_16lst_51",xe="_timerString_16lst_62",De="_tips_16lst_68";var m={liveList:be,liCover:Ie,liContent:ve,liTitle:ye,buyNum:Se,num:je,price:Ce,priceNum:Te,label:Le,liveGroup:Pe,subjectName:Ne,timerString:xe,tips:De};function ke(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!bt(e)}var Ee=b({name:"live",data(){const e=this.$route.query;return{list:[],dataShow:!0,loading:!1,finished:!1,params:{teacherId:e.teacherId,groupStatus:"APPLY",page:1,rows:20}}},mounted(){this.getList()},methods:{formatTime(e){const a=l(e||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 e={...this.params};g.version&&(e.version=g.version||"",e.platform="ios-student");const a=await d.post("/api-student/courseGroup/queryPageCourseGroup",{data:{...e}});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(e){this.$router.push({path:"/liveDetail",query:{groupId:e.courseGroupId}})}},render(){let e;return t(p,null,[t(F,{type:"LIVE",class:m.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?t(Ct,{class:m.liveList,loading:this.loading,"onUpdate:loading":a=>this.loading=a,immediateCheck:!1,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86"},ke(e=this.list.map(a=>t(_t,{class:m.liveGroup,border:!1,onClick:()=>this.onDetail(a)},{default:()=>[t(f,{style:{paddingTop:"19px",paddingBottom:"19px"}},{icon:()=>t("div",{style:{position:"relative",lineHeight:"0"}},[t(P,{class:m.liCover,src:a.backgroundPic,fit:"cover"},null),t("span",{class:m.subjectName},[a==null?void 0:a.subjectName])]),title:()=>t("div",{class:m.liContent},[t("div",{class:[m.liTitle,"van-ellipsis"]},[a.courseGroupName]),t("div",{class:m.price},[a.coursePrice>0&&t(p,null,[t("span",{class:m.priceNum},[t("i",null,[r("\xA5")]),this.$filters.moneyFormat(a.coursePrice)])]),t("span",{class:m.label},[a.coursePrice>0&&"/",a.courseNum,r("\u8BFE\u65F6")])])])}),t(f,{titleStyle:{color:"#666666",fontSize:"13px"}},{title:()=>t("span",{class:m.timerString},[this.formatTime(a.salesStartDate)]),default:()=>t("div",null,[a.existBuy===1?t("span",{class:m.buyNum},[r("\u5B66\u4E60")]):t("span",{class:m.num},[a.studentCount,r("\u4EBA\u5B66\u4E60")])])})]})))?e:{default:()=>[e]}):t(w,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u76F4\u64AD\u8BFE"},null)])}});const we="_videoItem_9rujg_1",Fe="_viCover_9rujg_8",Be="_viSection_9rujg_13",Ve="_viTitle_9rujg_16",Ae="_viUserNum_9rujg_21",ze="_viPrice_9rujg_26",Me="_priceNum_9rujg_31",$e="_label_9rujg_40",Oe="_subjectName_9rujg_43";var j={videoItem:we,viCover:Fe,viSection:Be,viTitle:Ve,viUserNum:Ae,viPrice:ze,priceNum:Me,label:$e,subjectName:Oe},He=b({name:"VideoItem",props:{item:Object,onClick:{type:Function,default:e=>{}}},render(){const e=this.item;return t("div",{class:j.videoItem,onClick:()=>{this.onClick(e)}},[t("div",{style:{position:"relative"}},[t(P,{class:j.viCover,fit:"cover",src:e==null?void 0:e.lessonCoverUrl},null),t("span",{class:j.subjectName},[e==null?void 0:e.lessonSubjectName])]),t("div",{class:j.viSection},[t("div",{class:[j.viTitle,"van-ellipsis"]},[e==null?void 0:e.lessonName]),t("div",{class:j.viPrice},[t("span",{class:j.priceNum},[e.payType==="VIP"?t("span",{style:{color:"#C76E21"}},[r("\u4F1A\u5458")]):t(p,null,[(e==null?void 0:e.lessonPrice)>0&&t(p,null,[t("i",null,[r("\uFFE5")]),e==null?void 0:e.lessonPrice]),(e==null?void 0:e.lessonPrice)<=0&&e.auditVersion!==0&&t(p,null,[t("i",null,[r("\uFFE5")]),r("0")]),(e==null?void 0:e.lessonPrice)<=0&&e.auditVersion===0&&t("span",{style:{color:"#20BEA0"}},[r("\u514D\u8D39")])])]),t("span",{class:j.label},[r("/"),e==null?void 0:e.lessonCount,r("\u8BFE\u65F6")])]),t("div",{class:j.viUserNum},[e==null?void 0:e.countStudent,r("\u4EBA\u5B66\u4E60")])])])}});const Ye="_videoList_15ff1_1",Ge="_tips_15ff1_12";var gt={videoList:Ye,tips:Ge};function Ue(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!bt(e)}var Re=b({name:"VideoList",data(){const e=this.$route.query;return{list:[],dataShow:!0,loading:!1,finished:!1,params:{teacherId:e.teacherId,page:1,rows:20}}},mounted(){this.getList()},methods:{async getList(){try{const e={...this.params};g.version&&(e.version=g.version||"",e.platform="ios-student");const a=await d.post("/api-student/videoLesson/selectGroup",{data:{...e}});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(e){this.$router.push({path:"/videoDetail",query:{groupId:e.id}})}},render(){let e;return t(p,null,[t(F,{type:"VIDEO",class:gt.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?t(Ct,{class:gt.videoList,loading:this.loading,"onUpdate:loading":a=>this.loading=a,finished:this.finished,immediateCheck:!1,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},Ue(e=this.list.map(a=>t(He,{item:a,onClick:this.onDetail},null)))?e:{default:()=>[e]}):t(w,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u89C6\u9891\u8BFE"},null)])}}),qe=b({name:"music",data(){return{teacherId:this.$route.query.teacherId,list:[],dataShow:!1,loading:!1,finished:!1,params:{page:1,rows:20}}},methods:{onItemClick(e){this.$router.push({path:"/music-detail",query:{id:e.id}})}},render(){return t(p,null,[t(Ft,{hideSearch:!0,myself:!0,onItemClick:this.onItemClick,teacherId:this.teacherId},null)])}});const We="_headerContent_enxzj_1",Je="_teacherContent_enxzj_6",Ke="_teacherUs_enxzj_11",Qe="_teacherIcon_enxzj_15",Xe="_avatar_enxzj_19",Ze="_avatarActive_enxzj_27",ts="_teacherIconVip_enxzj_31",es="_teacherInfo_enxzj_38",ss="_teacherInfoName_enxzj_43",as="_teacherHonor_enxzj_57",is="_score_enxzj_67",ns="_headerCount_enxzj_70",os="_teacherOperation_enxzj_77",rs="_btn_enxzj_90",cs="_btnStar_enxzj_99",ls="_subjectSection_enxzj_104",us="_iconCert_enxzj_114",hs="_followFans_enxzj_118",ds="_iconVip_enxzj_157",ps="_iconOther_enxzj_161",ms="_teacherCert_enxzj_177",_s="_teacherLast_enxzj_181",gs="_subjectList_enxzj_188",fs="_piNameSubject_enxzj_198",bs="_subject_enxzj_104",Is="_rTitle_enxzj_218",vs="_liveTag_enxzj_231",ys="_teacherName_enxzj_247",Ss="_teacherIcons_enxzj_255",js="_teaherPopup_enxzj_259",Cs="_teacherIconWrap_enxzj_264",Ts="_teacherIconItem_enxzj_270",Ls="_teacherIconItemTop_enxzj_273",Ps="_teacherIconTitle_enxzj_283",Ns="_teacherIconDes_enxzj_288",xs="_closeIcon_enxzj_295",Ds="_liveList_enxzj_303",ks="_headerFollow_enxzj_306",Es="_unlinkeBtn_enxzj_340",ws="_followContainer_enxzj_347";var h={headerContent:We,teacherContent:Je,teacherUs:Ke,teacherIcon:Qe,avatar:Xe,avatarActive:Ze,teacherIconVip:ts,teacherInfo:es,teacherInfoName:ss,teacherHonor:as,score:is,headerCount:ns,teacherOperation:os,btn:rs,btnStar:cs,subjectSection:ls,"teacher-bottom":"_teacher-bottom_enxzj_109",iconCert:us,followFans:hs,"teacher-data":"_teacher-data_enxzj_121","teacher-data_item":"_teacher-data_item_enxzj_126",iconVip:ds,iconOther:ps,"teacher-info":"_teacher-info_enxzj_166","teacher-name":"_teacher-name_enxzj_169",teacherCert:ms,teacherLast:_s,subjectList:gs,piNameSubject:fs,subject:bs,rTitle:Is,liveTag:vs,teacherName:ys,teacherIcons:Ss,teaherPopup:js,teacherIconWrap:Cs,teacherIconItem:Ts,teacherIconItemTop:Ls,teacherIconTitle:Ps,teacherIconDes:Ns,closeIcon:xs,liveList:Ds,headerFollow:ks,unlinkeBtn:Es,followContainer:ws};const N=e=>{const a=`../images/${e}`;return{"../images/cert_active.png":O,"../images/cert_default.png":H,"../images/follow_bg.png":Y,"../images/head_bg.png":G,"../images/icon-add.png":U,"../images/icon-cert.png":R,"../images/icon-chat.png":q,"../images/icon-close.png":W,"../images/icon-message.png":J,"../images/icon1.png":K,"../images/icon2.png":Q,"../images/icon3.png":X,"../images/icon_fans.png":Z,"../images/icon_subject.png":tt,"../images/icon_subject1.png":et,"../images/icon_video.png":st,"../images/live_active.png":at,"../images/live_bg.png":it,"../images/live_default.png":nt,"../images/music_active.png":ot,"../images/music_default.png":rt,"../images/svip_active.png":ct,"../images/teacher-icon.png":lt,"../images/video_active.png":ut,"../images/video_default.png":ht,"../images/vip_active.png":dt,"../images/vip_default.png":pt}[a].default};var Fs=b({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:e}=this.userInfo;return Number(e)||0}},methods:{async onStart(){try{const e=this.userInfo.isStar?0:1;await d.get("/api-student/teacher/starOrUnStar",{params:{userId:this.teacherId,starStatus:e}});const a=e?this.userInfo.fansNum+1:this.userInfo.fansNum-1;this.$emit("star",{isStar:e,fansNum:a<=0?0:a})}catch{}},checkBadge(e){var o,n,i;let a=!1;const{userInfo:s}=this;switch(e){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":s.tag&&(a=s.tag.indexOf(e)>-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 t(p,null,[t("div",{class:h.headerContent},[t("div",{class:h.headerCount},[t("div",{class:h.teacherContent},[t("div",{class:h.teacherIcon,onClick:()=>{this.userInfo.liveing===1&&$({api:"joinLiveRoom",content:{roomId:this.userInfo.roomUid,teacherId:this.userInfo.userId}})}},[t(P,{class:[h.avatar,(this.checkBadge("SVIP")||this.checkBadge("VIP"))&&h.avatarActive],round:!0,src:this.userInfo.heardUrl||zt,fit:"cover"},null),this.userInfo.liveing===1&&t("p",{class:h.liveTag},[r("\u76F4\u64AD\u4E2D")]),(this.checkBadge("SVIP")||this.checkBadge("VIP"))&&t(P,{class:h.teacherIconVip,src:this.checkBadge("SVIP")?N("svip_active.png"):this.checkBadge("VIP")?N("vip_active.png"):""},null)]),t("div",{class:h.teacherUs},[t("div",{class:h.teacherInfo},[t("div",{class:h.teacherInfoName},[this.userInfo.username||`\u6E38\u5BA2${this.userInfo.userId||""}`]),t("div",{class:h.teacherHonor},[t("div",{class:h.level},[this.starGrade?t(At,{readonly:!0,modelValue:this.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):""])])]),t("div",{class:h["teacher-bottom"]},[t("img",{src:N("icon-cert.png"),class:h.iconCert},null),t("div",{class:h["teacher-data"]},[t("div",{class:h["teacher-data_item"]},[r("\u7C89\u4E1D "),t("span",null,[this.userInfo.fansNum||0])]),t("div",{class:h["teacher-data_item"]},[r("\u5DF2\u4E0A\u8BFE\u65F6 "),t("span",null,[this.userInfo.expTime||0])])])])])]),t("div",{class:h.piNameSubject},[t(P,{class:h.subjectSection,src:N("icon_subject1.png"),fit:"contain"},null),t("div",{class:h.subjectList},[this.subjectNameList.map(e=>t("span",{class:h.subject},[e]))])]),t("div",{class:h.teacherOperation},[t(v,{type:"primary",size:"small",class:[h.btn,h.btnStar],onClick:this.onStart},{default:()=>[this.userInfo.isStar?"":t("img",{src:N("icon-add.png")},null),this.userInfo.isStar?"\u5DF2\u5173\u6CE8":"\u5173\u6CE8"]}),t(v,{type:"primary",size:"small",class:h.btn,onClick:()=>{$({api:"joinChatGroup",content:{type:"single",id:this.userInfo.imUserId}})}},{default:()=>[t("img",{src:N("icon-message.png")},null),r("\u804A\u5929")]})])])])])}}),Bs=b({name:"VIP_COURSE",props:{userInfo:{type:Object,default:{}}},data(){const e=this.$route.query;return{teacherId:e.teacherId,subjectId:e.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 e;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 n=this.subjectId||((e=g.user.data)==null?void 0:e.subjectId),u=s.find(S=>S.subjectId===Number(n))||s[0],{subjectName:y,subjectPrice:B,courseMinutes:V,subjectId:A,id:z,freeMinutes:M}=u;this.subjectInfo={subjectPrice:B,freeMinutes:M,id:z,courseMinutes:V,subjectName:y,subjectId:A},s.forEach(S=>{S.name=S.subjectName}),this.teacherSubjectList=s,this.getList(),this.onBuy(!0),this.settingStatus=!0}else this.settingStatus=!1;const o=await d.post("/api-teacher/open/appVersion",{data:{platform:g.platformType==="STUDENT"?"ios-student":"ios-teacher",version:g.version}});this.settingStatus=!o.data.check,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")+" "+k(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){mt("\u8BF7\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4");return}if(this.selectCourseList.length<this.courseNum){this.selectStatus=!0;return}await this._lookCourse()},async getList(e){var a;try{const s=e||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=g.user.data)==null?void 0:a.userId,teacherId:this.teacherId}})).data||[];let u={};i.forEach(y=>{u[y.date]=y}),this.calendarList=u,this.calendarStatus=i.length>0}catch{}},onSelectDay(e){const a=e||[];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(e){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===e.startTime);this.selectCourseList.splice(a,1)})},async _lookCourse(e){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,e&&e()}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 e=this.coursePlanStatus;await this._lookCourse(()=>{e&&(this.selectStatus=!1,this.onBuy())})},async onBuy(e){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")} ${k(l(i.startTime).day())} ${l(i.startTime).format("HH:mm")}~${l(i.endTime).format("HH:mm")}`}),_.orderObject.orderType="VIP_COURSE",_.orderObject.orderName=s.subjectName+"VIP\u5B9A\u5236\u8BFE",_.orderObject.orderDesc=s.subjectName+"VIP\u5B9A\u5236\u8BFE",_.orderObject.actualPrice=Number((this.courseNum*s.subjectPrice).toFixed(2)),_.orderObject.orderNo="",_.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),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()=>{jt(n,this.routerTo)}).catch(()=>{L.close(),this.cancelPayment(n.orderNo)}):!e&&this.routerTo()}catch{}},routerTo(){this.$router.push({path:"/orderDetail",query:{orderType:"VIP_COURSE"}})},async cancelPayment(e){try{await d.post("/api-student/userOrder/orderCancel",{data:{orderNo:e}})}catch{}}},render(){return t(p,null,[!this.loadDataStatus&&(this.settingStatus?t(p,null,[t("div",{class:c.practice},[t(F,{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),t(_t,{class:c.group,border:!1},{default:()=>[t(f,{title:"\u9009\u62E9\u4E13\u4E1A",isLink:!0,value:this.subjectInfo.subjectName,onClick:()=>this.subjectStatus=!0},null),this.subjectInfo.subjectPrice>0&&t(f,{title:"VIP\u5B9A\u5236\u8BFE\u6536\u8D39"},{default:()=>t("div",{class:c.price},[t("span",null,[r("\xA5"),this.$filters.moneyFormat(this.subjectInfo.subjectPrice)]),r("/"),this.subjectInfo.courseMinutes,r("\u5206\u949F")])}),t(f,{title:"\u8BFE\u65F6\u6570"},{default:()=>t(yt,{modelValue:this.courseNum,"onUpdate:modelValue":e=>this.courseNum=e,theme:"round",max:12,min:1,buttonSize:22,onChange:()=>{this.selectCourseList=[]}},null)})]}),this.calendarStatus&&t("div",{class:c.group},[t(It,{selectList:this.selectCourseList,list:this.calendarList,maxDays:this.courseNum,nextMonth:e=>this.getList(e),prevMonth:e=>this.getList(e),selectDay:this.onSelectDay,calendarDate:this.calendarDate,"onUpdate:calendarDate":e=>this.calendarDate=e},null)]),this.showSelectList.length>0&&t(f,{class:[c.arrangeCell]},{title:()=>t("div",{class:c.rTitle},[t("span",null,[r("\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4")])]),label:()=>t("div",{class:c.rTag},[this.showSelectList.map(e=>t(p,null,[t(St,{plain:!0,round:!0,closeable:!0,size:"large",type:"primary",class:c.tag,onClose:()=>this.onCloseTag(e)},{default:()=>[e.title]}),t("br",null,null)]))])}),t(E,{show:this.selectStatus,class:c.selectPopup},{default:()=>[t("div",{class:c.selectContainer},[t("div",{class:c.rTitle},[t("span",null,[r("\u63D0\u793A")])]),t("div",{class:c.selectPopupContent},[t("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&&t("p",{class:c.times},[this.coursePlanList.map(e=>t("span",null,[l(e.startTime||new Date).format("YYYY-MM-DD")," ",l(e.startTime||new Date).format("HH:mm"),r("~"),l(e.endTime||new Date).format("HH:mm")]))])]),t("div",{class:c.selectBtn},[t(v,{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"]}),t(v,{class:c.btn,type:"primary",round:!0,block:!0,onClick:this.onSure},{default:()=>[r("\u786E\u8BA4")]})])])]}),t(vt,{show:this.subjectStatus,actions:this.teacherSubjectList,cancelText:"\u53D6\u6D88",closeOnClickAction:!0,onCancel:()=>this.subjectStatus=!1,onSelect:e=>{const{subjectName:a,subjectPrice:s,courseMinutes:o,id:n,subjectId:i,freeMinutes:u}=e;this.subjectInfo={subjectPrice:s,freeMinutes:u,id:n,courseMinutes:o,subjectName:a,subjectId:i},this.subjectStatus=!1}},null)]),t("div",{class:["btnGroup",c.fixedBtn],style:{background:"#fff",paddingTop:"10px"}},[t(v,{block:!0,round:!0,type:"primary",onClick:this.onSubmit},{default:()=>[r("\u786E\u8BA4\u7EA6\u8BFE")]})])]):t(w,{btnStatus:!1,classImgSize:"SMALL",tips:"\u8001\u5E08\u6682\u672A\u5F00\u653EVIP\u5B9A\u5236\u8BFE"},null))])}});const Vs="_filterTitle_cir06_1",As="_fansGroup_cir06_9",zs="_introduce_cir06_19",Ms="_fansImage_cir06_25",$s="_fansTitle_cir06_31",Os="_joinContainer_cir06_37",Hs="_joinText_cir06_40";var T={filterTitle:Vs,fansGroup:As,introduce:zs,fansImage:Ms,fansTitle:$s,joinContainer:Os,joinText:Hs};const Ys=e=>{const a=`../images/${e}`;return{"../images/cert_active.png":O,"../images/cert_default.png":H,"../images/follow_bg.png":Y,"../images/head_bg.png":G,"../images/icon-add.png":U,"../images/icon-cert.png":R,"../images/icon-chat.png":q,"../images/icon-close.png":W,"../images/icon-message.png":J,"../images/icon1.png":K,"../images/icon2.png":Q,"../images/icon3.png":X,"../images/icon_fans.png":Z,"../images/icon_subject.png":tt,"../images/icon_subject1.png":et,"../images/icon_video.png":st,"../images/live_active.png":at,"../images/live_bg.png":it,"../images/live_default.png":nt,"../images/music_active.png":ot,"../images/music_default.png":rt,"../images/svip_active.png":ct,"../images/teacher-icon.png":lt,"../images/video_active.png":ut,"../images/video_default.png":ht,"../images/vip_active.png":dt,"../images/vip_default.png":pt}[a].default};var Gs=b({name:"joinChat",props:{item:{type:Object,default:{}},onClose:{type:Function,default:e=>{}}},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}}),mt("\u7533\u8BF7\u6210\u529F"),this.desc="",this.onClose&&this.onClose(this.item.id)}catch{}}},render(){return t(p,null,[t("div",{class:[T.filterTitle,"van-hairline--bottom"]},[r("\u7533\u8BF7\u5165\u7FA4")]),t("div",{class:T.joinContainer},[t(f,{center:!0,class:T.fansGroup,border:!1},{icon:()=>t(P,{src:this.item.img||Ys("icon_fans.png"),fit:"cover",class:T.fansImage},null),title:()=>t("div",{class:T.fansTitle},[t("div",{class:T.title},[this.item.name]),t("p",{class:["van-ellipsis",T.introduce]},[this.item.introduce])])}),t($t,{type:"textarea",class:T.joinText,rows:2,maxlength:200,modelValue:this.desc,"onUpdate:modelValue":e=>this.desc=e,placeholder:"\u8BF7\u586B\u5199\u60A8\u7684\u5165\u7FA4\u7533\u8BF7\uFF0C\u4F1A\u66F4\u5FEB\u7684\u88AB\u901A\u8FC7\u5594\uFF5E"},null)]),t("div",{class:"btnGroup"},[t(v,{type:"primary",block:!0,round:!0,style:{width:"70%",margin:"0 auto"},onClick:this.onJoinChat},{default:()=>[r("\u786E\u8BA4")]})])])}});const Us="_fansSection_7v7ky_1",Rs="_fansBg_7v7ky_6",qs="_noFans_7v7ky_9",Ws="_fansList_7v7ky_16",Js="_fansGroup_7v7ky_19",Ks="_fansImage_7v7ky_47",Qs="_fansTitle_7v7ky_54",Xs="_title_7v7ky_59",Zs="_introduce_7v7ky_63";var C={fansSection:Us,fansBg:Rs,noFans:qs,fansList:Ws,fansGroup:Js,fansImage:Ks,fansTitle:Qs,title:Xs,introduce:Zs},ta="./assets/fans-bg.fa43239b.png",ea=b({name:"fans-list",props:{fansList:{type:Array,default:()=>[]}},emits:["confirm"],setup(e,{emit:a}){const s=async o=>{if(!o.hasWaitAuditFlag&&!o.existFlag){a("confirm",o);return}o.existFlag&&$({api:"joinChatGroup",content:{type:"multi",id:o.id}})};return()=>t("div",{class:C.fansSection},[t("img",{src:ta,class:C.fansBg},null),e.fansList&&e.fansList.length>0?t("div",{class:C.fansList},[e.fansList.map(o=>t(f,{center:!0,class:C.fansGroup,border:!1},{icon:()=>t(P,{src:o.img||Lt,fit:"cover",class:C.fansImage},null),title:()=>t("div",{class:C.fansTitle},[t("div",{class:[C.title,"van-ellipsis"]},[o.name]),t("p",{class:["van-ellipsis",C.introduce]},[o.introduce])]),default:()=>t(v,{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":""]})}))]):t("div",{class:C.noFans},[r("\u60A8\u8FD8\u6CA1\u6709\u7C89\u4E1D\u7FA4\u54E6\uFF01")])])}});const ft=e=>{const a=`./images/${e}`;return{"./images/cert_active.png":O,"./images/cert_default.png":H,"./images/follow_bg.png":Y,"./images/head_bg.png":G,"./images/icon-add.png":U,"./images/icon-cert.png":R,"./images/icon-chat.png":q,"./images/icon-close.png":W,"./images/icon-message.png":J,"./images/icon1.png":K,"./images/icon2.png":Q,"./images/icon3.png":X,"./images/icon_fans.png":Z,"./images/icon_subject.png":tt,"./images/icon_subject1.png":et,"./images/icon_video.png":st,"./images/live_active.png":at,"./images/live_bg.png":it,"./images/live_default.png":nt,"./images/music_active.png":ot,"./images/music_default.png":rt,"./images/svip_active.png":ct,"./images/teacher-icon.png":lt,"./images/video_active.png":ut,"./images/video_default.png":ht,"./images/vip_active.png":dt,"./images/vip_default.png":pt}[a].default};var Wa=b({name:"teacherHome",data(){const e=sessionStorage.getItem("teacherHomeTabs")||"",a=this.$route.query;return{teacherId:a.teacherId,tabs:e||a.tabs||"vip",userInfo:{},background:"rgba(55, 205, 177, 0)",headColor:"#fff",height:"auto",backIconColor:"white",homeContaiterHeight:"",fansStatus:!1,fansList:[],chatItem:{},chatStatus:!1}},async created(){},async mounted(){this.getTeacherDetail(),Dt("webViewOnResume",()=>{this.getTeacherDetail()}),Bt(document,"scroll",e=>{const{y:a}=Vt();a.value>52?(this.headColor="#000",this.background="#fff",this.backIconColor="black"):(this.background="transparent",this.headColor="#fff",this.backIconColor="white")}),Mt("\u8FBE\u4EBA\u98CE\u91C7")},methods:{async getTeacherDetail(){try{const e=await d.get("/api-student/teacher/queryTeacherHome",{params:{userId:this.teacherId}});this.userInfo=e.data}catch{}},async getFansList(){try{const e=await d.post("/api-student/imGroup/queryTeacherGroup",{data:{type:"FAN",createUserId:this.teacherId}});this.fansList=e.data||[]}catch{}}},render(){return t("div",{class:I["teacher-record"]},[t("div",{ref:"headers"},[t(Et,{background:this.background,border:!1,color:this.headColor,backIconColor:this.backIconColor,onHeaderBack:()=>{this.$nextTick(()=>{const{height:e}=kt(this.$refs.headers);this.height=e})}},null)]),t("img",{class:I.bgImg,src:this.userInfo.heardUrl},null),t("div",{class:I.bg,style:{paddingTop:this.height+"px"}},null),t("div",{class:I.teacherHeader},[t(Fs,{userInfo:this.userInfo,teacherId:this.teacherId,onStar:e=>{this.userInfo.isStar=e.isStar,this.userInfo.fansNum=e.fansNum}},null),t("div",{class:I.singleSection},[t("div",{class:I.btnType},[t("div",{class:I.btn1},[t("img",{src:ft("icon1.png")},null),r("\u4E2A\u4EBA\u98CE\u91C7")]),t("div",{class:I.btn2,onClick:async()=>{this.fansList.length<=0&&await this.getFansList(),this.fansStatus=!0}},[t("img",{src:ft("icon2.png")},null),r("\u7C89\u4E1D\u7FA4")])]),this.userInfo.introduction&&t("div",{class:I.singleContent},[this.userInfo.introduction])])]),t(wt,{color:"var(--van-primary)",background:"#f8f9fc",shrink:!0,lineWidth:44,sticky:!0,offsetTop:this.height,active:this.tabs,"onUpdate:active":e=>this.tabs=e,onChange:()=>{sessionStorage.setItem("teacherHomeTabs",this.tabs)}},{default:()=>[t(x,{title:"VIP\u5B9A\u5236\u8BFE",name:"vip"},{default:()=>[t("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="vip"&&t(Bs,{userInfo:this.userInfo},null)])]}),t(x,{title:"\u8DA3\u7EA0\u8BFE",name:"practice"},{default:()=>[t("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="practice"&&t(fe,{userInfo:this.userInfo},null)])]}),t(x,{title:"\u76F4\u64AD\u8BFE",name:"live"},{default:()=>[t("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="live"&&t(Ee,null,null)])]}),t(x,{title:"\u89C6\u9891\u8BFE",name:"video"},{default:()=>[t("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="video"&&t(Re,null,null)])]}),t(x,{title:"\u4E50\u8C31",name:"music"},{default:()=>[t("div",{style:{minHeight:this.homeContaiterHeight}},[this.tabs==="music"&&t(qe,null,null)])]})]}),t(E,{show:this.fansStatus,class:I.fansPopup,closeable:!0,onClose:()=>this.fansStatus=!1},{default:()=>[t(ea,{fansList:this.fansList,onConfirm:e=>{this.chatStatus=!0,this.chatItem=e}},null)]}),t(E,{show:this.chatStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.chatStatus=!1},{default:()=>[t(Gs,{item:this.chatItem,onClose:e=>{this.fansList.forEach(a=>{a.id===e&&(a.hasWaitAuditFlag=!0)}),this.chatStatus=!1}},null)]})])}});export{Wa as default,ft as getAssetsHomeFile};