video.js 22 KB

1
  1. "use strict";var I=Object.defineProperty,k=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var m=(e,i,l)=>i in e?I(e,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[i]=l,a=(e,i)=>{for(var l in i||(i={}))y.call(i,l)&&m(e,l,i[l]);if(p)for(var l of p(i))x.call(i,l)&&m(e,l,i[l]);return e},g=(e,i)=>k(e,v(i));var T=(e,i)=>{var l={};for(var r in e)y.call(e,r)&&i.indexOf(r)<0&&(l[r]=e[r]);if(e!=null&&p)for(var r of p(e))i.indexOf(r)<0&&x.call(e,r)&&(l[r]=e[r]);return l};var s=require("../common/vendor.js"),b=require("../utils/common.js"),u=require("../api/course.js");require("../api/user.js");require("../common/request.js");const w={data(){return{baseUrl:s.index.getStorageSync("requestPath"),rewardType:[{name:"\u7EA2\u5305\u5956\u52B1",value:1},{name:"\u79EF\u5206\u5956\u52B1",value:2}],currentReward:1,player:null,loading:!0,progress:0,code:null,statusBarHeight:s.index.getSystemInfoSync().statusBarHeight,scrollTop:0,height:"0px",isLogin:!0,videoUrl:"",videoId:"",playTime:0,duration:0,playDuration:0,playDurationSeek:0,tipsTime:0,tipsOpen:!1,config:{},courseInfo:{},quesList:[],lineList:[],errQues:[],remain:0,errTitle:"",errDesc:"",showPlay:!0,showControls:!1,playStatus:"",isfull:!1,isAddKf:0,lineIndex:0,isExpand:!1,textHeight:0,qwUserId:"",qrcode:"",corpId:"",qrcodeMsg:"",urlOption:{},bufferRate:0,uuId:"",isEnded:!1,linkType:0,ip:null,checked:!0,isFinish:0,interval:null,intervalIntegral:null,options:{sources:[{src:""}],poster:"",live:!1,controls:!0,autoplay:!1,licenseUrl:"https://license.vod2.myqcloud.com/license/v2/1323137866_1/v_cube.license",LicenseKey:"bcc5bd9a14b798b48c52ff005a21d926",controlBar:{volumePanel:!1,playbackRateMenuButton:!1,QualitySwitcherMenuButton:!1},plugins:{ContextMenu:{statistic:!1}}},errorCount:0,answerPopup:!1,sortLink:"",isExpire:!0,menuButtonLeft:281,menuButtonH:45,timer:null,flag:!1,danmuList:[],danmuIput:"",focus:!1,danmubtnLoading:!1,openDanmuType:0,socket:null,isSocketOpen:!1,isSend:!0,reOpenSocket:!1,pingpangTimes:null,danmuboxHeight:0,user:{},crtShow:!0,isCheckRealUrl:!1}},filters:{numberToChinese(e){return e?["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"][e-1]:""}},computed:{isAnswer(){return(e,i)=>e.type==1?e.answer==i:e.type==2?e.answer.split(",").some(r=>r==i):!1}},onLoad(e){this.code=e.code,this.urlOption=e.course?JSON.parse(e.course):{},this.videoId=this.urlOption.videoId,this.qwUserId=this.urlOption.qwUserId||"",this.corpId=this.urlOption.corpId||"",this.linkType=this.urlOption.linkType||0,this.sortLink=this.urlOption.link||"",this.getMenuButton(),s.index.onKeyboardHeightChange(this.keyboardHeightChange),this.socket!=null&&(this.socket.close(),clearInterval(this.pingpangTimes),this.socket=null)},onShow(){this.tipsOpen=!1,this.isExpand=!0,this.uuId=b.generateRandomString(16),s.index.getStorageSync("userInfo")&&JSON.stringify(s.index.getStorageSync("userInfo"))!="{}"?this.user=JSON.parse(s.index.getStorageSync("userInfo")):this.user={},this.videoId&&this.getH5CourseByVideo(),this.sortLink?this.getLink():s.index.showToast({title:"sortLink is not found",icon:"none"})},mounted(){this.getIP(),this.getHeight()},onHide(){this.player&&this.player.pause()},onUnload(){this.interval!=null&&(clearInterval(this.interval),this.interval=null),this.socket!=null&&(this.socket.close(),clearInterval(this.pingpangTimes),this.socket=null),s.index.offKeyboardHeightChange(this.keyboardHeightChange),this.clearIntegral()},beforeDestroy(){this.player=s.index.createVideoContext("video-content-box"),this.player&&(this.player.stop(),this.player=null),this.interval!=null&&(clearInterval(this.interval),this.interval=null),this.socket!=null&&(this.socket.close(),clearInterval(this.pingpangTimes),this.socket=null),s.index.offKeyboardHeightChange(this.keyboardHeightChange),this.clearIntegral()},methods:{keyboardHeightChange(e){console.log("this.danmuboxHeight",this.danmuboxHeight),this.danmuboxHeight=e.height},getMenuButton(){const e=s.index.getMenuButtonBoundingClientRect();this.menuButtonLeft=e.left,this.menuButtonH=e.height},onTimeUpdate(e){let i=Math.round(e.detail.currentTime);this.playDurationSeek>0?(this.playTime=this.playDurationSeek,this.throttle(()=>this.changeTime(this),1e3,!1)):(this.linkType!=1&&(i-this.playTime>3||i-this.playTime<-3)&&this.isFinish!=1&&(s.index.showToast({title:"\u4E0D\u80FD\u5FEB\u8FDB\u54E6",icon:"none"}),i=this.playTime,this.player.seek(this.playTime)),this.playTime=i)},changeTime(e,i){e.playDurationSeek=0},videoErrorCallback(e){this.clearIntegral(),this.errorCount++,!(this.errorCount>3)&&(console.log(e),this.getErrMsg(e.target.errMsg),this.getH5CourseVideoDetails("error"))},getPlay(){this.errorCount=0,this.judgeDuration()},getPause(){this.clearIntegral()},getEnded(){this.clearIntegral(),this.isEnded=!0,this.getFinishCourseVideo()},fullscreenchange(e){this.isfull=e.detail.fullScreen},controlstoggle(e){this.crtShow=e.detail.show},getIP(){s.index.request({url:"https://ipinfo.io/json",method:"GET",success:e=>{this.ip=e.data.ip}})},getHeight(){this.$nextTick(()=>{s.index.createSelectorQuery().in(this).select("#title-content").boundingClientRect(i=>{this.height=`calc(100vh - ${i.height}px - 420rpx - ${this.statusBarHeight}px - 164rpx - 88rpx)`}).exec()})},getDescHeight(){this.$nextTick(()=>{s.index.createSelectorQuery().in(this).select("#descbox-desc").boundingClientRect(i=>{this.textHeight=i.height}).exec()})},numberToLetter(e){let i=e+65;return String.fromCharCode(i)},updateTime(){var e=this;this.interval!=null&&clearInterval(this.interval),this.interval=setInterval(function(){e.getFinishCourseVideo(),e.getInternetTraffic()},6e4)},judgeDuration(){var e=this;this.intervalIntegral!=null&&(clearInterval(this.intervalIntegral),this.intervalIntegral=null),this.intervalIntegral=setInterval(function(){e.getIntegralByH5Video()},6e5)},clearIntegral(){this.intervalIntegral!=null&&(clearInterval(this.intervalIntegral),this.intervalIntegral=null)},handleExpand(){this.isExpand=!this.isExpand},getH5CourseByVideo(){this.loading=!0,u.getH5CourseByVideoId({videoId:this.videoId}).then(e=>{this.loading=!1,e.code==200&&(this.courseInfo=e.data,s.index.setNavigationBarTitle({title:this.courseInfo&&this.courseInfo.title?this.courseInfo.title:""})),this.getHeight(),this.getDescHeight()},e=>{this.loading=!1}).catch(()=>{this.loading=!1})},getH5CourseVideoDetails(e){u.getH5CourseVideoDetails(this.urlOption).then(i=>{if(i.code==200){this.config=i.config||{},this.isFinish=i.isFinish||0,this.duration=i.course&&i.course.duration?i.course.duration:0,this.playDuration=i.playDuration||0,this.playDurationSeek=i.playDuration||0,this.tipsTime=i.tipsTime||0;let l=[];i.course&&i.course.lineOne&&l.push(i.course.lineOne),i.course&&i.course.lineTwo&&l.push(i.course.lineTwo),i.course&&i.course.lineThree&&l.push(i.course.lineThree),this.lineList=l,!this.player||e=="error"?(this.lineIndex=this.config.defaultLine,this.videoUrl=l[this.lineIndex],this.poster=i.course&&i.course.imgUrl?i.course.imgUrl:"",this.playTime=this.playDuration>=this.duration?0:this.playDuration,setTimeout(()=>{this.player=s.index.createVideoContext("video-content-box"),this.player.seek(this.playTime),this.player.play()},500),this.getDanmuList(),this.socket?this.socket.close({success:()=>{this.reOpenSocket=!0,clearInterval(this.pingpangTimes)}}):this.initSocket()):(this.playTime=this.playTime>this.playDuration?this.playTime:this.playDuration>=this.duration?0:this.playDuration,this.player.seek(this.playTime),this.player.play()),this.updateTime(),this.quesList=i.questions&&i.questions.length>0?i.questions:[],this.quesList=this.quesList.map(r=>g(a({},r),{questionOption:JSON.parse(r.question),answer:""}))}this.getHeight(),this.getDescHeight()},i=>{})},handleAnswer(e,i,l){let r=this.playTime;if(this.isEnded?r=this.duration:r<this.playDuration&&this.isFinish!=1&&(r=this.playDuration),Number(this.duration||0)==0||r<this.duration-60){s.index.showToast({title:"\u8BF7\u5148\u89C2\u770B\u5B8C\u6574\u8BFE\u7A0B\u518D\u7B54\u9898\u54E6\uFF5E",icon:"none"});return}if(e.type==1)e.answer=i.name;else if(e.type==2){let t=e.answer?e.answer.split(","):[];t.indexOf(i.name)===-1?(t.push(i.name),e.answer=t.join(",")):(t.splice(t.indexOf(i.name),1),e.answer=t.join(","))}},submit(){if(this.isExpire){s.index.showToast({title:"\u8BFE\u7A0B\u5DF2\u8FC7\u671F\u6216\u94FE\u63A5\u65E0\u6548",icon:"none"});return}this.$isLoginCourse().then(e=>{e?this.isAddKf==1&&this.isCheckRealUrl?this.courseAnswer():this.videoId&&this.qwUserId?this.getIsAddKf():s.index.showToast({title:"\u8BF7\u6DFB\u52A0\u5BA2\u670D",icon:"none"}):this.goLogin()},e=>{})},courseAnswer(){let e=this.playTime;if(this.isEnded?e=this.duration:e<this.playDuration&&this.isFinish!=1&&(e=this.playDuration),Number(this.duration||0)==0||e<this.duration-60){s.index.showToast({title:"\u8BF7\u5148\u89C2\u770B\u5B8C\u6574\u8BFE\u7A0B\u518D\u7B54\u9898\u54E6\uFF5E",icon:"none"});return}if(this.quesList.some(r=>!r.answer)){s.index.showToast({title:"\u8BF7\u786E\u8BA4\u662F\u5426\u7B54\u5B8C\u6240\u6709\u9898\u76EE",icon:"none"});return}const i=this.quesList.map(r=>{const n=r,{questionOption:t}=n;return T(n,["questionOption"])});if(!this.isCheckRealUrl)return;const l=g(a({},this.urlOption),{questions:i,videoId:this.videoId,duration:this.playTime});this.errTitle="",this.errDesc="",this.errQues=[],u.courseAnswer(l).then(r=>{r.code==200?r.incorrectQuestions?(r.incorrectQuestions.length>0&&(this.errQues=r.incorrectQuestions),this.remain=r.remain||0,r.remain>0&&(this.errTitle="\u5F88\u9057\u61BE\u7B54\u9519\u4E86",this.errDesc=`<span style="color:#FF5C03">\u8FD8\u6709${r.remain}\u6B21\u673A\u4F1A\uFF0C\u7EE7\u7EED\u52A0\u6CB9</span>`,this.$refs.answerPopup.open("center"))):(this.errTitle="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E",this.errDesc="\u8BF7\u9009\u62E9\u5956\u52B1",this.$refs.answerPopup.open("center")):r.msg=="\u8BE5\u8BFE\u9898\u5230\u8FBE\u7B54\u9519\u6B21\u6570\u9650\u5236"?(this.errTitle="\u7B54\u9898\u6B21\u6570\u8D85\u8FC7\u9650\u5236",this.errDesc="\u4EE5\u540E\u7684\u8BFE\u7A0B\u8981\u8BA4\u771F\u5B66\u4E60\u54E6",this.$refs.answerPopup.open("center")):s.index.showToast({title:r.msg,icon:"none"})},r=>{})},rewardChange(e){this.currentReward=e.detail.value},closeAnswerPopup(){if(this.$refs.answerPopup.close(),!!this.isCheckRealUrl&&this.errTitle=="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E"){const e=g(a({},this.urlOption),{rewardType:Number(this.currentReward),source:2});u.sendReward(e).then(i=>{s.index.showToast({title:i.msg,icon:"none"})})}},openPop(){this.$refs.popup.open("bottom")},close(){this.$refs.popup.close()},handleLine(e){var i=this;if(this.lineIndex==e&&this.videoUrl==this.lineList[e]){this.close();return}else this.lineIndex=e,this.videoUrl=this.lineList[e],this.tipsOpen=!1,this.playDurationSeek=this.playTime||0,this.player=s.index.createVideoContext("video-content-box"),setTimeout(function(){i.player.seek(i.playDurationSeek),i.player.play()},500),this.close()},getIsAddKf(){this.qrcode="",this.qrcodeMsg="",this.isAddKf=0,u.getIsAddKf(this.urlOption).then(e=>{if(e.code==200)this.isAddKf=1,this.isCheckRealUrl=!0,this.getH5CourseVideoDetails();else if(e.code==400)this.isAddKf=0,this.isCheckRealUrl=!1,this.qrcode=e.qrcode,this.qrcodeMsg=e.msg,this.$refs.kfPopup.open();else if(e.code==504)this.isCheckRealUrl=!1,this.goLogin();else if(e.code==566){this.isAddKf=1,this.isCheckRealUrl=!0;const i=e.courseLink.realLink.split("?course=")[1];this.urlOption=JSON.parse(i),this.getH5CourseVideoDetails()}else this.isCheckRealUrl=!1,this.isAddKf=0,s.index.showToast({title:e.msg,icon:"none"})},e=>{})},closeKFPop(){this.$refs.kfPopup.close()},getFinishCourseVideo(){if(!this.playTime||!this.isCheckRealUrl)return;const e=a({duration:this.playTime},this.urlOption);u.getFinishCourseVideo(e)},getIntegralByH5Video(){if(!this.isCheckRealUrl)return;const e=a({duration:this.playTime},this.urlOption);u.getIntegralByH5Video(e).then(i=>{i.code==200&&s.index.showToast({title:"\u79EF\u5206+10",icon:"none"})})},progressChange(e){this.bufferRate=Math.ceil(e.detail.buffered)},getInternetTraffic(){if(!this.isCheckRealUrl)return;const e=Math.ceil(this.playTime/this.duration*100);if((this.bufferRate==0||this.bufferRate<e)&&(this.bufferRate=e),this.bufferRate==0||Number(this.bufferRate.toFixed(2))==0)return;const i=a({uuId:s.dayjs().format("YYYYMMDD")+this.uuId,duration:this.playTime,bufferRate:Number(this.bufferRate.toFixed(2))},this.urlOption);u.getInternetTraffic(i)},getErrMsg(e){let i={videoUrl:this.videoUrl,lineIndex:this.lineIndex,errTime:new Date,ip:this.ip,errMsg:e};u.getErrMsg({msg:JSON.stringify(i)})},goLogin(){this.$getProvider().then(e=>{console.log("\u5F53\u524D\u7684\u73AF\u5883\u5546",e),e||reject(),s.index.login({provider:e,success:async i=>{console.log(i),s.index.getUserInfo({provider:e,success:l=>{s.index.showToast({title:"\u5904\u7406\u4E2D...",icon:"loading"}),u.loginByMp({code:i.code,encryptedData:l.encryptedData,iv:l.iv}).then(r=>{s.index.hideLoading(),r.code==200?(s.index.setStorageSync("AppTokenmini_RTCourse",r.token),s.index.setStorageSync("userInfo",JSON.stringify(r.user)),this.user=r.user,this.isLogin=!0,this.getIsAddKf()):s.index.showToast({title:r.msg,icon:"none"})}).catch(r=>{s.index.hideLoading(),s.index.showToast({icon:"none",title:"\u767B\u5F55\u5931\u8D25,\u8BF7\u91CD\u65B0\u767B\u5F55"})})}})}})}).catch(e=>{})},getLink(){u.getRealLink({sortLink:this.sortLink}).then(e=>{e.code==200?(this.isExpire=!1,this.isLogin&&this.isAddKf==1&&this.isCheckRealUrl&&this.getH5CourseVideoDetails(),this.videoId&&(this.isAddKf!=1||!this.isCheckRealUrl)&&this.$isLoginCourse().then(i=>{this.isLogin=i,i?this.getIsAddKf():this.goLogin()},i=>{})):(this.isExpire=!0,s.index.showToast({title:"\u8BFE\u7A0B\u5DF2\u8FC7\u671F\u6216\u94FE\u63A5\u65E0\u6548",icon:"none"}))}).catch(e=>{this.isExpire=!0,s.index.showToast({title:"\u53D1\u751F\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",icon:"none"})})},throttle(e,i=500,l=!0){l?this.flag||(this.flag=!0,typeof e=="function"&&e(),this.timer=setTimeout(()=>{this.flag=!1},i)):this.flag||(this.flag=!0,this.timer=setTimeout(()=>{this.flag=!1,typeof e=="function"&&e()},i))},openDanmu(e){this.openDanmuType=e,this.danmuIput="",e==1&&this.player.exitFullScreen(),this.$refs.danmuPopup.open()},changeShowPopup(e){this.focus=e.show},sendDanmu(){if(this.danmuIput==""||this.danmuIput.trim()==""){s.index.showToast({title:"\u5F39\u5E55\u4E0D\u80FD\u4E3A\u7A7A",icon:"none"});return}this.sendMsg()},getDanmuList(){u.getDanmuList(this.videoId).then(e=>{e.code==200&&e.data&&e.data.length>0?this.danmuList=e.data.map(i=>({id:i.id,text:i.content,time:i.timePoint?Number(i.timePoint):this.playTime,color:"#FFFFFF"})):this.danmuList=[]})},initSocket(){let e=this.user.userId,i=this;this.socket=s.index.connectSocket({url:getApp().globalData.danmuWSUrl+"/ws/barrage/"+this.videoId,multiple:!0,header:{token:s.index.getStorageSync("AppTokenmini_RTCourse")},success:l=>{console.log("WebSocket\u8FDE\u63A5\u5DF2\u6253\u5F001\uFF01"),i.isSocketOpen=!0,i.reOpenSocket=!1,i.pingpangTimes&&(clearInterval(i.pingpangTimes),i.pingpangTimes=null),i.pingpangTimes=setInterval(()=>{let r={cmd:"heartbeat",userId:e};i.socket.send({data:JSON.stringify(r),success:()=>{},fail:()=>{i.isSocketOpen=!1}})},15e3)},error:l=>{console.log(l)}}),this.socket.onMessage(l=>{console.log("\u6536\u5230\u6D88\u606Fparse",JSON.parse(l.data));const r=JSON.parse(l.data);r.cmd=="heartbeat"||r.cmd=="danmu"&&(i.isSend=!0,i.addMsg(1,r))}),this.socket.onOpen(()=>{console.log("WebSocket\u8FDE\u63A5\u5DF2\u6253\u5F002\uFF01"),i.isSocketOpen=!0,i.reOpenSocket=!1,i.isSend=!0}),this.socket.onClose(()=>{i.isSocketOpen=!1,i.socket=null,console.log("WebSocket\u8FDE\u63A5\u5DF2\u5173\u95ED\uFF01",i.reOpenSocket),i.pingpangTimes&&(clearInterval(i.pingpangTimes),i.pingpangTimes=null),i.reOpenSocket&&i.initSocket()}),this.socket.onError(l=>{console.log("socket err\uFF1A",l),i.isSocketOpen=!1,i.reOpenSocket=!1,i.socket=null,i.pingpangTimes&&(clearInterval(i.pingpangTimes),i.pingpangTimes=null)})},sendMsg(){if(!!this.isSend&&this.isSocketOpen){var e={cmd:"danmu",userId:this.user.userId,videoId:this.videoId,content:this.danmuIput,timePoint:this.playTime,platform:"uniapp",fontSize:"14px",mode:"scroll",color:"#fff"};this.socket.send({data:JSON.stringify(e),success:()=>{console.log("\u53D1\u9001\u6210\u529F"),this.$refs.danmuPopup.close(),this.isSend=!1},fail:()=>{console.log("\u53D1\u9001\u5931\u8D25"),s.index.showToast({title:"\u53D1\u9001\u5931\u8D25",icon:"none"})}})}},addMsg(e,i){this.player||(this.player=s.index.createVideoContext("video-content-box")),this.player.sendDanmu({text:i.content,color:"#FF0000",time:this.playTime+1})}}};if(!Array){const e=s.resolveComponent("uni-popup"),i=s.resolveComponent("u-input");(e+i)()}const S=()=>"../uni_modules/uni-popup/components/uni-popup/uni-popup.js",L=()=>"../uni_modules/uview-plus/components/u-input/u-input.js";Math||(S+L)();function C(e,i,l,r,t,o){return s.e({a:s.t(t.courseInfo.title),b:t.menuButtonLeft+"px",c:t.menuButtonH+"px",d:t.menuButtonH+"px",e:`calc(88rpx + ${t.statusBarHeight}px)`,f:t.statusBarHeight+"px",g:!t.isLogin||t.isAddKf!=1},!t.isLogin||t.isAddKf!=1?{h:t.courseInfo.imgUrl}:{},{i:s.o(n=>o.openDanmu(1)),j:t.isfull&&t.crtShow&&t.isLogin&&t.isAddKf==1?"block":"none",k:s.o((...n)=>o.onTimeUpdate&&o.onTimeUpdate(...n)),l:s.o((...n)=>o.progressChange&&o.progressChange(...n)),m:s.o((...n)=>o.videoErrorCallback&&o.videoErrorCallback(...n)),n:s.o((...n)=>o.getPlay&&o.getPlay(...n)),o:s.o((...n)=>o.getPause&&o.getPause(...n)),p:s.o((...n)=>o.getEnded&&o.getEnded(...n)),q:s.o((...n)=>o.fullscreenchange&&o.fullscreenchange(...n)),r:s.o((...n)=>o.controlstoggle&&o.controlstoggle(...n)),s:t.courseInfo.title,t:e.poster,v:[],w:t.videoUrl,x:t.danmuList,y:t.isLogin&&t.isAddKf==1},t.isLogin&&t.isAddKf==1?{z:s.t(t.courseInfo.title)}:{A:s.t(t.courseInfo.courseName)},{B:!t.isLogin||t.isAddKf!=1},!t.isLogin||t.isAddKf!=1?s.e({C:s.t(t.courseInfo.title),D:t.textHeight>21},t.textHeight>21?{E:s.t(t.isExpand?"\u6536\u8D77\u7B80\u4ECB":"\u5C55\u5F00\u7B80\u4ECB"),F:s.o((...n)=>o.handleExpand&&o.handleExpand(...n)),G:t.baseUrl+"/images/course_arrow_up_icon.png",H:t.isExpand,I:t.baseUrl+"/images/course_arrow_down_icon.png",J:!t.isExpand}:{}):{},{K:s.t(t.courseInfo.description),L:t.isLogin&&t.isAddKf==1&&t.textHeight>21},t.isLogin&&t.isAddKf==1&&t.textHeight>21?{M:s.t(t.isExpand?"\u6536\u8D77\u7B80\u4ECB":"\u5C55\u5F00\u7B80\u4ECB"),N:s.o((...n)=>o.handleExpand&&o.handleExpand(...n)),O:t.baseUrl+"/images/course_arrow_up_icon.png",P:t.isExpand,Q:t.baseUrl+"/images/course_arrow_down_icon.png",R:!t.isExpand,S:s.n(t.isExpand?"expand":"expand expand-ab")}:{},{T:t.isExpand?"auto":"42rpx",U:t.isLogin&&t.isAddKf==1},t.isLogin&&t.isAddKf==1?{V:s.f(t.quesList,(n,h,d)=>({a:s.t(h+1),b:s.t(n.type==1?"\u5355\u9009":n.type==2?"\u591A\u9009":""),c:n.type==1||n.type==2,d:s.t(n.title),e:s.f(n.questionOption,(c,f,_)=>({a:s.t(o.numberToLetter(f)),b:s.t(c.name),c:s.n(o.isAnswer(n,c.name)?"ques-option ques-option-active":"ques-option"),d:f,e:s.o(O=>o.handleAnswer(n,c),f)})),f:h}))}:{},{W:t.height,X:t.scrollTop,Y:t.isLogin&&t.isAddKf==1},t.isLogin&&t.isAddKf==1?{Z:t.baseUrl+"/images/changePlayer-icon.png",aa:s.t(t.lineIndex+1|e.numberToChinese),ab:s.o((...n)=>o.openPop&&o.openPop(...n))}:{},{ac:t.baseUrl+"/images/tc_close_icon.png",ad:s.o((...n)=>o.close&&o.close(...n)),ae:s.f(t.lineList,(n,h,d)=>({a:s.t(h+1|e.numberToChinese),b:s.n(t.lineIndex==h?"line-item line-active":"line-item"),c:h,d:s.o(c=>o.handleLine(h),h)})),af:s.sr("popup","468b9330-0"),ag:s.p({type:"bottom"}),ah:t.isLogin&&t.isAddKf==1},t.isLogin&&t.isAddKf==1?{ai:s.o(n=>o.openDanmu(0))}:{},{aj:s.o(n=>t.danmuIput=n),ak:s.p({placeholder:"\u53D1\u4E2A\u5F39\u5E55\u5427~",border:"surround",shape:"circle",focus:t.focus,adjustPosition:!1,autoBlur:!0,maxlength:"140",clearable:!0,modelValue:t.danmuIput}),al:t.danmubtnLoading,am:s.o((...n)=>o.sendDanmu&&o.sendDanmu(...n)),an:t.isfull?t.statusBarHeight+"px":0,ao:t.danmuboxHeight+"px",ap:s.sr("danmuPopup","468b9330-1"),aq:s.o(o.changeShowPopup),ar:s.p({type:"bottom"}),as:t.errTitle=="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E"},t.errTitle=="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E"?{at:t.baseUrl+"/images/course_answer_img.png"}:{av:t.baseUrl+"/images/course_answer_incorrectly_img.png"},{aw:s.t(t.errTitle),ax:t.errDesc,ay:t.errTitle=="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E"},t.errTitle=="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E"?{az:s.f(t.rewardType,(n,h,d)=>({a:n.value+"",b:n.value==t.currentReward,c:s.t(n.name),d:n.value==t.currentReward?"#FF5C03":"",e:n.value})),aA:s.o((...n)=>o.rewardChange&&o.rewardChange(...n))}:{},{aB:t.errQues&&t.errQues.length>0},t.errQues&&t.errQues.length>0?{aC:s.f(t.errQues,(n,h,d)=>({a:s.t(n.title),b:h}))}:{},{aD:t.errTitle=="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E"},t.errTitle=="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E"?{aE:s.o((...n)=>o.closeAnswerPopup&&o.closeAnswerPopup(...n))}:{aF:s.t(t.remain>0?"\u91CD\u65B0\u7B54\u9898":"\u786E\u8BA4"),aG:s.o((...n)=>o.closeAnswerPopup&&o.closeAnswerPopup(...n)),aH:t.errQues&&t.errQues.length>0?"40rpx":"54rpx"},{aI:s.n(t.errTitle=="\u606D\u559C\u4F60\uFF0C\u56DE\u7B54\u6B63\u786E"?"answerPopup-box bg":"answerPopup-box"),aJ:s.sr("answerPopup","468b9330-3"),aK:s.p({type:"center",show:t.answerPopup}),aL:t.qrcode,aM:t.qrcodeMsg,aN:t.qrcodeMsg,aO:t.baseUrl+"/images/course_close_white_icon.png",aP:s.o((...n)=>o.closeKFPop&&o.closeKFPop(...n)),aQ:s.sr("kfPopup","468b9330-4"),aR:s.p({type:"center",["mask-click"]:!1}),aS:t.videoId},t.videoId?{aT:t.isLogin&&t.isAddKf==1,aU:t.baseUrl+"/images/red_envelope_btnimg.png",aV:s.t(t.isLogin&&t.isAddKf==1?"\u63D0\u4EA4\u7B54\u6848\u9886\u53D6\u5956\u52B1":"\u7ACB\u5373\u5B66\u4E60"),aW:s.n(t.isLogin&&t.isAddKf==1?"footer-btn footer-btn-border":"footer-btn"),aX:s.o((...n)=>o.submit&&o.submit(...n))}:{})}var D=s._export_sfc(w,[["render",C],["__scopeId","data-v-468b9330"],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_course/video.vue"]]);wx.createPage(D);