import{r as e,j as a,o as t,c as l,w as n,a as s,d as o,k as u,l as r,g as i,i as c,b as v,m as d,v as h,e as p,f as m,I as f}from"./index-DVIfOFfO.js";import{_ as g,a as w,b as _}from"./old.CKixGO1Z.js";import{o as x}from"./uni-app.es.DNqITeUz.js";import{_ as b}from"./_plugin-vue_export-helper.BCo6x5W8.js";const y="/wechat/thd/assets/1-BjS2h1iy.png",$=b({__name:"huakuai",setup(v){const d=100,h=e(null),p=e(null),m=e(400),f=e(600),g=e(0),w=e(0),_=e(0),b=e(!1),$=e(0);const k=`path('${L=d,`\n M20 0\n h${L/3-20}\n a20 20 0 0 1 0 40\n h${L/3}\n a20 20 0 0 0 0 -40\n h${L/3-20}\n v${L/3-20}\n a20 20 0 0 1 -40 0\n v${L/3}\n a20 20 0 0 0 40 0\n v${L/3-20}\n h-${L/3-20}\n a20 20 0 0 1 0 -40\n h-${L/3}\n a20 20 0 0 0 0 40\n h-${L/3-20}\n z\n `}')`;var L;function E(){r().in(h.value).select(".bg-image").boundingClientRect((e=>{e?(console.log("图片宽高:",e.width,e.height),m.value=2*e.width,f.value=2*e.height,g.value=Math.random()*(m.value-200)+d,w.value=f.value/2,_.value=0,console.log("originX:",g.value,"originY:",w.value)):console.error("无法获取.bg-image尺寸")})).exec()}function C(e){b.value=!0,$.value=e.touches?2*e.touches[0].clientX:2*e.clientX,window.addEventListener("mousemove",M),window.addEventListener("mouseup",j),window.addEventListener("touchmove",M),window.addEventListener("touchend",j)}function M(e){if(!b.value)return;let a=(e.touches?2*e.touches[0].clientX:2*e.clientX)-$.value;a=Math.max(0,Math.min(a,m.value-d)),_.value=a}function j(){b.value=!1,window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",j),window.removeEventListener("touchmove",M),window.removeEventListener("touchend",j),Math.abs(_.value-g.value)<20?console.log("验证成功"):_.value=0}const I=e("");return x((()=>{let e=Math.floor(4*Math.random());const a=["/wechat/thd/assets/0-DC0meffC.png",y,y,y];I.value=a[e]})),a((()=>{window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",j),window.removeEventListener("touchmove",M),window.removeEventListener("touchend",j)})),(e,a)=>{const r=i,v=c;return t(),l(v,{class:"captcha-container",ref_key:"container",ref:h},{default:n((()=>[s(v,{class:"captcha-image",style:{position:"relative",width:"100%",height:"400rpx",overflow:"hidden"}},{default:n((()=>[s(r,{src:I.value,class:"bg-image",mode:"widthFix",onLoad:E},null,8,["src"]),s(v,{class:"overlay",style:o({width:m.value+"rpx",height:f.value+"rpx"})},{default:n((()=>[s(v,{class:"hole",style:o({top:w.value+"rpx",left:g.value+"rpx",width:"100rpx",height:"100rpx",clipPath:k,transform:"translate(-50%, -50%)",backgroundColor:"rgba(0,0,0,0.3)"})},null,8,["style"]),s(v,{class:"piece",style:o({top:w.value+"rpx",left:_.value+"rpx",width:"100rpx",height:"100rpx",backgroundImage:`url(${I.value})`,backgroundSize:m.value+"rpx "+f.value+"rpx",backgroundPosition:`-${g.value}rpx -${w.value}rpx`,clipPath:k,transform:"translate(-50%, -50%)"})},null,8,["style"])])),_:1},8,["style"])])),_:1}),s(v,{class:"slider-bar"},{default:n((()=>[s(v,{class:"slider-button",ref_key:"btn",ref:p,onTouchstart:u(C,["prevent"]),onMousedown:u(C,["prevent"]),style:o({left:_.value+"rpx",maxWidth:m.value-d+"rpx"})},null,8,["style"])])),_:1})])),_:1},512)}}},[["__scopeId","data-v-9fb232f4"]]),k=b({__name:"phonebumber",setup(a){const o=e(!1),r=()=>{m({url:`/pages/login/code?phonenumber=${x.value}`})};const x=e(""),b=e(!1),y=e=>{var a;console.log("????",e.detail.value),a=e.detail.value,/^\d{11}$/.test(a.toString())?(x.value=e.detail.value,b.value=!0):b.value=!1};return(e,a)=>{const m=i,x=c,k=f;return t(),l(x,{class:"login-container"},{default:n((()=>[s(x,{class:"title"},{default:n((()=>[s(m,{class:"title-imge",src:g}),s(x,{class:"title-font"},{default:n((()=>[s(x,{class:""},{default:n((()=>[v("您好,")])),_:1}),s(x,{class:""},{default:n((()=>[v("欢迎使用护理单元~")])),_:1})])),_:1})])),_:1}),s(m,{class:"photo-imge",src:w}),s(m,{class:"old-imge",src:_}),s(x,{class:"under-container"},{default:n((()=>[s(x,{class:"under-container-title"},{default:n((()=>[s(x,{class:"under-container-input"},{default:n((()=>[s(x,{class:"input-left"},{default:n((()=>[v("+86")])),_:1}),s(k,{type:"number",style:{width:"600rpx","font-size":"33rpx"},maxlength:"11",placeholder:"请输入绑定手机号",onInput:y})])),_:1})])),_:1}),s(x,{class:"button-blue",onClick:a[0]||(a[0]=e=>o.value=!0)},{default:n((()=>[v(" 滑块校验 ")])),_:1}),d(s(x,{class:"button-blue",onClick:r},{default:n((()=>[v(" 获得验证码 ")])),_:1},512),[[h,b.value]]),d(s(x,{class:"button-gray"},{default:n((()=>[v(" 获得验证码 ")])),_:1},512),[[h,!b.value]])])),_:1}),o.value?(t(),l(x,{key:0,class:"bg-mask",onClick:a[2]||(a[2]=e=>o.value=!1)},{default:n((()=>[s($,{onClick:a[1]||(a[1]=u((()=>{}),["stop"]))})])),_:1})):p("",!0)])),_:1})}}},[["__scopeId","data-v-a00813dc"]]);export{k as default};