1 |
- !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);r<t;r++)n[r]=e[r];return n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t,r,n,c,o,i){try{var u=e[o](i),s=u.value}catch(a){return void r(a)}u.done?t(s):Promise.resolve(s).then(n,c)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,c){var i=e.apply(t,r);function u(e){o(i,n,c,u,s,"next",e)}function s(e){o(i,n,c,u,s,"throw",e)}u(void 0)}))}}var u=document.createElement("style");u.innerHTML="._select_okh0s_1{padding:0 .32rem;height:.64rem}._tag-list_okh0s_5{margin-top:.32rem}._tag-list_okh0s_5 .van-tag{margin-right:.16rem;margin-bottom:.16rem}._showPrice_okh0s_12{background:#FFFAEE;border:.02667rem solid #faedd7;border-radius:.10667rem;padding:.24rem .16rem;line-height:1;font-size:.34667rem;color:#f68e3e;margin-bottom:.32rem}._showPrice_okh0s_12 span{font-weight:600;font-size:.34667rem;color:#ff4e1a}._tipsAccount_okh0s_27{padding-top:.32rem;font-size:.37333rem;color:#999;line-height:.64rem;padding:0 .37333rem}._tipsAccount_okh0s_27 span{color:#ff4e19;font-weight:700;padding:0 .10667rem}._radio-group_okh0s_39,._checkbox-group_okh0s_40{display:flex;flex-wrap:wrap;margin-top:.37333rem}._radio-group_okh0s_39 ._radio_okh0s_39:first-child .van-radio__label,._checkbox-group_okh0s_40 ._radio_okh0s_39:first-child .van-radio__label,._radio-group_okh0s_39 ._checkbox_okh0s_40:first-child .van-checked__label,._checkbox-group_okh0s_40 ._checkbox_okh0s_40:first-child .van-checked__label{margin-left:0}._radio_okh0s_39 .van-radio__icon{display:none}._checkbox-group_okh0s_40{padding:.16rem 0}._checkbox-group_okh0s_40 .van-tag--large{font-size:.32rem;line-height:1.2;padding:.08rem .16rem .05333rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio-group_okh0s_39 .van-tag--large{width:2.50667rem;height:.8rem;font-size:.42667rem;line-height:1.2;text-align:center;display:flex;align-items:center;justify-content:center}._radio-group_okh0s_39 .van-tag{box-sizing:border-box}._radio-group_okh0s_39 .van-tag--default{color:var(--van-tag-text-default-color)}._radio-group_okh0s_39 .van-tag--primary{background-color:var(--tag-bg-color)}._checkbox_okh0s_40{margin-bottom:.13333rem}._checkbox_okh0s_40 .van-checkbox__icon{display:none}._PracticeSettingBtns_okh0s_93{padding-bottom:.8rem}._PracticeSettingBtns_okh0s_93 .van-button{font-size:.48rem}._iconQuestion_okh0s_99{width:.64rem;height:.64rem;flex-shrink:0}._tipPopup_okh0s_104{background:transparent}._tipPopup_okh0s_104 .van-popup__close-icon{font-size:.48rem;color:#ccc}\n",document.head.appendChild(u),System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.56fd22af.js","./index-legacy.7e687ee8.js","./index-legacy.df807cec.js","./index-legacy.3ee63cbf.js","./index-legacy.9d25098b.js","./index-legacy.c8c5bc4e.js","./index-legacy.cae55a25.js","./index-legacy.c835419c.js","./index-legacy.39123961.js","./index-legacy.23131301.js","./toolsValidate-legacy.b90c63da.js","./index-legacy.6ac2a941.js","./index-legacy.9696a579.js","./index-legacy.8045bebf.js","./index-legacy.b20da433.js","./index-legacy.b257cee5.js","./index-legacy.ff44e6c0.js","./index-legacy.4be048cf.js","./index-legacy.421f1fa7.js","./index-legacy.3ccba950.js","./checkbox_default-legacy.9f48b0e4.js","./use-id-legacy.ef8b5e97.js","./index-legacy.4bad5b90.js"],(function(t){"use strict";var r,c,o,u,s,a,l,f,m,d,p,b,h,_,g,j,y,v,P,k,x,S,I,T,w,C,M;return{setters:[function(e){r=e.d,c=e.y,o=e.g,u=e.bC,s=e.T,a=e.n,l=e.j,f=e.D,m=e.A,d=e.B,p=e.aS,b=e.$},function(e){h=e.C},function(e){_=e.C},function(e){g=e.S},function(e){j=e.C},function(e){y=e.T},function(){},function(e){v=e.F},function(e){P=e.A},function(e){k=e.C},function(){},function(e){x=e.v},function(e){S=e.C},function(e){I=e.T},function(e){T=e.i,w=e.T},function(e){C=e.F},function(e){M=e.C},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var O="_showPrice_okh0s_12",V="_tipsAccount_okh0s_27",N="_checkbox-group_okh0s_40",A="_checkbox_okh0s_40",E="_PracticeSettingBtns_okh0s_93",z="_iconQuestion_okh0s_99",F="_tipPopup_okh0s_104";function q(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!b(e)}var U=t("numberToTwoUp",(function(e){return e=Number(e),Math.ceil(100*e)/100}));t("default",r({name:"PracticeSetting",data:function(){var e=this.$route.query;return{tipStatus:!1,courseType:"vip"==e.tabs?"VIP":"PRACTICE",text:"vip"==e.tabs?"VIP定制课":"趣纠课",subjectList:[],chargeTypeArr:{0:"否",1:"是"},checkStatus:!1,classTimeStatus:!1,subjectStatus:!1,form:{lowestPrice:0,highestPrice:0,coursePrice:0,courseMinutes:null,freeMinutes:0,subjectIdTemp:"",subjectId:[],subjectPrice:[]},minutes:[],rate:0,accountPeriod:0}},computed:{choiceSubjectId:function(){var e=this.form;return(e.subjectIdTemp?e.subjectIdTemp.split(","):[]).map((function(e){return Number(e)}))||[]}},mounted:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var r,i,u,s,a,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return document.title="".concat(e.text,"设置"),t.prev=1,t.next=4,c.get("/api-teacher/sysConfig/queryByParamNameList",{params:{paramNames:"practice_times_setting,practice_service_fee,vip_course_times_setting,vip_course_service_fee,vip_course_account_period,practice_account_period"}});case 4:return r=t.sent,(r.data||[]).forEach((function(t){if(t.paramName===("VIP"===e.courseType?"vip_course_times_setting":"practice_times_setting")){var r=t.paramValue?JSON.parse(t.paramValue):[],c=[];if(r.forEach((function(e){c.push(n(n({},e),{},{name:e.courseMinutes}))})),e.minutes=[].concat(c),e.minutes.length>0){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)<Number(this.form.lowestPrice))},onFormatter:function(e){return x(e)},onSubmit:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=e.form,o=[],r.subjectPrice.forEach((function(t){var r=e.getSubjectName(t.subjectId);console.log(r,"subjectName"),o.push(n(n({},t),{},{courseMinutes:e.form.courseMinutes,courseType:e.courseType,freeMinutes:e.form.freeMinutes,subjectName:r}))})),console.log(o,"foparamsrm"),t.next=7,c.post("/api-teacher/teacherSubjectPrice/saveOrUpdate",{data:o});case 7:setTimeout((function(){s("设置成功")}),100),setTimeout((function(){a({api:"back",content:{}})}),500),t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:case"end":return t.stop()}}),t,null,[[0,11]])})))()}},render:function(){var e,t,r=this;return l(C,{style:{paddingTop:"15px"},onSubmit:this.onSubmit},{default:function(){return[l(S,{title:"".concat(r.text,"设置")},{right:function(){return l("img",{src:T,class:z,onClick:function(){return r.tipStatus=!0}},null)}}),l(_,null,{default:function(){return[l(h,{title:"可教授乐器",required:!0},{default:function(){return[r.form.subjectPrice&&r.form.subjectPrice.length>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)]}})]}})}}))}}}))}();
|