Files
hnxdcount-uniapp/unpackage/dist/build/web/assets/pages-login-register.Cl1oozsz.js
PC-202306242200\Administrator dac42e3b0c first commit
2026-03-28 23:09:02 +08:00

2 lines
10 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{d as e,m as t,a,K as l,b as o,c as i,L as s,M as n,p as r,o as c,g as d,w as h,q as p,n as u,N as b,h as m,r as f,s as C,t as g,j as k,z as x,D as _,l as y,E as D,O as S,u as z,y as v,P as w,G as V,J as B,Q as P,R as j}from"./index-BycOfjPK.js";import{_ as A}from"./u-icon.Bn8ZYdhI.js";import{_ as I,r as N,c as H,s as L,d as R}from"./api.Cc9YjI0f.js";import{_ as U,a as $}from"./logoB.D1yH5YI-.js";import{_ as E}from"./u-input.BXN8t6Qx.js";import{_ as O}from"./u-code.DqKoqWLQ.js";import{_ as q}from"./logo.CdEtXfNd.js";const G=I({name:"u-checkbox",mixins:[t,a,{props:{name:{type:[String,Number,Boolean],default:()=>e.checkbox.name},shape:{type:String,default:()=>e.checkbox.shape},size:{type:[String,Number],default:()=>e.checkbox.size},checked:{type:Boolean,default:()=>e.checkbox.checked},disabled:{type:[String,Boolean],default:()=>e.checkbox.disabled},activeColor:{type:String,default:()=>e.checkbox.activeColor},inactiveColor:{type:String,default:()=>e.checkbox.inactiveColor},iconSize:{type:[String,Number],default:()=>e.checkbox.iconSize},iconColor:{type:String,default:()=>e.checkbox.iconColor},label:{type:[String,Number],default:()=>e.checkbox.label},labelSize:{type:[String,Number],default:()=>e.checkbox.labelSize},labelColor:{type:String,default:()=>e.checkbox.labelColor},labelDisabled:{type:[String,Boolean],default:()=>e.checkbox.labelDisabled},usedAlone:{type:[Boolean],default:()=>!1}}}],data:()=>({isChecked:!1,parentData:{iconSize:12,labelDisabled:null,disabled:null,shape:"square",activeColor:null,inactiveColor:null,size:18,modelValue:null,iconColor:null,placement:"row",borderBottom:!1,iconPlacement:"left"}}),computed:{elDisabled(){return""!==this.disabled?this.disabled:null!==this.parentData.disabled&&this.parentData.disabled},elLabelDisabled(){return""!==this.labelDisabled?this.labelDisabled:null!==this.parentData.labelDisabled&&this.parentData.labelDisabled},elSize(){return this.size?this.size:this.parentData.size?this.parentData.size:21},elIconSize(){return this.iconSize?this.iconSize:this.parentData.iconSize?this.parentData.iconSize:12},elActiveColor(){return this.activeColor?this.activeColor:this.parentData.activeColor?this.parentData.activeColor:"#2979ff"},elInactiveColor(){return this.inactiveColor?this.inactiveColor:this.parentData.inactiveColor?this.parentData.inactiveColor:"#c8c9cc"},elLabelColor(){return this.labelColor?this.labelColor:this.parentData.labelColor?this.parentData.labelColor:"#606266"},elShape(){return this.shape?this.shape:this.parentData.shape?this.parentData.shape:"circle"},elLabelSize(){return l(this.labelSize?this.labelSize:this.parentData.labelSize?this.parentData.labelSize:"15")},elIconColor(){const e=this.iconColor?this.iconColor:this.parentData.iconColor?this.parentData.iconColor:"#ffffff";return this.elDisabled?this.isChecked?this.elInactiveColor:"transparent":this.isChecked?e:"transparent"},iconClasses(){let e=[];return e.push("u-checkbox__icon-wrap--"+this.elShape),this.elDisabled&&e.push("u-checkbox__icon-wrap--disabled"),this.isChecked&&this.elDisabled&&e.push("u-checkbox__icon-wrap--disabled--checked"),e},iconWrapStyle(){const e={};return e.backgroundColor=this.isChecked&&!this.elDisabled?this.elActiveColor:"#ffffff",e.borderColor=this.isChecked&&!this.elDisabled?this.elActiveColor:this.elInactiveColor,e.width=l(this.elSize),e.height=l(this.elSize),this.usedAlone||"right"===this.parentData.iconPlacement&&(e.marginRight=0),e},checkboxStyle(){const e={};return this.usedAlone||(this.parentData.borderBottom&&this.parentData.placement,this.parentData.borderBottom&&"column"===this.parentData.placement&&(e.paddingBottom="8px")),o(e,i(this.customStyle))}},mounted(){this.init()},emits:["change"],methods:{init(){this.usedAlone||(this.updateParentData(),this.parent);const e=this.parentData.modelValue;this.checked?this.isChecked=!0:!this.usedAlone&&s.array(e)&&(this.isChecked=e.some((e=>e===this.name)))},updateParentData(){this.getParentData("u-checkbox-group")},wrapperClickHandler(e){(this.usedAlone||"right"===this.parentData.iconPlacement)&&this.iconClickHandler(e)},iconClickHandler(e){this.preventEvent(e),this.elDisabled||this.setRadioCheckedStatus()},labelClickHandler(e){this.preventEvent(e),this.elLabelDisabled||this.elDisabled||this.setRadioCheckedStatus()},emitEvent(){this.$emit("change",this.isChecked),this.$nextTick((()=>{n(this,"change")}))},setRadioCheckedStatus(){this.isChecked=!this.isChecked,this.emitEvent(),this.usedAlone||"function"==typeof this.parent.unCheckedOther&&this.parent.unCheckedOther(this)}},watch:{checked(){this.isChecked=this.checked}}},[["render",function(e,t,a,l,o,i){const s=N(r("u-icon"),A),n=k,_=x;return c(),d(n,{class:u(["u-checkbox cursor-pointer",[`u-checkbox-label--${o.parentData.iconPlacement}`,o.parentData.borderBottom&&"column"===o.parentData.placement&&"u-border-bottom"]]),style:m([i.checkboxStyle]),onClick:b(i.wrapperClickHandler,["stop"])},{default:h((()=>[p(n,{class:u(["u-checkbox__icon-wrap cursor-pointer",i.iconClasses]),onClick:b(i.iconClickHandler,["stop"]),style:m([i.iconWrapStyle])},{default:h((()=>[f(e.$slots,"icon",{},(()=>[p(s,{class:"u-checkbox__icon-wrap__icon",name:"checkbox-mark",size:i.elIconSize,color:i.elIconColor},null,8,["size","color"])]),!0)])),_:3},8,["onClick","class","style"]),p(_,{onClick:b(i.labelClickHandler,["stop"]),style:m({color:i.elDisabled?i.elInactiveColor:i.elLabelColor,fontSize:i.elLabelSize,lineHeight:i.elLabelSize})},{default:h((()=>[C(g(e.label),1)])),_:1},8,["onClick","style"])])),_:3},8,["style","onClick","class"])}],["__scopeId","data-v-1b94749c"]]),T=I({__name:"register",setup(e){const t=_().statusBarHeight+"px";let a=y(""),l=y(null);y("");let o=D({userName:"",passwd:"",shareCode:"",phone:"",platform:1,smsCode:"",confirmPasswd:""}),i=y(!1);H((()=>{const e=S("invite_code");e&&(o.shareCode=e)}));let s=e=>{i.value=e},n=()=>{V()},u=e=>{a.value=e},b=()=>{if(!o.phone)return B({title:"请输入手机号",icon:"none"});l.value.canGetCode?(P({title:"正在获取验证码"}),L({phone:o.phone}).then((e=>{j(),uni.$u.toast("验证码已发送"),l.value.start()}))):uni.$u.toast("倒计时结束后再发送")},f=async()=>i.value?o.userName?o.phone?11!=o.phone.length?B({title:"请输入正确的手机号",icon:"none"}):o.smsCode?o.shareCode?o.passwd?o.confirmPasswd?o.passwd!=o.confirmPasswd?B({title:"两次密码输入不一致",icon:"none"}):(await R(o),B({title:"注册成功",icon:"none"}),void setTimeout((()=>{V()}),200)):B({title:"请再次输入密码",icon:"none"}):B({title:"请输入密码",icon:"none"}):B({title:"请输入邀请码",icon:"none"}):B({title:"请输入验证码",icon:"none"}):B({title:"请输入手机号",icon:"none"}):B({title:"请输入用户名",icon:"none"}):B({title:"请先阅读并勾选隐私政策和用户注册服务协议",icon:"none"}),I=()=>{V()};return(e,i)=>{const _=k,y=N(r("up-icon"),A),D=v,S=N(r("statusBar"),U),V=N(r("up-input"),E),B=N(r("up-code"),O),P=x,j=N(r("up-checkbox"),G),H=w;return c(),d(_,{class:"login"},{default:h((()=>[p(_,{class:"orderdetail_header p30"},{default:h((()=>[p(_,{style:m({height:t})},null,8,["style"]),p(_,{style:{height:"44px",display:"flex","align-items":"center"}},{default:h((()=>[p(y,{name:"arrow-left",bold:"",color:"#000",onClick:z(I)},null,8,["onClick"])])),_:1})])),_:1}),p(D,{class:"login_bei",src:$}),p(_,{style:{padding:"0 60rpx"}},{default:h((()=>[p(S),p(_,{class:"login_logo"},{default:h((()=>[p(D,{class:"login_logo_img",src:q}),p(_,{class:"login_logo_tit"},{default:h((()=>[C("欢迎来到星动能源")])),_:1})])),_:1}),p(_,{style:{"margin-top":"100rpx"}},{default:h((()=>[p(_,null,{default:h((()=>[p(V,{fontSize:"30rpx",modelValue:z(o).userName,"onUpdate:modelValue":i[0]||(i[0]=e=>z(o).userName=e),placeholder:"请输入您的用户名",border:"bottom",clearable:""},null,8,["modelValue"])])),_:1}),p(_,{style:{"font-size":"26rpx",color:"#ff9900",margin:"10rpx 0 10rpx","padding-left":"9px"}},{default:h((()=>[C("用户名由字母或数字组成长度6-32")])),_:1}),p(_,{style:{"margin-bottom":"30rpx"}},{default:h((()=>[p(V,{fontSize:"30rpx",modelValue:z(o).phone,"onUpdate:modelValue":i[1]||(i[1]=e=>z(o).phone=e),placeholder:"请输入您的手机号",border:"bottom",clearable:""},null,8,["modelValue"])])),_:1}),p(_,{style:{"margin-bottom":"30rpx",display:"flex","align-items":"center"}},{default:h((()=>[p(V,{fontSize:"30rpx",modelValue:z(o).smsCode,"onUpdate:modelValue":i[2]||(i[2]=e=>z(o).smsCode=e),placeholder:"请输入验证码",border:"bottom",clearable:""},null,8,["modelValue"]),p(B,{ref_key:"uCode",ref:l,onChange:z(u),"keep-running":"","start-text":"点我获取验证码"},null,8,["onChange"]),p(P,{onClick:z(b),text:z(a),style:{"font-size":"28rpx",color:"#4874e5"}},{default:h((()=>[C(g(z(a)),1)])),_:1},8,["onClick","text"])])),_:1}),p(_,{style:{"margin-bottom":"30rpx"}},{default:h((()=>[p(V,{fontSize:"30rpx",modelValue:z(o).shareCode,"onUpdate:modelValue":i[3]||(i[3]=e=>z(o).shareCode=e),placeholder:"请输入您的邀请码",border:"bottom",clearable:""},null,8,["modelValue"])])),_:1}),p(_,null,{default:h((()=>[p(V,{fontSize:"30rpx",modelValue:z(o).passwd,"onUpdate:modelValue":i[4]||(i[4]=e=>z(o).passwd=e),type:"password",placeholder:"请输入您的密码",border:"bottom",clearable:""},null,8,["modelValue"])])),_:1}),p(_,{style:{"font-size":"26rpx",color:"#ff9900",margin:"10rpx 0 10rpx","padding-left":"9px"}},{default:h((()=>[C("密码必须包含字母、数字长度8-32")])),_:1}),p(_,{style:{"margin-bottom":"30rpx"}},{default:h((()=>[p(V,{fontSize:"30rpx",modelValue:z(o).confirmPasswd,"onUpdate:modelValue":i[5]||(i[5]=e=>z(o).confirmPasswd=e),type:"password",placeholder:"请再次输入您的密码",border:"bottom",clearable:""},null,8,["modelValue"])])),_:1})])),_:1}),p(_,{style:{"font-size":"28rpx",color:"#666","margin-top":"20rpx"}},{default:h((()=>[C(" 已有账号? "),p(P,{style:{color:"#4874e5"},onClick:z(n)},{default:h((()=>[C("立即登录")])),_:1},8,["onClick"])])),_:1}),p(_,{style:{display:"flex","justify-content":"center","margin-top":"80rpx"}},{default:h((()=>[p(_,{class:"login_btn",onClick:z(f)},{default:h((()=>[C("注册")])),_:1},8,["onClick"])])),_:1})])),_:1}),p(_,{style:{display:"flex","flex-wrap":"wrap","justify-content":"center","margin-top":"20rpx","font-size":"26rpx","align-items":"center"}},{default:h((()=>[p(j,{onChange:z(s),customStyle:{marginRight:"15rpx",marginBotton:0}},null,8,["onChange"]),C(" 已阅读并同意 "),p(H,{url:"/pages/agreement/agreement?id=9",style:{color:"#4874e5"}},{default:h((()=>[C("《用户注册服务协议》")])),_:1}),C(" 和 "),p(H,{url:"/pages/agreement/agreement?id=10",style:{color:"#4874e5"}},{default:h((()=>[C("《隐私政策》")])),_:1})])),_:1}),p(_,{style:{height:"150rpx"}})])),_:1})}}},[["__scopeId","data-v-72154356"]]);export{T as default};