!function(){function e(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return r(e,t)}(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 r(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function t(e,r,t,o,n,c,a){try{var i=e[c](a),u=i.value}catch(s){return void t(s)}i.done?r(u):Promise.resolve(u).then(o,n)}System.register(["./index-legacy.b2528a15.js"],(function(r){"use strict";var o,n,c,a;return{setters:[function(e){o=e.S,n=e.s,c=e.e,a=e.D}],execute:function(){var i=r("o",o({orderType:"",orderInfo:{orderNo:"",actualPrice:0,payStatus:!0},orderObject:{orderNo:"",actualPrice:0,orderName:"",orderDesc:"",orderType:"",recomUserId:null,orderList:[],activityId:"",couponId:"",discountPrice:0}})),u=(r("r",(function(){Object.assign(i,{orderType:"",orderInfo:{orderNo:"",actualPrice:0,payStatus:!0},orderObject:{orderNo:"",actualPrice:0,orderName:"",orderDesc:"",orderType:"",recomUserId:null,orderList:[],activityId:"",couponId:"",discountPrice:0}})})),r("b",(function(){return(i.orderObject.orderList||[]).map((function(e){var r={goodType:e.orderType,goodName:e.goodsName,recomUserId:e.recomUserId,bizContent:{}};if("VIDEO"===e.orderType)r.bizContent={videoLessonGroupId:e.courseGroupId,payMoney:e.coursePrice||0};else if("LIVE"===e.orderType)r.bizContent={groupId:e.courseGroupId};else if("PRACTICE"===e.orderType){var t=e.classTime||[],o=[];t.forEach((function(e){o.push({classDate:e.classDate,startTime:e.startTime,endTime:e.endTime})})),r.bizContent={courseGroupName:e.courseGroupName,courseIntroduce:e.courseIntroduce,subjectId:e.subjectId,singleCourseMinutes:e.singleCourseMinutes,courseNum:e.courseNum,coursePrice:e.coursePrice,teacherId:e.teacherId,classTime:o}}else"VIP"===e.orderType?r.bizContent=e.id:"MUSIC"===e.orderType||"ALBUM"===e.orderType?r.bizContent={musicSheetId:e.id,actualPrice:e.actualPrice||0,clientType:n.platformType}:"PIANO_ROOM"===e.orderType?r.bizContent=e.id:"ACTI_REGIST"===e.orderType&&(r.bizContent={activityId:e.activityId});return r}))})));r("a",function(){var r,o=(r=regeneratorRuntime.mark((function r(t){var o,s,d,l;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=i.orderObject,s="TEACHER"===n.platformType?"/api-teacher/userOrder/executeOrder":"/api-student/userOrder/executeOrder",r.next=5,c.post(s,{data:{orderName:o.orderName,orderDesc:o.orderDesc,orderType:o.orderType,actualPrice:o.actualPrice||0,recomUserId:o.recomUserId,activityId:o.activityId,orderInfos:e(u())}});case 5:d=r.sent,"PAID"==(l=d.data||{}).status?t?t():a.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}):a.alert({message:l.msg,confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(0),a.alert({title:"提示",message:"支付失败，请稍后重试！",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"});case 13:case"end":return r.stop()}}),r,null,[[0,10]])})),function(){var e=this,o=arguments;return new Promise((function(n,c){var a=r.apply(e,o);function i(e){t(a,n,c,i,u,"next",e)}function u(e){t(a,n,c,i,u,"throw",e)}i(void 0)}))});return function(e){return o.apply(this,arguments)}}())}}}))}();
