1 |
- import{d as k,x,r as v,y as _,af as I,a as e,V as C,A as l,F as B,C as d,q as z,S as E,R,a5 as L,h as m,D as A,E as P}from"./index-9fb65bf8.js";import{M as H}from"./index-10d6d4ab.js";import{g as p,s}from"./index-41e41ecf.js";import{I as f}from"./index-e290504b.js";const N="_woringBook_k99iz_1",U="_woringHeader_k99iz_6",D="_leftArrow_k99iz_11",M="_title_k99iz_14",O="_woringSecgtion_k99iz_37",T="_woringImg_k99iz_44",n={woringBook:N,woringHeader:U,leftArrow:D,title:M,woringSecgtion:O,woringImg:T},$=""+new URL("ai-exam-ac155650.png",import.meta.url).href,F=""+new URL("woring-practice-5f4735ad.png",import.meta.url).href,q=""+new URL("woring-stat-fe2f9a06.png",import.meta.url).href,J=k({name:"woring",emits:["close"],setup(i,{emit:w}){const t=x({box:{},show:!1,steps:[{ele:"",eleRect:{},img:p("woring1.png"),handStyle:{top:"2.98rem",left:"4.5rem"},imgStyle:{top:"3.3rem",left:"2.1rem"},btnsStyle:{top:"6.2rem",left:"3.5rem"},boxStyle:{transform:"scale(1)"}},{ele:"",eleRect:{},img:p("woring2.png"),handStyle:{top:"2.98rem",left:"4.5rem"},imgStyle:{top:"3.3rem",left:"2.1rem"},btnsStyle:{top:"6.2rem",left:"3.5rem"},boxStyle:{transform:"scale(1)"}},{ele:"",img:p("woring3.png"),handStyle:{top:"-1.39rem",left:"4.5rem",transform:"rotate(180deg)"},imgStyle:{top:"-5.4rem",left:"2.1rem"},btnsStyle:{top:"-2.4rem",left:"2.5rem"},boxStyle:{transform:"scale(1)"}}],step:0}),r=v(!1),c=()=>{const o=document.getElementById(`woring-${t.step}`);if(o){const a=o.getBoundingClientRect();t.box={left:a.x+"px",top:a.y+"px",width:a.width+"px",height:a.height+"px"}}else g()};_(()=>{setTimeout(()=>{const o=localStorage.getItem("guideInfo");o&&JSON.parse(o).woring?r.value=!1:r.value=!0,c()},300),window.addEventListener("resize",y)});const y=()=>{c()};I(()=>{window.removeEventListener("resize",y)});const g=()=>{if(t.step>=3){u();return}t.step=t.step+1,c()},u=()=>{let o=JSON.parse(localStorage.getItem("guideInfo")||"{}");o?o.woring=!0:o={woring:!0},localStorage.setItem("guideInfo",JSON.stringify(o)),r.value=!1};return()=>e(C,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",s.guidePopup],show:r.value,"onUpdate:show":o=>r.value=o},{default:()=>[e("div",{class:s.content,onClick:()=>g()},[t.step!=t.steps.length-1&&e("div",{class:s.backBtn,onClick:o=>{o.stopPropagation(),u()}},[l("跳过")]),e("div",{class:s.box,style:{...t.box,...t.steps[t.step].boxStyle},id:`modeType-${t.step}`},[t.steps.map((o,a)=>{var S,h;return e("div",{onClick:b=>b.stopPropagation(),class:s.item,style:{display:a===t.step?"":"none",left:`${(S=o.eleRect)==null?void 0:S.left}px`,top:`${(h=o.eleRect)==null?void 0:h.top}px`}},[e("img",{class:s.img,style:o.imgStyle,src:o.img},null),e("img",{class:s.iconHead,style:o.handStyle,src:p("indexDot.png")},null),e("div",{class:s.btns,style:o.btnsStyle},[t.step+1==t.steps.length?e(B,null,[e(d,{class:s.btn,round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{t.step=0,c()}},{default:()=>[l("再看一遍")]}),e(d,{class:[s.btn,s.endBtn],round:!0,type:"primary",onClick:()=>u()},{default:()=>[l("完成")]})]):e(d,{class:s.btn,round:!0,type:"primary",onClick:()=>g()},{default:()=>[l("下一步 ("),t.step+1,l("/"),t.steps.length,l(")")]})])])})])])]})}}),K=k({name:"wroing-book",setup(){const i=z(),w=async()=>{try{const{data:t}=await A.post("/edu-app/studentUnitExamination/errorEdition",{hideLoading:!1,data:{page:1,rows:50}});(t||{}).total>0?i.push({path:"/error-question-mode"}):setTimeout(()=>{P("暂无错题")},100)}catch(t){}};return()=>e("div",{class:n.woringBook},[e(H,{position:"top"},{default:()=>[e(E,{border:!1,background:"transparent"},{content:()=>e("div",{class:n.woringHeader},[e("i",{onClick:()=>{R().isApp?L({api:"goBack"}):i.back()},class:["van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow",n.leftArrow]},null),e("span",{class:n.title},[e("i",null,null)])])})]}),e("div",{class:n.woringSecgtion},[e(f,m({id:"woring-0"},{lazyLoad:!0,src:q,class:n.woringImg,onClick:()=>i.push("wroing-stat")}),null),e(f,m({id:"woring-1"},{lazyLoad:!0,src:F,class:n.woringImg,onClick:w}),null),e(f,m({id:"woring-2"},{lazyLoad:!0,src:$,class:n.woringImg,onClick:()=>i.push("ai-exam")}),null)]),e(J,null,null)])}});export{K as default};
|