1 |
- !function(){function e(e,r,t,o,n,i,c){try{var u=e[i](c),a=u.value}catch(d){return void t(d)}u.done?r(a):Promise.resolve(a).then(o,n)}function r(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 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 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,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}System.register(["./ResizeObserver.es-legacy.44b91b4c.js"],(function(t){"use strict";var o,n,i,c,u,a;return{setters:[function(e){o=e.S,n=e.g,i=e.y,c=e.D,u=e.f,a=e.w}],execute:function(){var d=t("o",o({orderType:"",orderInfo:{orderNo:"",actualPrice:0,payStatus:!0},orderObject:{orderNo:"",actualPrice:0,orderName:"",orderDesc:"",orderType:"",recomUserId:null,orderList:[],activityId:"",couponId:"",couponAmount:0,couponDiscountPrice:0,discountCardPrice:0,discountPrice:0}})),s=(t("r",(function(){Object.assign(d,{orderType:"",orderInfo:{orderNo:"",actualPrice:0,payStatus:!0},orderObject:{orderNo:"",actualPrice:0,orderName:"",orderDesc:"",orderType:"",recomUserId:null,orderList:[],activityId:"",couponId:"",couponAmount:0,couponDiscountPrice:0,discountCardPrice:0,discountPrice:0}})})),function(e){if(e.vipEndDays>0){var r=a(e.startTime).add(e.vipEndDays,"day"),t="YEAR"===e.period?"years":"months",o=r.diff(a(e.startTime),t);return"MONTH"===e.period?o+1:"QUARTERLY"===e.period?Math.ceil((o+1)/3):"YEAR_HALF"===e.period?Math.ceil((o+1)/6):"YEAR"===e.period?o+1:1}return 1}),p=t("c",(function(){return(d.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||"GROUP"===e.orderType)r.bizContent={groupId:e.courseGroupId};else if("PRACTICE"===e.orderType||"VIP_COURSE"===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 if("VIP"===e.orderType)r.bizContent=e.id,r.goodsNum=e.num,r.bizPrice=e.salePrice;else if("SVIP"===e.orderType){r.bizContent=e.id;var i=s(e);r.vipEndDays=e.num>i?e.vipEndDays:null,r.goodsNum=e.num,r.bizPrice=e.salePrice}else"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}))}));t("d",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];t=e&&e.length>0?e||[]:d.orderObject.orderList||[];var o=[],i=t.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,r.goodsNum=e.num,r.goodNum=e.num,(e.activityList||[]).map((function(e){o.push(e)}));else if("SVIP"===e.orderType){r.bizContent=e.id;var t=s(e);r.vipEndDays=e.num>t?e.vipEndDays:null,r.goodsNum=e.num,r.goodNum=e.num,(e.activityList||[]).map((function(e){o.push(e)}))}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)console.log(e,"item"),r.bizContent={tenantAlbumId:e.id,actualPrice:e.actualPrice||0,buyNumber:1,buyMultiple:1,clientType:n.platformType},r.tenantGroupAlbumId=e.tenantGroupAlbumId,r.bizId=e.id,r.buyNumber=1,r.buyMultiple=1;else if("LIVE"===e.orderType||"GROUP"===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||"VIP_COURSE"===e.orderType){var i=e.classTime||[],c=[];i.forEach((function(e){c.push({classDate:e.classDate,startTime:e.startTime,endTime:e.endTime})})),r.bizContent={courseGroupName:e.courseGroupName,courseIntroduce:e.courseIntroduce,teacherSubjectPriceId:e.teacherSubjectPriceId,subjectId:e.subjectId,singleCourseMinutes:e.singleCourseMinutes,courseNum:e.courseNum,coursePrice:e.coursePrice,teacherId:e.teacherId,classTime:c}}else"PIANO_ROOM"===e.orderType?r.bizContent=e.id:"ACTI_REGIST"===e.orderType?r.bizContent={activityId:e.activityId}:"DISCOUNT"==e.orderType&&(r.bizContent=e.id,r.goodsNum=e.num,r.goodNum=e.num);return r}));return[].concat(r(i),o)})),t("a",function(){var t,o=(t=regeneratorRuntime.mark((function e(t){var o,u,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=d.orderObject,u="TEACHER"===n.platformType?"/api-teacher/userOrder/executeOrder":"/api-student/userOrder/executeOrder",e.next=5,i.post(u,{data:{orderName:o.orderName,orderDesc:o.orderDesc,orderType:o.orderType,actualPrice:o.actualPrice||0,recomUserId:o.recomUserId,activityId:o.activityId,orderInfos:r(p())}});case 5:a=e.sent,"PAID"==(s=a.data||{}).status?t?t():c.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}):c.alert({message:s.msg,confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),c.alert({title:"提示",message:"支付失败,请稍后重试!",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"});case 13:case"end":return e.stop()}}),e,null,[[0,10]])})),function(){var r=this,o=arguments;return new Promise((function(n,i){var c=t.apply(r,o);function u(r){e(c,n,i,u,a,"next",r)}function a(r){e(c,n,i,u,a,"throw",r)}u(void 0)}))});return function(e){return o.apply(this,arguments)}}()),t("b",(function(e){var r="qrCode";return u().weixin?"alipay_qr"==e||"alipay_wap"==e?r="qrCode":"wx_pub"==e&&(r="pay"):r=u().alipay&&"alipay_wap"==e?"pay":"qrCode","qrCode"==r?"payDefine":"payResult"}))}}}))}();
|