index-legacy-a0f3e6e8.js 17 KB

1
  1. !function(){function e(e,n,t,i,s,o,a){try{var r=e[o](a),l=r.value}catch(u){return void t(u)}r.done?n(l):Promise.resolve(l).then(i,s)}function n(n){return function(){var t=this,i=arguments;return new Promise((function(s,o){var a=n.apply(t,i);function r(n){e(a,s,o,r,l,"next",n)}function l(n){e(a,s,o,r,l,"throw",n)}r(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,s,o,a,r,l,u,c,d,f,p,_,A,v,b,w,g,h,m,y,I,x,C,T,q,k,L,B,S,E,R,U,F,P,z,N,j,D;return{setters:[e=>{i=e.d,s=e.P,o=e.q,a=e.r,r=e.x,l=e.w,u=e.e,c=e.y,d=e.Q,f=e.a,p=e.V,_=e.A,A=e.C,v=e.R,b=e.S,w=e.a3,g=e.D,h=e.N,m=e.z,y=e.$},e=>{I=e.e,x=e.Q,C=e.C,T=e.D,q=e.K,k=e.P,L=e.i,B=e.A,S=e.a,E=e.R},e=>{R=e.M},e=>{U=e.E},e=>{F=e.b,P=e.u,z=e.a},e=>{N=e.S,j=e.a},e=>{D=e.I},null,null,null,null],execute:function(){var O=document.createElement("style");O.textContent="._unitDetail_s94f4_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_s94f4_9{margin-top:2.4rem}._unitSwipe_s94f4_9 ._questionTitle_s94f4_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_s94f4_9 ._questionTitle_s94f4_12 ._questionNum_s94f4_21{display:flex;align-items:center}._unitSwipe_s94f4_9 ._questionTitle_s94f4_12 ._questionNum_s94f4_21 span{color:#ff5a56}._unitSwipe_s94f4_9 ._questionTitle_s94f4_12 ._questionNum_s94f4_21 ._pointName_s94f4_28{padding-right:.16rem;color:#1cacf1;font-weight:600;font-size:.37333rem;max-width:4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._unitSwipe_s94f4_9 ._questionTitle_s94f4_12 ._questionType_s94f4_38{display:flex;align-items:center}._unitSwipe_s94f4_9 ._questionTitle_s94f4_12 ._questionType_s94f4_38 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:4.26667rem}._unitSwipe_s94f4_9 ._questionTitle_s94f4_12 ._questionType_s94f4_38 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}._unitSwipe_s94f4_9 ._questionTitle_s94f4_12 ._controlBtn_s94f4_56{padding:0 .32rem}._wapList_s94f4_59{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_s94f4_65{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_s94f4_65 ._prevBtn_s94f4_70,._btnSection_s94f4_65 ._nextBtn_s94f4_71,._btnSection_s94f4_65 ._activePrevBtn_s94f4_72{width:3.30667rem!important;border:none;color:#fff}._btnSection_s94f4_65 ._prevBtn_s94f4_70{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_s94f4_65 ._activePrevBtn_s94f4_72{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_s94f4_65 ._nextBtn_s94f4_71{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_s94f4_65 .van-button--disabled{color:#587c98}._btnSection_s94f4_65 .van-button--disabled:before{opacity:.2!important}._right_s94f4_95{color:#14c295}._error_s94f4_98{color:#ff5a56}._primary_s94f4_101{color:#1cacf1}._unitDetailTablet_s94f4_104{background:url("+new URL("bg-tablet-64a19550.png",t.meta.url).href+") no-repeat top center;background-size:contain;background-color:#abe8ff}._unitDetailTablet_s94f4_104 ._prevBtn_s94f4_70,._unitDetailTablet_s94f4_104 ._nextBtn_s94f4_71,._unitDetailTablet_s94f4_104 ._activePrevBtn_s94f4_72{width:40%!important;--van-button-default-height: 1.49333rem}._unitDetailTablet_s94f4_104 ._prevBtn_s94f4_70{background:url("+new URL("prev_btn_bg-tablet-e6fe194e.png",t.meta.url).href+") no-repeat center;background-size:contain}._unitDetailTablet_s94f4_104 ._activePrevBtn_s94f4_72{background:url("+new URL("next_btn_bg-tablet-d84258ec.png",t.meta.url).href+") no-repeat center;background-size:contain}._unitDetailTablet_s94f4_104 ._nextBtn_s94f4_71{background:url("+new URL("next_btn_bg-tablet-d84258ec.png",t.meta.url).href+") no-repeat center;background-size:contain}._unitDetailTablet_s94f4_104 ._wapList_s94f4_59{width:1.36rem;height:1.49333rem}\n",document.head.appendChild(O);const K="_unitDetail_s94f4_1",M="_unitSwipe_s94f4_9",H="_questionTitle_s94f4_12",X="_questionNum_s94f4_21",Q="_pointName_s94f4_28",G="_controlBtn_s94f4_56",Z="_wapList_s94f4_59",W="_btnSection_s94f4_65",V="_prevBtn_s94f4_70",Y="_nextBtn_s94f4_71",J="_activePrevBtn_s94f4_72",$="_right_s94f4_95",ee="_error_s94f4_98",ne="_primary_s94f4_101",te="_unitDetailTablet_s94f4_104";e("default",i({name:"unit-detail",setup(){const e=s(),t=o(),i=a(),O=r({background:"transparent",visiableError:!1,visiableAnswer:!1,id:e.query.id,currentIndex:0,questionList:[],page:1,rows:50,total:0,isFinish:!1,visiableInfo:{show:!1,operationType:"RESULT",type:"DEFAULT",content:"",showCancelButton:!1,confirmButtonText:"",cancelButtonText:"",title:"",graspItem:{}},nextStatus:!1,swipeHeight:"auto",answerAnalysis:"",questionTypeCode:"",overResult:{time:"00:00",questionLength:0,errorLength:0,rate:0}}),{counter:ie,resume:se,pause:oe}=F(1e3,{controls:!0}),ae=function(){var e=n((function*(e){try{const{data:n}=yield g.post("/edu-app/studentUnitExamination/errorEdition",{data:{page:O.page,rows:O.rows,maxStudentExaminationErrorEditionId:e}}),t=n||{};O.total=t.total||0,O.isFinish=!(t.current<t.pages),t.records.forEach((e=>{e.showAnalysis=!1,e.grasp=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),O.questionList.push(...t.records||[])}catch(n){}}));return function(n){return e.apply(this,arguments)}}();l((()=>O.currentIndex),(()=>{if(O.currentIndex+3>=O.questionList.length&&!O.isFinish){const e=O.questionList[O.questionList.length-1];O.page=O.page+1,ae(e.id)}}));const re=function(){var e=n((function*(e){e.grasp||(O.visiableInfo.show=!0,O.visiableInfo.title="确定掌握此题?",O.visiableInfo.showCancelButton=!0,O.visiableInfo.operationType="GRASP",O.visiableInfo.cancelButtonText="取消",O.visiableInfo.confirmButtonText="确定",O.visiableInfo.content="你确定已掌握该题知识要点,此题将移除你的错题集。",O.visiableInfo.graspItem=e,console.log(O.total,"toa"),O.total<=1&&be())}));return function(n){return e.apply(this,arguments)}}(),le=function(){var e=n((function*(){try{if(O.visiableInfo.show=!1,yield g.get("/edu-app/studentExaminationErrorEdition/del",{hideLoading:!1,params:{questionId:O.visiableInfo.graspItem.id}}),O.visiableInfo.graspItem.grasp=!0,I.emit("unitAudioStop"),O.total<=1)return t.back(),void t.back();if(O.total>O.currentIndex+1){const e=O.questionList.findIndex((e=>e.studentExaminationErrorEditionId===O.visiableInfo.graspItem.studentExaminationErrorEditionId));return O.questionList.splice(e,1),O.total-=1,void fe()}if(O.total==O.currentIndex+1){const e=O.questionList.findIndex((e=>e.studentExaminationErrorEditionId===O.visiableInfo.graspItem.studentExaminationErrorEditionId));return O.questionList.splice(e,1),O.total-=1,O.currentIndex-=1,void fe()}}catch(e){}}));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=n((function*(){try{var e;const t=O.questionList||[],s=t[O.currentIndex];if((null==s||null===(e=s.userAnswer)||void 0===e?void 0:e.length)<=0)return h("题目尚未做答"),void(O.nextStatus=!1);let o={};t.forEach(((e,n)=>{n===O.currentIndex&&(o={questionId:e.id,details:e.userAnswer||[]})}));const{data:a}=yield g.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:o});if(t.forEach(((e,n)=>{n===O.currentIndex&&(O.answerAnalysis=e.answerAnalysis,O.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=a)})),O.questionList.length===O.currentIndex+1)return I.emit("unitAudioStop"),O.visiableInfo.show=!0,O.visiableInfo.title="练习完成",O.visiableInfo.showCancelButton=!0,O.visiableInfo.operationType="CONTINUE",O.visiableInfo.cancelButtonText="再等等",O.visiableInfo.confirmButtonText="确认完成",O.visiableInfo.content="确认本次练习的题目都完成了吗?",void be();var n;if(a)null===(n=i.value)||void 0===n||n.next();else O.visiableError=!0}catch(t){}}));return function(){return e.apply(this,arguments)}}(),ce=u((()=>{const e=O.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 de=0;const fe=(e=!0)=>{m((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[O.currentIndex])||void 0===n?void 0:n.querySelector(".swipe-item-question"),i=null==t?void 0:t.querySelectorAll(".answerTitleImg img");let s=!0;null==i||i.forEach((e=>{e.complete||(s=!1)})),!s&&de<3&&setTimeout((()=>{de+=1,fe(e)}),300),s&&(de=0);const o=y(t);O.swipeHeight=o.height}),100)}))},pe=()=>{"RESULT"===O.visiableInfo.operationType?(O.visiableInfo.show=!1,t.back(),t.back()):"BACK"===O.visiableInfo.operationType?(O.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ve,!1)):"CONTINUE"===O.visiableInfo.operationType?Ae():"GRASP"===O.visiableInfo.operationType&&le()},_e=function(){var e=n((function*(){const e=O.visiableInfo.operationType;"RESULT"===e||("BACK"===e?(O.visiableInfo.show=!1,be()):"CONTINUE"===e?O.visiableInfo.show=!1:"GRASP"===e&&(O.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ve,!1)))}));return function(){return e.apply(this,arguments)}}(),Ae=()=>{const e=ce.value;let n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));const t=ie.value,i=Math.floor(t/60)>=10?Math.floor(t/60):"0"+Math.floor(t/60),s=t%60>=10?t%60:"0"+t%60;O.overResult={time:i+":"+s,questionLength:e.count,errorLength:e.noPassCount,rate:n},oe(),ie.value=0,O.visiableInfo.show=!0,O.visiableInfo.title="已完成",O.visiableInfo.showCancelButton=!1,O.visiableInfo.operationType="RESULT",O.visiableInfo.confirmButtonText="确认",O.visiableInfo.content=`<div>您已完成本次测试,答对<span class='${$}'>${e.passCount}</span>,答错<span class='${ee}'>${e.count-e.passCount}</span>,正确率<span class='${ne}'>${n}%</span>~</div>`},ve=()=>{const e=ce.value;O.visiableInfo.show=!0,O.visiableInfo.title="确认退出吗?",O.visiableInfo.showCancelButton=!0,O.visiableInfo.operationType="BACK",O.visiableInfo.cancelButtonText="退出",O.visiableInfo.confirmButtonText="继续",O.visiableInfo.content=`您已经完成${e.passCount+e.noPassCount}道题了,继续做题可以巩固所学知识哦~`,I.emit("unitAudioStop")},be=()=>{window.removeEventListener("popstate",ve,!1),t.back()};return c(n((function*(){P(document,"scroll",(()=>{const{y:e}=z();e.value>52?O.background="#fff":O.background="transparent"})),yield ae(),fe(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ve,!1)}))),d((()=>{I.emit("unitAudioStop")})),()=>{let e;return f("div",{class:[K,b().isTablet?te:""]},[f(R,{position:"top"},{default:()=>[f(p,{border:!1,background:O.background},null)]}),f(N,{loop:!1,showIndicators:!1,ref:i,duration:300,touchable:!1,class:M,style:{paddingBottom:"12px"},lazyRender:!0,height:O.swipeHeight,onChange:e=>{I.emit("unitAudioStop"),O.currentIndex=e,fe()}},(n=e=O.questionList.map(((e,n)=>f(j,null,{default:()=>[f("div",{class:"swipe-item-question"},[e.questionTypeCode===x.RADIO&&f(C,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"radio",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>f("div",{class:H},[f("div",{class:X},[f("p",{class:Q},[e.knowledgePointName]),f("span",null,[O.currentIndex+1]),_("/"),O.total]),f(A,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:G,disabled:e.grasp,onClick:()=>re(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===x.CHECKBOX&&f(C,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"checkbox",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>f("div",{class:H},[f("div",{class:X},[f("p",{class:Q},[e.knowledgePointName]),f("span",null,[O.currentIndex+1]),_("/"),O.total]),f(A,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:G,disabled:e.grasp,onClick:()=>re(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===x.SORT&&f(T,{value:e.userAnswer,"onUpdate:value":[n=>e.userAnswer=n,()=>{const n=!(e.userAnswer&&e.userAnswer.length>0);fe(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>f("div",{class:H},[f("div",{class:X},[f("p",{class:Q},[e.knowledgePointName]),f("span",null,[O.currentIndex+1]),_("/"),O.total]),f(A,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:G,disabled:e.grasp,onClick:()=>re(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===x.LINK&&f(q,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>f("div",{class:H},[f("div",{class:X},[f("p",{class:Q},[e.knowledgePointName]),f("span",null,[O.currentIndex+1]),_("/"),O.total]),f(A,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:G,disabled:e.grasp,onClick:()=>re(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===x.PLAY&&f(k,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,unitId:O.id,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>f("div",{class:H},[f("div",{class:X},[f("span",null,[O.currentIndex+1]),_("/"),O.total]),f(A,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",disabled:e.grasp,class:G,onClick:()=>re(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])})])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!w(n)?e:{default:()=>[e]})),f(R,{position:"bottom"},{default:()=>[f("div",{class:["btnGroup btnMore",W]},[f(A,{round:!0,block:!0,class:O.currentIndex>0?J:V,disabled:!(O.currentIndex>0),onClick:()=>{var e;null===(e=i.value)||void 0===e||e.prev()}},{default:()=>[_("上一题")]}),f(A,{block:!0,round:!0,class:Y,onClick:ue,loading:O.nextStatus,disabled:O.nextStatus},{default:()=>[O.questionList.length===O.currentIndex+1?"提交":"下一题"]}),f(D,{src:L,class:[Z,"van-haptics-feedback"],onClick:()=>O.visiableAnswer=!0},null)])]}),f(B,{show:O.visiableAnswer,"onUpdate:show":e=>O.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[f(S,{value:O.questionList,lookType:"PRACTICE",statusList:[{text:"答对",color:"#1CACF1"},{text:"答错",color:"#FF8486"},{text:"未答",color:"#EAEAEA"}],isFinish:O.isFinish,onSelect:e=>{var n;null===(n=i.value)||void 0===n||n.swipeTo(e,{immediate:!0}),O.visiableAnswer=!1},onLoadMore:()=>{const e=O.questionList[O.questionList.length-1];O.page=O.page+1,ae(e.id)}},null)]}),f(v,{show:O.visiableError,"onUpdate:show":e=>O.visiableError=e,style:{width:"90%",maxWidth:"520px"},round:!0,closeOnClickOverlay:!1},{default:()=>[f(U,{onClose:()=>O.visiableError=!1,answerAnalysis:O.answerAnalysis,questionTypeCode:O.questionTypeCode,onConform:()=>{var e;null===(e=i.value)||void 0===e||e.next(),setTimeout((()=>{O.answerAnalysis=""}),500)}},null)]}),f(v,{show:O.visiableInfo.show,"onUpdate:show":e=>O.visiableInfo.show=e,closeOnClickOverlay:!1,style:{background:"transparent",width:"100%",maxWidth:"100%",transform:"translateY(-55%)"}},{default:()=>[f(E,{title:O.visiableInfo.title,showCancelButton:O.visiableInfo.showCancelButton,cancelButtonText:O.visiableInfo.cancelButtonText,confirmButtonText:O.visiableInfo.confirmButtonText,status:O.visiableInfo.type,content:O.visiableInfo.content,contentHtml:!0,onConform:pe,onClose:_e},null)]})]);var n}}}))}}}))}();