| 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-1c27a158.js","./index-legacy-3aae5810.js","./index-legacy-d7636ed0.js","./index-legacy-84058ecb.js","./index-legacy-0debdff1.js","./index-legacy-19d969df.js","./index-legacy-75f2ea87.js","./index-legacy-392308c8.js","./index-legacy-8f7c1943.js","./index-legacy-d5a9a851.js"],(function(e,t){"use strict";var i,o,s,a,l,r,u,c,d,x,A,p,v,f,_,w,b,y,h,m,g,I,C,T,q,k,S,B,L,E,R,U,P,j,N,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,A=e.A,p=e.C,v=e.V,f=e.a2,_=e.D,w=e.E,b=e.z,y=e._},e=>{h=e.e,m=e.Q,g=e.C,I=e.D,C=e.K,T=e.P,q=e.i,k=e.A,S=e.a,B=e.R},e=>{L=e.M},e=>{E=e.E},e=>{R=e.b,U=e.u,P=e.a},e=>{j=e.S,N=e.a},e=>{O=e.I},null,null,null],execute:function(){var K=document.createElement("style");K.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(K);const M="_unitDetail_1xn4x_1",z="_unitSwipe_1xn4x_9",H="_questionTitle_1xn4x_12",Q="_questionNum_1xn4x_21",X="_questionType_1xn4x_24",Z="_wapList_1xn4x_42",D="_btnSection_1xn4x_48",F="_prevBtn_1xn4x_53",W="_nextBtn_1xn4x_54",G="_activePrevBtn_1xn4x_55",V="_right_1xn4x_78",Y="_error_1xn4x_81",J="_primary_1xn4x_84";e("default",i({name:"unit-detail",setup(){const e=o(),t=s(),i=a(),K=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:$,resume:ee,pause:ne}=R(1e3,{controls:!0}),te=function(){var e=n((function*(){try{const{data:e}=yield _.post("/edu-app/studentUnitExamination/queryPracticeModeExam",{data:{lessonCoursewareId:K.lessonCoursewareId,knowledgePointIds:K.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=[]})),K.questionList=n.examinationQuestionAdds||[]}catch(e){}}));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=n((function*(){try{var e;const t=K.questionList||[];let o=!0;const s=t[K.currentIndex];if((null==s||null===(e=s.userAnswer)||void 0===e?void 0:e.length)<=0)return void w("题目尚未做答");if(null==s||!s.analysis.isAnswer){let e={};t.forEach(((n,t)=>{t===K.currentIndex&&(e={questionId:n.id,details:n.userAnswer||[]})}));const{data:n}=yield _.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:e});o=n,t.forEach(((e,t)=>{t===K.currentIndex&&(K.answerAnalysis=e.answerAnalysis,K.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=n,e.analysis.isAnswer=!0,e.analysis.disabled=!0)}))}if(K.questionList.length===K.currentIndex+1)return h.emit("unitAudioStop"),K.visiableInfo.show=!0,K.visiableInfo.title="练习完成",K.visiableInfo.showCancelButton=!0,K.visiableInfo.operationType="CONTINUE",K.visiableInfo.cancelButtonText="再等等",K.visiableInfo.confirmButtonText="确认完成",K.visiableInfo.content="确认本次练习的题目都完成了吗?",void de();var n;if(o)null===(n=i.value)||void 0===n||n.next();else K.visiableError=!0}catch(t){}}));return function(){return e.apply(this,arguments)}}(),oe=r((()=>{const e=K.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 se=0;const ae=(e=!0)=>{b((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[K.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&&se<3&&setTimeout((()=>{se+=1,ae(e)}),300),o&&(se=0);const s=y(t);K.swipeHeight=s.height}),100)}))},le=()=>{"RESULT"===K.visiableInfo.operationType?(K.visiableInfo.show=!1,t.back(),t.back()):"BACK"===K.visiableInfo.operationType?(K.visiableInfo.show=!1,de()):"CONTINUE"===K.visiableInfo.operationType&&ue()},re=function(){var e=n((function*(){"RESULT"===K.visiableInfo.operationType||("BACK"===K.visiableInfo.operationType||"CONTINUE"===K.visiableInfo.operationType)&&(K.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ce,!1))}));return function(){return e.apply(this,arguments)}}(),ue=()=>{const e=oe.value;let n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));const t=$.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;K.overResult={time:i+":"+o,questionLength:e.count,errorLength:e.noPassCount,rate:n},ne(),$.value=0,K.visiableInfo.show=!0,K.visiableInfo.title="已完成~",K.visiableInfo.showCancelButton=!1,K.visiableInfo.operationType="RESULT",K.visiableInfo.confirmButtonText="确认",K.visiableInfo.content=`<div>您已完成本次测试,答对<span class='${V}'>${e.passCount}</span>,答错<span class='${Y}'>${e.count-e.passCount}</span>,正确率<span class='${J}'>${n}%</span>~</div>`},ce=()=>{const e=oe.value;K.visiableInfo.show=!0,K.visiableInfo.title="确认退出吗?",K.visiableInfo.showCancelButton=!0,K.visiableInfo.operationType="BACK",K.visiableInfo.cancelButtonText="取消",K.visiableInfo.confirmButtonText="确定",K.visiableInfo.content=`您已经完成${e.passCount+e.noPassCount}道题了,继续做题可以巩固所学知识哦~`,h.emit("unitAudioStop")},de=()=>{window.removeEventListener("popstate",ce,!1),t.back()};return u(n((function*(){U(document,"scroll",(()=>{const{y:e}=P();e.value>52?(K.background="#fff",K.color="#323333"):(K.background="transparent",K.color="#fff")})),yield te(),ae(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ce,!1)}))),c((()=>{h.emit("unitAudioStop")})),()=>{let e;return d("div",{class:M},[d(L,{position:"top"},{default:()=>[d(x,{border:!1,background:K.background,color:K.color},null)]}),d(j,{loop:!1,showIndicators:!1,ref:i,duration:300,touchable:!1,class:z,style:{paddingBottom:"12px"},lazyRender:!0,height:K.swipeHeight,onChange:e=>{h.emit("unitAudioStop"),K.currentIndex=e,ae()}},(n=e=K.questionList.map(((e,n)=>d(N,null,{default:()=>[d("div",{class:"swipe-item-question"},[e.questionTypeCode===m.RADIO&&d(g,{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:H},[d("div",{class:Q},[d("span",null,[K.currentIndex+1]),A("/"),K.questionList.length]),d("div",{class:X},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===m.CHECKBOX&&d(g,{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:H},[d("div",{class:Q},[d("span",null,[K.currentIndex+1]),A("/"),K.questionList.length]),d("div",{class:X},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===m.SORT&&d(I,{value:e.userAnswer,"onUpdate:value":[n=>e.userAnswer=n,()=>{const n=!(e.userAnswer&&e.userAnswer.length>0);ae(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:H},[d("div",{class:Q},[d("span",null,[K.currentIndex+1]),A("/"),K.questionList.length]),d("div",{class:X},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===m.LINK&&d(C,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:H},[d("div",{class:Q},[d("span",null,[K.currentIndex+1]),A("/"),K.questionList.length]),d("div",{class:X},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===m.PLAY&&d(T,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,unitId:K.id,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:H},[d("div",{class:Q},[d("span",null,[K.currentIndex+1]),A("/"),K.questionList.length]),d("div",{class:X},[d("i",null,null),d("span",null,[e.knowledgePointName])])])})])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!f(n)?e:{default:()=>[e]})),d(L,{position:"bottom"},{default:()=>[d("div",{class:["btnGroup btnMore",D]},[d(p,{round:!0,block:!0,class:K.currentIndex>0?G:F,disabled:!(K.currentIndex>0),onClick:()=>{var e;null===(e=i.value)||void 0===e||e.prev()}},{default:()=>[A("上一题")]}),d(p,{block:!0,round:!0,class:W,onClick:ie,loading:K.nextStatus,disabled:K.nextStatus},{default:()=>[K.questionList.length===K.currentIndex+1?"提交":"下一题"]}),d(O,{src:q,class:[Z,"van-haptics-feedback"],onClick:()=>K.visiableAnswer=!0},null)])]}),d(k,{show:K.visiableAnswer,"onUpdate:show":e=>K.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[d(S,{value:K.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}),K.visiableAnswer=!1}},null)]}),d(v,{show:K.visiableError,"onUpdate:show":e=>K.visiableError=e,style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:()=>[d(E,{onClose:()=>K.visiableError=!1,answerAnalysis:K.answerAnalysis,questionTypeCode:K.questionTypeCode,onConform:()=>{var e;null===(e=i.value)||void 0===e||e.next(),K.answerAnalysis=""}},null)]}),d(v,{show:K.visiableInfo.show,"onUpdate:show":e=>K.visiableInfo.show=e,closeOnClickOverlay:!1,style:{background:"transparent",width:"100%",maxWidth:"100%",transform:"translateY(-55%)"}},{default:()=>[d(B,{title:K.visiableInfo.title,showCancelButton:K.visiableInfo.showCancelButton,cancelButtonText:K.visiableInfo.cancelButtonText,confirmButtonText:K.visiableInfo.confirmButtonText,status:K.visiableInfo.type,content:K.visiableInfo.content,contentHtml:!0,onConform:le,onClose:re},null)]})]);var n}}}))}}}))}();
|