1 |
- import{d as T,x as R,r as f,y as I,Q as L,a as e,R as P,A as c,F as A,C as h,q as U,V as H,S as p,U as N,h as y,D as W,N as $}from"./index-0f430fcc.js";import{M as z}from"./index-006d92d8.js";import{g as d,s as n,a as D,b as G}from"./api-d8ca2d23.js";import{I as b}from"./index-15acf057.js";import"./index-9b258718.js";const M="_woringBook_c1785_1",O="_woringHeader_c1785_6",V="_leftArrow_c1785_11",F="_title_c1785_14",q="_woringSecgtion_c1785_37",J="_woringImg_c1785_44",Q="_woringBookTablet_c1785_48",s={woringBook:M,woringHeader:O,leftArrow:V,title:F,woringSecgtion:q,woringImg:J,woringBookTablet:Q},j=""+new URL("ai-exam-ac155650.png",import.meta.url).href,K=""+new URL("woring-practice-5f4735ad.png",import.meta.url).href,X=""+new URL("woring-stat-fe2f9a06.png",import.meta.url).href,Y=""+new URL("ai-exam-tablet-59317842.png",import.meta.url).href,Z=""+new URL("woring-practice-tablet-e52c153b.png",import.meta.url).href,ee=""+new URL("woring-stat-tablet-45571c53.png",import.meta.url).href,te=T({name:"woring",emits:["close"],setup(g,{emit:v}){const o=R({box:{height:""},show:!1,steps:[{ele:"",eleRect:{},img:d("woring1.png"),handStyle:{left:"4.5rem"},imgStyle:{width:"8.19rem",height:"3.9rem",top:"0.6rem",left:"0.8rem"},btnsStyle:{top:"5.2rem",left:"3.5rem"},type:"bottom"},{ele:"",eleRect:{},img:d("woring2.png"),handStyle:{left:"4.5rem"},imgStyle:{width:"8.19rem",height:"3.9rem",top:"0.6rem",left:"0.8rem"},btnsStyle:{top:"5.2rem",left:"3.5rem"},type:"bottom"},{ele:"",img:d("woring3.png"),handStyle:{top:"-1.39rem",left:"4.5rem",transform:"rotate(180deg)"},imgStyle:{width:"8.19rem",height:"3.9rem",top:"-7.4rem",left:"0.8rem"},btnsStyle:{top:"-2.6rem",left:"2.11rem"}}],step:0}),i=f(!1),k=f(!0),r=f({}),C=async()=>{var t;try{const a=await D({guideTag:"guideInfo"});a.data?r.value=JSON.parse((t=a.data)==null?void 0:t.guideValue)||null:r.value={},r.value&&r.value.woring?i.value=!1:i.value=!0}catch(a){console.log(a)}},u=()=>{var a;const t=document.getElementById(`woring-${o.step}`);if(t){const l=t.getBoundingClientRect();o.box={left:l.x+"px",top:l.y+"px",width:l.width+"px",height:l.height+"px"},console.log((a=o.box)==null?void 0:a.height)}else m()};I(()=>{setTimeout(()=>{var t=document.documentElement,a=t.clientWidth;a>750?(console.log("PAD"),k.value=!0):(k.value=!1,console.log("PHONE")),u(),C()},500),window.addEventListener("resize",x)});const x=()=>{u()};L(()=>{window.removeEventListener("resize",x)});const m=()=>{if(o.step>=3){w();return}o.step=o.step+1,u()},w=async()=>{r.value?r.value.woring=!0:r.value={woring:!0};try{const t=await G({guideTag:"guideInfo",guideValue:JSON.stringify(r.value)})}catch(t){console.log(t)}i.value=!1};return()=>e(P,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",n.guidePopup],show:i.value,"onUpdate:show":t=>i.value=t},{default:()=>[e("div",{class:n.content,onClick:()=>m()},[o.step!=o.steps.length-1&&e("div",{class:[n.backBtn,n.right],onClick:t=>{t.stopPropagation(),w()}},[c("跳过")]),e("div",{class:[n.box,n.noscalc],style:{...o.box},id:`modeType-${o.step}`},[o.steps.map((t,a)=>{var l,S,_,B;return e("div",{onClick:E=>E.stopPropagation(),class:n.item,style:t.type=="bottom"?{display:a===o.step?"":"none",left:`${(l=t.eleRect)==null?void 0:l.left}px`,top:`${(S=o.box)==null?void 0:S.height}`}:{display:a===o.step?"":"none",left:`${(_=t.eleRect)==null?void 0:_.left}px`,top:`${(B=t.eleRect)==null?void 0:B.top}px`}},[e("img",{class:n.img,style:t.imgStyle,src:t.img},null),e("img",{class:n.iconHead,style:t.handStyle,src:d("indexDot.png")},null),e("div",{class:n.btns,style:t.btnsStyle},[o.step+1==o.steps.length?e(A,null,[e(h,{class:[n.btn,n.sacleBtn],round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{o.step=0,u()}},{default:()=>[c("再看一遍")]}),e(h,{class:[n.btn,n.endBtn,n.sacleBtn],round:!0,type:"primary",onClick:()=>w()},{default:()=>[c("完成")]})]):e(h,{class:[n.btn,n.sacleBtn],round:!0,type:"primary",onClick:()=>m()},{default:()=>[c("下一步 ("),o.step+1,c("/"),o.steps.length,c(")")]})])])})])])]})}}),le=T({name:"wroing-book",setup(){const g=U(),v=async()=>{try{const{data:o}=await W.post("/edu-app/studentUnitExamination/errorEdition",{hideLoading:!1,data:{page:1,rows:50}});(o||{}).total>0?g.push({path:"/error-question-mode"}):setTimeout(()=>{$("暂无错题")},100)}catch(o){}};return()=>e("div",{class:[s.woringBook,p().isTablet?s.woringBookTablet:""]},[e(z,{position:"top"},{default:()=>[e(H,{border:!1,background:"transparent"},{content:()=>e("div",{class:s.woringHeader},[e("i",{onClick:()=>{p().isApp?N({api:"goBack"}):g.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(b,y({id:"woring-0"},{lazyLoad:!0,src:p().isTablet?ee:X,class:s.woringImg,onClick:()=>g.push("wroing-stat")}),null),e(b,y({id:"woring-1"},{lazyLoad:!0,src:p().isTablet?Z:K,class:s.woringImg,onClick:v}),null),e(b,y({id:"woring-2"},{lazyLoad:!0,src:p().isTablet?Y:j,class:s.woringImg,onClick:()=>g.push("ai-exam")}),null)]),e(te,null,null)])}});export{le as default};
|