unit-detail-1cae22b9.js 1.6 KB

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