preview-index-legacy.3a5c25f2.js 12 KB

1
  1. !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var l=null!=arguments[r]?arguments[r]:{};r%2?e(Object(l),!0).forEach((function(e){n(t,e,l[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):e(Object(l)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(l,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,l,o,a){try{var s=e[o](a),i=s.value}catch(u){return void n(u)}s.done?t(i):Promise.resolve(i).then(r,l)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(l,o){var a=e.apply(t,n);function s(e){r(a,l,o,s,i,"next",e)}function i(e){r(a,l,o,s,i,"throw",e)}s(void 0)}))}}System.register(["./index-legacy.90c82f08.js","./icon-checkbox-active-legacy.be570a48.js","./index-legacy.f7f96215.js","./index-legacy.d85a75b6.js","./index-legacy.55839436.js","./index-legacy.3c5580aa.js","./index-legacy.dc8d6058.js","./index-legacy.92c1b9d6.js","./index-legacy.f3e5e283.js","./index-legacy.eb4bc59e.js","./Checker-legacy.1b485b9f.js"],(function(e){"use strict";var n,r,o,a,s,i,u,c,d,p,f,g,m,v,b,y,h,x,I,T,P,S,j,w,k,C,O,U,B,R,V;return{setters:[function(e){n=e.d,r=e.ah,o=e.r,a=e.R,s=e.$,i=e._,u=e.b3,c=e.c,d=e.q,p=e.o,f=e.b6,g=e.F,m=e.m},function(e){v=e.h,b=e.s,y=e.a,h=e.b,x=e.i,I=e.c,T=e.d,P=e.e,S=e.f},function(e){j=e.C},function(e){w=e.F},function(e){k=e.C},function(e){C=e.F},function(e){O=e.R,U=e.a},function(e){B=e.T},function(e){R=e.C},function(e){V=e.I},function(){}],execute:function(){for(var q=[],E=1;E<=40;E++)q.push({text:E+"班",value:E});e("default",n({name:"pre-goods-apply",setup:function(){var e=r(),n=o({code:"",detail:{},toolImgStatus:!1,currentGrade:[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5},{text:"六年级",value:6},{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}],classList:q,subjectList:[],instrumentsInspectionDescribe:"",inspectPopupStatus:!1,gradeStatus:!1,classStatus:!1,subjectStatus:!1,registerInfo:{},goodsInfo:{},textBookInfo:{},inspectInfo:{},vipYearInfo:{},inspectStatus:!0,testIsWeixin:!1,details:[],pattern:/^1(3|4|5|6|7|8|9)\d{9}$/,nameReg:/^[\u4E00-\u9FA5]+$/,paymentType:"",musicPaymentType:"",studentReadStatus:!1,dialogStatus:!1,dialogMessage:"",dialogOrchestraStatus:!1,dialogConfig:{},orderInfo:{needPrice:0,originalPrice:0},submitStatus:!1}),E=o({username:null,sex:null,currentGrade:null,currentGradeTxt:null,currentClass:"",currentClassTxt:null,registerSubjectId:"",registerSubjectTxt:null,parentName:null,groupBuyType:"",phone:null,learningTools:null,instrumentsBrand:null}),G=o({toolPlan:{title:"",groupTitle:"",groupDesc:"",selfTitle:"",selfDesc:""},leBao:{show:1,selected:1}}),A=function(e){return n.nameReg.test(e)&&e.length>=2&&e.length<=15},D=function(e){return e?n.nameReg.test(e)?e.length<2||e.length>15?"学员姓名必须为2~15个字":"":"学员姓名必须为中文":"请填写学员真实姓名"},L=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=a(""),F=a(e.query.orchestraName||""),Y=function(e){if("payment-notes"===e.data.api){var t=e.data.data?JSON.parse(e.data.data):{};console.log(t,"result"),N.value=t.notice,G.toolPlan=t.toolPlan,G.leBao=t.leBao}},M=function(){var t=l(regeneratorRuntime.mark((function t(){var r,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,m.post("/api-student/open/orchestraSubjectConfig/pageByOrchestraId",{data:{orchestraId:e.query.id,page:1,rows:100}});case 3:r=t.sent,(l=r.data.rows||[]).forEach((function(e){n.subjectList.push({text:e.name,value:e.subjectId})})),l.length>0&&(E.registerSubjectId=l[0].subjectId,E.registerSubjectTxt=l[0].name,_()),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),_=function(){var r=l(regeneratorRuntime.mark((function r(){var l,o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,m.get("/api-student/open/orchestraRegister/registerGoods/"+e.query.id,{params:{subjectId:E.registerSubjectId}});case 3:l=r.sent,o=l.data,n.musicPaymentType=o.paymentServiceProvider||"",(a=o.details||[]).forEach((function(e){if("INSTRUMENTS"===e.goodsType){var r=e.goodsUrl?e.goodsUrl.split(",")[0]:"";n.goodsInfo=t(t({},e),{},{goodsUrl:r}),n.instrumentsInspectionDescribe=e.instrumentsInspectionDescribe}else if("TEXTBOOK"===e.goodsType){var l=e.goodsUrl?e.goodsUrl.split(",")[0]:"";n.textBookInfo=t(t({},e),{},{goodsUrl:l})}else"INSTRUMENT_INSPECT"===e.goodsType?n.inspectInfo=t({},e):"VIP_YEAR"===e.goodsType&&(n.vipYearInfo=t({},e));n.details=a})),r.next=12;break;case 10:r.prev=10,r.t0=r.catch(0);case 12:case"end":return r.stop()}}),r,null,[[0,10]])})));return function(){return r.apply(this,arguments)}}();return s(l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:i((function(){window.parent&&window.parent.postMessage({api:"onLoad",status:!0},"*")})),window.addEventListener("message",Y);case 4:case"end":return e.stop()}}),e)})))),u((function(){window.removeEventListener("message",Y)})),function(){return c("div",{class:b.goodsApply},[c("img",{src:v,class:b.headBg},null),c("div",{class:b.goodsHeader},[c("div",{class:b.orchestraTitle},[c("img",{class:b.headTitle,src:y},null),c("p",{class:[b.name,"van-multi-ellipsis--l3"]},[F.value])]),c("img",{src:h,class:b.headPhone},null)]),c(w,{validateFirst:!0,errorMessageAlign:"right",scrollToError:!0,onSubmit:L,onFailed:function(e){i((function(){var e;null===(e=document.getElementsByClassName("van-field__error-message")[0])||void 0===e||e.scrollIntoView({block:"center",behavior:"smooth"})}))},ref:"form",class:b.form},{default:function(){return[c(k,{class:b.applyCellGroup,border:!1},{default:function(){return[c("div",{class:[b.title,b.titleApply]},null),c(C,{required:!0,label:"学员信息",placeholder:"请填写学员真实姓名",inputAlign:"right",modelValue:E.username,"onUpdate:modelValue":function(e){return E.username=e},maxlength:15,rules:[{validator:A,message:D}]},null),c(C,{required:!0,label:"性别",inputAlign:"right",rules:[{required:!0,message:"请选择性别"}]},{input:function(){return c(O,{modelValue:E.sex,"onUpdate:modelValue":function(e){return E.sex=e}},{default:function(){return[c(B,{size:"large",type:"primary",class:[b.radioSection,1===E.sex?b.active:""]},{default:function(){return[c(U,{class:b.radioItem,name:1},null),d("男生")]}}),c(B,{size:"large",type:"primary",class:[b.radioSection,0===E.sex?b.active:""]},{default:function(){return[c(U,{class:b.radioItem,name:0},null),d("女生")]}})]}})}}),c(C,{required:!0,label:"年级",inputAlign:"right",readonly:!0,isLink:!0,clickable:!1,placeholder:"请选择年级",modelValue:E.currentGradeTxt,"onUpdate:modelValue":function(e){return E.currentGradeTxt=e},onClick:function(){return n.gradeStatus=!0},rules:[{required:!0,message:"请选择年级"}]},null),c(C,{required:!0,label:"班级",inputAlign:"right",readonly:!0,isLink:!0,clickable:!1,placeholder:"请选择班级",modelValue:E.currentClassTxt,"onUpdate:modelValue":function(e){return E.currentClassTxt=e},onClick:function(){return n.classStatus=!0},rules:[{required:!0,message:"请选择班级"}]},null),c(C,{required:!0,label:"选报声部",inputAlign:"right",readonly:!0,isLink:!0,clickable:!1,placeholder:"请选择选报声部",modelValue:E.registerSubjectTxt,"onUpdate:modelValue":function(e){return E.registerSubjectTxt=e},onClick:function(){n.subjectList.length<=0?p("暂无报名选报声部"):n.subjectStatus=!0},rules:[{required:!0,message:"请选择选报声部"}]},null)]}}),c(k,{class:b.applyCellGroup,border:!1},{default:function(){return[c("div",{class:[b.title,b.titleParent]},null),c(C,{required:!0,label:"家长姓名",inputAlign:"right",placeholder:"请填写家长真实姓名",modelValue:E.parentName,"onUpdate:modelValue":function(e){return E.parentName=e},maxlength:15},null),c(C,{required:!0,label:"手机号",inputAlign:"right",placeholder:"请输入手机号",modelValue:E.phone,"onUpdate:modelValue":function(e){return E.phone=e},maxlength:11,type:"tel"},null)]}}),c(k,{class:b.applyCellGroup,border:!1},{default:function(){return[c("div",{class:[b.title,b.titleTips]},null),c("div",{class:b.tipsContainer,innerHTML:N.value},null)]}}),c(k,{class:b.applyCellGroup,border:!1},{default:function(){return[c("div",{class:[b.title,b.titleTool]},null),c(C,{required:!0,label:G.toolPlan.title,labelAlign:"top",rules:[{required:!0,message:"请选择训练工具的准备方式"}]},{input:function(){return c(O,{modelValue:E.groupBuyType,"onUpdate:modelValue":function(e){return E.groupBuyType=e},class:b.toolRadioGroup},{default:function(){return[c(B,{size:"large",type:"primary",class:[b.radioSectionTag,b.radioSection,"GROUP_BUY"===E.groupBuyType?b.active:""]},{default:function(){return[c(U,{class:b.radioItem,name:"GROUP_BUY",disabled:!0,onClick:function(){}},null),G.toolPlan.groupTitle,c("p",{class:b.radioTip},[G.toolPlan.groupDesc])]}}),c(B,{size:"large",type:"primary",class:[b.radioSectionTag,b.radioSection,"SELF"===E.groupBuyType?b.active:""]},{default:function(){return[c(U,{class:b.radioItem,name:"SELF",disabled:!0},null),G.toolPlan.selfTitle,c("p",{class:b.radioTip},[G.toolPlan.selfDesc])]}})]}})}})]}}),c(k,{class:[b.applyCellGroup,b.groupBuy],border:!1},{default:function(){return[c("div",{class:[b.title,b.titleIntrumentTool]},null),c(R,{border:!1},{icon:function(){return c(V,{src:n.vipYearInfo.goodsUrl,class:b.goodsImg},null)},value:function(){return c("div",{class:b.vipYearInfo},[c("div",{class:b.goodsTitle},[n.vipYearInfo.goodsName,d(" "),c("img",{src:x},null)]),c("p",{class:b.goodsTips},[d("乐团首次训练之日起生效")]),c("p",{class:[b.goodsMemo,"van-multi-ellipsis--l2"]},[n.vipYearInfo.description]),c("div",{class:b.goodsPrice},[c("div",{class:b.priceGroup},[d("团购价:"),c("p",null,[c("span",null,[d("¥")]),d(" "),f(n.vipYearInfo.currentPrice)])])])])}}),c(R,{border:!1},{icon:function(){return c(V,{src:n.goodsInfo.goodsUrl,class:b.goodsImg},null)},value:function(){return c("div",{class:b.goodsInfo},[c("div",{class:b.goodsTitle},[n.goodsInfo.goodsName,n.goodsInfo.currentPrice<=0?c("img",{src:I},null):""]),c("p",{class:[b.goodsMemo,"van-multi-ellipsis--l2"]},[n.goodsInfo.description]),c("div",{class:b.goodsPrice},[c("div",{class:b.priceGroup},[d("团购价:"),c("p",null,[n.goodsInfo.currentPrice<=0?c("del",null,[c("span",null,[d("¥")]),d(" "),f(n.goodsInfo.groupPrice)]):c(g,null,[c("span",null,[d("¥")]),d(" "),f(n.goodsInfo.currentPrice)])])])])])}}),G.leBao.show?c(R,{class:b.inspectCell,style:{backgroundColor:n.inspectStatus?"#FFF3EA":"#f4f4f4"}},{icon:function(){return c("img",{src:T,class:b.iconBao,onClick:function(){n.instrumentsInspectionDescribe&&(n.inspectPopupStatus=!0)}},null)},value:function(){return c("div",{class:b.baoContainer},[c("div",{class:b.baoTitle,onClick:function(){n.instrumentsInspectionDescribe&&(n.inspectPopupStatus=!0)}},[d("下校检查乐器 1-2次/学期")]),c("div",{class:b.baoPrice},[c("p",null,[c("span",{class:b.prefix},[d("¥")]),d(" "),n.inspectInfo.currentPrice,c("span",{class:b.suffix},[d("/年")])]),c(j,{modelValue:G.leBao.selected,"onUpdate:modelValue":function(e){return G.leBao.selected=e}},{icon:function(e){return c("img",{class:b.checkboxImg,src:e.checked?P:S},null)}})])])}}):""]}})]}})])}}}))}}}))}();