orderStatus-legacy.d4b782c6.js 5.3 KB

1
  1. !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,i,c){try{var a=e[i](c),u=a.value}catch(d){return void t(d)}a.done?r(u):Promise.resolve(u).then(o,n)}System.register(["./index-legacy.b903c881.js"],(function(r){"use strict";var o,n,i,c,a;return{setters:[function(e){o=e.Q,n=e.g,i=e.w,c=e.D,a=e.f}],execute:function(){var u=r("o",o({orderType:"",orderInfo:{orderNo:"",actualPrice:0,payStatus:!0},orderObject:{orderNo:"",actualPrice:0,orderName:"",orderDesc:"",orderType:"",recomUserId:null,orderList:[],activityId:"",couponId:"",discountPrice:0}})),d=(r("r",(function(){Object.assign(u,{orderType:"",orderInfo:{orderNo:"",actualPrice:0,payStatus:!0},orderObject:{orderNo:"",actualPrice:0,orderName:"",orderDesc:"",orderType:"",recomUserId:null,orderList:[],activityId:"",couponId:"",discountPrice:0}})})),r("c",(function(){return(u.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}:"TENANT_ALBUM"===e.orderType&&(r.bizContent={musicSheetId:e.id,actualPrice:e.actualPrice||0,clientType:n.platformType});return r}))})));r("d",(function(){return(u.orderObject.orderList||[]).map((function(e){var r={goodType:e.orderType,goodName:e.goodsName,goodNum:1,bizContent:{}};if("VIP"===e.orderType)r.bizContent=e.id,r.bizId=e.id;else if("MUSIC"===e.orderType)r.bizContent={musicSheetId:e.id,actualPrice:e.actualPrice||0,clientType:n.platformType},r.bizId=e.id;else if("ALBUM"===e.orderType)r.bizContent={musicSheetId:e.id,actualPrice:e.actualPrice||0,clientType:n.platformType},r.bizId=e.id;else if("TENANT_ALBUM"===e.orderType)r.bizContent={tenantAlbumId:e.id,actualPrice:e.actualPrice||0,buyNumber:1,buyMultiple:e.purchaseCycle/6,clientType:n.platformType},r.bizId=e.id,r.buyNumber=1,r.buyMultiple=e.purchaseCycle/6;else if("LIVE"===e.orderType)r.bizContent={groupId:e.courseGroupId};else if("VIDEO"===e.orderType)r.bizContent={videoLessonGroupId:e.courseGroupId,payMoney:e.coursePrice||0};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"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,a,s,p;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=u.orderObject,a="TEACHER"===n.platformType?"/api-teacher/userOrder/executeOrder":"/api-student/userOrder/executeOrder",r.next=5,i.post(a,{data:{orderName:o.orderName,orderDesc:o.orderDesc,orderType:o.orderType,actualPrice:o.actualPrice||0,recomUserId:o.recomUserId,activityId:o.activityId,orderInfos:e(d())}});case 5:s=r.sent,"PAID"==(p=s.data||{}).status?t?t():c.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}):c.alert({message:p.msg,confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(0),c.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,i){var c=r.apply(e,o);function a(e){t(c,n,i,a,u,"next",e)}function u(e){t(c,n,i,a,u,"throw",e)}a(void 0)}))});return function(e){return o.apply(this,arguments)}}()),r("b",(function(e){var r="qrCode";return a().weixin?"alipay_qr"==e||"alipay_wap"==e?r="qrCode":"wx_pub"==e&&(r="pay"):r=a().alipay&&"alipay_wap"==e?"pay":"qrCode","qrCode"==r?"payDefine":"payResult"}))}}}))}();