practice-setting-legacy.2d16c528.js 15 KB

1
  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){o(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 o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t,r,n,o,c,i){try{var u=e[c](i),s=u.value}catch(a){return void r(a)}u.done?t(s):Promise.resolve(s).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){c(i,n,o,u,s,"next",e)}function s(e){c(i,n,o,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.8d60aee1.js","./index-legacy.2a290207.js","./index-legacy.7df716cf.js","./index-legacy.45e061e6.js","./index-legacy.f8ebe92d.js","./index-legacy.a85d660d.js","./index-legacy.610f0a70.js","./index-legacy.78ce4f6b.js","./index-legacy.fb4c992e.js","./index-legacy.5e551733.js","./index-legacy.4e5c868b.js","./toolsValidate-legacy.b90c63da.js","./index-legacy.87bcd48f.js","./index-legacy.4f8bc5f4.js","./index-legacy.14ad6d76.js","./index-legacy.69a58442.js","./index-legacy.af745e4d.js","./index-legacy.f8f0c467.js","./index-legacy.4a75d877.js","./index-legacy.df0bf034.js","./index-legacy.6a5df59c.js","./checkbox_default-legacy.9f48b0e4.js","./use-id-legacy.54528695.js","./index-legacy.bbc2b10e.js"],(function(t){"use strict";var r,o,c,u,s,a,l,f,d,m,p,b,h,_,g,j,y,v,P,k,x,S,I,T,w,C,M;return{setters:[function(e){r=e.d,o=e.y,c=e.g,u=e.bC,s=e.T,a=e.n,l=e.j,f=e.D,d=e.A,m=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,o.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):[],o=[];if(r.forEach((function(e){o.push(n(n({},e),{},{name:e.courseMinutes}))})),e.minutes=[].concat(o),e.minutes.length>0){var c=e.minutes[0];e.form.coursePrice=c.price,e.form.courseMinutes=c.courseMinutes,e.form.freeMinutes=c.freeMinutes,e.form.lowestPrice=c.lowestPrice||0,e.form.highestPrice=c.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,o.post("/api-teacher/teacher/querySubject");case 9:return i=t.sent,e.subjectList=i.data||[],t.next=13,o.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,o.post("/api-teacher/open/appVersion",{data:{platform:"STUDENT"===c.platformType?"ios-student":"ios-teacher",version:c.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 o=e(this.form.subjectPrice);n.forEach((function(e){-1===o.findIndex((function(t){return t.subjectId===e}))&&(console.log(r.form,"this.orm"),o.push({subjectId:e,subjectPrice:r.checkStatus?0:r.form.coursePrice,subjectName:""}))}));var c=[];o.forEach((function(e){n.some((function(t){return t===e.subjectId}))&&c.push(e)})),this.form.subjectPrice=c,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,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=e.form,c=[],r.subjectPrice.forEach((function(t){var r=e.getSubjectName(t.subjectId);console.log(r,"subjectName"),c.push(n(n({},t),{},{courseMinutes:e.form.courseMinutes,courseType:e.courseType,freeMinutes:e.form.freeMinutes,subjectName:r}))})),console.log(c,"foparamsrm"),t.next=7,o.post("/api-teacher/teacherSubjectPrice/saveOrUpdate",{data:c});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,[d("分钟")])}})]}})]}}),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,[d("元")])}}),l("div",{class:O},[d("课程预计收入:"),l("span",null,[d("¥ "),r.onCalcCoursePrice(e.subjectPrice)])])]}})})))?t:{default:function(){return[t]}}),l("div",{class:V},[d("扣除应缴税金和平台服务费后 "),l("br",null,null),d("实际课程收入按学生实际付款金额计算"),l("br",null,null),d("您的课程收入将在课程结束"),l("span",null,[r.accountPeriod]),d("天后结算到您的账户")]),l(I,{position:"bottom"},{default:function(){return[l("div",{class:["btnGroup",E]},[l(m,{block:!0,round:!0,type:"primary","native-type":"submit"},{default:function(){return[d("提交")]}})])]}}),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)]}})]}})}}))}}}))}();