| 1 |
- import{f as y,an as Ie,ao as Y,r as z,W as se,o as r,c as g,b as n,k as e,l as oe,ci as Ee,aX as Ve,q as C,au as ge,am as ne,m as b,w as l,a as p,n as L,cj as Me,y as $,Z as ye,t as B,ck as ee,H as A,I as ae,bK as Le,R as le,g as Re,p as J,e as Q,a2 as Ne,h as F,i as P,s as T,j as Z,d as S,E as I,P as E,cl as Te,cm as De,cn as Pe,Q as Oe,bM as Be,co as ve,cp as Ae,cq as ce,$ as U,a0 as G}from"./entry.ae0eac90.js";import{_ as R}from"./_plugin-vue_export-helper.c27b6911.js";import{_ as ie}from"./nuxt-link.23abffb7.js";import{g as qe}from"./util.8a34bab4.js";import{E as Fe,a as Ue,m as Ge,b as He,_ as We}from"./index.vue.517002ae.js";import{u as je}from"./asyncData.829e4700.js";import{f as ze}from"./news.fce18aa1.js";import{_ as Ke}from"./client-only.4ea322e7.js";import{u as q}from"./useLockFn.f7aed9c0.js";import{a as w,E as X}from"./index.0b9a7607.js";import{E as Ye}from"./index.c0bb7f30.js";import{E as Je}from"./index.2083c06d.js";import"./index.4b94ed3a.js";import"./index.37a58183.js";import"./isUndefined.aa0326a0.js";import"./isEqual.8f1b966f.js";import"./_getTag.e4404448.js";const Qe={class:"w-[250px] search"},Ze=y({__name:"search",setup(t){const o=Ie(),s=Y(),a=z(),i=()=>{if(!a.value)return ge.msgError("请输入关键词");o.push({path:"/information/search",query:{keywords:a.value}})};return se(s,u=>{u.path=="/information/search"?a.value=u.query.keywords:a.value=""},{immediate:!0}),(u,d)=>(r(),g("div",Qe,[n(e(C),{modelValue:e(a),"onUpdate:modelValue":d[0]||(d[0]=c=>oe(a)?a.value=c:null),modelModifiers:{trim:!0},placeholder:"请输入关键词","suffix-icon":e(Ee),onKeyup:Ve(i,["enter"])},null,8,["modelValue","suffix-icon","onKeyup"])]))}});const Xe=R(Ze,[["__scopeId","data-v-a5c2cedb"]]),et=["src"],tt=y({__name:"logo",setup(t){const o=ne();return(s,a)=>{const i=ie;return e(o).getWebsiteConfig.pc_logo?(r(),b(i,{key:0,class:"flex",to:"/"},{default:l(()=>[p("img",{src:e(o).getWebsiteConfig.pc_logo,class:"h-[26px]"},null,8,et)]),_:1})):L("",!0)}}}),st=[{name:"首页",path:"/"},{name:"资讯中心",path:"/information",component:"information"},{name:"微信小程序",path:"/mobile",component:"mobile"},{name:"管理后台",path:"/admin",component:"admin"},{name:"农机服务",path:"/nong",component:"nong"},{name:"飞防服务",path:"/fei",component:"fei"},{name:"烘干服务",path:"/gan",component:"gan"},{name:"供需信息",path:"/message",component:"message"},{name:"发布情况",path:"/condition",component:"condition"}],ot=[{module:"personal",hidden:!0,children:[{name:"个人中心",path:"/user",children:[{name:"个人信息",path:"info"}]},{name:"账户设置",path:"/account",children:[{name:"账户安全",path:"security"}]}]}];function xe(){const t=Me(()=>st,"$rhqQh4BJeQ"),o=Y(),s=$(()=>nt(o.meta.module)),a=$(()=>s.value.length);return{menu:t,sidebar:s,hasSidebar:a}}function nt(t){const o=[];for(ot.forEach(s=>o.push(s));o.length;){const s=o.shift();if(s.module&&s.module==t)return s.children;s.children&&s.children.forEach(a=>o.push(a))}return[]}const re=y({__name:"menu-item",props:{menuItem:{type:Object,default:()=>({})},routePath:{type:String,required:!0}},setup(t){const o=t,s=$(()=>!!(o.menuItem.children??[]).filter(u=>!(u!=null&&u.hidden)).length),a=i=>ee(i)?i:qe(`${o.routePath}/${i}`);return(i,u)=>{var m;const d=ie,c=ye("MenuItem",!0);return(m=t.menuItem)!=null&&m.hidden?L("",!0):(r(),g(A,{key:0},[e(s)?(r(),b(e(Ue),{key:1,index:t.routePath,"popper-offset":12},{title:l(()=>[p("span",null,B(t.menuItem.name),1)]),default:l(()=>[(r(!0),g(A,null,ae(t.menuItem.children,f=>(r(),b(c,{key:a(f.path),"menu-item":f,"route-path":a(f.path)},null,8,["menu-item","route-path"]))),128))]),_:1},8,["index"])):(r(),b(d,{key:0,to:t.routePath,class:"flex items-center w-full",custom:t.menuItem.type=="custom",external:e(ee)(t.routePath),target:e(ee)(t.routePath)?"_blank":""},{default:l(()=>[n(e(Fe),{class:"w-full",index:t.routePath},{title:l(()=>[p("span",null,B(t.menuItem.name),1)]),_:1},8,["index"])]),_:1},8,["to","custom","external","target"]))],64))}}}),at=y({__name:"index",props:{menu:{type:Array,default:()=>[]},...Ge},setup(t){return(o,s)=>(r(),b(e(He),Le({class:"menu"},o.$props,{ellipsis:!0}),{default:l(()=>[(r(!0),g(A,null,ae(t.menu,a=>(r(),g("div",{key:a.path},[le(o.$slots,"item",{item:a},()=>[n(re,{"menu-item":a,"route-path":a.path},null,8,["menu-item","route-path"])],!0)]))),128))]),_:3},16))}});const we=R(at,[["__scopeId","data-v-858b94a4"]]),lt={style:{display:"flex"}},it=y({__name:"information",props:{menuItem:{type:Object,default:()=>({})}},async setup(t){let o,s;const{data:a}=([o,s]=Re(()=>je(()=>ze(),"$W6AA6qpnyW")),o=await o,s(),o);return $(()=>a.value&&a.value.length),(i,u)=>(r(),g("div",null,[p("div",lt,[(r(!0),g(A,null,ae(e(a),d=>(r(),g("div",null,[n(re,{"menu-item":d,"route-path":"/information/default?cid="+d.id+"&&name="+d.name},null,8,["menu-item","route-path"])]))),256))])]))}}),rt={key:1},ut=y({__name:"navbar",setup(t){const o=Y(),s=$(()=>o.path),{menu:a}=xe();return(i,u)=>(r(),g("nav",null,[n(we,{class:"navbar",menu:e(a),"default-active":e(s),mode:"horizontal",style:{"background-color":"#007b44"}},{item:l(({item:d})=>[d.component?(r(),g("div",rt,[d.component=="information"?(r(),b(it,{key:0,"menu-item":d},null,8,["menu-item"])):L("",!0),d.component=="/supply"?(r(),b(We,{key:1,"menu-item":d},null,8,["menu-item"])):L("",!0)])):(r(),b(re,{key:0,"menu-item":d,"route-path":d.path},null,8,["menu-item","route-path"]))]),_:1},8,["menu","default-active"])]))}});const ct=R(ut,[["__scopeId","data-v-e65b5359"]]),dt=t=>(J("data-v-97df593d"),t=t(),Q(),t),mt={class:"layout-header text-white bg-primary"},pt={class:"header-contain"},_t=dt(()=>p("div",{class:"flex-1"},null,-1)),ft=y({__name:"index",setup(t){return(o,s)=>(r(),g("header",mt,[p("div",pt,[n(tt,{class:"flex-none mr-4"}),n(ct,{class:"w-[600px]"}),_t,n(Xe,{class:"mr-[40px] flex-none"})])]))}});const ht=R(ft,[["__scopeId","data-v-97df593d"]]),gt={class:"mx-auto w-[1200px] py-4"},yt={key:0,class:"mr-4 bg-white rounded-[8px] overflow-hidden"},vt=y({__name:"index",setup(t){const o=Y(),s=$(()=>o.meta.activeMenu??o.path),{sidebar:a,hasSidebar:i}=xe();return(u,d)=>(r(),g("main",gt,[e(a).length?(r(),g("div",yt,[n(we,{menu:e(a),"default-active":e(s),mode:"vertical"},null,8,["menu","default-active"])])):L("",!0),p("div",{class:Ne(["layout-page flex-1 min-w-0 rounded-[8px]",{"bg-body":e(i)}])},[le(u.$slots,"default")],2)]))}}),xt=y({__name:"index",setup(t){return ne(),(o,s)=>(r(),g("div"))}});var K=(t=>(t.LOGIN="YZMDL",t.BIND_MOBILE="BDSJHM",t.CHANGE_MOBILE="BGSJHM",t.FIND_PASSWORD="ZHDLMM",t))(K||{}),te=(t=>(t.SERVICE="service",t.PRIVACY="privacy",t))(te||{});const be=t=>(J("data-v-c41bfc18"),t=t(),Q(),t),wt={class:"login"},bt=be(()=>p("div",{class:"text-4xl"},"欢迎登录",-1)),kt={class:"flex"},$t={class:"flex-1"},St={class:"mb-[-15px] mx-[-40px] mt-[30px] bg-primary-light-9 rounded-b-md px-[15px] flex leading-10"},Ct={class:"flex-1"},It={class:"text-tx-secondary text-sm"},Et=["href"],Vt=["href"],Mt=be(()=>p("span",{class:"text-sm"},"注册账号",-1)),Lt=y({__name:"login",setup(t){const o=ne(),s=F(),{setPopupType:a,toggleShowPopup:i}=P(),u=z(!1),d=T(),c={account:[{required:!0,validator(V,h,O){if(h===""){O(new Error(m.scene==1?"请输入账号/手机号":"请输入手机号"));return}O()},trigger:["change","blur"]}],password:[{required:!0,message:"请输入密码",trigger:["change","blur"]}],code:[{required:!0,message:"请输入验证码",trigger:["change","blur"]}]},m=Z({code:"",account:"",password:"",scene:0}),f=$(()=>m.scene==1),v=$(()=>m.scene==2),D=V=>{var h;return(h=o.getLoginConfig.login_way)==null?void 0:h.includes(String(V))};$(()=>o.getLoginConfig.wechat_auth);const x=$(()=>o.getLoginConfig.login_agreement==1);$(()=>o.getLoginConfig.third_auth==1);const _=$(()=>o.getLoginConfig.coerce_mobile==1),N=()=>{m.scene==1?m.scene=2:m.scene=1};T();const k=async()=>{var h;await((h=d.value)==null?void 0:h.validate());const V=await Te(m);if(_.value&&!V.mobile){s.temToken=V.token,a(E.BIND_MOBILE);return}s.login(V.token),await s.getUser(),i(!1)},{lockFn:$e,isLock:Se}=q(k),ue=async()=>{u.value||(await ge.confirm("确认已阅读并同意《服务协议》和《隐私政策》"),u.value=!0)},Ce=async()=>{await ue(),await $e()};return q(async()=>{await ue();const{url:V}=await De();window.location.href=V}),se(()=>o.getLoginConfig,V=>{const{login_way:h}=V;h&&h.length&&(m.scene=h.at(0))},{immediate:!0}),(V,h)=>{const O=ie;return r(),g("div",wt,[bt,n(e(X),{ref_key:"formRef",ref:d,class:"mt-[35px]",size:"large",model:e(m),rules:c},{default:l(()=>[e(f)&&D(1)?(r(),g(A,{key:0},[n(e(w),{prop:"account"},{default:l(()=>[n(e(C),{modelValue:e(m).account,"onUpdate:modelValue":h[0]||(h[0]=M=>e(m).account=M),placeholder:"请输入账号/手机号"},null,8,["modelValue"])]),_:1}),n(e(w),{prop:"password"},{default:l(()=>[n(e(C),{modelValue:e(m).password,"onUpdate:modelValue":h[1]||(h[1]=M=>e(m).password=M),type:"password","show-password":"",placeholder:"请输入密码"},null,8,["modelValue"])]),_:1})],64)):L("",!0),p("div",kt,[p("div",$t,[e(v)&&D(1)?(r(),b(e(I),{key:0,type:"primary",link:"",onClick:N},{default:l(()=>[S(" 账号密码登录 ")]),_:1})):L("",!0)]),e(f)?(r(),b(e(I),{key:0,link:"",onClick:h[2]||(h[2]=M=>e(a)(e(E).FORGOT_PWD))},{default:l(()=>[S(" 忘记密码? ")]),_:1})):L("",!0)]),n(e(w),{class:"mt-[30px]"},{default:l(()=>[n(e(I),{class:"w-full bgSty",type:"primary",loading:e(Se),onClick:Ce},{default:l(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),p("div",St,[p("div",Ct,[e(x)?(r(),b(e(Ye),{key:0,modelValue:e(u),"onUpdate:modelValue":h[3]||(h[3]=M=>oe(u)?u.value=M:null)},{default:l(()=>[p("span",It,[S(" 已阅读并同意 "),n(O,{to:`/policy/${e(te).SERVICE}`,custom:""},{default:l(({href:M})=>[p("a",{class:"text-tx-primary",href:M,target:"_blank"}," 《服务协议》 ",8,Et)]),_:1},8,["to"]),S(" 和 "),n(O,{class:"text-tx-primary",to:`/policy/${e(te).PRIVACY}`,custom:""},{default:l(({href:M})=>[p("a",{class:"text-tx-primary",href:M,target:"_blank"}," 《隐私政策》 ",8,Vt)]),_:1},8,["to"])])]),_:1},8,["modelValue"])):L("",!0)]),p("div",null,[n(e(I),{link:"",type:"primary",onClick:h[4]||(h[4]=M=>e(a)(e(E).REGISTER))},{default:l(()=>[Mt]),_:1})])])]),_:1},8,["model"])])}}});const Rt=R(Lt,[["__scopeId","data-v-c41bfc18"]]),Nt=t=>(J("data-v-e840ea32"),t=t(),Q(),t),Tt={class:"login"},Dt={class:"flex justify-between"},Pt=Nt(()=>p("span",{class:"text-4xl"},"注册账号",-1)),Ot=y({__name:"register",setup(t){const{setPopupType:o}=P(),s=T(),a={account:[{required:!0,message:"请输入创建的账号",trigger:["change","blur"]},{min:3,max:12,message:"账号长度应为3-12",trigger:["change","blur"]}],password:[{required:!0,message:"请输入6-20位数字+字母或符号组合",trigger:["change","blur"]},{min:6,max:20,message:"密码长度应为6-20",trigger:["change","blur"]}],password_confirm:[{validator(m,f,v){f===""?v(new Error("请再次输入密码")):f!==i.password?v(new Error("两次输入的密码不一致")):v()},trigger:["change","blur"]}]},i=Z({account:"",password:"",password_confirm:""}),u=async()=>{var m;await((m=s.value)==null?void 0:m.validate()),await Pe(i),o(E.LOGIN)},{lockFn:d,isLock:c}=q(u);return(m,f)=>(r(),g("div",Tt,[p("div",Dt,[Pt,n(e(I),{type:"primary",link:"",onClick:f[0]||(f[0]=v=>e(o)(e(E).LOGIN))},{default:l(()=>[S(" 返回登录 ")]),_:1})]),n(e(X),{ref_key:"formRef",ref:s,class:"mt-[35px]",size:"large",model:e(i),rules:a},{default:l(()=>[n(e(w),{prop:"account"},{default:l(()=>[n(e(C),{modelValue:e(i).account,"onUpdate:modelValue":f[1]||(f[1]=v=>e(i).account=v),placeholder:"请输入创建的账号"},null,8,["modelValue"])]),_:1}),n(e(w),{prop:"password"},{default:l(()=>[n(e(C),{modelValue:e(i).password,"onUpdate:modelValue":f[2]||(f[2]=v=>e(i).password=v),type:"password","show-password":"",placeholder:"请输入6-20位数字+字母或符号组合"},null,8,["modelValue"])]),_:1}),n(e(w),{prop:"password_confirm"},{default:l(()=>[n(e(C),{modelValue:e(i).password_confirm,"onUpdate:modelValue":f[3]||(f[3]=v=>e(i).password_confirm=v),type:"password","show-password":"",placeholder:"请再次输入密码"},null,8,["modelValue"])]),_:1}),n(e(w),{class:"mt-[60px]"},{default:l(()=>[n(e(I),{class:"w-full bgSty",type:"primary",loading:e(c),onClick:e(d)},{default:l(()=>[S(" 注册 ")]),_:1},8,["loading","onClick"])]),_:1})]),_:1},8,["model"])]))}});const Bt=R(Ot,[["__scopeId","data-v-e840ea32"]]);/*! vue-countdown v2.1.1 | (c) 2018-present Chen Fengyuan | MIT */const H=1e3,W=60*H,j=60*W,de=24*j,me="abort",pe="end",_e="progress",fe="start",he="visibilitychange";var At=y({name:"VueCountdown",props:{autoStart:{type:Boolean,default:!0},emitEvents:{type:Boolean,default:!0},interval:{type:Number,default:1e3,validator:t=>t>=0},now:{type:Function,default:()=>Date.now()},tag:{type:String,default:"span"},time:{type:Number,default:0,validator:t=>t>=0},transform:{type:Function,default:t=>t}},emits:[me,pe,_e,fe],data(){return{counting:!1,endTime:0,totalMilliseconds:0,requestId:0}},computed:{days(){return Math.floor(this.totalMilliseconds/de)},hours(){return Math.floor(this.totalMilliseconds%de/j)},minutes(){return Math.floor(this.totalMilliseconds%j/W)},seconds(){return Math.floor(this.totalMilliseconds%W/H)},milliseconds(){return Math.floor(this.totalMilliseconds%H)},totalDays(){return this.days},totalHours(){return Math.floor(this.totalMilliseconds/j)},totalMinutes(){return Math.floor(this.totalMilliseconds/W)},totalSeconds(){return Math.floor(this.totalMilliseconds/H)}},watch:{$props:{deep:!0,immediate:!0,handler(){this.totalMilliseconds=this.time,this.endTime=this.now()+this.time,this.autoStart&&this.start()}}},mounted(){document.addEventListener(he,this.handleVisibilityChange)},beforeUnmount(){document.removeEventListener(he,this.handleVisibilityChange),this.pause()},methods:{start(){this.counting||(this.counting=!0,this.emitEvents&&this.$emit(fe),document.visibilityState==="visible"&&this.continue())},continue(){if(!this.counting)return;const t=Math.min(this.totalMilliseconds,this.interval);if(t>0){let o,s;const a=i=>{o||(o=i),s||(s=i);const u=i-o;u>=t||u+(i-s)/2>=t?this.progress():this.requestId=requestAnimationFrame(a),s=i};this.requestId=requestAnimationFrame(a)}else this.end()},pause(){cancelAnimationFrame(this.requestId)},progress(){this.counting&&(this.update(),this.emitEvents&&this.totalMilliseconds>0&&this.$emit(_e,{days:this.days,hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds,totalDays:this.totalDays,totalHours:this.totalHours,totalMinutes:this.totalMinutes,totalSeconds:this.totalSeconds,totalMilliseconds:this.totalMilliseconds}),this.continue())},abort(){this.counting&&(this.pause(),this.counting=!1,this.emitEvents&&this.$emit(me))},end(){this.counting&&(this.pause(),this.totalMilliseconds=0,this.counting=!1,this.emitEvents&&this.$emit(pe))},update(){this.counting&&(this.totalMilliseconds=Math.max(0,this.endTime-this.now()))},restart(){this.pause(),this.totalMilliseconds=this.time,this.endTime=this.now()+this.time,this.counting=!1,this.start()},handleVisibilityChange(){switch(document.visibilityState){case"visible":this.update(),this.continue();break;case"hidden":this.pause();break}}},render(){return Oe(this.tag,this.$slots.default?[this.$slots.default(this.transform({days:this.days,hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds,totalDays:this.totalDays,totalHours:this.totalHours,totalMinutes:this.totalMinutes,totalSeconds:this.totalSeconds,totalMilliseconds:this.totalMilliseconds}))]:void 0)}});const qt=y({components:{VueCountdown:At,ElButton:I},props:{seconds:{type:Number,default:60},startText:{type:String,default:"获取验证码"},changeText:{type:String,default:"x秒重新获取"},endText:{type:String,default:"重新获取"}},emits:["click-get"],setup(t,{emit:o}){const s=z(!1),a=z(!1),i=async()=>{s.value=!0},u=m=>t.changeText.replace("x",m),d=()=>{s.value=!1,a.value=!0},c=Be(()=>{o("click-get")},1e3,!1);return{getChangeText:u,isStart:s,start:i,isRetry:a,handleEnd:d,handlStart:c}}});function Ft(t,o,s,a,i,u){const d=I,c=ye("VueCountdown");return t.isStart?(r(),b(c,{key:1,ref:"vueCountdownRef",time:t.seconds*1e3,onEnd:t.handleEnd},{default:l(({totalSeconds:m})=>[S(B(t.getChangeText(m)),1)]),_:1},8,["time","onEnd"])):(r(),b(d,{key:0,onClick:t.handlStart,link:""},{default:l(()=>[S(B(t.isRetry?t.endText:t.startText),1)]),_:1},8,["onClick"]))}const ke=R(qt,[["render",Ft]]),Ut=t=>(J("data-v-c45613f6"),t=t(),Q(),t),Gt={class:"login"},Ht={class:"flex justify-between"},Wt=Ut(()=>p("span",{class:"text-4xl"},"忘记登录密码",-1)),jt={class:"flex justify-center leading-5 w-[90px] pl-2.5 border-l border-br"},zt=y({__name:"forgot-pwd",setup(t){const o=F(),{setPopupType:s,toggleShowPopup:a}=P(),i=T(),u=T(),d={mobile:[{required:!0,message:"请输入手机号码",trigger:["change","blur"]},{min:3,max:12,message:"账号长度应为3-12",trigger:["change","blur"]}],code:[{required:!0,message:"请输入验证码",trigger:["change","blur"]}],password:[{required:!0,message:"请输入6-20位数字+字母或符号组合",trigger:["change","blur"]},{min:6,max:20,message:"密码长度应为6-20",trigger:["change","blur"]}],password_confirm:[{validator(x,_,N){_===""?N(new Error("请再次输入密码")):_!==c.password?N(new Error("两次输入的密码不一致")):N()},trigger:["change","blur"]}]},c=Z({mobile:"",password:"",code:"",password_confirm:""}),m=async()=>{var x,_;await((x=i.value)==null?void 0:x.validateField(["mobile"])),await ve({scene:K.FIND_PASSWORD,mobile:c.mobile}),(_=u.value)==null||_.start()},f=async()=>{var x;await((x=i.value)==null?void 0:x.validate()),await Ae(c),o.logout(),s(E.LOGIN)},{lockFn:v,isLock:D}=q(f);return(x,_)=>{const N=ke;return r(),g("div",Gt,[p("div",Ht,[Wt,e(o).isLogin?L("",!0):(r(),b(e(I),{key:0,type:"primary",link:"",onClick:_[0]||(_[0]=k=>e(s)(e(E).LOGIN))},{default:l(()=>[S(" 返回登录 ")]),_:1}))]),n(e(X),{ref_key:"formRef",ref:i,class:"mt-[35px]",size:"large",model:e(c),rules:d},{default:l(()=>[n(e(w),{prop:"mobile"},{default:l(()=>[n(e(C),{modelValue:e(c).mobile,"onUpdate:modelValue":_[1]||(_[1]=k=>e(c).mobile=k),placeholder:"请输入手机号码"},null,8,["modelValue"])]),_:1}),n(e(w),{prop:"code"},{default:l(()=>[n(e(C),{modelValue:e(c).code,"onUpdate:modelValue":_[2]||(_[2]=k=>e(c).code=k),placeholder:"请输入验证码"},{suffix:l(()=>[p("div",jt,[n(N,{ref_key:"verificationCodeRef",ref:u,onClickGet:m},null,512)])]),_:1},8,["modelValue"])]),_:1}),n(e(w),{prop:"password"},{default:l(()=>[n(e(C),{modelValue:e(c).password,"onUpdate:modelValue":_[3]||(_[3]=k=>e(c).password=k),placeholder:"请输入6-20位数字+字母或符号组合",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),n(e(w),{prop:"password_confirm"},{default:l(()=>[n(e(C),{modelValue:e(c).password_confirm,"onUpdate:modelValue":_[4]||(_[4]=k=>e(c).password_confirm=k),placeholder:"请再次输入密码",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),n(e(w),{class:"mt-[60px]"},{default:l(()=>[n(e(I),{class:"w-full bgSty",type:"primary",onClick:e(v),loading:e(D)},{default:l(()=>[S(" 确认 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"])])}}});const Kt=R(zt,[["__scopeId","data-v-c45613f6"]]),Yt={class:"login"},Jt={class:"flex justify-between"},Qt={class:"text-4xl"},Zt={class:"flex justify-center leading-5 w-[90px] pl-2.5 border-l border-br"},Xt=y({__name:"bind-mobile",setup(t){const{toggleShowPopup:o}=P(),s=F(),a=T(),i=T(),u={mobile:[{required:!0,message:"请输入手机号码",trigger:["change","blur"]}],code:[{required:!0,message:"请输入验证码",trigger:["change","blur"]}]},d=$(()=>!!s.userInfo.mobile),c=Z({type:d.value?"change":"bind",mobile:"",code:""}),m=async()=>{var x,_;await((x=a.value)==null?void 0:x.validateField(["mobile"])),await ve({scene:d.value?K.CHANGE_MOBILE:K.BIND_MOBILE,mobile:c.mobile}),(_=i.value)==null||_.start()},f=async()=>{var x;await((x=a.value)==null?void 0:x.validate()),s.isLogin?await ce(c):(await ce(c,{token:s.temToken}),s.login(s.temToken),await s.getUser()),o(!1)},{lockFn:v,isLock:D}=q(f);return(x,_)=>{const N=ke;return r(),g("div",Yt,[p("div",Jt,[p("span",Qt,B(e(d)?"更换手机号":"绑定手机号"),1)]),n(e(X),{ref_key:"formRef",ref:a,class:"mt-[35px]",size:"large",model:e(c),rules:u},{default:l(()=>[n(e(w),{prop:"mobile"},{default:l(()=>[n(e(C),{modelValue:e(c).mobile,"onUpdate:modelValue":_[0]||(_[0]=k=>e(c).mobile=k),placeholder:"请输入手机号码"},null,8,["modelValue"])]),_:1}),n(e(w),{prop:"code"},{default:l(()=>[n(e(C),{modelValue:e(c).code,"onUpdate:modelValue":_[1]||(_[1]=k=>e(c).code=k),placeholder:"请输入验证码"},{suffix:l(()=>[p("div",Zt,[n(N,{ref_key:"verificationCodeRef",ref:i,onClickGet:m},null,512)])]),_:1},8,["modelValue"])]),_:1}),n(e(w),{class:"mt-[60px]"},{default:l(()=>[n(e(I),{class:"w-full bgSty",type:"primary",onClick:e(v),loading:e(D)},{default:l(()=>[S(" 确认 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"])])}}});const es=R(Xt,[["__scopeId","data-v-4cfa35d7"]]),ts={key:0,class:"account"},ss={class:"px-5 text-tx-primary"},os=y({__name:"index",setup(t){const{popupType:o,showPopup:s}=P(),a=F();return se(s,i=>{i||(a.temToken=null)}),(i,u)=>{const d=Ke;return e(s)?(r(),g("div",ts,[n(d,null,{default:l(()=>[n(e(Je),{modelValue:e(s),"onUpdate:modelValue":u[0]||(u[0]=c=>oe(s)?s.value=c:null),width:400,"close-on-click-modal":!1},{default:l(()=>[p("div",ss,[U(n(Rt,null,null,512),[[G,e(o)==e(E).LOGIN]]),U(n(Bt,null,null,512),[[G,e(o)==e(E).REGISTER]]),U(n(Kt,null,null,512),[[G,e(o)==e(E).FORGOT_PWD]]),U(n(es,null,null,512),[[G,e(o)==e(E).BIND_MOBILE]])])]),_:1},8,["modelValue"])]),_:1})])):L("",!0)}}}),ns={class:"flex flex-col justify-center items-center"},as=p("div",{class:"text-tx-regular mb-4"},"您还未登录,请先登录",-1),ls=y({__name:"to-login",setup(t){const{setPopupType:o,toggleShowPopup:s}=P(),a=()=>{o(E.LOGIN),s(!0)};return(i,u)=>(r(),g("div",ns,[as,n(e(I),{onClick:a},{default:l(()=>[S("登录")]),_:1})]))}}),is={class:"layout-default min-w-[1200px]"},rs={class:"main-contain"},us=y({__name:"default",setup(t){const o=F();return(s,a)=>(r(),g("section",is,[n(ht),p("div",rs,[n(vt,{class:"flex-1 min-h-0 flex"},{default:l(()=>[e(o).isLogin||!s.$route.meta.auth?le(s.$slots,"default",{key:0},void 0,!0):(r(),b(ls,{key:1,class:"h-full"}))]),_:3}),n(xt)]),n(os)]))}});const Es=R(us,[["__scopeId","data-v-6913b1ba"]]);export{Es as default};
|