index-legacy-66b6038d.js 16 KB

1
  1. !function(){function e(e,n,t,i,o,a,s){try{var l=e[a](s),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,a){var s=n.apply(t,i);function l(n){e(s,o,a,l,r,"next",n)}function r(n){e(s,o,a,l,r,"throw",n)}l(void 0)}))}}System.register(["./index-legacy-a314c7dd.js","./index-legacy-ab55f766.js","./index-legacy-2788affc.js","./index-legacy-c10cee2e.js","./index-legacy-fb49b6ec.js","./index-legacy-dd79c724.js","./index-legacy-72dfb7ed.js","./index-legacy-67938227.js","./index-legacy-59282c70.js","./howler-legacy-0586f4f3.js","./index-legacy-dff5e6e7.js"],(function(e,t){"use strict";var i,o,a,s,l,r,u,c,d,p,A,f,_,v,w,b,h,g,m,y,I,x,C,T,q,E,S,L,k,B,R,F,U,P,N,j,z;return{setters:[e=>{i=e.d,o=e.P,a=e.q,s=e.r,l=e.x,r=e.w,u=e.e,c=e.y,d=e.a8,p=e.a,A=e.W,f=e.A,_=e.C,v=e.Q,w=e.a3,b=e.D,h=e.E,g=e.z,m=e.$},e=>{y=e.e,I=e.Q,x=e.C,C=e.D,T=e.K,q=e.P,E=e.i,S=e.A,L=e.a,k=e.R},e=>{B=e.M},e=>{R=e.E},e=>{F=e.b,U=e.u,P=e.a},e=>{N=e.S,j=e.a},e=>{z=e.I},null,null,null,null],execute:function(){var O=document.createElement("style");O.textContent="._unitDetail_15a1l_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_15a1l_9{margin-top:2.4rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21{display:flex;align-items:center}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21 span{color:#ff5a56}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21 ._pointName_15a1l_28{padding-right:.16rem;color:#1cacf1;font-weight:600;font-size:.37333rem;max-width:4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_38{display:flex;align-items:center}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_38 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:4.26667rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_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_15a1l_9 ._questionTitle_15a1l_12 ._controlBtn_15a1l_56{padding:0 .32rem}._wapList_15a1l_59{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_15a1l_65{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_15a1l_65 ._prevBtn_15a1l_70,._btnSection_15a1l_65 ._nextBtn_15a1l_71,._btnSection_15a1l_65 ._activePrevBtn_15a1l_72{width:3.30667rem!important;border:none;color:#fff}._btnSection_15a1l_65 ._prevBtn_15a1l_70{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 ._activePrevBtn_15a1l_72{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 ._nextBtn_15a1l_71{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 .van-button--disabled{color:#587c98}._btnSection_15a1l_65 .van-button--disabled:before{opacity:.2!important}._right_15a1l_95{color:#14c295}._error_15a1l_98{color:#ff5a56}._primary_15a1l_101{color:#1cacf1}\n",document.head.appendChild(O);const K="_unitDetail_15a1l_1",M="_unitSwipe_15a1l_9",H="_questionTitle_15a1l_12",X="_questionNum_15a1l_21",Q="_pointName_15a1l_28",Z="_controlBtn_15a1l_56",D="_wapList_15a1l_59",G="_btnSection_15a1l_65",W="_prevBtn_15a1l_70",V="_nextBtn_15a1l_71",Y="_activePrevBtn_15a1l_72",J="_right_15a1l_95",$="_error_15a1l_98",ee="_primary_15a1l_101";e("default",i({name:"unit-detail",setup(){const e=o(),t=a(),i=s(),O=l({background:"transparent",color:"#fff",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:ne,resume:te,pause:ie}=F(1e3,{controls:!0}),oe=function(){var e=n((function*(e){try{const{data:n}=yield b.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)}}();r((()=>O.currentIndex),(()=>{if(O.currentIndex+3>=O.questionList.length&&!O.isFinish){const e=O.questionList[O.questionList.length-1];O.page=O.page+1,oe(e.id)}}));const ae=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&&_e())}));return function(n){return e.apply(this,arguments)}}(),se=function(){var e=n((function*(){try{if(O.visiableInfo.show=!1,yield b.get("/edu-app/studentExaminationErrorEdition/del",{hideLoading:!1,params:{questionId:O.visiableInfo.graspItem.id}}),O.visiableInfo.graspItem.grasp=!0,y.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 ce()}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 ce()}}catch(e){}}));return function(){return e.apply(this,arguments)}}(),le=function(){var e=n((function*(){try{var e;const t=O.questionList||[],o=t[O.currentIndex];if((null==o||null===(e=o.userAnswer)||void 0===e?void 0:e.length)<=0)return h("题目尚未做答"),void(O.nextStatus=!1);let a={};t.forEach(((e,n)=>{n===O.currentIndex&&(a={questionId:e.id,details:e.userAnswer||[]})}));const{data:s}=yield b.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:a});if(t.forEach(((e,n)=>{n===O.currentIndex&&(O.answerAnalysis=e.answerAnalysis,O.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=s)})),O.questionList.length===O.currentIndex+1)return y.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 _e();var n;if(s)null===(n=i.value)||void 0===n||n.next();else O.visiableError=!0}catch(t){}}));return function(){return e.apply(this,arguments)}}(),re=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 ue=0;const ce=(e=!0)=>{g((()=>{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 o=!0;null==i||i.forEach((e=>{e.complete||(o=!1)})),!o&&ue<3&&setTimeout((()=>{ue+=1,ce(e)}),300),o&&(ue=0);const a=m(t);O.swipeHeight=a.height}),100)}))},de=()=>{"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",fe,!1)):"CONTINUE"===O.visiableInfo.operationType?Ae():"GRASP"===O.visiableInfo.operationType&&se()},pe=function(){var e=n((function*(){const e=O.visiableInfo.operationType;"RESULT"===e||("BACK"===e?(O.visiableInfo.show=!1,_e()):"CONTINUE"===e?O.visiableInfo.show=!1:"GRASP"===e&&(O.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",fe,!1)))}));return function(){return e.apply(this,arguments)}}(),Ae=()=>{const e=re.value;let n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));const t=ne.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;O.overResult={time:i+":"+o,questionLength:e.count,errorLength:e.noPassCount,rate:n},ie(),ne.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='${J}'>${e.passCount}</span>,答错<span class='${$}'>${e.count-e.passCount}</span>,正确率<span class='${ee}'>${n}%</span>~</div>`},fe=()=>{const e=re.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}道题了,继续做题可以巩固所学知识哦~`,y.emit("unitAudioStop")},_e=()=>{window.removeEventListener("popstate",fe,!1),t.back()};return c(n((function*(){U(document,"scroll",(()=>{const{y:e}=P();e.value>52?(O.background="#fff",O.color="#323333"):(O.background="transparent",O.color="#fff")})),yield oe(),ce(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",fe,!1)}))),d((()=>{y.emit("unitAudioStop")})),()=>{let e;return p("div",{class:K},[p(B,{position:"top"},{default:()=>[p(A,{border:!1,background:O.background,color:O.color},null)]}),p(N,{loop:!1,showIndicators:!1,ref:i,duration:300,touchable:!1,class:M,style:{paddingBottom:"12px"},lazyRender:!0,height:O.swipeHeight,onChange:e=>{y.emit("unitAudioStop"),O.currentIndex=e,ce()}},(n=e=O.questionList.map(((e,n)=>p(j,null,{default:()=>[p("div",{class:"swipe-item-question"},[e.questionTypeCode===I.RADIO&&p(x,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"radio",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:H},[p("div",{class:X},[p("p",{class:Q},[e.knowledgePointName]),p("span",null,[O.currentIndex+1]),f("/"),O.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:Z,disabled:e.grasp,onClick:()=>ae(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===I.CHECKBOX&&p(x,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"checkbox",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:H},[p("div",{class:X},[p("p",{class:Q},[e.knowledgePointName]),p("span",null,[O.currentIndex+1]),f("/"),O.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:Z,disabled:e.grasp,onClick:()=>ae(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===I.SORT&&p(C,{value:e.userAnswer,"onUpdate:value":[n=>e.userAnswer=n,()=>{const n=!(e.userAnswer&&e.userAnswer.length>0);ce(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:H},[p("div",{class:X},[p("p",{class:Q},[e.knowledgePointName]),p("span",null,[O.currentIndex+1]),f("/"),O.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:Z,disabled:e.grasp,onClick:()=>ae(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===I.LINK&&p(T,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:H},[p("div",{class:X},[p("p",{class:Q},[e.knowledgePointName]),p("span",null,[O.currentIndex+1]),f("/"),O.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:Z,disabled:e.grasp,onClick:()=>ae(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===I.PLAY&&p(q,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,unitId:O.id,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>p("div",{class:H},[p("div",{class:X},[p("span",null,[O.currentIndex+1]),f("/"),O.total]),p(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",disabled:e.grasp,class:Z,onClick:()=>ae(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])})])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!w(n)?e:{default:()=>[e]})),p(B,{position:"bottom"},{default:()=>[p("div",{class:["btnGroup btnMore",G]},[p(_,{round:!0,block:!0,class:O.currentIndex>0?Y:W,disabled:!(O.currentIndex>0),onClick:()=>{var e;null===(e=i.value)||void 0===e||e.prev()}},{default:()=>[f("上一题")]}),p(_,{block:!0,round:!0,class:V,onClick:le,loading:O.nextStatus,disabled:O.nextStatus},{default:()=>[O.questionList.length===O.currentIndex+1?"提交":"下一题"]}),p(z,{src:E,class:[D,"van-haptics-feedback"],onClick:()=>O.visiableAnswer=!0},null)])]}),p(S,{show:O.visiableAnswer,"onUpdate:show":e=>O.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[p(L,{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,oe(e.id)}},null)]}),p(v,{show:O.visiableError,"onUpdate:show":e=>O.visiableError=e,style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:()=>[p(R,{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)]}),p(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:()=>[p(k,{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:de,onClose:pe},null)]})]);var n}}}))}}}))}();