1 |
- !function(){function e(e,t,n,l,o,r,a){try{var s=e[r](a),i=s.value}catch(c){return void n(c)}s.done?t(i):Promise.resolve(i).then(l,o)}function t(t){return function(){var n=this,l=arguments;return new Promise((function(o,r){var a=t.apply(n,l);function s(t){e(a,o,r,s,i,"next",t)}function i(t){e(a,o,r,s,i,"throw",t)}s(void 0)}))}}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function l(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?n(Object(l),!0).forEach((function(t){o(e,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):n(Object(l)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))}))}return e}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var l=n.call(e,t||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}System.register(["./index-legacy-bed3194f.js","./index-legacy-e56257fa.js","./index.module-legacy-9e06124c.js","./index-legacy-b72d8d1a.js","./index-legacy-e8305c49.js","./index-legacy-143af6ce.js","./index-legacy-412152a1.js"],(function(e,n){"use strict";var o,r,a,s,i,c,d,u,p,g,m,y,f,v,b,h,w,k,S,x,C,O,j,I,P,D,E,N,V,R,T,A,L,B,U,q,z,$,J,H,K,F,G,M,Q;return{setters:[e=>{o=e.c,r=e.d,a=e.a7,s=e.X,i=e.a,c=e.a8,d=e.t,u=e.k,p=e.a9,g=e.n,m=e.r,y=e.aa,f=e.e,v=e.ab,b=e.w,h=e.ac,w=e.z,k=e.ad,S=e.ae,x=e.h,C=e.g,O=e.v,j=e.x,I=e.y,P=e.af,D=e.V,E=e.A,N=e.F,V=e.C,R=e.q,T=e.U,A=e.S,L=e.a0,B=e.a1,U=e.D,q=e.E},e=>{z=e.M},e=>{$=e.s},e=>{J=e.u,H=e.a},e=>{K=e.g,F=e.s},e=>{G=e.c,M=e.C},e=>{Q=e.I}],execute:function(){const[W,X]=o("collapse"),Y=Symbol(W),Z={border:d,accordion:Boolean,modelValue:{type:[String,Number,Array],default:""}};var _=r({name:W,props:Z,emits:["change","update:modelValue"],setup(e,{emit:t,slots:n}){const{linkChildren:l,children:o}=a(Y),r=e=>{t("change",e),t("update:modelValue",e)};return s({toggleAll:(t={})=>{if(e.accordion)return;"boolean"==typeof t&&(t={expanded:t});const{expanded:n,skipDisabled:l}=t,a=o.filter((e=>e.disabled&&l?e.expanded.value:null!=n?n:!e.expanded.value)).map((e=>e.itemName.value));r(a)}}),l({toggle:(t,n)=>{const{accordion:l,modelValue:o}=e;r(l?t===o?"":t:n?o.concat(t):o.filter((e=>e!==t)))},isExpanded:t=>{const{accordion:n,modelValue:l}=e;return!!function(e,t){return t&&Array.isArray(e)?(console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode'),!1):!(!t&&!Array.isArray(e)&&(console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode'),1))}(l,n)&&(n?l===t:l.includes(t))}}),()=>{var t;return i("div",{class:[X(),{[c]:e.border}]},[null==(t=n.default)?void 0:t.call(n)])}}});const ee=u(_),[te,ne]=o("collapse-item"),le=["icon","title","value","label","right-icon"],oe=p({},G,{name:g,isLink:d,disabled:Boolean,readonly:Boolean,lazyRender:d});var re=r({name:te,props:oe,setup(e,{slots:t}){const n=m(),l=m(),{parent:o,index:r}=y(Y);if(!o)return void console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");const a=f((()=>{var t;return null!=(t=e.name)?t:r.value})),c=f((()=>o.isExpanded(a.value))),d=m(c.value),u=v((()=>d.value||!e.lazyRender)),p=()=>{c.value?n.value&&(n.value.style.height=""):d.value=!1};b(c,((e,t)=>{if(null===t)return;e&&(d.value=!0);(e?w:k)((()=>{if(!l.value||!n.value)return;const{offsetHeight:t}=l.value;if(t){const l=`${t}px`;n.value.style.height=e?"0":l,h((()=>{n.value&&(n.value.style.height=e?l:"0")}))}else p()}))}));const g=(e=!c.value)=>{o.toggle(a.value,e)},j=()=>{e.disabled||e.readonly||g()},I=()=>{const{border:n,disabled:l,readonly:o}=e,r=S(e,Object.keys(G));return o&&(r.isLink=!1),(l||o)&&(r.clickable=!1),i(M,x({role:"button",class:ne("title",{disabled:l,expanded:c.value,borderless:!n}),"aria-expanded":String(c.value),onClick:j},r),S(t,le))},P=u((()=>{var e;return C(i("div",{ref:n,class:ne("wrapper"),onTransitionend:p},[i("div",{ref:l,class:ne("content")},[null==(e=t.default)?void 0:e.call(t)])]),[[O,d.value]])}));return s({toggle:g,expanded:c,itemName:a}),()=>i("div",{class:[ne({border:r.value&&e.border})]},[I(),P()])}});const ae=u(re),se=""+new URL("library-1-96754f77.png",n.meta.url).href,ie=""+new URL("library-2-18c7f885.png",n.meta.url).href,ce=""+new URL("library-3-784f5dd5.png",n.meta.url).href,de=r({name:"knowledge-guide",emits:["close"],setup(e,{emit:t}){const n=j({box:{},show:!1,steps:[{ele:"",eleRect:{},img:K("knowledge1.png"),handStyle:{top:"1.3rem",left:"1.5rem"},imgStyle:{width:"5.46rem",height:"2.30rem",top:"1.9rem"},btnsStyle:{top:"4.5rem",left:"1rem"},boxStyle:{transform:"scale(1.2)!important"}},{ele:"",eleRect:{},img:K("knowledge2.png"),handStyle:{top:"1.3rem",left:"1.5rem"},imgStyle:{top:"1.9rem",left:"-1.5rem"},btnsStyle:{top:"4.5rem"},boxStyle:{transform:"scale(1.2)!important"}},{ele:"",img:K("knowledge3.png"),handStyle:{top:"4.1rem",left:"3.6rem"},imgStyle:{top:"4.8rem",left:"1.2rem",width:"7.2rem",height:"3.45rem"},btnsStyle:{top:"8.8rem",left:"1.3rem"},boxStyle:{transform:"scale(1)"}}],step:0}),o=m(!1),r=()=>{const e=document.getElementById(`knowledge-${n.step}`);if(console.log(e,"ele"),e){const t=e.getBoundingClientRect();n.box={left:t.x+"px",top:t.y+"px",width:t.width+"px",height:t.height+"px"}}else s()};I((()=>{const e=localStorage.getItem("guideInfo");e&&JSON.parse(e).knowledge?o.value=!1:o.value=!0,r(),window.addEventListener("resize",a)}));const a=()=>{r()};P((()=>{window.removeEventListener("resize",a)}));const s=()=>{console.log(n.step,""),n.step>=2?c():(n.step=n.step+1,r())},c=()=>{let e=JSON.parse(localStorage.getItem("guideInfo")||"{}");e?e.knowledge=!0:e={knowledge:!0},localStorage.setItem("guideInfo",JSON.stringify(e)),o.value=!1};return()=>i(D,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",F.guidePopup],show:o.value,"onUpdate:show":e=>o.value=e},{default:()=>[i("div",{class:F.content,onClick:()=>s()},[n.step!=n.steps.length-1&&i("div",{class:[F.backBtn,F.right],onClick:e=>{e.stopPropagation(),c()}},[E("跳过")]),i("div",{class:[F.box,F.noscalc],style:l(l({},n.box),n.steps[n.step].boxStyle),id:`modeType-${n.step}`},[n.steps.map(((e,t)=>{var l,o;return i("div",{onClick:e=>e.stopPropagation(),class:F.item,style:{display:t===n.step?"":"none",left:`${null===(l=e.eleRect)||void 0===l?void 0:l.left}px`,top:`${null===(o=e.eleRect)||void 0===o?void 0:o.top}px`}},[i("img",{class:F.img,style:e.imgStyle,src:e.img},null),i("img",{class:F.iconHead,style:e.handStyle,src:K("indexDot.png")},null),i("div",{class:F.btns,style:e.btnsStyle},[n.step+1==n.steps.length?i(N,null,[i(V,{class:F.btn,round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{n.step=0,r()}},{default:()=>[E("再看一遍")]}),i(V,{class:[F.btn,F.endBtn],round:!0,type:"primary",onClick:()=>c()},{default:()=>[E("完成")]})]):i(V,{class:F.btn,round:!0,type:"primary",onClick:()=>s()},{default:()=>[E("下一步 ("),n.step+1,E("/"),n.steps.length,E(")")]})])])}))])])]})}});e("default",r({name:"knowledge-ligrary",setup(){const e=R(),n=T(),l=m(),o=j({cid:n.query.cid,list:[],activeNames:sessionStorage.getItem("knowledge-ligrary-key")?Number(sessionStorage.getItem("knowledge-ligrary-key")):0,background:"transparent",color:"#fff"}),r=function(){var e=t((function*(){try{const{data:e}=yield U.post("/edu-app/lessonCourseware/queryStudentLessonDetail",{requestType:"form",data:{lessonCoursewareId:o.cid}});o.list=e,l.value=!0}catch(e){}}));return function(){return e.apply(this,arguments)}}(),a=e=>e%3==1?se:e%3==2?ie:e%3==0?ce:void 0,s=function(){var n=t((function*(t){try{const{data:n}=yield U.get("/edu-app/studentUnitExamination/checkKnowledgePointIds",{params:{lessonCoursewareId:o.cid}});if(!n)return void setTimeout((()=>{q("暂无题目")}),100);"TEST"===t?e.push({path:"/examination-mode",query:{lessonCoursewareId:o.cid}}):e.push({path:"/practice-mode",query:{lessonCoursewareId:o.cid}})}catch(n){}}));return function(e){return n.apply(this,arguments)}}();return I((()=>{J(document,"scroll",(()=>{const{y:e}=H();e.value>52?(o.background="#fff",o.color="#323333"):(o.background="transparent",o.color="#fff")})),r()})),()=>{let t;return i("div",{class:$.knowledgeLibrary},[i(z,{position:"top"},{default:()=>[i(A,{border:!1,background:o.background,color:o.color},{right:()=>i("div",{class:[$.wroingBtn],onClick:()=>e.push("/wroing-book")},[i("i",{class:$.iconWroing},null),E("错题本")])})]}),i("div",{class:$.btnGroup},[i("div",{id:"knowledge-0",class:$.btnPractice,onClick:()=>s("PRACTICE")},null),i("div",{id:"knowledge-1",class:$.btnTest,onClick:()=>s("TEST")},null)]),i("div",{class:[$.containerSection,$.librarySection]},[i(ee,{modelValue:o.activeNames,"onUpdate:modelValue":e=>o.activeNames=e,accordion:!0,border:!1,onChange:e=>{sessionStorage.setItem("knowledge-ligrary-key",e)}},(n=t=o.list.map(((t,n)=>i(ae,{title:t.lessonCoursewareDetailName,name:n,value:o.activeNames===n?"收起":"展开",border:!1},{default:()=>[t.knowledgeDetails&&t.knowledgeDetails.map(((t,n)=>i("div",{class:$.unitItem,onClick:()=>e.push({path:"/unit-detail",query:{detailId:t.lessonCoursewareKnowledgeDetailId}})},[i(Q,x({id:0==n?"knowledge-2":""},{class:$.unitImg,lazyLoad:!0,src:a(n)}),null),i("p",{class:$.name},[i("span",null,[t.name])])]))),t.knowledgeDetails&&t.knowledgeDetails.length<=0&&i(L,{description:"暂无章节"},null)]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!B(n)?t:{default:()=>[t]}))]),l.value&&i(de,null,null)]);var n}}}))}}}))}();
|