import{S as e,v as s,a as o}from"./vendor-DeXdhdID.js";import{_ as t}from"./vendor-Dbr4D_Oo.js";import{f as a,k as l,E as r}from"./souav-BTAG2baT.js";import{ag as n,d as i,a4 as p,a5 as c,v as d,ad as m,aW as x}from"./vendor-BXdGExd0.js";import{j as u,i as v}from"./vendor-BJZ6tUoe.js";import"./vendor-BCo6x5W8.js";import"./vendor-CDxkAdJH.js";import"./vendor-Cv8m7sE6.js";import"./vendor-bo_0oRCG.js";import"./vendor-CB_mu4eO.js";import"./vendor-Dos3PyFQ.js";import"./vendor-Dwl46Tfs.js";import"./vendor-DN37M9Hi.js";import"./vendor-BHR_E30J.js";import"./vendor-DzK633Zd.js";import"./vendor-CfyHAoLP.js";import"./vendor-Dm4oB1Pn.js";import"./vendor-DBhUxCDU.js";const f={class:"sticky top-0 z-50 flex items-center justify-center h-12 border-b border-[#1D1E22]"},j={class:"flex-1 overflow-y-auto pb-10"},h={class:"pt-[50px] pb-[69px] flex justify-center"},b=["src"],w={class:"px-8 flex flex-col items-center"},g=n({__name:"SignUp",emits:["ppw-close"],setup(n){const g=a(),y=i({phone:"",password:""}),C=e=>{var s;const o=e.target;"INPUT"!==o.tagName&&"BUTTON"!==o.tagName&&(null==(s=document.activeElement)||s.blur())},k=async()=>{if(!s(y.phone))return void u("请输入格式正确的手机号");if(!o(y.password))return void u("请输入格式正确的密码");const e=v({message:"注册中...",forbidClick:!0,duration:0});try{const e=await g.mobileLogin({mobile:y.phone,password:l.toMD5(y.password)}),{code:s,msg:o}=e;s==r.Success?u("注册成功"):u(o)}catch(t){u("注册失败")}finally{e.close()}},V=()=>{},U=()=>{};return(s,o)=>(x(),p("div",{class:"min-h-dvh bg-[#0E0F12] flex flex-col",onClick:C},[c("header",f,[c("button",{onClick:o[0]||(o[0]=e=>s.$emit("ppw-close")),class:"absolute left-4 p-2 -ml-2 text-white"},[...o[3]||(o[3]=[c("i",{class:"icon-sprite icon-back"},null,-1)])]),o[4]||(o[4]=c("h1",{class:"text-lg font-medium text-white"},"注册帐号",-1))]),c("main",j,[c("div",h,[c("img",{src:d(t),alt:"Logo",class:"w-[140px] h-[90px] object-contain"},null,8,b)]),c("div",w,[m(e,{modelValue:y.phone,"onUpdate:modelValue":o[1]||(o[1]=e=>y.phone=e),placeholder:"请输入手机号",type:"tel"},null,8,["modelValue"]),o[7]||(o[7]=c("div",{class:"h-[25px]"},null,-1)),m(e,{modelValue:y.password,"onUpdate:modelValue":o[2]||(o[2]=e=>y.password=e),placeholder:"请输入密码",type:"password"},null,8,["modelValue"]),o[8]||(o[8]=c("div",{class:"h-[3px]"},null,-1)),o[9]||(o[9]=c("div",{class:"text-[#DB2639] text-xs text-left w-full"}," 密码必须是8-16位英文字母、数字、字符组合（不能是纯数字） ",-1)),o[10]||(o[10]=c("div",{class:"h-[35px]"},null,-1)),c("button",{onClick:k,class:"w-[220px] h-[40px] rounded-[20px] bg-[#F2C94C] text-black text-[14px] font-bold flex items-center justify-center hover:opacity-90 active:scale-95 transition-all"}," 注册 "),o[11]||(o[11]=c("div",{class:"h-[23px]"},null,-1)),c("div",{class:"text-[12px] text-gray-500 text-center leading-relaxed"},[o[5]||(o[5]=c("span",null,"注册代表您已同意",-1)),c("span",{onClick:V,class:"text-[#F2C94C] cursor-pointer active:opacity-70 mx-1"}," 《用户协议》 "),o[6]||(o[6]=c("span",null,"和",-1)),c("span",{onClick:U,class:"text-[#F2C94C] cursor-pointer active:opacity-70 mx-1"}," 《隐私政策》 ")])])])]))}});export{g as default};
