| 1 |
- System.register(["./index-legacy-bfebbbb9.js","./index-legacy-391308c1.js","./index-legacy-c66bda16.js","./index-legacy-b8ade0a3.js","./index-legacy-679bdc2e.js","./index-legacy-0230da5d.js","./index-legacy-1ac807a6.js","./index-legacy-c0b87482.js","./index-legacy-236532da.js"],(function(e,n){"use strict";var t,i,s,o,a,l,r,u,c,d,v,p,f,_,b,w,h,m,I,y,x,q,g,A,T,S,E,L,C,U,B,k,O;return{setters:[e=>{t=e.d,i=e.U,s=e.q,o=e.r,a=e.x,l=e.ai,r=e.D,u=e.y,c=e.af,d=e.a,v=e.S,p=e.A,f=e.C,_=e.V,b=e.a1,w=e.z,h=e.Z},e=>{m=e.e,I=e.Q,y=e.C,x=e.D,q=e.K,g=e.P,A=e.i,T=e.A,S=e.a,E=e.R},e=>{L=e.M},e=>{C=e.u,U=e.a},e=>{B=e.S,k=e.a},e=>{O=e.I},null,null,null],execute:function(){var D=document.createElement("style");D.textContent="._unitDetail_13q27_1{min-height:100vh;overflow:hidden;background:url("+new URL("bg-a9662afa.png",n.meta.url).href+") no-repeat top center;background-size:contain;position:relative;background-color:#abe8ff}._unitSwipe_13q27_9{margin-top:2.4rem}._unitSwipe_13q27_9 ._questionTitle_13q27_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_13q27_9 ._questionTitle_13q27_12 ._questionNum_13q27_21 span{color:#ff5a56}._unitSwipe_13q27_9 ._questionTitle_13q27_12 ._questionType_13q27_24{display:flex;align-items:center;font-weight:600;color:#ff5a56;font-size:.37333rem}._wapList_13q27_31{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_13q27_37{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_13q27_37 ._prevBtn_13q27_42,._btnSection_13q27_37 ._nextBtn_13q27_43,._btnSection_13q27_37 ._activePrevBtn_13q27_44{width:3.30667rem!important;border:none;color:#fff}._btnSection_13q27_37 ._prevBtn_13q27_42{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",n.meta.url).href+") no-repeat center;background-size:contain}._btnSection_13q27_37 ._activePrevBtn_13q27_44{background:url("+new URL("next_btn_bg-efb37605.png",n.meta.url).href+") no-repeat center;background-size:contain}._btnSection_13q27_37 ._nextBtn_13q27_43{background:url("+new URL("next_btn_bg-efb37605.png",n.meta.url).href+") no-repeat center;background-size:contain}._btnSection_13q27_37 .van-button--disabled{color:#587c98}._btnSection_13q27_37 .van-button--disabled:before{opacity:.2!important}._right_13q27_67{color:#14c295}._error_13q27_70{color:#ff5a56}._minutes_13q27_73{color:#1cacf1}\n",document.head.appendChild(D);const R="_unitDetail_13q27_1",j="_unitSwipe_13q27_9",N="_questionTitle_13q27_12",P="_questionNum_13q27_21",z="_questionType_13q27_24",K="_wapList_13q27_31",M="_btnSection_13q27_37",$="_prevBtn_13q27_42",F="_nextBtn_13q27_43",H="_activePrevBtn_13q27_44",Q="_right_13q27_67",Y="_error_13q27_70",G="_minutes_13q27_73";e("default",t({name:"unit-detail",setup(){const e=i(),n=s(),t=o(),D=a({type:e.query.type,knowledgePointIds:e.query.knowledgePointIds,lessonCoursewareId:e.query.lessonCoursewareId,studentUnitExaminationId:"",background:"transparent",color:"#fff",visiableAnswer:!1,examDetail:{},currentIndex:0,time:0,questionList:[],visiableInfo:{show:!1,operationType:"RESULT",type:"DEFAULT",content:"",showCancelButton:!1,confirmButtonText:"",cancelButtonText:"",title:""},nextStatus:!1,swipeHeight:"auto",countDownOver:!1}),W=l({time:D.time,onChange(e){if(3e5>=e.total&&!D.countDownOver){if(D.visiableInfo.show)return void(D.countDownOver=!0);D.visiableInfo.show=!0,D.visiableInfo.title="倒计时5分钟",D.visiableInfo.showCancelButton=!1,D.visiableInfo.operationType="TIME",D.visiableInfo.type="COUNTDOWN",D.visiableInfo.confirmButtonText="确认",D.visiableInfo.content="距离交卷时间还剩五分钟哦,请尽快答题~",D.countDownOver=!0}},onFinish:async()=>{m.emit("unitAudioStop"),await te(),se()}}),X=async()=>{const e=(D.examDetail||{}).timeMinutes||0;D.time=Math.ceil(60*e*1e3),setTimeout((()=>{W.reset(60*e*1e3),W.start()}),10)},V=async()=>{D.nextStatus=!0;try{var e;const n=D.questionList||[],i=[];if(n.forEach(((e,n)=>{e.userAnswer&&e.userAnswer.length>0&&i.push({questionId:e.id,details:e.userAnswer})})),D.questionList.length===D.currentIndex+1)return m.emit("unitAudioStop"),D.visiableInfo.show=!0,D.visiableInfo.title="测验完成",D.visiableInfo.showCancelButton=!0,D.visiableInfo.operationType="CONTINUE",D.visiableInfo.type="DEFAULT",D.visiableInfo.cancelButtonText="再等等",D.visiableInfo.confirmButtonText="确认完成",D.visiableInfo.content="确认本次测验的题目都完成了吗?",D.nextStatus=!1,void se();await r.post("/edu-app/studentUnitExamination/submitAnswer",{hideLoading:!0,data:{answers:i,studentUnitExaminationId:D.studentUnitExaminationId}}),null===(e=t.value)||void 0===e||e.next()}catch{}D.nextStatus=!1};let Z=0;const J=(e=!0)=>{w((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[D.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&&Z<3&&setTimeout((()=>{Z+=1,J(e)}),300),s&&(Z=0);const o=h(t);D.swipeHeight=o.height}),100)}))},ee=()=>{"RESULT"===D.visiableInfo.operationType?(D.visiableInfo.show=!1,n.back(),n.back()):"BACK"===D.visiableInfo.operationType||"CONTINUE"===D.visiableInfo.operationType?te():"TIME"===D.visiableInfo.operationType&&(D.visiableInfo.show=!1)},ne=async e=>{if("BACK"===D.visiableInfo.operationType){if(e)return D.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),void window.addEventListener("popstate",ie,!1);try{await r.get("/edu-app/studentUnitExamination/dropExamination",{params:{studentUnitExaminationId:D.studentUnitExaminationId}}),D.visiableInfo.show=!1,se()}catch{}}else"CONTINUE"===D.visiableInfo.operationType&&(D.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ie,!1))},te=async()=>{try{const e=D.questionList||[],n=[];e.forEach((e=>{e.userAnswer&&e.userAnswer.length>0&&n.push({questionId:e.id,details:e.userAnswer})}));const{data:t}=await r.post("/edu-app/studentUnitExamination/completionExamination",{hideLoading:!1,data:{answers:n,studentUnitExaminationId:D.studentUnitExaminationId}});D.visiableInfo.show=!0,D.visiableInfo.title=t.score+"分",D.visiableInfo.showCancelButton=!1,D.visiableInfo.operationType="RESULT",D.visiableInfo.confirmButtonText="确认","A_EXCELLENT"===t.status?(D.visiableInfo.type="GOOD",D.visiableInfo.content="<div>你很棒,题目掌握的非常不错,"):"B_PASS"===t.status?(D.visiableInfo.type="PASS",D.visiableInfo.content="<div>还需要加油哦,"):(D.visiableInfo.type="FAIL",D.visiableInfo.content="<div>别气馁,继续努力,"),D.visiableInfo.content+=`您本次获得了<span class='${Q}'>${t.score}分</span>,正确率<span class='${Y}'>${t.rightRate}%</span>,实际用时<span class='${G}'>${Math.ceil(t.answerTime/60)}</span>分钟~</div>`}catch{}},ie=()=>{D.visiableInfo.show=!0,D.visiableInfo.title="确认要离开吗?",D.visiableInfo.showCancelButton=!0,D.visiableInfo.operationType="BACK",D.visiableInfo.type="DEFAULT",D.visiableInfo.cancelButtonText="弃考",D.visiableInfo.confirmButtonText="提交",D.visiableInfo.content="还有题目未完成哦,是否要提前交卷?",m.emit("unitAudioStop")},se=()=>{window.removeEventListener("popstate",ie,!1),n.back()};return u((async()=>{C(document,"scroll",(()=>{const{y:e}=U();e.value>52?(D.background="#fff",D.color="#323333"):(D.background="transparent",D.color="#fff")})),await(async()=>{try{let e={};if("ai"===D.type){const{data:n}=await r.post("/edu-app/studentUnitExamination/pointRandomSave",{data:{knowledgePointIds:D.knowledgePointIds}});e=n||{}}else{const{data:n}=await r.post("/edu-app/studentUnitExamination/mockExamination",{data:{lessonCoursewareId:D.lessonCoursewareId}});e=n||{}}e.examinationQuestionAdds.forEach((e=>{e.showAnalysis=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),D.questionList=e.examinationQuestionAdds||[],D.studentUnitExaminationId=e.unitExaminationId,D.examDetail=e||{},X()}catch{}})(),J(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ie,!1)})),c((()=>{m.emit("unitAudioStop")})),()=>{let e;return d("div",{class:R},[d(L,{position:"top"},{default:()=>[d(v,{border:!1,background:D.background,color:D.color},null)]}),d(B,{loop:!1,showIndicators:!1,ref:t,duration:300,touchable:!1,class:j,style:{paddingBottom:"12px"},lazyRender:!0,height:D.swipeHeight,onChange:e=>{m.emit("unitAudioStop"),D.currentIndex=e,J()}},(n=e=D.questionList.map(((e,n)=>d(k,null,{default:()=>[d("div",{class:"swipe-item-question"},[e.questionTypeCode===I.RADIO&&d(y,{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:N},[d("div",{class:P},[d("span",null,[D.currentIndex+1]),p("/"),D.questionList.length]),d("div",{class:z},[W.current.value.minutes+60*W.current.value.hours,p(":"),W.current.value.seconds])])}),e.questionTypeCode===I.CHECKBOX&&d(y,{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:N},[d("div",{class:P},[d("span",null,[D.currentIndex+1]),p("/"),D.questionList.length]),d("div",{class:z},[W.current.value.minutes+60*W.current.value.hours,p(":"),W.current.value.seconds])])}),e.questionTypeCode===I.SORT&&d(x,{value:e.userAnswer,"onUpdate:value":[n=>e.userAnswer=n,()=>{const n=!(e.userAnswer&&e.userAnswer.length>0);J(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:N},[d("div",{class:P},[d("span",null,[D.currentIndex+1]),p("/"),D.questionList.length]),d("div",{class:z},[W.current.value.minutes+60*W.current.value.hours,p(":"),W.current.value.seconds])])}),e.questionTypeCode===I.LINK&&d(q,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:N},[d("div",{class:P},[d("span",null,[D.currentIndex+1]),p("/"),D.questionList.length]),d("div",{class:z},[W.current.value.minutes+60*W.current.value.hours,p(":"),W.current.value.seconds])])}),e.questionTypeCode===I.PLAY&&d(g,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,unitId:D.studentUnitExaminationId,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>d("div",{class:N},[d("div",{class:P},[d("span",null,[D.currentIndex+1]),p("/"),D.questionList.length]),d("div",{class:z},[W.current.value.minutes+60*W.current.value.hours,p(":"),W.current.value.seconds])])})])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!b(n)?e:{default:()=>[e]})),d(L,{position:"bottom"},{default:()=>[d("div",{class:["btnGroup btnMore",M]},[d(f,{round:!0,block:!0,class:D.currentIndex>0?H:$,disabled:!(D.currentIndex>0),onClick:()=>{var e;null===(e=t.value)||void 0===e||e.prev()}},{default:()=>[p("上一题")]}),d(f,{block:!0,round:!0,class:F,onClick:V,loading:D.nextStatus,disabled:D.nextStatus},{default:()=>[D.questionList.length===D.currentIndex+1?"提交":"下一题"]}),d(O,{src:A,class:[K,"van-haptics-feedback"],onClick:()=>D.visiableAnswer=!0},null)])]}),d(T,{show:D.visiableAnswer,"onUpdate:show":e=>D.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[d(S,{value:D.questionList,onSelect:e=>{var n;null===(n=t.value)||void 0===n||n.swipeTo(e,{immediate:!0}),D.visiableAnswer=!1}},null)]}),d(_,{show:D.visiableInfo.show,"onUpdate:show":e=>D.visiableInfo.show=e,closeOnClickOverlay:!1,style:{background:"transparent",width:"100%",maxWidth:"100%",transform:"translateY(-55%)"}},{default:()=>[d(E,{title:D.visiableInfo.title,showCancelButton:D.visiableInfo.showCancelButton,cancelButtonText:D.visiableInfo.cancelButtonText,confirmButtonText:D.visiableInfo.confirmButtonText,status:D.visiableInfo.type,content:D.visiableInfo.content,closeable:"BACK"===D.visiableInfo.operationType,contentHtml:!0,onConform:ee,onClose:ne},null)]})]);var n}}}))}}}));
|