tradeOrder-legacy.e5c67f0f.js 7.7 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.8361d47d.js","./index-legacy.f8641610.js","./orderStatus-legacy.43d498d4.js"],(function(e){"use strict";var t,n,o,c,u;return{setters:[function(e){t=e.m},function(e){n=e.s,o=e.e,c=e.x},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,g,h,b,w,y,x,N,P,T;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?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,g=[],(i.planList||[]).forEach((function(e){var r=e.startTime||new Date,t=e.endTime||new Date;g.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:g},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 h=JSON.parse(n.bizContent),s=r(r({},h),{},{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:b=e.sent,w=b.lessonGroup,y=b.detailList,s={orderType:n.goodType,goodName:n.goodName,courseGroupId:w.id,courseGroupName:w.lessonName,coursePrice:w.lessonPrice,teacherName:w.username,teacherId:w.teacherId,avatar:w.avatar,courseInfo:y},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]||"",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:N=e.sent,s=r({orderType:n.goodType,goodName:n.goodName},N),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,l(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:T=e.sent,s={orderType:n.goodType,goodsName:T.activityName,activityId:T.id,actualPrice:T.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)}}(),l=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,r){var t=e.orderNo,n=e.actualPrice,o=e.orderDesc,c=e.orderName,s=e.orderType,p=e.orderDetailList,d=e.couponAmount,m=e.discountPrice;u.orderObject.orderType=s,u.orderObject.orderName=c,u.orderObject.orderDesc=o,u.orderObject.actualPrice=n,u.orderObject.orderNo=t,u.orderObject.discountPrice=m,u.orderObject.orderList=[];try{p.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:d,discountPrice:m});case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()),r&&r()}catch(f){}}))}}}))}();