import{d as c,q as l,x as u,a as o,S as f,z as p,a0 as g,C as m,V as w,D as r,E as y}from"./index-51d4fe4a.js";import{M as I}from"./index-14677bd8.js";import{s as a}from"./index.module-a86fa758.js";import{u as k,a as C}from"./index-428f84dc.js";const b=""+new URL("icon-exam-question-ebdee0f1.png",import.meta.url).href,q=c({name:"unit-detail",setup(){const n=m(),s=w(),e=l({detailId:s.query.detailId,loading:!1,background:"transparent",color:"#fff",dataInfo:{}}),i=async()=>{e.loading=!0;try{const{data:t}=await r.get("/edu-app/lessonCoursewareKnowledgeDetail/detail/"+e.detailId);e.dataInfo=t}catch(t){}e.loading=!1},d=async()=>{try{const{data:t}=await r.get("/edu-app/studentUnitExamination/checkKnowledgePointIds",{params:{lessonCoursewareId:e.detailId}});if(t)n.push({path:"/practice-mode",query:{lessonCoursewareId:s.query.detailId}});else{setTimeout(()=>{y("暂无题目")},100);return}}catch(t){}};return u(()=>{k(document,"scroll",()=>{const{y:t}=C();t.value>52?(e.background="#fff",e.color="#323333"):(e.background="transparent",e.color="#fff")}),i()}),()=>o("div",{class:a.knowledgeLibrary},[o(I,{position:"top"},{default:()=>[o(f,{border:!1,background:e.background,color:e.color},{right:()=>o("div",{class:a.wroingBtn,onClick:()=>n.push("/wroing-book")},[o("i",{class:a.iconWroing},null),p("错题本")])})]}),o("div",{class:[a.containerSection,a.woringSection]},[e.dataInfo.desc&&o("div",{class:a.woringContent,innerHTML:e.dataInfo.desc},null),!e.dataInfo.desc&&!e.loading&&o("div",{class:a.woringContent},[o(g,{description:"暂无内容",style:{paddingTop:"40px"}},null)])]),o("img",{src:b,class:a.iconExamQuestion,onClick:d},null)])}});export{q as default};