1 |
- !function(){function e(e,n,t,i,r,s,a){try{var o=e[s](a),u=o.value}catch(l){return void t(l)}o.done?n(u):Promise.resolve(u).then(i,r)}function n(n){return function(){var t=this,i=arguments;return new Promise((function(r,s){var a=n.apply(t,i);function o(n){e(a,r,s,o,u,"next",n)}function u(n){e(a,r,s,o,u,"throw",n)}o(void 0)}))}}var t=document.createElement("style");t.innerHTML="._unitDetail_asj8n_1{overflow:hidden}._unitSection_asj8n_4{margin:.32rem .34667rem;padding:.34667rem .4rem;width:auto;overflow:hidden;border-radius:.26667rem}._unitSection_asj8n_4 ._unitTitle_asj8n_11{font-size:.42667rem;font-weight:500;color:#333}._unitSection_asj8n_4 .van-cell__value{flex:0 auto}._unitSection_asj8n_4 ._unitCount_asj8n_19{padding-top:.26667rem;padding-left:.21333rem;display:flex;align-items:center;justify-content:space-between}._unitSection_asj8n_4 ._countSection_asj8n_26{display:flex;align-items:center;font-size:.32rem;line-height:.45333rem;color:#333;flex-direction:column}._unitSection_asj8n_4 ._countSection_asj8n_26 ._nums_asj8n_34{font-family:DIAN;font-weight:700;color:#333;font-size:.53333rem;padding-bottom:.08rem}._unitSection_asj8n_4 ._countSection_asj8n_26+._countSection_asj8n_26{margin-left:.66667rem}._wapList_asj8n_44{width:1.17333rem;height:1.17333rem;flex-shrink:0;margin-left:.48rem}._practiceResult_asj8n_50 ._practiceTitle_asj8n_50{font-size:.53333rem;font-weight:600;color:#191919;line-height:.74667rem}._practiceResult_asj8n_50 ._practiceRate_asj8n_56{padding-top:.4rem;font-size:1.6rem;font-weight:700;color:#f67146;line-height:1.86667rem}._practiceResult_asj8n_50 .van-grid{padding-top:.26667rem;padding-bottom:.26667rem;margin-left:5%;width:90%}._practiceResult_asj8n_50 .van-grid-item__content{background-color:transparent}._practiceResult_asj8n_50 ._title_asj8n_72{font-size:.64rem;font-weight:700;color:#333;line-height:.74667rem}._practiceResult_asj8n_50 ._name_asj8n_78{padding-top:.08rem;font-size:.37333rem;color:#777;line-height:.53333rem}._practiceResult_asj8n_50 ._practiceTips_asj8n_84{margin-left:10%;width:80%;background:linear-gradient(135deg,#fff4da 0%,#ffe6c4 100%);border-radius:.26667rem;padding:.37333rem 0;text-align:center;font-size:.4rem;font-weight:500;color:#703a17;line-height:.56rem;letter-spacing:.02667rem}._popupResult_1naxw_1{padding:.53333rem .53333rem .66667rem;color:#333;font-size:.4rem}._popupResult_1naxw_1 ._resultTitle_1naxw_6{display:flex;align-items:center;justify-content:center;text-align:center;font-size:.48rem;font-weight:600;color:#333}._popupResult_1naxw_1 ._resultTitle_1naxw_6 ._titleImg_1naxw_15{width:.48rem;height:.48rem;margin-right:.16rem}._popupResult_1naxw_1 ._result_1naxw_6{margin-top:.53333rem;padding:.32rem;background:#f6f6f6;border-radius:.10667rem;font-size:.42667rem;font-weight:500;color:#333}._popupResult_1naxw_1 ._result_1naxw_6 ._yes_1naxw_29{color:#4593f4;margin-right:.53333rem}._popupResult_1naxw_1 ._result_1naxw_6 ._no_1naxw_33{color:#f44541}._popupResult_1naxw_1 ._resultContent_1naxw_36{padding:.53333rem 0 .8rem;font-size:.4rem;color:#333;text-align:justify;line-height:.61333rem}._popupResult_1naxw_1 ._resultContent_1naxw_36 span{font-weight:600}\n",document.head.appendChild(t),System.register(["./index-legacy.48c8d62c.js","./index-legacy.c57970b0.js","./index-legacy.8cf5f94f.js","./index-legacy.5a3e4145.js","./index-legacy.0e0de364.js","./index-legacy.f73724ef.js","./index-legacy.f3037807.js","./index-legacy.6f22ba3a.js","./index-legacy.087e0425.js","./index-legacy.71047e87.js","./index-legacy.b7e8815a.js","./index-legacy.8429fc95.js","./index-legacy.93204044.js","./index-legacy.ac553194.js"],(function(e){"use strict";var t,i,r,s,a,o,u,l,c,d,f,p,_,m,w,g,v,h,y,x,b,j,A,C,R,S,T,q,k,I,L,E,B,U,z,P,O,M;return{setters:[function(e){t=e.d,i=e.c,r=e.q,s=e.B,a=e.aV,o=e.ag,u=e.R,l=e.r,c=e.y,d=e.$,f=e.f,p=e.a_,_=e.P,m=e.ak,w=e.m,g=e._,v=e.am},function(e){h=e.a,y=e.e,x=e.Q,b=e.C,j=e.D,A=e.K,C=e.P,R=e.i,S=e.A},function(e){T=e.O},function(e){q=e.O},function(e){k=e.I},function(e){I=e.R},function(e){L=e.O},function(e){E=e.u},function(e){B=e.C},function(e){U=e.S,z=e.a},function(e){P=e.A},function(e){O=e.G,M=e.a},function(){},function(){}],execute:function(){var D="_unitDetail_asj8n_1",H="_unitSection_asj8n_4",F="_unitTitle_asj8n_11",K="_unitCount_asj8n_19",N="_countSection_asj8n_26",G="_nums_asj8n_34",Q="_wapList_asj8n_44",Y="_practiceResult_asj8n_50",V="_practiceTitle_asj8n_50",X="_practiceRate_asj8n_56",$="_title_asj8n_72",J="_name_asj8n_78",W="_practiceTips_asj8n_84",Z={popupResult:"_popupResult_1naxw_1",resultTitle:"_resultTitle_1naxw_6",titleImg:"_titleImg_1naxw_15",result:"_result_1naxw_6",yes:"_yes_1naxw_29",no:"_no_1naxw_33",resultContent:"_resultContent_1naxw_36"},ee=t({name:"result-mode",props:{confirmButtonText:{type:String,default:"我知道了"},answerAnalysis:{type:String,default:""},questionTypeCode:{type:String,default:""}},emits:["close","conform"],setup:function(e,n){var t=n.emit;return function(){return i("div",{class:Z.popupResult},[i("div",{class:Z.resultTitle},[i(k,{src:h,class:Z.titleImg},null),"PLAY"===e.questionTypeCode?"不合格!":"回答错误!"]),i("div",{class:Z.resultContent},[i("span",null,[r("答案解析:")]),e.answerAnalysis]),i(s,{type:"primary",round:!0,class:Z.btn,block:!0,onClick:function(){t("conform"),t("close")}},{default:function(){return[e.confirmButtonText]}})])}}});e("default",t({name:"unit-detail",setup:function(){var e=a(),t=o();u();var h=u(),Z=l({examId:e.query.examId,name:e.query.name,courseTypeCode:e.query.courseTypeCode,visiableError:!1,visiableAnswer:!1,visiableResult:!1,id:e.query.id,currentIndex:0,questionList:[],visiableSure:!1,resultInfo:{},resultStatusType:"SUCCESS",visiableExam:!1,nextStatus:!1,swipeHeight:"auto",answerAnalysis:"",questionTypeCode:"",overResult:{time:"00:00",questionLength:0,errorLength:0,rate:0},knowledgelist:[],quitStatus:!1,dialogMessage:"",dialogStatus:!1}),ne=E(1e3,{controls:!0}),te=ne.counter,ie=ne.resume,re=ne.pause,se=function(){var e=n(regeneratorRuntime.mark((function e(){var n,t,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,w.post("/api-student/examinationQuestion/randomPage",{data:{page:1,row:50,categoryId:Z.id}});case 3:n=e.sent,t=n.data,(i=t||[]).forEach((function(e){e.showAnalysis=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),Z.questionList=i,e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=n(regeneratorRuntime.mark((function e(){var n,t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,w.post("/api-student/unitExamination/queryKnowledgePoint",{requestType:"form",data:{unitExaminationId:Z.examId}});case 3:n=e.sent,t=n.data,Z.knowledgelist=t.lists||[],e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=n(regeneratorRuntime.mark((function e(){var n,t,i,r,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=Z.questionList||[],t={},n.forEach((function(e,n){n===Z.currentIndex&&(t={questionId:e.id,details:e.userAnswer||[]})})),e.next=6,w.post("/api-student/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:t});case 6:if(i=e.sent,r=i.data,n.forEach((function(e,n){n===Z.currentIndex&&(Z.answerAnalysis=e.answerAnalysis,Z.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=r)})),Z.questionList.length!==Z.currentIndex+1){e.next=13;break}return y.emit("unitAudioStop"),Z.visiableSure=!0,e.abrupt("return");case 13:r?null===(s=h.value)||void 0===s||s.next():Z.visiableError=!0,e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(){return e.apply(this,arguments)}}(),ue=c((function(){var e=Z.questionList||[],n=0,t=0,i=0;return e.forEach((function(e){e.showAnalysis&&(n+=1,e.analysis.userResult?t+=1:i+=1)})),{count:n,passCount:t,noPassCount:i}})),le=0,ce=function e(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];g((function(){n&&window.scrollTo(0,0),setTimeout((function(){var t,i=null===(t=document.querySelectorAll(".van-swipe-item")[Z.currentIndex])||void 0===t?void 0:t.querySelector(".swipe-item-question");console.log("🚀 ~ setTimeout ~ currentItemDom",i);var r=i.querySelectorAll(".answerTitleImg img"),s=!0;r.forEach((function(e){console.log(e.complete),e.complete||(s=!1)})),!s&&le<3&&setTimeout((function(){le+=1,e(n)}),300),s&&(le=0);var a=v(i);Z.swipeHeight=a.height}),100)}))},de=function(){var e=ue.value,n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));var t=te.value,i=Math.floor(t/60)>=10?Math.floor(t/60):"0"+Math.floor(t/60),r=t%60>=10?t%60:"0"+t%60;Z.overResult={time:i+":"+r,questionLength:e.count,errorLength:e.noPassCount,rate:n},re(),te.value=0,Z.visiableResult=!0},fe=function(){var e=n(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Z.questionList=[],e.next=3,se();case 3:setTimeout(n(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(n=h.value)||void 0===n||n.swipeTo(0,{immediate:!0}),Z.swipeHeight="auto",Z.answerAnalysis="",Z.overResult={time:"00:00",questionLength:0,errorLength:0,rate:0},Z.visiableResult=!1,ie(),ce();case 7:case"end":return e.stop()}}),e)}))),100);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pe=function(){var e=Z.knowledgelist||[],n=e.findIndex((function(e){return e.id===Z.id}));console.log("🚀 ~ file: index.tsx:249 ~ onConfirmResult ~ knownleIndex",n);var t={};t=n+1>=e.length||n<0?e[0]:e[n+1],Z.id=t.id,Z.visiableResult=!1,Z.currentIndex=0,fe()},_e=function(){Z.quitStatus=!0,y.emit("unitAudioStop")},me=function(){window.removeEventListener("popstate",_e,!1),t.back()};return d(n(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,se();case 2:return e.next=4,ae();case 4:if(ce(),f.user.data.vipMember){e.next=10;break}return re(),Z.dialogStatus=!0,Z.dialogMessage="您暂未开通团练宝,请开通后使用",e.abrupt("return");case 10:window.history.pushState(null,"",document.URL),window.addEventListener("popstate",_e,!1);case 12:case"end":return e.stop()}}),e)})))),p((function(){y.emit("unitAudioStop")})),function(){var e,n;return i("div",{class:D},[i(T,{position:"top"},{default:function(){return[i(L,null,{right:function(){return i("span",{style:"color: var(--van-primary-color)",onClick:function(){y.emit("unitAudioStop"),Z.visiableSure=!0}},[r("结束练习")])}})]}}),i(B,{center:!0,class:H,border:!1},{title:function(){return i("div",{class:[F]},[Z.name])},value:function(){return i("div",{class:K},[i("div",{class:N},[i("span",{class:G},[ue.value.passCount]),i("span",null,[r("答对")])]),i("div",{class:N},[i("span",{class:G,style:{color:"#F44541"}},[ue.value.noPassCount]),i("span",null,[r("答错")])])])}}),i(U,{loop:!1,showIndicators:!1,ref:h,duration:300,touchable:!1,style:{paddingBottom:"12px"},lazyRender:!0,height:Z.swipeHeight,onChange:function(e){y.emit("unitAudioStop"),Z.currentIndex=e,ce()}},(n=e=Z.questionList.map((function(e,n){return i(z,null,{default:function(){return[i("div",{class:"swipe-item-question"},[e.questionTypeCode===x.RADIO&&i(b,{value:e.userAnswer,"onUpdate:value":function(n){return e.userAnswer=n},index:n+1,data:e,type:"radio",showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===x.CHECKBOX&&i(b,{value:e.userAnswer,"onUpdate:value":function(n){return e.userAnswer=n},index:n+1,data:e,type:"checkbox",showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===x.SORT&&i(j,{value:e.userAnswer,"onUpdate:value":[function(n){return e.userAnswer=n},function(){var n=!(e.userAnswer&&e.userAnswer.length>0);ce(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===x.LINK&&i(A,{value:e.userAnswer,"onUpdate:value":function(n){return e.userAnswer=n},data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===x.PLAY&&i(C,{value:e.userAnswer,"onUpdate:value":function(n){return e.userAnswer=n},data:e,index:n+1,unitId:Z.id,showAnalysis:e.showAnalysis,analysis:e.analysis},null)])]}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!m(n)?e:{default:function(){return[e]}})),i(T,{position:"bottom",background:"white"},{default:function(){return[i("div",{class:["btnGroup btnMore"]},[Z.currentIndex>0&&i(s,{round:!0,block:!0,type:"primary",plain:!0,onClick:function(){var e;null===(e=h.value)||void 0===e||e.prev()}},{default:function(){return[r("上一题")]}}),i(s,{block:!0,round:!0,type:"primary",onClick:oe,loading:Z.nextStatus,disabled:Z.nextStatus},{default:function(){return[r("提交")]}}),i(k,{src:R,class:[Q,"van-haptics-feedback"],onClick:function(){return Z.visiableAnswer=!0}},null)])]}}),i(P,{show:Z.visiableAnswer,"onUpdate:show":function(e){return Z.visiableAnswer=e},title:"题目列表",safeAreaInsetBottom:!0},{default:function(){return[i(S,{value:Z.questionList,lookType:"PRACTICE",statusList:[{text:"答对",color:"#71B0FF"},{text:"答错",color:"#FF8486"}],onSelect:function(e){var n;null===(n=h.value)||void 0===n||n.swipeTo(e,{immediate:!0}),Z.visiableAnswer=!1}},null)]}}),i(_,{show:Z.visiableError,"onUpdate:show":function(e){return Z.visiableError=e},style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:function(){return[i(ee,{onClose:function(){return Z.visiableError=!1},answerAnalysis:Z.answerAnalysis,questionTypeCode:Z.questionTypeCode,onConform:function(){var e;null===(e=h.value)||void 0===e||e.next(),Z.answerAnalysis=""}},null)]}}),i(_,{show:Z.visiableResult,"onUpdate:show":function(e){return Z.visiableResult=e},closeOnClickOverlay:!1,style:{background:"transparent",width:"96%"}},{default:function(){return[i(I,{status:"PRACTICE",confirmButtonText:"下一个考点",cancelButtonText:"继续练习本考点",onClose:fe,onConform:pe},{content:function(){return i("div",{class:Y},[i("div",{class:V},[r("本次练习正确率")]),i("div",{class:X},[Z.overResult.rate,r("%")]),i(O,{border:!1,columnNum:3},{default:function(){return[i(M,null,{default:function(){return[i("p",{class:$},[Z.overResult.time]),i("p",{class:J},[r("练习时长")])]}}),i(M,null,{default:function(){return[i("p",{class:[$]},[0|Z.overResult.questionLength]),i("p",{class:J},[r("答题数")])]}}),i(M,null,{default:function(){return[i("p",{class:$},[0|Z.overResult.errorLength]),i("p",{class:J},[r("错题数")])]}})]}}),Z.overResult.rate>=100?i("div",{class:W},[r("你真棒!"),i("br",null,null),r("本知识点你已经完全掌握啦!")]):i("div",{class:W},[r("继续努力!"),i("br",null,null),r("争取在测验中获得高分!")])])}})]}}),i(q,{show:Z.visiableSure,"onUpdate:show":function(e){return Z.visiableSure=e},title:"练习完成",message:"确认本次练习的题目都完成了吗?",messageAlign:"left",showCancelButton:!0,cancelButtonText:"再等等",confirmButtonText:"确认完成",onConfirm:de},null),i(q,{show:Z.quitStatus,"onUpdate:show":function(e){return Z.quitStatus=e},title:"提示",message:"您是否退出本次练习?",showCancelButton:!0,cancelButtonText:"取消",onCancel:function(){window.history.pushState(null,"",document.URL),window.addEventListener("popstate",_e,!1)},confirmButtonText:"确认退出",onConfirm:me},null),i(q,{message:Z.dialogMessage,show:Z.dialogStatus,"onUpdate:show":function(e){return Z.dialogStatus=e},showCancelButton:!0,cancelButtonText:"返回",onCancel:function(){t.back()},confirmButtonText:"立即开通",onConfirm:function(){t.push("/memberCenter")}},null)])}}}))}}}))}();
|