1 |
- !function(){function e(e,n,t,l,i,o,d){try{var r=e[o](d),a=r.value}catch(s){return void t(s)}r.done?n(a):Promise.resolve(a).then(l,i)}function n(n){return function(){var t=this,l=arguments;return new Promise((function(i,o){var d=n.apply(t,l);function r(n){e(d,i,o,r,a,"next",n)}function a(n){e(d,i,o,r,a,"throw",n)}r(void 0)}))}}System.register(["./index-legacy-49622d8c.js","./index-legacy-40231b53.js","./index.module-legacy-e716731e.js","./index-legacy-7277aaf3.js"],(function(e,t){"use strict";var l,i,o,d,r,a,s,u,c,f,v,g,w,I,p;return{setters:[e=>{l=e.d,i=e.U,o=e.x,d=e.e,r=e.y,a=e.a,s=e.S,u=e.a1,c=e.C,f=e.D,v=e.R},e=>{g=e.M},e=>{w=e.s},e=>{I=e.u,p=e.a}],execute:function(){e("default",l({name:"unit-detail",setup(){const e=i(),t=o({detailId:e.query.detailId,loading:!1,background:"transparent",color:"#fff",dataInfo:{},title:" ",listKnowledge:[],prevDetailId:"",nextDetailId:""}),l=function(){var e=n((function*(){t.loading=!0;try{const{data:e}=yield f.get("/edu-app/lessonCoursewareKnowledgeDetail/detail/"+t.detailId);t.dataInfo=e,t.title=e.name}catch(e){}t.loading=!1}));return function(){return e.apply(this,arguments)}}(),D=function(){var l=n((function*(){try{const n={lessonCoursewareId:e.query.lessonCoursewareId};v().ios&&(n.platform="iOS-STUDENT",n.verson=e.query.verson||"1.0.8");const{data:l}=yield f.post("/edu-app/lessonCoursewareDetail/listKnowledge",{data:n});t.listKnowledge=l||[]}catch(n){}}));return function(){return l.apply(this,arguments)}}(),y=d((()=>{var e;const n=t.listKnowledge||[];let l=n.findIndex((e=>{var n;return e.id===(null===(n=t.dataInfo)||void 0===n?void 0:n.lessonCoursewareDetailId)}));const i=n.find((e=>{var n;return e.id===(null===(n=t.dataInfo)||void 0===n?void 0:n.lessonCoursewareDetailId)}));if(!i)return!0;let o=null==i||null===(e=i.lessonCoursewareDetailKnowledgeDetailList)||void 0===e?void 0:e.findIndex((e=>e.id==t.detailId)),d=!1,r="";for(;o>=0;){if(o--,o>=0){var a;const e=null==i||null===(a=i.lessonCoursewareDetailKnowledgeDetailList)||void 0===a?void 0:a[o];e.id&&(d=!0,r=e.id)}if(d)break}if(d)return t.prevDetailId=r,!1;let s=!1;for(;l>=0;){var u;l--;const e=(null===(u=n[l])||void 0===u?void 0:u.lessonCoursewareDetailKnowledgeDetailList)||[];let t=e.length;for(;t>0&&(e[t-1]&&(s=!0,r=e[t-1].id),t--,!s););if(s)break}return s&&(t.prevDetailId=r),!s})),C=d((()=>{var e;const n=t.listKnowledge||[];let l=n.findIndex((e=>{var n;return e.id===(null===(n=t.dataInfo)||void 0===n?void 0:n.lessonCoursewareDetailId)}));const i=n.find((e=>{var n;return e.id===(null===(n=t.dataInfo)||void 0===n?void 0:n.lessonCoursewareDetailId)}));if(!i)return!0;let o=null==i||null===(e=i.lessonCoursewareDetailKnowledgeDetailList)||void 0===e?void 0:e.findIndex((e=>e.id==t.detailId)),d=!1,r="";for(;o<(null==i?void 0:i.lessonCoursewareDetailKnowledgeDetailList.length)-1;){if(o++,o>=0){var a;const e=null==i||null===(a=i.lessonCoursewareDetailKnowledgeDetailList)||void 0===a?void 0:a[o];e.id&&(d=!0,r=e.id)}if(d)break}if(d)return t.nextDetailId=r,!1;let s=!1;for(;l<=n.length-1;){var u;l++;const e=(null===(u=n[l])||void 0===u?void 0:u.lessonCoursewareDetailKnowledgeDetailList)||[];let t=0;for(;t<=e.length-1&&(e[t]&&(s=!0,r=e[t].id),t++,!s););if(s)break}return s&&(t.nextDetailId=r),!s})),x=function(){var e=n((function*(e){"up"===e?(t.detailId=t.prevDetailId,yield l()):"down"===e&&(t.detailId=t.nextDetailId,yield l())}));return function(n){return e.apply(this,arguments)}}();return r(n((function*(){I(document,"scroll",(()=>{const{y:e}=p();e.value>52?(t.background="#fff",t.color="#323333"):(t.background="transparent",t.color="#fff")})),yield l(),yield D()}))),()=>{var e,n;return a("div",{class:w.knowledgeLibrary},[a(g,{position:"top"},{default:()=>[a(s,{border:!1,background:t.background,color:t.color,title:t.title},null)]}),a("div",{class:[w.containerSection,w.woringSection]},[(null===(e=t.dataInfo)||void 0===e?void 0:e.desc)&&a("div",{class:w.woringContent,innerHTML:t.dataInfo.desc},null),!(null!==(n=t.dataInfo)&&void 0!==n&&n.desc)&&!t.loading&&a("div",{class:w.woringContent},[a(u,{description:"暂无内容",style:{paddingTop:"40px"}},null)])]),a(g,{position:"bottom"},{default:()=>[a("div",{class:[w.stickBtnGroup]},[a(c,{round:!0,class:w.prevBtn,disabled:y.value,onClick:()=>x("up")},null),a(c,{round:!0,disabled:C.value,class:w.nextBtn,onClick:()=>x("down")},null)])]})])}}}))}}}))}();
|