|
|
try{var activeInfo=this.activeInfo;if(activeInfo.activityState!==1){Dialog.alert({message:'活动已结束,感谢你的关注!',theme:'round-button',confirmButtonColor:'#2dc7aa'});this.onBackDialog('活动已结束,感谢你的关注!');return false;}var nowTime=dayjs();var startTime=dayjs(activeInfo.activityStart);var endTime=dayjs(activeInfo.activityEnd);if(dayjs(nowTime).isBefore(dayjs(startTime))){this.onBackDialog('活动尚未开始,请您耐心等待!');return false;}else if(!dayjs(nowTime).isBefore(dayjs(endTime))){this.onBackDialog('活动已结束,感谢你的关注!');return false;}return true;}catch(_unused2){//
|
|
|
}},onBackDialog:function onBackDialog(str){Dialog.alert({message:str,theme:'round-button',confirmButtonColor:'#2dc7aa'}).then(function(){postMessage({api:'back'});});},onJoinActve:function onJoinActve(){var _this3=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){var activeInfo,_res$data,res;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:if(browser().isApp){_context3.next=4;break;}_this3.popupStatus=true;removeAuth();return _context3.abrupt("return");case 4:activeInfo=_this3.activeInfo;_context3.prev=5;if(_this3.checkActivityTime()){_context3.next=8;break;}return _context3.abrupt("return");case 8:if(!(activeInfo.registrationMethod==='CHARGE')){_context3.next=22;break;}_context3.next=11;return request.post('/api-student/userOrder/getPendingOrder',{data:{goodType:'ACTI_REGIST',bizId:activeInfo.id}});case 11:res=_context3.sent;// 判断是否是收费活动
|
|
|
orderStatus.orderObject.orderType='ACTI_REGIST';orderStatus.orderObject.orderName=activeInfo.activityName;orderStatus.orderObject.orderDesc=activeInfo.activityName;orderStatus.orderObject.actualPrice=activeInfo.registrationPrice;orderStatus.orderObject.orderNo=((_res$data=res.data)===null||_res$data===void 0?void 0:_res$data.orderNo)||'';orderStatus.orderObject.recomUserId=_this3.recomUserId;orderStatus.orderObject.orderList=[{orderType:'ACTI_REGIST',goodsName:activeInfo.activityName,activityId:activeInfo.id,actualPrice:activeInfo.registrationPrice,recomUserId:_this3.recomUserId}];_this3.$router.push({path:'/orderDetail',query:{orderType:'ACTI_REGIST',activityId:activeInfo.id}});_context3.next=26;break;case 22:_context3.next=24;return request.post("/api-student/activity/joinActivity/".concat(activeInfo.id));case 24:// 成功通知
|
|
|
_this3.getMusicInfo();case 26:_context3.next=30;break;case 28:_context3.prev=28;_context3.t0=_context3["catch"](5);case 30:case"end":return _context3.stop();}}},_callee3,null,[[5,28]]);}))();},onOpenMusic:function onOpenMusic(){var _this4=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(){var selectMusic,browserInfo,url;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.prev=0;selectMusic=_this4.selectMusic;if(!(selectMusic.join!==1)){_context4.next=6;break;}_context4.next=5;return request.post("/api-student/activity/evaluation/".concat(selectMusic.evaluationId));case 5:_this4.selectMusic.join=1;case 6:_this4.popupStatus=false;browserInfo=browser();url=qs.stringifyUrl({url:location.origin+'/accompany',query:{id:selectMusic.musicSheetId,behaviorId:_this4.behaviorId,client:browserInfo.isTeacher?'teacher':'student',setting:JSON.stringify({mode:'EVALUATING',resets:['SPEED'],difficulty:_this4.activeInfo.evaluationDifficulty,feeType:'FREE',submitData:{evaluationId:_this4.selectMusic.evaluationId}})}});postMessage({api:'openAccompanyWebView',content:{url:url,orientation:0,isHideTitle:true,statusBarTextColor:false,isOpenLight:true}});_context4.next=14;break;case 12:_context4.prev=12;_context4.t0=_context4["catch"](0);case 14:case"end":return _context4.stop();}}},_callee4,null,[[0,12]]);}))();},onOpenApp:function onOpenApp(){//
|
|
|
var _location=location,origin=_location.origin;var str=origin+"/student/#/track-review-activity?id=".concat(this.id,"&recomUserId=").concat(this.recomUserId);shareCall(str,{});// 不管有没有唤起,则跳转到下载页面
|