tradeOrder-legacy.c0331619.js 7.8 KB

1
  1. !function(){function e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function r(r){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){t(r,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}))}return r}function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(e,r,t,n,a,o,c){try{var u=e[o](c),s=u.value}catch(i){return void t(i)}u.done?r(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var r=this,t=arguments;return new Promise((function(a,o){var c=e.apply(r,t);function u(e){n(c,a,o,u,s,"next",e)}function s(e){n(c,a,o,u,s,"throw",e)}u(void 0)}))}}System.register(["./index-legacy.98761967.js","./ResizeObserver.es-legacy.9ef5ac8c.js","./orderStatus-legacy.00d7eecf.js"],(function(e){"use strict";var t,n,o,c,u;return{setters:[function(e){t=e.m},function(e){n=e.g,o=e.y,c=e.w},function(e){u=e.o}],execute:function(){var s="STUDENT"===n.platformType?"/api-student":"/api-teacher",i=function(){var e=a(regeneratorRuntime.mark((function e(n,a){var o,s,i,l,b,h,y,w,x,O,P,N;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=n.goodType,s={},e.t0=o,e.next="LIVE"===e.t0?5:"PRACTICE"===e.t0?19:"VIDEO"===e.t0?22:"VIP"===e.t0||"SVIP"===e.t0?34:"MUSIC"===e.t0?45:"ALBUM"===e.t0?56:"ACTI_REGIST"===e.t0?68:79;break;case 5:return e.prev=5,e.next=8,d(n.bizId);case 8:i=e.sent,l=[],(i.planList||[]).forEach((function(e){var r=e.startTime||new Date,t=e.endTime||new Date;l.push({courseTime:"".concat(c(r).format("YYYY-MM-DD")," ").concat(c(r).format("HH:mm"),"~").concat(c(t).format("HH:mm")),coursePlan:e.plan,id:e.courseId})})),s={orderType:n.goodType,goodName:n.goodName,courseGroupId:i.courseGroupId,courseGroupName:i.courseGroupName,coursePrice:i.coursePrice,teacherName:i.userName||"游客".concat(i.teacherId||""),teacherId:i.teacherId,avatar:i.avatar,courseInfo:l},e.next=18;break;case 15:throw e.prev=15,e.t1=e.catch(5),new Error(e.t1.message);case 18:return e.abrupt("break",79);case 19:return b=JSON.parse(n.bizContent),s=r(r({},b),{},{teacherName:n.username,starGrade:n.starGrade,avatar:n.avatar}),e.abrupt("break",79);case 22:return e.prev=22,e.next=25,p(n.bizId);case 25:h=e.sent,y=h.lessonGroup,w=h.detailList,s={orderType:n.goodType,goodName:n.goodName,courseGroupId:y.id,courseGroupName:y.lessonName,coursePrice:y.lessonPrice,teacherName:y.username,teacherId:y.teacherId,avatar:y.avatar,courseInfo:w},e.next=33;break;case 30:throw e.prev=30,e.t2=e.catch(22),new Error(e.t2.message);case 33:return e.abrupt("break",79);case 34:return e.prev=34,e.next=37,m(n.id);case 37:x=e.sent,s={orderType:n.goodType,goodName:n.goodName,id:n.id,title:t[x.period]||"",vipEndDays:n.vipEndDays,price:null!=a&&a.couponAmount?Number((x.salePrice-a.couponAmount+a.discountPrice).toFixed(2)):x.salePrice||n.actualPrice,startTime:c(x.startTime).format("YYYY-MM-DD"),endTime:c(x.endTime).format("YYYY-MM-DD")},e.next=44;break;case 41:throw e.prev=41,e.t3=e.catch(34),new Error(e.t3.message);case 44:return e.abrupt("break",79);case 45:return e.prev=45,e.next=48,f(n.bizId);case 48:O=e.sent,s=r({orderType:n.goodType,goodName:n.goodName},O),e.next=55;break;case 52:throw e.prev=52,e.t4=e.catch(45),new Error(e.t4.message);case 55:return e.abrupt("break",79);case 56:return console.log(n),e.prev=57,e.next=60,g(n.bizId);case 60:P=e.sent,s=r({orderType:n.goodType,goodName:n.goodName},P),e.next=67;break;case 64:throw e.prev=64,e.t5=e.catch(57),new Error(e.t5.message);case 67:return e.abrupt("break",79);case 68:return e.prev=68,e.next=71,v(n.bizId);case 71:N=e.sent,s={orderType:n.goodType,goodsName:N.activityName,activityId:N.id,actualPrice:N.registrationPrice},e.next=78;break;case 75:throw e.prev=75,e.t6=e.catch(68),new Error(e.t6.message);case 78:return e.abrupt("break",79);case 79:s.orderType=o,s.goodName=n.goodName,u.orderObject.orderList.push(s);case 82:case"end":return e.stop()}}),e,null,[[5,15],[22,30],[34,41],[45,52],[57,64],[68,75]])})));return function(r,t){return e.apply(this,arguments)}}(),p=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.get("".concat(s,"/videoLesson/selectVideoLesson"),{params:{groupId:r}});case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取视频课详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),d=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.get("".concat(s,"/courseGroup/queryLiveCourseInfo"),{params:{groupId:r}});case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取直播课详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),m=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.get("".concat(s,"/vipCardRecord/detail/")+r);case 3:return t=e.sent,e.abrupt("return",t.data||[]);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取会员详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),f=e("g",function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.get("".concat(s,"/music/sheet/detail/").concat(r));case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取曲目详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}()),v=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.post("".concat(s,"/open/activity/info/").concat(r));case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取曲目详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),g=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.post("".concat(s,"/music/album/detail"),{data:{id:r}});case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取专辑详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}();e("t",(function(e,t){var n=e.orderNo,o=e.actualPrice,c=e.orderDesc,s=e.orderName,p=e.orderType,d=e.orderDetailList,m=e.couponAmount,f=e.discountPrice,v=e.paymentConfig,g=e.paymentVendor,l=e.paymentVersion;u.orderObject.orderType=p,u.orderObject.orderName=s,u.orderObject.orderDesc=c,u.orderObject.actualPrice=o,u.orderObject.orderNo=n,u.orderObject.discountPrice=f,u.orderObject.paymentConfig=r(r({},v),{},{paymentVendor:g,paymentVersion:l}),u.orderObject.orderList=[];try{d.forEach(function(){var e=a(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i(r,{couponAmount:m,discountPrice:f});case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()),t&&t()}catch(b){}}))}}}))}();