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