!function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(!e)return;if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(e,r)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var o=e.minutes[0];e.form.coursePrice=o.price,e.form.courseMinutes=o.courseMinutes,e.form.freeMinutes=o.freeMinutes,e.form.lowestPrice=o.lowestPrice||0,e.form.highestPrice=o.highestPrice||0}}t.paramName===("VIP"===e.courseType?"vip_course_service_fee":"practice_service_fee")&&(e.rate=t.paramValue),t.paramName===("VIP"===e.courseType?"vip_course_account_period":"practice_account_period")&&(e.accountPeriod=t.paramValue)})),t.next=9,c.post("/api-teacher/teacher/querySubject");case 9:return i=t.sent,e.subjectList=i.data||[],t.next=13,c.post("/api-teacher/teacherSubjectPrice/list",{data:{courseType:e.courseType}});case 13:return u=t.sent,s=u.data,Array.isArray(s)&&(a=[],s.forEach((function(t){e.form.courseMinutes=t.courseMinutes,e.form.freeMinutes=t.freeMinutes,e.form.subjectId.push(t.subjectId),a.push({subjectId:t.subjectId,subjectName:t.subjectName,subjectPrice:t.subjectPrice})})),e.form.subjectIdTemp=e.form.subjectId.join(","),e.form.subjectPrice=a),t.next=18,c.post("/api-teacher/open/appVersion",{data:{platform:"STUDENT"===o.platformType?"ios-student":"ios-teacher",version:o.version}});case 18:l=t.sent,e.checkStatus=!!l.data.check,t.next=24;break;case 22:t.prev=22,t.t0=t.catch(1);case 24:case"end":return t.stop()}}),t,null,[[1,22]])})))()},methods:{onCalcCoursePrice:function(e){if(!e)return"-";var t=Number(e);return u(U(t-this.rate*t/100))},onSelect:function(e){this.form.courseMinutes=e.courseMinutes,this.form.freeMinutes=e.freeMinutes},onChoice:function(t){var r=this;console.log(t);var n=t||[];this.form.subjectId=n,this.form.subjectIdTemp=n.join(",")||"";var c=e(this.form.subjectPrice);n.forEach((function(e){-1===c.findIndex((function(t){return t.subjectId===e}))&&(console.log(r.form,"this.orm"),c.push({subjectId:e,subjectPrice:r.checkStatus?0:r.form.coursePrice,subjectName:""}))}));var o=[];c.forEach((function(e){n.some((function(t){return t===e.subjectId}))&&o.push(e)})),this.form.subjectPrice=o,this.subjectStatus=!1},getSubjectName:function(e){var t=this.subjectList.find((function(t){return t.id===e}));return t?t.name:""},validatePrice:function(e){return!(Number(e)>Number(this.form.highestPrice)||Number(e)0&&l(M,{modelValue:r.form.subjectId,class:N,disabled:!0,onClick:function(){r.subjectStatus=!0}},q(e=r.form.subjectPrice.map((function(e){var t;return l(k,{class:A},{default:function(){return[l(y,{plain:!0,type:"primary",round:!0,closeable:!0,size:"large",style:{backgroundColor:"#E9FFF8"},onClick:function(e){e.stopPropagation(),e.preventDefault()},onClose:function(t){t.stopPropagation(),t.preventDefault(),f.confirm({title:"提示",message:"您是否要删除选择的乐器?",confirmButtonColor:"var(--van-primary)"}).then((function(){var t=r.form.subjectId.indexOf(e.subjectId);-1!==t&&r.form.subjectId.splice(t,1);var n=r.form.subjectPrice.findIndex((function(t){return t.subjectId===e.subjectId}));-1!==n&&r.form.subjectPrice.splice(n,1),r.form.subjectIdTemp=r.form.subjectId.join(",")}))}},q(t=r.getSubjectName(e.subjectId))?t:{default:function(){return[t]}})]}})})))?e:{default:function(){return[e]}}),!r.form.subjectPrice.length&&l(v,{modelValue:r.form.subjectIdTemp,"onUpdate:modelValue":function(e){return r.form.subjectIdTemp=e},name:"courseMinutes",readonly:!0,onClick:function(){r.subjectStatus=!0},rules:[{required:!0,message:"请选择可教授乐器"}],placeholder:"请选择可教授乐器"},null)]}}),l(h,{title:"单课时时长",required:!0},{default:function(){return[l(v,{modelValue:r.form.courseMinutes,"onUpdate:modelValue":function(e){return r.form.courseMinutes=e},name:"courseMinutes",readonly:!0,isLink:!0,onClick:function(){r.classTimeStatus=!0},rules:[{required:!0,message:"请选择单课时时长"}],placeholder:"请选择单课时时长"},{button:function(){return l("span",null,[m("分钟")])}})]}})]}}),r.form.subjectPrice&&r.form.subjectPrice.length>0&&!r.checkStatus&&l(_,null,q(t=r.form.subjectPrice.map((function(e){return l(h,{title:"".concat(r.getSubjectName(e.subjectId),"声部").concat(r.text,"价格"),required:!0},{default:function(){return[l(v,{modelValue:e.subjectPrice,"onUpdate:modelValue":function(t){return e.subjectPrice=t},name:"singleMins",type:"number",labelWidth:"auto",border:!1,readonly:"PRACTICE"===r.courseType,label:"".concat(r.form.courseMinutes||0,"分钟 / "),rules:[{required:!0,message:"请输入".concat(r.getSubjectName(e.subjectId),"声部").concat(r.text,"价格")},"VIP"===r.courseType?{validator:r.validatePrice,message:"请输入价格在".concat(r.form.lowestPrice,"~").concat(r.form.highestPrice,"范围内")}:{}],formatter:r.onFormatter,maxlength:8,placeholder:"VIP"===r.courseType?"".concat(r.form.lowestPrice,"~").concat(r.form.highestPrice):"请选择声部".concat(r.text,"价格")},{button:function(){return l("span",null,[m("元")])}}),l("div",{class:O},[m("课程预计收入:"),l("span",null,[m("¥ "),r.onCalcCoursePrice(e.subjectPrice)])])]}})})))?t:{default:function(){return[t]}}),l("div",{class:V},[m("扣除应缴税金和平台服务费后 "),l("br",null,null),m("实际课程收入按学生实际付款金额计算"),l("br",null,null),m("您的课程收入将在课程结束"),l("span",null,[r.accountPeriod]),m("天后结算到您的账户")]),l(I,{position:"bottom"},{default:function(){return[l("div",{class:["btnGroup",E]},[l(d,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:function(){return[m("提交")]}})])]}}),l(j,{modelValue:r.subjectStatus,"onUpdate:modelValue":function(e){return r.subjectStatus=e},destroy:!0},{default:function(){return[l(S,{title:"".concat(r.text,"设置")},null),l(g,{max:5,single:!0,subjectList:r.subjectList,choiceSubjectIds:r.choiceSubjectId,onChoice:r.onChoice},null)]}}),l(P,{show:r.classTimeStatus,"onUpdate:show":function(e){return r.classTimeStatus=e},actions:r.minutes,cancelText:"取消",closeOnClickAction:!0,onSelect:r.onSelect},null),l(p,{show:r.tipStatus,class:F,closeable:!0,onClose:function(){return r.tipStatus=!1}},{default:function(){return[l(w,{onClose:function(){return r.tipStatus=!1},title:"VIP"===r.courseType?"什么是VIP定制课?":"什么是趣纠课?",content:"VIP"===r.courseType?"VIP定制课采用一对一专属授课模式,每节课时长为45分钟。课程内容根据学生的具体需求量身打造,旨在全面提升学生的个人技能与表现。不论是希望在乐器演奏技巧上取得突破,如提高指法精准度、气息控制能力或节奏掌握等;还是为即将到来的重要活动、比赛或考级做充分准备,我们都能提供高度匹配的教学方案。此外,教学进度将根据每位学员的学习吸收情况灵活调整,确保每个人都能在最适合自己的节奏中稳步前进,扎实提升个人能力。":"趣纠课以一对一专属、高度针对性的形式进行,每次课程时长为25分钟。本课程专为解决学生日常练习中的疑问与误区设计,尤其适合那些在自我练习后感到困惑或不确定自己方法是否正确的学生。不同于传统的教学模式,趣纠课不侧重于新知识或新技能的传授,而是全心全意致力于检查学生现有的练习成果,并及时纠正其中出现的问题。这种方式不仅有助于学生巩固已掌握的知识和技能,还能有效防止错误习惯的形成和发展,为他们今后的学习打下更加坚实的基础。"},null)]}})]}})}}))}}}))}();