index-legacy-5e07e26e.js 13 KB

1
  1. !function(){function e(e,n,t,i,o,s,a){try{var l=e[s](a),r=l.value}catch(u){return void t(u)}l.done?n(r):Promise.resolve(r).then(i,o)}function n(n){return function(){var t=this,i=arguments;return new Promise((function(o,s){var a=n.apply(t,i);function l(n){e(a,o,s,l,r,"next",n)}function r(n){e(a,o,s,l,r,"throw",n)}l(void 0)}))}}System.register(["./index-legacy-e1ea41b7.js","./index-legacy-a0082703.js","./index-legacy-820d5526.js","./index-legacy-d68a5c5b.js","./index-legacy-c9b011be.js","./index-legacy-c2783a73.js","./index-legacy-01b7024c.js","./index-legacy-22d0bd61.js","./index-legacy-f9c3c6d2.js","./index-legacy-666fea96.js"],(function(e,t){"use strict";var i,o,s,a,l,r,u,c,d,x,p,A,v,_,f,w,b,y,h,m,g,I,C,T,q,k,S,B,L,E,R,U,P,j,O;return{setters:[e=>{i=e.d,o=e.U,s=e.q,a=e.r,l=e.x,r=e.e,u=e.y,c=e.a8,d=e.a,x=e.S,p=e.A,A=e.C,v=e.V,_=e.a2,f=e.D,w=e.z,b=e._},e=>{y=e.e,h=e.Q,m=e.C,g=e.D,I=e.K,C=e.P,T=e.i,q=e.A,k=e.a,S=e.R},e=>{B=e.M},e=>{L=e.E},e=>{E=e.b,R=e.u,U=e.a},e=>{P=e.S,j=e.a},e=>{O=e.I},null,null,null],execute:function(){var N=document.createElement("style");N.textContent="._unitDetail_1xn4x_1{min-height:100vh;overflow:hidden;background:url("+new URL("bg-a9662afa.png",t.meta.url).href+") no-repeat top center;background-size:contain;position:relative;background-color:#abe8ff}._unitSwipe_1xn4x_9{margin-top:2.4rem}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12 ._questionNum_1xn4x_21 span{color:#ff5a56}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12 ._questionType_1xn4x_24{display:flex;align-items:center}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12 ._questionType_1xn4x_24 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:4.26667rem}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12 ._questionType_1xn4x_24 i{margin-right:.16rem;display:inline-block;width:.53333rem;height:.53333rem;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAKAAAAAB65masAAACuElEQVRYCe2YT2sTURDAZzabFjSxiCC1qcFqS7BYQWkEwZv9AB4qeBb8Ar0Lgne/QMVeRCT05LmlHoQiVdRW7MFKxZpqKR40pWDi7jiz8TWb7L50s7u2he5C2Hnz95d5u499D2+WSik4wJdxgNkcNLMV8H5f5ciAsTUGSF2tNhkTYqVmwZfb5VPLfnad7lHu2/l0CvJIlPX1Iayu2pmZu+vZbbfdA1hIVWYZo+h2apKJoJv7XjpdLtuGMfmxlnnQmlT5y58dSm9NGLZ9h3U5IGXxuSMB114AyF51W32muA2cO5ILcuF7BfPX26n+jeFmE4DoCmblnfiwLddq9x97a/sA+odqtQRnjxrW3MP+zQHlI7LogGhHp2yd3qMDSkWiE8ew9kQVd2TWqXGUu+cZDJ+Mio/z6zecePJOVdi8MQICpG265YBgWBxvXKyAiHilXqLd6+qFaKfZATxzaeRaCqkXNsvt/NvaCKFPHHjFCH2du3xh3CL8/vnN0gtJ4rwkQ6MXJ0yDniPC09CZOZAXYVN+kXIwg7AIk+RxkhFZPDURHxyDUw2P19k+TAPYf6Jw8sIgTP86GCmTCu7JA2R66z+RY7riWQcFBl0fRW45Imh8gBFBdOEJoK4zQfVJB4N2SueXdFDXmaD6pINBO6XzSzqo60xQfdLBoJ3S+R2iDlq/G01wyw1tKCnS53lTxZ9rAGvzrOINicgxXfEBClj5ZUxYjTSeZ/Cr2dOw7rHkV9vTwcnjRRis/oAU2HuKZ/EGc6XLe1qiAKuKpsb7ieXuk2q4n3eHyZliApziPfHGftK4awuLMInO6eCn1+/nWA54hudOBTA4OjLPm1j/A0/EhZVXS00Hks3Ru4/UFO/uqfGwqnjdMGmMza1HxlW7hjOasMDqyICri4vbXO1Z4IodOnqWmQ7j/7v7Xwtnr/nyIvR9AAAAAElFTkSuQmCC) no-repeat center;background-size:contain}._wapList_1xn4x_42{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_1xn4x_48{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_1xn4x_48 ._prevBtn_1xn4x_53,._btnSection_1xn4x_48 ._nextBtn_1xn4x_54,._btnSection_1xn4x_48 ._activePrevBtn_1xn4x_55{width:3.30667rem!important;border:none;color:#fff}._btnSection_1xn4x_48 ._prevBtn_1xn4x_53{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_1xn4x_48 ._activePrevBtn_1xn4x_55{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_1xn4x_48 ._nextBtn_1xn4x_54{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_1xn4x_48 .van-button--disabled{color:#587c98}._btnSection_1xn4x_48 .van-button--disabled:before{opacity:.2!important}._right_1xn4x_78{color:#14c295}._error_1xn4x_81{color:#ff5a56}._primary_1xn4x_84{color:#1cacf1}\n",document.head.appendChild(N);const K="_unitDetail_1xn4x_1",M="_unitSwipe_1xn4x_9",Q="_questionTitle_1xn4x_12",z="_questionNum_1xn4x_21",H="_questionType_1xn4x_24",X="_wapList_1xn4x_42",D="_btnSection_1xn4x_48",F="_prevBtn_1xn4x_53",Z="_nextBtn_1xn4x_54",W="_activePrevBtn_1xn4x_55",G="_right_1xn4x_78",V="_error_1xn4x_81",Y="_primary_1xn4x_84";e("default",i({name:"unit-detail",setup(){const e=o(),t=s(),i=a(),N=l({type:e.query.type,knowledgePointIds:e.query.knowledgePointIds,lessonCoursewareId:e.query.lessonCoursewareId,background:"transparent",color:"#fff",visiableError:!1,visiableAnswer:!1,id:e.query.id,currentIndex:0,questionList:[],visiableInfo:{show:!1,operationType:"RESULT",type:"DEFAULT",content:"",showCancelButton:!1,confirmButtonText:"",cancelButtonText:"",title:""},nextStatus:!1,swipeHeight:"auto",answerAnalysis:"",questionTypeCode:"",overResult:{time:"00:00",questionLength:0,errorLength:0,rate:0}}),{counter:J,resume:$,pause:ee}=E(1e3,{controls:!0}),ne=function(){var e=n((function*(){try{const{data:e}=yield f.post("/edu-app/studentUnitExamination/queryPracticeModeExam",{data:{lessonCoursewareId:N.lessonCoursewareId,knowledgePointIds:N.knowledgePointIds}}),n=e||{};n.examinationQuestionAdds.forEach((e=>{e.showAnalysis=!1,e.analysis={message:e.answerAnalysis,topic:!0,isAnswer:!1,userResult:!1,disabled:!1},e.userAnswer=[]})),N.questionList=n.examinationQuestionAdds||[]}catch(e){}}));return function(){return e.apply(this,arguments)}}(),te=function(){var e=n((function*(){try{var e;const t=N.questionList||[];let o=!0;if(null===(e=t[N.currentIndex])||void 0===e||!e.analysis.isAnswer){let e={};t.forEach(((n,t)=>{t===N.currentIndex&&(e={questionId:n.id,details:n.userAnswer||[]})}));const{data:n}=yield f.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:e});o=n,t.forEach(((e,t)=>{t===N.currentIndex&&(N.answerAnalysis=e.answerAnalysis,N.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=n,e.analysis.isAnswer=!0,e.analysis.disabled=!0)}))}if(N.questionList.length===N.currentIndex+1)return y.emit("unitAudioStop"),N.visiableInfo.show=!0,N.visiableInfo.title="练习完成",N.visiableInfo.showCancelButton=!0,N.visiableInfo.operationType="CONTINUE",N.visiableInfo.cancelButtonText="再等等",N.visiableInfo.confirmButtonText="确认完成",N.visiableInfo.content="确认本次练习的题目都完成了吗?",void ce();var n;if(o)null===(n=i.value)||void 0===n||n.next();else N.visiableError=!0}catch(t){}}));return function(){return e.apply(this,arguments)}}(),ie=r((()=>{const e=N.questionList||[];let n=0,t=0,i=0;return e.forEach((e=>{e.showAnalysis&&(n+=1,e.analysis.userResult?t+=1:i+=1)})),{count:n,passCount:t,noPassCount:i}}));let oe=0;const se=(e=!0)=>{w((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[N.currentIndex])||void 0===n?void 0:n.querySelector(".swipe-item-question"),i=null==t?void 0:t.querySelectorAll(".answerTitleImg img");let o=!0;null==i||i.forEach((e=>{console.log(e.complete),e.complete||(o=!1)})),!o&&oe<3&&setTimeout((()=>{oe+=1,se(e)}),300),o&&(oe=0);const s=b(t);N.swipeHeight=s.height}),100)}))},ae=()=>{"RESULT"===N.visiableInfo.operationType?(N.visiableInfo.show=!1,t.back(),t.back()):"BACK"===N.visiableInfo.operationType?(N.visiableInfo.show=!1,ce()):"CONTINUE"===N.visiableInfo.operationType&&re()},le=function(){var e=n((function*(){"RESULT"===N.visiableInfo.operationType||("BACK"===N.visiableInfo.operationType||"CONTINUE"===N.visiableInfo.operationType)&&(N.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ue,!1))}));return function(){return e.apply(this,arguments)}}(),re=()=>{const e=ie.value;let n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));const t=J.value,i=Math.floor(t/60)>=10?Math.floor(t/60):"0"+Math.floor(t/60),o=t%60>=10?t%60:"0"+t%60;N.overResult={time:i+":"+o,questionLength:e.count,errorLength:e.noPassCount,rate:n},ee(),J.value=0,N.visiableInfo.show=!0,N.visiableInfo.title="已完成~",N.visiableInfo.showCancelButton=!1,N.visiableInfo.operationType="RESULT",N.visiableInfo.confirmButtonText="确认",N.visiableInfo.content=`<div>您已完成本次测试,答对<span class='${G}'>${e.passCount}</span>,答错<span class='${V}'>${e.count-e.passCount}</span>,正确率<span class='${Y}'>${n}%</span>~</div>`},ue=()=>{const e=ie.value;N.visiableInfo.show=!0,N.visiableInfo.title="确认退出吗?",N.visiableInfo.showCancelButton=!0,N.visiableInfo.operationType="BACK",N.visiableInfo.cancelButtonText="取消",N.visiableInfo.confirmButtonText="确定",N.visiableInfo.content=`您已经完成${e.passCount+e.noPassCount}道题了,继续做题可以巩固所学知识哦~`,y.emit("unitAudioStop")},ce=()=>{window.removeEventListener("popstate",ue,!1),t.back()};return u(n((function*(){R(document,"scroll",(()=>{const{y:e}=U();e.value>52?(N.background="#fff",N.color="#323333"):(N.background="transparent",N.color="#fff")})),yield ne(),se(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ue,!1)}))),c((()=>{y.emit("unitAudioStop")})),()=>{let e;return d("div",{class:K},[d(B,{position:"top"},{default:()=>[d(x,{border:!1,background:N.background,color:N.color},null)]}),d(P,{loop:!1,showIndicators:!1,ref:i,duration:300,touchable:!1,class:M,style:{paddingBottom:"12px"},lazyRender:!0,height:N.swipeHeight,onChange:e=>{y.emit("unitAudioStop"),N.currentIndex=e,se()}},(n=e=N.questionList.map(((e,n)=>d(j,null,{default:()=>[d("div",{class:"swipe-item-question"},[e.questionTypeCode===h.RADIO&&d(m,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"radio",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:Q},[d("div",{class:z},[d("span",null,[N.currentIndex+1]),p("/"),N.questionList.length]),d("div",{class:H},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===h.CHECKBOX&&d(m,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"checkbox",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:Q},[d("div",{class:z},[d("span",null,[N.currentIndex+1]),p("/"),N.questionList.length]),d("div",{class:H},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===h.SORT&&d(g,{value:e.userAnswer,"onUpdate:value":[n=>e.userAnswer=n,()=>{const n=!(e.userAnswer&&e.userAnswer.length>0);se(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:Q},[d("div",{class:z},[d("span",null,[N.currentIndex+1]),p("/"),N.questionList.length]),d("div",{class:H},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===h.LINK&&d(I,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:Q},[d("div",{class:z},[d("span",null,[N.currentIndex+1]),p("/"),N.questionList.length]),d("div",{class:H},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===h.PLAY&&d(C,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,unitId:N.id,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:Q},[d("div",{class:z},[d("span",null,[N.currentIndex+1]),p("/"),N.questionList.length]),d("div",{class:H},[d("i",null,null),d("span",null,[e.knowledgePointName])])])})])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!_(n)?e:{default:()=>[e]})),d(B,{position:"bottom"},{default:()=>[d("div",{class:["btnGroup btnMore",D]},[d(A,{round:!0,block:!0,class:N.currentIndex>0?W:F,disabled:!(N.currentIndex>0),onClick:()=>{var e;null===(e=i.value)||void 0===e||e.prev()}},{default:()=>[p("上一题")]}),d(A,{block:!0,round:!0,class:Z,onClick:te,loading:N.nextStatus,disabled:N.nextStatus},{default:()=>[N.questionList.length===N.currentIndex+1?"提交":"下一题"]}),d(O,{src:T,class:[X,"van-haptics-feedback"],onClick:()=>N.visiableAnswer=!0},null)])]}),d(q,{show:N.visiableAnswer,"onUpdate:show":e=>N.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[d(k,{value:N.questionList,statusList:[{text:"答对",color:"#1CACF1"},{text:"答错",color:"#FF8486"},{text:"未答",color:"#EAEAEA"}],lookType:"PRACTICE",onSelect:e=>{var n;null===(n=i.value)||void 0===n||n.swipeTo(e,{immediate:!0}),N.visiableAnswer=!1}},null)]}),d(v,{show:N.visiableError,"onUpdate:show":e=>N.visiableError=e,style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:()=>[d(L,{onClose:()=>N.visiableError=!1,answerAnalysis:N.answerAnalysis,questionTypeCode:N.questionTypeCode,onConform:()=>{var e;null===(e=i.value)||void 0===e||e.next(),N.answerAnalysis=""}},null)]}),d(v,{show:N.visiableInfo.show,"onUpdate:show":e=>N.visiableInfo.show=e,closeOnClickOverlay:!1,style:{background:"transparent",width:"100%",maxWidth:"100%",transform:"translateY(-55%)"}},{default:()=>[d(S,{title:N.visiableInfo.title,showCancelButton:N.visiableInfo.showCancelButton,cancelButtonText:N.visiableInfo.cancelButtonText,confirmButtonText:N.visiableInfo.confirmButtonText,status:N.visiableInfo.type,content:N.visiableInfo.content,contentHtml:!0,onConform:ae,onClose:le},null)]})]);var n}}}))}}}))}();