1 |
- ;(function(){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}System.register(['./index-legacy.cddcfa89.js','./index-legacy.890d473e.js','./orderStatus-legacy.ac613bcd.js','./vendor-legacy.73abbe39.js'],function(exports){'use strict';var memberType,state,request,orderStatus,dayjs;return{setters:[function(module){memberType=module.m;},function(module){state=module.s;request=module.r;},function(module){orderStatus=module.o;},function(module){dayjs=module.h;}],execute:function execute(){var apiSuffix=state.platformType==="STUDENT"?"/api-student":"/api-teacher";var formatOrderDetail=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(item,amount){var type,tempList,live,courseInfo,coursePlanList,bizContent,res,lessonGroup,detailList,_res,_res2,_res3;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:type=item.goodType;tempList={};_context.t0=type;_context.next=_context.t0==="LIVE"?5:_context.t0==="PRACTICE"?19:_context.t0==="VIDEO"?22:_context.t0==="VIP"?34:_context.t0==="MUSIC"?45:_context.t0==="ACTI_REGIST"?56:67;break;case 5:_context.prev=5;_context.next=8;return getLiveDetail(item.bizId);case 8:live=_context.sent;courseInfo=[];coursePlanList=live.planList||[];coursePlanList.forEach(function(item2){var startTime=item2.startTime||new Date();var endTime=item2.endTime||new Date();courseInfo.push({courseTime:"".concat(dayjs(startTime).format("YYYY-MM-DD")," ").concat(dayjs(startTime).format("HH:mm"),"~").concat(dayjs(endTime).format("HH:mm")),coursePlan:item2.plan,id:item2.courseId});});tempList={orderType:item.goodType,goodName:item.goodName,courseGroupId:live.courseGroupId,courseGroupName:live.courseGroupName,coursePrice:live.coursePrice,teacherName:live.userName||"\u6E38\u5BA2".concat(live.teacherId||""),teacherId:live.teacherId,avatar:live.avatar,courseInfo:courseInfo};_context.next=18;break;case 15:_context.prev=15;_context.t1=_context["catch"](5);throw new Error(_context.t1.message);case 18:return _context.abrupt("break",67);case 19:bizContent=JSON.parse(item.bizContent);tempList=_objectSpread(_objectSpread({},bizContent),{},{teacherName:item.username,starGrade:item.starGrade,avatar:item.avatar});return _context.abrupt("break",67);case 22:_context.prev=22;_context.next=25;return getVideoDetail(item.bizId);case 25:res=_context.sent;lessonGroup=res.lessonGroup,detailList=res.detailList;tempList={orderType:item.goodType,goodName:item.goodName,courseGroupId:lessonGroup.id,courseGroupName:lessonGroup.lessonName,coursePrice:lessonGroup.lessonPrice,teacherName:lessonGroup.username,teacherId:lessonGroup.teacherId,avatar:lessonGroup.avatar,courseInfo:detailList};_context.next=33;break;case 30:_context.prev=30;_context.t2=_context["catch"](22);throw new Error(_context.t2.message);case 33:return _context.abrupt("break",67);case 34:_context.prev=34;_context.next=37;return getVipDetail(item.id);case 37:_res=_context.sent;tempList={orderType:item.goodType,goodName:item.goodName,id:item.id,title:memberType[_res.period]||"",price:amount!==null&&amount!==void 0&&amount.couponAmount?Number((_res.salePrice-amount.couponAmount+amount.discountPrice).toFixed(2)):_res.salePrice||item.actualPrice,startTime:dayjs(_res.startTime).format("YYYY-MM-DD"),endTime:dayjs(_res.endTime).format("YYYY-MM-DD")};_context.next=44;break;case 41:_context.prev=41;_context.t3=_context["catch"](34);throw new Error(_context.t3.message);case 44:return _context.abrupt("break",67);case 45:_context.prev=45;_context.next=48;return getMusicDetail(item.bizId);case 48:_res2=_context.sent;tempList=_objectSpread({orderType:item.goodType,goodName:item.goodName},_res2);_context.next=55;break;case 52:_context.prev=52;_context.t4=_context["catch"](45);throw new Error(_context.t4.message);case 55:return _context.abrupt("break",67);case 56:_context.prev=56;_context.next=59;return getMusicActiveTrack(item.bizId);case 59:_res3=_context.sent;tempList={orderType:item.goodType,goodsName:_res3.activityName,activityId:_res3.id,actualPrice:_res3.registrationPrice};_context.next=66;break;case 63:_context.prev=63;_context.t5=_context["catch"](56);throw new Error(_context.t5.message);case 66:return _context.abrupt("break",67);case 67:tempList.orderType=type;tempList.goodName=item.goodName;orderStatus.orderObject.orderList.push(tempList);case 70:case"end":return _context.stop();}}},_callee,null,[[5,15],[22,30],[34,41],[45,52],[56,63]]);}));return function formatOrderDetail(_x,_x2){return _ref.apply(this,arguments);};}();var getVideoDetail=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(groupId){var res;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get("".concat(apiSuffix,"/videoLesson/selectVideoLesson"),{params:{groupId:groupId}});case 3:res=_context2.sent;return _context2.abrupt("return",res.data);case 7:_context2.prev=7;_context2.t0=_context2["catch"](0);throw new Error("\u83B7\u53D6\u89C6\u9891\u8BFE\u8BE6\u60C5\u5931\u8D25");case 10:case"end":return _context2.stop();}}},_callee2,null,[[0,7]]);}));return function getVideoDetail(_x3){return _ref2.apply(this,arguments);};}();var getLiveDetail=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(groupId){var res;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return request.get("".concat(apiSuffix,"/courseGroup/queryLiveCourseInfo"),{params:{groupId:groupId}});case 3:res=_context3.sent;return _context3.abrupt("return",res.data);case 7:_context3.prev=7;_context3.t0=_context3["catch"](0);throw new Error("\u83B7\u53D6\u76F4\u64AD\u8BFE\u8BE6\u60C5\u5931\u8D25");case 10:case"end":return _context3.stop();}}},_callee3,null,[[0,7]]);}));return function getLiveDetail(_x4){return _ref3.apply(this,arguments);};}();var getVipDetail=/*#__PURE__*/function(){var _ref4=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(id){var setting;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;_context4.next=3;return request.get("".concat(apiSuffix,"/vipCardRecord/detail/")+id);case 3:setting=_context4.sent;return _context4.abrupt("return",setting.data||[]);case 7:_context4.prev=7;_context4.t0=_context4["catch"](0);throw new Error("\u83B7\u53D6\u4F1A\u5458\u8BE6\u60C5\u5931\u8D25");case 10:case"end":return _context4.stop();}}},_callee4,null,[[0,7]]);}));return function getVipDetail(_x5){return _ref4.apply(this,arguments);};}();var getMusicDetail=exports('g',/*#__PURE__*/function(){var _ref5=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee5(id){var res;return regeneratorRuntime.wrap(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:_context5.prev=0;_context5.next=3;return request.get("".concat(apiSuffix,"/music/sheet/detail/").concat(id));case 3:res=_context5.sent;return _context5.abrupt("return",res.data);case 7:_context5.prev=7;_context5.t0=_context5["catch"](0);throw new Error("\u83B7\u53D6\u66F2\u76EE\u8BE6\u60C5\u5931\u8D25");case 10:case"end":return _context5.stop();}}},_callee5,null,[[0,7]]);}));return function(_x6){return _ref5.apply(this,arguments);};}());var getMusicActiveTrack=/*#__PURE__*/function(){var _ref6=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee6(id){var res;return regeneratorRuntime.wrap(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:_context6.prev=0;_context6.next=3;return request.post("".concat(apiSuffix,"/open/activity/info/").concat(id));case 3:res=_context6.sent;return _context6.abrupt("return",res.data);case 7:_context6.prev=7;_context6.t0=_context6["catch"](0);throw new Error("\u83B7\u53D6\u66F2\u76EE\u8BE6\u60C5\u5931\u8D25");case 10:case"end":return _context6.stop();}}},_callee6,null,[[0,7]]);}));return function getMusicActiveTrack(_x7){return _ref6.apply(this,arguments);};}();var tradeOrder=exports('t',function(result,callBack){var orderNo=result.orderNo,actualPrice=result.actualPrice,orderDesc=result.orderDesc,orderName=result.orderName,orderType=result.orderType,orderDetailList=result.orderDetailList,couponAmount=result.couponAmount,discountPrice=result.discountPrice;orderStatus.orderObject.orderType=orderType;orderStatus.orderObject.orderName=orderName;orderStatus.orderObject.orderDesc=orderDesc;orderStatus.orderObject.actualPrice=actualPrice;orderStatus.orderObject.orderNo=orderNo;orderStatus.orderObject.discountPrice=discountPrice;orderStatus.orderObject.orderList=[];try{orderDetailList.forEach(/*#__PURE__*/function(){var _ref7=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee7(item){return regeneratorRuntime.wrap(function _callee7$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:_context7.next=2;return formatOrderDetail(item,{couponAmount:couponAmount,discountPrice:discountPrice});case 2:case"end":return _context7.stop();}}},_callee7);}));return function(_x8){return _ref7.apply(this,arguments);};}());callBack&&callBack();}catch(_unused6){}});}};});})();
|