| 12 |
- import{_ as e,aa as i,ab as n,ac as s,p as o,n as t,r as a,a as l,o as u,c as p,w as r,i as d,g as c,j as g,k as m,F as h,q as f,u as y,m as b}from"./index-BAMs4g2N.js";import{_}from"./uni-id-pages-agreements.DtOmCYnd.js";import{_ as k}from"./uni-easyinput.BtmRbBVL.js";import{_ as w}from"./uni-id-pages-fab-login.1DAc7n54.js";import{m as x}from"./login-page.mixin.Co1wd1R5.js";import"./uni-popup-dialog.BbzARIyH.js";const L=e({mixins:[x],data:()=>({type:"",phone:"",focusPhone:!1,logo:"/static/logo.png"}),computed:{loginTypes:async()=>i.loginTypes,isPhone(){return/^1\d{10}$/.test(this.phone)},imgSrc(){return"weixin"==this.type?"/uni_modules/uni-id-pages/static/login/weixin.png":"/uni_modules/uni-id-pages/static/app-plus/apple.png"}},async onLoad(e){let s=e.type||i.loginTypes[0];this.type=s,"univerify"!=s&&(this.focusPhone=!0),this.$nextTick((()=>{["weixin","apple"].includes(s)&&(this.$refs.uniFabLogin.servicesList=this.$refs.uniFabLogin.servicesList.filter((e=>e.id!=s)))})),n("uni-id-pages-setLoginType",(e=>{this.type=e}))},onShow(){document.onkeydown=e=>{let i=e||window.event;i&&13==i.keyCode&&this.toSmsPage()}},onUnload(){s("uni-id-pages-setLoginType")},onReady(){},methods:{showCurrentWebview(){undefined.setStyle({top:0})},quickLogin(e){var i,n;let s={};(null==(i=e.detail)?void 0:i.code)&&(s.phoneNumberCode=e.detail.code),("weixinMobile"!==this.type||(null==(n=e.detail)?void 0:n.code))&&this.$refs.uniFabLogin.login_before(this.type,!0,s)},toSmsPage(){return this.isPhone?this.needAgreements&&!this.agree?this.$refs.agreements.popup(this.toSmsPage):void t({url:"/uni_modules/uni-id-pages/pages/login/login-smscode?phoneNumber="+this.phone}):(this.focusPhone=!0,o({title:"手机号码格式不正确",icon:"none",duration:3e3}))},toPwdLogin(){t({url:"../login/password"})},chooseArea(){o({title:"暂不支持其他国家",icon:"none",duration:3e3})}}},[["render",function(e,i,n,s,o,t){const x=f,L=d,P=y,v=b,C=a(l("uni-id-pages-agreements"),_),j=a(l("uni-easyinput"),k),S=a(l("uni-id-pages-fab-login"),w);return u(),p(L,{class:"uni-content"},{default:r((()=>[c(L,{class:"login-logo"},{default:r((()=>[c(x,{src:o.logo},null,8,["src"])])),_:1}),c(P,{class:"title"},{default:r((()=>[g("请选择登录方式")])),_:1}),["apple","weixin","weixinMobile"].includes(o.type)?(u(),m(h,{key:0},[c(P,{class:"tip"},{default:r((()=>[g("将根据第三方账号服务平台的授权范围获取你的信息")])),_:1}),c(L,{class:"quickLogin"},{default:r((()=>["weixinMobile"!==o.type?(u(),p(x,{key:0,onClick:t.quickLogin,src:t.imgSrc,mode:"widthFix",class:"quickLoginBtn"},null,8,["onClick","src"])):(u(),p(v,{key:1,type:"primary","open-type":"getPhoneNumber",onGetphonenumber:t.quickLogin,class:"uni-btn"},{default:r((()=>[g("微信授权手机号登录")])),_:1},8,["onGetphonenumber"])),c(C,{scope:"register",ref:"agreements"},null,512)])),_:1})],64)):(u(),m(h,{key:1},[c(P,{class:"tip"},{default:r((()=>[g("未注册的账号验证通过后将自动注册")])),_:1}),c(L,{class:"phone-box"},{default:r((()=>[c(L,{onClick:t.chooseArea,class:"area"},{default:r((()=>[g("+86")])),_:1},8,["onClick"]),c(j,{focus:o.focusPhone,onBlur:i[0]||(i[0]=e=>o.focusPhone=!1),class:"input-box",type:"number",inputBorder:!1,modelValue:o.phone,"onUpdate:modelValue":i[1]||(i[1]=e=>o.phone=e),maxlength:"11",placeholder:"请输入手机号"},null,8,["focus","modelValue"])])),_:1}),c(C,{scope:"register",ref:"agreements"},null,512),c(v,{class:"uni-btn",type:"primary",onClick:t.toSmsPage},{default:r((()=>[g("获取验证码")])),_:1},8,["onClick"])],64)),c(S,{ref:"uniFabLogin"},null,512)])),_:1})}],["__scopeId","data-v-55e888de"]]);export{L as default};
|