unit-detail-legacy-133c92c7.js 1.8 KB

1
  1. System.register(["./index-legacy-bfebbbb9.js","./index-legacy-c66bda16.js","./index.module-legacy-9e06124c.js","./index-legacy-b8ade0a3.js"],(function(n,e){"use strict";var o,a,t,d,i,s,c,l,r,u,g,f,p,w,y;return{setters:[n=>{o=n.d,a=n.q,t=n.U,d=n.x,i=n.y,s=n.a,c=n.S,l=n.A,r=n.a0,u=n.D,g=n.E},n=>{f=n.M},n=>{p=n.s},n=>{w=n.u,y=n.a}],execute:function(){const I=""+new URL("icon-exam-question-ebdee0f1.png",e.meta.url).href;n("default",o({name:"unit-detail",setup(){const n=a(),e=t(),o=d({detailId:e.query.detailId,loading:!1,background:"transparent",color:"#fff",dataInfo:{}}),k=async()=>{try{const{data:e}=await u.get("/edu-app/studentUnitExamination/checkKnowledgePointIds",{params:{knowledgePointIds:o.dataInfo.knowledgePointIds}});if(!e)return void setTimeout((()=>{g("暂无题目")}),100);n.push({path:"/practice-mode",query:{knowledgePointIds:o.dataInfo.knowledgePointIds}})}catch{}};return i((()=>{w(document,"scroll",(()=>{const{y:n}=y();n.value>52?(o.background="#fff",o.color="#323333"):(o.background="transparent",o.color="#fff")})),(async()=>{o.loading=!0;try{const{data:n}=await u.get("/edu-app/lessonCoursewareKnowledgeDetail/detail/"+o.detailId);o.dataInfo=n}catch{}o.loading=!1})()})),()=>s("div",{class:p.knowledgeLibrary},[s(f,{position:"top"},{default:()=>[s(c,{border:!1,background:o.background,color:o.color},{right:()=>s("div",{class:p.wroingBtn,onClick:()=>n.push("/wroing-book")},[s("i",{class:p.iconWroing},null),l("错题本")])})]}),s("div",{class:[p.containerSection,p.woringSection]},[o.dataInfo.desc&&s("div",{class:p.woringContent,innerHTML:o.dataInfo.desc},null),!o.dataInfo.desc&&!o.loading&&s("div",{class:p.woringContent},[s(r,{description:"暂无内容",style:{paddingTop:"40px"}},null)])]),s("img",{src:I,class:p.iconExamQuestion,onClick:k},null)])}}))}}}));