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