1234 |
- ;(function(){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);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._live-detail_11jpd_1 ._introduction_11jpd_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._live-detail_11jpd_1 .van-tabs__wrap{margin-bottom:.4rem}._live-detail_11jpd_1 .van-button--disabled{opacity:.9}._live-detail_11jpd_1 ._tips_11jpd_12{background-color:#fff;border-radius:.26667rem;margin:.37333rem;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding)}._live-detail_11jpd_1 ._tips_11jpd_12 h3{display:flex;font-size:.37333rem;font-weight:500;color:#333;line-height:1}._live-detail_11jpd_1 ._tips_11jpd_12 p{padding-top:.24rem;font-size:.32rem;color:#7a7a7a;line-height:.61333rem}._live-detail_11jpd_1 ._tips_11jpd_12 .van-icon{margin-right:.16rem}._live-detail_11jpd_1 ._btnMore_11jpd_34{display:flex;justify-content:space-around}._live-detail_11jpd_1 ._btnMore_11jpd_34 .van-button{width:60%}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.477e6810.js','./index-legacy.51c32d39.js','./index-legacy.0a729531.js','./index-legacy.a46cdcf2.js','./vendor-legacy.85605a93.js','./index-legacy.f25f109a5.js','./orderStatus-legacy.e9edd6af.js','./index-legacy.f63b6c36.js','./index-legacy.e4e58e1c.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a4.js','./index-legacy.f25f109a10.js','./icon_teacher-legacy.42ba77b1.js','./icon_timer2-legacy.b6c78faa.js','./index-legacy.f25f109a8.js'],function(exports){'use strict';var CoursePlanStep,SectionDetail,UserDetail,request,postMessage,defineComponent,dayjs,Toast,Dialog,createVNode,Icon,createTextVNode,Sticky,Button,orderStatus,ColHeader;return{setters:[function(module){CoursePlanStep=module.C;},function(module){SectionDetail=module.S;},function(module){UserDetail=module.U;},function(module){request=module.r;postMessage=module.p;},function(module){defineComponent=module.d;dayjs=module.g;Toast=module.T;Dialog=module.D;createVNode=module.a;Icon=module.u;createTextVNode=module.j;Sticky=module.S;Button=module.B;},function(){},function(module){orderStatus=module.o;},function(module){ColHeader=module.C;},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var introduction="_introduction_11jpd_1";var tips="_tips_11jpd_12";var btnMore="_btnMore_11jpd_34";var styles={"live-detail":"_live-detail_11jpd_1",introduction:introduction,tips:tips,btnMore:btnMore};var iconTips="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAAXNSR0IArs4c6QAAASNQTFRFAAAA/wAA/4AA/6pV/5kz/4Ar/4BA/49A/445/4BA/4xA/4VD/4pA/4U9/4lA/4g7/4M+/4Y5/4Y9/4VA/4g+/4U9/4g8/4Y8/4Q+/4U//4U9/4g8/4Y+/4c9/4Y9/4c8/4c+/4c+/4U9/4Y+/4Y9/4Y8/4c+/4Y+/4c9/4Y9/4Y8/4Y9/4c9/4Y9/4Y8/4Y+/4U+/4U9/4c9/4Y8/4U+/4Y9/4c8/4Y8/4Y+/4Y9/4Y+/4c+/4c9/4Y9/4c+/4Y9/4Y9/4Y8/4c9/4Y9/4Y8/4Y9/4U9/4c9/4Y8/4c9/4Y9/4Y9/4Y9/4c9/4Y8/4Y+/4Y9/4Y9/4U8/4Y9/4Y9/4Y9/4Y8/4Y9/4Y9/4Y8/4Y9/4Y9/4Y9/4c9/4Y8/4Y9/4Y9qWZ60gAAAGB0Uk5TAAECAwUGEBASFBQXGBkcHiUoKiwtLi83OkFLTU5TVFVXYmRnaXJzdH1+h42Ok5SUlZeXmJmgoaWlp6qusLGys7u+w8rL0NbW19jZ3d7j5OTn7O3t8vP19/j5+fr7/P3+TBv5LQAAAThJREFUOMvF1OszQkEYx/FK6KakXMpBSDfkknIJSYUuKIVOl+P7//8VXmiOc057mDHTeF7t85vP7uzu7KzFMrE6eY3/jhQebD8Lf7IMdMtJvynx5oaMapjzik2oBdxnEonjO6AVEhmpD4Wlr/HiNfSlcRPsIG99t5tdOkGjsZb4WNcGawolqwFFYE+f7ELEgIq0Z/XJzAtFfeIYkDHu4IiBQxeEYewwEoR1QRTGzhKAqC6IgceIPBDTBXFwG5Eb4v+JUmKU0rS2LGJE1qa9AKXpNCJnU9FeQpW6T/TEfHWqatMjLX6saXrquEHNJTKuGg21SYD8LCgZkiqyX2JSV3bNwqvpU0EdSNY//QJzGwujidMr2/MmqA7tm7P9w4vbN3g0QUXtjvMmaGo5lq88vcutyvlOYEIf2ydPMlkWBCFozgAAAABJRU5ErkJggg==";var liveDetail=exports('default',defineComponent({name:'LiveDetail',data:function data(){var query=this.$route.query;return{joinRoom:query.joinRoom,// 原生传递过来的参数,判断是否进入直播间
- recomUserId:query.recomUserId,// 推荐人id
- groupId:query.groupId,courseId:query.classId,live:{}};},computed:{userInfo:function userInfo(){var _planList$,_planList$2;var live=this.live;var planList=live.planList||[];var startTime=((_planList$=planList[0])===null||_planList$===void 0?void 0:_planList$.startTime)||new Date();var endTime=((_planList$2=planList[0])===null||_planList$2===void 0?void 0:_planList$2.endTime)||new Date();return{headUrl:live.avatar,username:live.userName||"\u6E38\u5BA2".concat(live.teacherId||''),startTime:"".concat(dayjs(startTime).format('YYYY-MM-DD')," ").concat(dayjs(startTime).format('HH:mm'),"~").concat(dayjs(endTime).format('HH:mm'))||'',buyNum:live.studentCount,lessonPrice:live.coursePrice,lessonNum:live.courseNum,lessonDesc:live.courseIntroduce,lessonCoverUrl:live.backgroundPic||live.backgroundPicTemplate,lessonName:live.courseGroupName};},courseInfo:function courseInfo(){var tempArr=[];var coursePlanList=this.live.planList||[];coursePlanList.forEach(function(item){var startTime=item.startTime||new Date();var endTime=item.endTime||new Date();tempArr.push({courseTime:"".concat(dayjs(startTime).format('YYYY-MM-DD')," ").concat(dayjs(startTime).format('HH:mm'),"~").concat(dayjs(endTime).format('HH:mm')),coursePlan:item.plan,roomUid:item.roomUid,liveState:item.liveState,id:item.courseId});});return tempArr||[];},salesEndDate:function salesEndDate(){var live=this.live;return dayjs(live.salesEndDate||new Date()).format('YYYY-MM-DD');},liveStatus:function liveStatus(){var _this=this;var coursePlanList=this.live.planList||[];var tempObj={status:false,liveStatus:0,roomUid:''};coursePlanList.forEach(function(item){if(item.courseId===Number(_this.courseId)){tempObj.status=true;tempObj.liveStatus=item.liveStatus;tempObj.roomUid=item.roomUid;}});return tempObj;}},mounted:function mounted(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.get('/api-student/courseGroup/queryLiveCourseInfo',{params:{groupId:_this2.groupId}});case 3:res=_context.sent;_this2.live=res.data||{};_context.next=9;break;case 7:_context.prev=7;_context.t0=_context["catch"](0);case 9:case"end":return _context.stop();}}},_callee,null,[[0,7]]);}))();},methods:{onJoinRoom:function onJoinRoom(){var _this3=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var res,result,coursePlanList,tempObj;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get('/api-student/courseGroup/queryLiveCourseInfo',{params:{groupId:_this3.groupId}});case 3:res=_context2.sent;result=res.data||{};coursePlanList=result.planList||[];tempObj={};coursePlanList.forEach(function(item){if(item.courseId===Number(_this3.courseId)){tempObj=item;}});console.log(tempObj,_this3.live,'tempObj');if(tempObj&&tempObj.liveState===1){postMessage({api:'joinLiveRoom',content:{roomId:tempObj.roomUid,teacherId:_this3.live.teacherId}});}else if(tempObj&&tempObj.liveState===2){setTimeout(function(){Toast('课程已结束');},100);}else{setTimeout(function(){Toast('课程尚未开始,请耐心等候');},100);}_context2.next=14;break;case 12:_context2.prev=12;_context2.t0=_context2["catch"](0);case 14:case"end":return _context2.stop();}}},_callee2,null,[[0,12]]);}))();},onBuy:function onBuy(){var _this4=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(){var res,live,result;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;_context4.next=3;return request.post('/api-student/userOrder/getPendingOrder',{data:{goodType:'LIVE',bizId:_this4.groupId}});case 3:res=_context4.sent;live=_this4.live;orderStatus.orderObject.orderType='LIVE';orderStatus.orderObject.orderName='直播课购买';orderStatus.orderObject.orderDesc='直播课购买';orderStatus.orderObject.actualPrice=live.coursePrice;orderStatus.orderObject.recomUserId=_this4.recomUserId;orderStatus.orderObject.orderNo='';orderStatus.orderObject.orderList=[{orderType:'LIVE',goodsName:'直播课购买',courseGroupId:live.courseGroupId,courseGroupName:live.courseGroupName,coursePrice:live.coursePrice,teacherName:live.userName||"\u6E38\u5BA2".concat(live.teacherId||''),teacherId:live.teacherId,avatar:live.avatar,courseInfo:_this4.courseInfo,recomUserId:_this4.recomUserId}];result=res.data;if(result){Dialog.confirm({title:'提示',message:'您有一个未支付的订单,是否继续支付?',confirmButtonColor:'#269a93',cancelButtonText:'取消订单',confirmButtonText:'继续支付'}).then(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:orderStatus.orderObject.orderNo=result.orderNo;orderStatus.orderObject.actualPrice=result.actualPrice;_this4.routerTo();case 3:case"end":return _context3.stop();}}},_callee3);}))).catch(function(){Dialog.close();// 只用取消订单,不用做其它处理
- _this4.cancelPayment(result.orderNo);});}else{_this4.routerTo();}_context4.next=18;break;case 16:_context4.prev=16;_context4.t0=_context4["catch"](0);case 18:case"end":return _context4.stop();}}},_callee4,null,[[0,16]]);}))();},routerTo:function routerTo(){var live=this.live;this.$router.push({path:'/orderDetail',query:{orderType:'LIVE',courseGroupId:live.courseGroupId}});},cancelPayment:function cancelPayment(orderNo){return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee5(){return regeneratorRuntime.wrap(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:_context5.prev=0;_context5.next=3;return request.post('/api-student/userOrder/orderCancel',{data:{orderNo:orderNo}});case 3:_context5.next=7;break;case 5:_context5.prev=5;_context5.t0=_context5["catch"](0);case 7:case"end":return _context5.stop();}}},_callee5,null,[[0,5]]);}))();}},render:function render(){var _this5=this;return createVNode("div",{"class":[styles['live-detail'],'mb12']},[createVNode(ColHeader,null,null),createVNode(UserDetail,{"userInfo":this.userInfo,"showBuy":false},null),createVNode(SectionDetail,null,{default:function _default(){return[createVNode("p",{"class":styles.introduction},[_this5.userInfo.lessonDesc])];}}),createVNode(SectionDetail,{"title":"课程列表","icon":"courseList","contentStyle":{paddingTop:'0'}},{default:function _default(){return[_this5.courseInfo.length>0&&createVNode(CoursePlanStep,{"courseInfo":_this5.courseInfo,"courseId":Number(_this5.courseId)||0},null)];}}),createVNode("div",{"class":styles.tips},[createVNode("h3",null,[createVNode(Icon,{"name":iconTips,"size":15},null),createTextVNode("\u6E29\u99A8\u63D0\u793A")]),createVNode("p",null,[createTextVNode("1\u3001\u8BE5\u76F4\u64AD\u8BFE\u7A0B\u9500\u552E\u622A\u6B62\u540E\uFF0C\u62A5\u540D\u4EBA\u6570\u82E5\u5C11\u4E8E"),this.live.mixStudentNum||0,createTextVNode("\u4EBA\u5C06\u53D6\u6D88\u5F00\u8BFE\uFF0C\u5DF2\u8D2D\u4E70\u5B66\u5458\u4ED8\u8D39\u91D1\u989D\u5C06\u81EA\u52A8\u8FD4\u8FD8\uFF0C\u8BF7\u60A8\u653E\u5FC3\u8D2D\u4E70\uFF1B"),createVNode("br",null,null),createTextVNode("2\u3001\u76F4\u64AD\u8BFE\u6559\u5B66\u8BA1\u5212\u4E2D\u7684\u4E0A\u8BFE\u65F6\u95F4\u4E3A\u8001\u5E08\u9884\u8BA1\u65F6\u95F4\uFF0C\u5B9E\u9645\u4E0A\u8BFE\u65F6\u95F4\u4EE5\u8001\u5E08\u5F00\u542F\u76F4\u64AD\u65F6\u95F4\u4E3A\u51C6\uFF1B"),createVNode("br",null,null),createTextVNode("3\u3001\u82E5\u60A8\u9519\u8FC7\u8001\u5E08\u76F4\u64AD\uFF0C\u53EF\u901A\u8FC7\u89C6\u9891\u56DE\u653E\u89C2\u770B\u5B8C\u6574\u8BFE\u7A0B\u3002")])]),this.courseInfo.length>0&&this.live.existBuy!==1&&createVNode(Sticky,{"offsetBottom":0,"position":"bottom"},{default:function _default(){return[createVNode("div",{"class":['btnGroup',styles.btnMore]},[createVNode(Button,{"block":true,"round":true,"type":"primary","onClick":_this5.onBuy},{default:function _default(){return[createTextVNode("\u7ACB\u5373\u8D2D\u4E70")];}})])];}}),this.joinRoom=='1'&&this.liveStatus.liveStatus!==2&&createVNode(Sticky,{"offsetBottom":0,"position":"bottom"},{default:function _default(){return[createVNode("div",{"class":['btnGroup'],"style":{paddingTop:'12px'}},[createVNode(Button,{"block":true,"round":true,"type":"primary","onClick":_this5.onJoinRoom},{default:function _default(){return[createTextVNode("\u8FDB\u5165\u76F4\u64AD\u95F4")];}})])];}})]);}}));}};});})();
|