index-legacy-89ffde89.js 14 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-e6be1dcb.js","./index-legacy-1907d713.js","./index-legacy-3fae0ac6.js","./index-legacy-d5d4870e.js","./index-legacy-cdd7affc.js","./index-legacy-c97c0453.js","./index-legacy-d3534fc9.js","./index-legacy-fe92801f.js","./index-legacy-f9bb7174.js","./howler-legacy-11f873fc.js","./index-legacy-72ad1f03.js"],(function(e,t){"use strict";var i,o,s,a,l,r,u,c,d,p,b,w,_,A,v,f,h,k,y,g,m,x,I,T,C,q,B,L,S,E,R,U,P,j,D,N,O,z;return{setters:[e=>{i=e.d,o=e.P,s=e.q,a=e.r,l=e.x,r=e.e,u=e.y,c=e.Q,d=e.a,p=e.V,b=e.A,w=e.C,_=e.R,A=e.S,v=e.a3,f=e.D,h=e.N,k=e.z,y=e.$,g=e.U},e=>{m=e.e,x=e.Q,I=e.C,T=e.D,C=e.K,q=e.P,B=e.i,L=e.A,S=e.a,E=e.R},e=>{R=e.M},e=>{U=e.E},e=>{P=e.b,j=e.u,D=e.a},e=>{N=e.S,O=e.a},e=>{z=e.I},null,null,null,null],execute:function(){var K=document.createElement("style");K.textContent="._unitDetail_b7pwk_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_b7pwk_9{margin-top:2.4rem}._unitSwipe_b7pwk_9 ._questionTitle_b7pwk_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_b7pwk_9 ._questionTitle_b7pwk_12 ._questionNum_b7pwk_21 span{color:#ff5a56}._unitSwipe_b7pwk_9 ._questionTitle_b7pwk_12 ._questionType_b7pwk_24{display:flex;align-items:center}._unitSwipe_b7pwk_9 ._questionTitle_b7pwk_12 ._questionType_b7pwk_24 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:4.26667rem}._unitSwipe_b7pwk_9 ._questionTitle_b7pwk_12 ._questionType_b7pwk_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_b7pwk_42{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_b7pwk_48{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_b7pwk_48 ._prevBtn_b7pwk_53,._btnSection_b7pwk_48 ._nextBtn_b7pwk_54,._btnSection_b7pwk_48 ._activePrevBtn_b7pwk_55{width:3.30667rem!important;border:none;color:#fff}._btnSection_b7pwk_48 ._prevBtn_b7pwk_53{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_b7pwk_48 ._activePrevBtn_b7pwk_55{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_b7pwk_48 ._nextBtn_b7pwk_54{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_b7pwk_48 .van-button--disabled{color:#587c98}._btnSection_b7pwk_48 .van-button--disabled:before{opacity:.2!important}._right_b7pwk_78{color:#14c295}._error_b7pwk_81{color:#ff5a56}._primary_b7pwk_84{color:#1cacf1}._unitDetailTablet_b7pwk_87{background:url("+new URL("bg-tablet-64a19550.png",t.meta.url).href+") no-repeat top center;background-size:contain;background-color:#abe8ff}._unitDetailTablet_b7pwk_87 ._prevBtn_b7pwk_53,._unitDetailTablet_b7pwk_87 ._nextBtn_b7pwk_54,._unitDetailTablet_b7pwk_87 ._activePrevBtn_b7pwk_55{width:40%!important;--van-button-default-height: 1.49333rem}._unitDetailTablet_b7pwk_87 ._prevBtn_b7pwk_53{background:url("+new URL("prev_btn_bg-tablet-e6fe194e.png",t.meta.url).href+") no-repeat center;background-size:contain}._unitDetailTablet_b7pwk_87 ._activePrevBtn_b7pwk_55{background:url("+new URL("next_btn_bg-tablet-d84258ec.png",t.meta.url).href+") no-repeat center;background-size:contain}._unitDetailTablet_b7pwk_87 ._nextBtn_b7pwk_54{background:url("+new URL("next_btn_bg-tablet-d84258ec.png",t.meta.url).href+") no-repeat center;background-size:contain}._unitDetailTablet_b7pwk_87 ._wapList_b7pwk_42{width:1.36rem;height:1.49333rem}\n",document.head.appendChild(K);const M="_unitDetail_b7pwk_1",Q="_unitSwipe_b7pwk_9",H="_questionTitle_b7pwk_12",X="_questionNum_b7pwk_21",F="_questionType_b7pwk_24",Z="_wapList_b7pwk_42",W="_btnSection_b7pwk_48",G="_prevBtn_b7pwk_53",V="_nextBtn_b7pwk_54",Y="_activePrevBtn_b7pwk_55",J="_right_b7pwk_78",$="_error_b7pwk_81",ee="_primary_b7pwk_84",ne="_unitDetailTablet_b7pwk_87";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",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:te,resume:ie,pause:oe}=P(1e3,{controls:!0}),se=function(){var e=n((function*(){try{const{data:e}=yield f.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)}}(),ae=function(){var e=n((function*(){try{var e;const o=K.questionList||[];let s=!0;const a=o[K.currentIndex];if((null==a||null===(e=a.userAnswer)||void 0===e?void 0:e.length)<=0)return void h("题目尚未做答");if(null==a||!a.analysis.isAnswer){let e={};o.forEach(((n,t)=>{t===K.currentIndex&&(e={questionId:n.id,details:n.userAnswer||[]})}));const{data:n}=yield f.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:e});s=n,o.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 m.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="确认本次练习的题目都完成了吗?",window.removeEventListener("popstate",be,!1),void t.back();var n;if(s)null===(n=i.value)||void 0===n||n.next();else K.visiableError=!0}catch(o){}}));return function(){return e.apply(this,arguments)}}(),le=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 re=0;const ue=(e=!0)=>{k((()=>{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=>{e.complete||(o=!1)})),!o&&re<3&&setTimeout((()=>{re+=1,ue(e)}),300),o&&(re=0);const s=y(t);K.swipeHeight=s.height}),100)}))},ce=()=>{"RESULT"===K.visiableInfo.operationType?(K.visiableInfo.show=!1,A().isApp?g({api:"back"}):(t.back(),t.back())):"BACK"===K.visiableInfo.operationType?(K.visiableInfo.show=!1,we()):"CONTINUE"===K.visiableInfo.operationType&&pe()},de=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",be,!1))}));return function(){return e.apply(this,arguments)}}(),pe=()=>{const e=le.value;let n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));const t=te.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},oe(),te.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='${J}'>${e.passCount}</span>,答错<span class='${$}'>${e.count-e.passCount}</span>,正确率<span class='${ee}'>${n}%</span>~</div>`},be=()=>{const e=le.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}道题了,继续做题可以巩固所学知识哦~`,m.emit("unitAudioStop")},we=()=>{window.removeEventListener("popstate",be,!1),A().isApp?g({api:"back"}):t.back()};return u(n((function*(){j(document,"scroll",(()=>{const{y:e}=D();e.value>52?K.background="#fff":K.background="transparent"})),yield se(),ue(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",be,!1)}))),c((()=>{m.emit("unitAudioStop")})),()=>{let e;return d("div",{class:[M,A().isTablet?ne:""]},[d(R,{position:"top"},{default:()=>[d(p,{border:!1,background:K.background},null)]}),d(N,{loop:!1,showIndicators:!1,ref:i,duration:300,touchable:!1,class:Q,style:{paddingBottom:"12px"},lazyRender:!0,height:K.swipeHeight,onChange:e=>{m.emit("unitAudioStop"),K.currentIndex=e,ue()}},(n=e=K.questionList.map(((e,n)=>d(O,null,{default:()=>[d("div",{class:"swipe-item-question"},[e.questionTypeCode===x.RADIO&&d(I,{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:X},[d("span",null,[K.currentIndex+1]),b("/"),K.questionList.length]),d("div",{class:F},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===x.CHECKBOX&&d(I,{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:X},[d("span",null,[K.currentIndex+1]),b("/"),K.questionList.length]),d("div",{class:F},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===x.SORT&&d(T,{value:e.userAnswer,"onUpdate:value":[n=>e.userAnswer=n,()=>{const n=!(e.userAnswer&&e.userAnswer.length>0);ue(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:H},[d("div",{class:X},[d("span",null,[K.currentIndex+1]),b("/"),K.questionList.length]),d("div",{class:F},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===x.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:X},[d("span",null,[K.currentIndex+1]),b("/"),K.questionList.length]),d("div",{class:F},[d("i",null,null),d("span",null,[e.knowledgePointName])])])}),e.questionTypeCode===x.PLAY&&d(q,{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:X},[d("span",null,[K.currentIndex+1]),b("/"),K.questionList.length]),d("div",{class:F},[d("i",null,null),d("span",null,[e.knowledgePointName])])])})])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!v(n)?e:{default:()=>[e]})),d(R,{position:"bottom"},{default:()=>[d("div",{class:["btnGroup btnMore",W]},[d(w,{round:!0,block:!0,class:K.currentIndex>0?Y:G,disabled:!(K.currentIndex>0),onClick:()=>{var e;null===(e=i.value)||void 0===e||e.prev()}},{default:()=>[b("上一题")]}),d(w,{block:!0,round:!0,class:V,onClick:ae,loading:K.nextStatus,disabled:K.nextStatus},{default:()=>[K.questionList.length===K.currentIndex+1?"提交":"下一题"]}),d(z,{src:B,class:[Z,"van-haptics-feedback"],onClick:()=>K.visiableAnswer=!0},null)])]}),d(L,{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(_,{show:K.visiableError,"onUpdate:show":e=>K.visiableError=e,style:{width:"90%",maxWidth:"520px"},round:!0,closeOnClickOverlay:!1},{default:()=>[d(U,{onClose:()=>K.visiableError=!1,answerAnalysis:K.answerAnalysis,questionTypeCode:K.questionTypeCode,onConform:()=>{var e;null===(e=i.value)||void 0===e||e.next(),setTimeout((()=>{K.answerAnalysis=""}),500)}},null)]}),d(_,{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(E,{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:ce,onClose:de},null)]})]);var n}}}))}}}))}();