import{d as e,r as a,z as s,K as o,o as l,P as t,U as i,g as n,f as d,h as r,w as c,i as p,j as u,l as m,C as g,u as h,k as f,m as w,T as x,c as _,s as y,B as b,v,p as k,e as V,x as C,y as j}from"./index.19ce6006.js";import{_ as H}from"./right_rule.083b6d28.js";import{_ as P}from"./favicon.a72fb3d2.js";import{_ as z}from"./plugin-vue_export-helper.21dcd24c.js";var F=z(e({setup(e){const z=a({docmHeight:document.documentElement.clientHeight,showHeight:document.documentElement.clientHeight,hideshow:!0,params:{phone:"",pwd:""},showPwd:!1,focus:"",read:!1,store:!1,loading:{login:!1},redirect:void 0,switch:{store:!1}}),F=s((()=>!(!z.params.phone||!z.params.pwd)));function U(){z.read?z.loading.login||(z.loading.login=!0,_.login({mobilePhone:z.params.phone,password:z.params.pwd}).then((e=>{y("login",{store:z.store,phone:z.store?z.params.phone:"",pwd:z.store?z.params.pwd:""}),y("user",e),b({url:z.redirect||"/"})})).finally((()=>{z.loading.login=!1}))):x("请阅读并同意协议")}function E(){v({url:"/pages/my/technicalSupport?name=login"})}function B(e){z.focus=e}function G(e){e&&k({url:e})}function S(){z.showPwd=!z.showPwd}return o([()=>z.showHeight],((e,a)=>{z.docmHeight>z.showHeight?z.hideshow=!1:z.hideshow=!0})),l((()=>{window.onresize=()=>{z.showHeight=document.body.clientHeight};const e=t.getCurQuery();z.redirect=e.redirect,i("user");const a=n("login")||{};z.store=a.store||!1,z.params.phone=a.phone||"",z.params.pwd=a.pwd||""})),(e,a)=>{const s=V("van-icon"),o=C,l=V("van-image"),t=V("van-field"),i=j,n=V("van-button"),x=V("van-checkbox"),_=V("van-form");return d(),r(o,{class:"login-bg"},{default:c((()=>[p("img",{onClick:E,src:H,style:{position:"fixed",right:"0",top:"70%","z-index":"99"},alt:""}),u(o,{class:"pd-40"},{default:c((()=>[u(o,{class:"text-xxl pd-b-20 mg-l-10-m"},{default:c((()=>[u(s,{name:"arrow-left",onClick:a[0]||(a[0]=e=>G("/"))})])),_:1}),u(l,{width:"214rpx",src:"/static/img/dz/jyx-logo.png"}),u(o,{class:"text-xxl text-bold pd-v-45"},{default:c((()=>[m("你好，欢迎使用商城。")])),_:1}),u(_,{class:"transparent",onSubmit:U},{default:c((()=>[u(t,{class:g({"field-focus":"phone"==h(z).focus}),modelValue:h(z).params.phone,"onUpdate:modelValue":a[1]||(a[1]=e=>h(z).params.phone=e),placeholder:"请输入手机号",type:"digit",clearable:"",onFocus:a[2]||(a[2]=e=>B("phone")),onBlur:a[3]||(a[3]=e=>B("")),"clear-trigger":"always",name:"phone",autocomplete:"on"},{"left-icon":c((()=>[u(s,{"class-prefix":"icon",name:"shoujihao"})])),_:1},8,["class","modelValue"]),u(t,{class:g({"field-focus":"pwd"==h(z).focus}),modelValue:h(z).params.pwd,"onUpdate:modelValue":a[4]||(a[4]=e=>h(z).params.pwd=e),clearable:"",autocomplete:"off","clear-trigger":"always",placeholder:"请输入密码",type:h(z).showPwd?"text":"password",onFocus:a[5]||(a[5]=e=>B("pwd")),onBlur:a[6]||(a[6]=e=>B(""))},{"left-icon":c((()=>[u(s,{"class-prefix":"icon",name:"mima"})])),"right-icon":c((()=>[u(s,{class:"mg-l-30","class-prefix":"icon",name:h(z).showPwd?"xianshimima":"yincangmima",onClick:S},null,8,["name"])])),_:1},8,["class","modelValue","type"]),u(o,{class:"justify-between pd-t-40 text-ss text-darkGray"},{default:c((()=>[u(o,{class:""},{default:c((()=>[m(" 还没有账号? 立即 "),u(i,{class:"text-orange",onClick:a[7]||(a[7]=e=>G("/pages/login/register"))},{default:c((()=>[m("注册")])),_:1})])),_:1}),u(o,{class:"",onClick:a[8]||(a[8]=e=>G("/pages/login/forget?phone="+h(z).params.phone))},{default:c((()=>[m("忘记密码?")])),_:1})])),_:1}),p("div",{class:"pd-v-50"},[u(n,{disabled:!h(F),"native-type":"submit",class:"text-l",loading:h(z).loading.login,color:h(F)?"linear-gradient(315deg, #FE521F 0%, #FE7902 100%)":"#cccccc",round:"",block:""},{default:c((()=>[m(" 登录 ")])),_:1},8,["disabled","loading","color"])]),u(o,{class:"justify-between text-ss"},{default:c((()=>[u(x,{class:"","icon-size":"17px",modelValue:h(z).read,"onUpdate:modelValue":a[11]||(a[11]=e=>h(z).read=e)},{default:c((()=>[u(o,{class:"text-darkGray"},{default:c((()=>[m(" 阅读并同意 "),u(i,{class:"text-orange",onClick:a[9]||(a[9]=e=>G("/pages/login/policy"))},{default:c((()=>[m("《隐私协议》")])),_:1}),m(" 和 "),u(i,{class:"text-orange",onClick:a[10]||(a[10]=e=>G("/pages/login/service"))},{default:c((()=>[m("《服务协议》")])),_:1})])),_:1})])),_:1},8,["modelValue"]),h(z).switch.store?(d(),r(x,{key:0,class:"scale-9 scale-rt","icon-size":"17px",modelValue:h(z).store,"onUpdate:modelValue":a[12]||(a[12]=e=>h(z).store=e)},{default:c((()=>[u(i,{class:"text-darkGray"},{default:c((()=>[m("记住密码")])),_:1})])),_:1},8,["modelValue"])):f("v-if",!0)])),_:1})])),_:1}),h(z).hideshow?(d(),w("div",{key:0,style:{"text-align":"center",position:"absolute",bottom:"10px",width:"100%",left:"0"},onClick:E},[p("img",{style:{width:"20px",height:"20px","vertical-align":"sub","margin-right":"10px"},src:P,alt:""}),p("span",{style:{color:"#666666"}},"提供技术支持")])):f("v-if",!0)])),_:1})])),_:1})}}}),[["__scopeId","data-v-3e966f04"]]);export{F as default};
