| 1 |
- import{_ as re}from"./nuxt-link.c437d508.js";import{aq as vt,ar as Ce,aa as D,_ as Q,f as E,r as x,O as B,y as $,S as he,cd as wt,bZ as le,k as t,W as ie,a9 as yt,R as q,Z as M,o as m,m as k,w as a,b as l,ce as bt,cf as It,aD as Ze,X as $t,E as A,B as Re,aW as Xe,N as Le,ac as Et,bw as Ct,be as kt,aR as St,c as I,b_ as Tt,bK as ee,a2 as ge,n as L,a5 as et,a as h,a1 as Rt,a3 as Se,H as te,cg as Lt,a4 as Mt,as as xt,at as tt,i as Z,h as oe,d as F,P as G,au as Me,bQ as Ft,an as Ot,ao as we,l as ye,ch as Nt,aX as Vt,q as U,am as be,ci as Dt,t as j,cj as ke,I as xe,g as Pt,p as Bt,e as At,s as J,j as Ie,ck as Gt,cl as Kt,cm as Ut,Q as qt,bM as Ht,cn as ot,co as zt,cp as Ke,$ as de,a0 as ce}from"./entry.32bca663.js";import{c as W,E as Wt,O as Yt,w as Ue}from"./index.8b7e1442.js";import{E as jt}from"./index.862a4486.js";import{c as Jt,E as Qt,d as Zt,a as nt,C as Xt,b as eo,e as to,f as oo,g as no,F as so,L as lo}from"./dropdown.998c21fe.js";import{c as ao,a as V,E as $e}from"./index.f4102e1b.js";import{c as st,E as lt}from"./index.c2ef993e.js";import{E as ro}from"./index.4f29d5ed.js";import{_ as ne}from"./_plugin-vue_export-helper.c27b6911.js";import{g as io,_ as uo}from"./index.vue.cace3977.js";import{E as at,a as co,m as po,b as mo,_ as fo}from"./index.vue.88748c3b.js";import{_ as Fe}from"./client-only.4bc740b3.js";import{u as _o}from"./asyncData.0d7e5235.js";import{f as ho}from"./news.fce18aa1.js";import{u as ae}from"./useLockFn.22d4fc16.js";import{E as go}from"./index.e967c3f2.js";import"./isUndefined.aa0326a0.js";import"./_getTag.1e4f6237.js";import"./index.52300c7b.js";const vo=vt({style:{type:Ce([String,Array,Object])},currentTabId:{type:Ce(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Ce(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:wo,ElCollectionItem:yo,COLLECTION_INJECTION_KEY:Oe,COLLECTION_ITEM_INJECTION_KEY:bo}=Jt("RovingFocusGroup"),Ne=Symbol("elRovingFocusGroup"),rt=Symbol("elRovingFocusGroupItem"),Io={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},$o=(e,o)=>{if(o!=="rtl")return e;switch(e){case D.right:return D.left;case D.left:return D.right;default:return e}},Eo=(e,o,s)=>{const n=$o(e.key,s);if(!(o==="vertical"&&[D.left,D.right].includes(n))&&!(o==="horizontal"&&[D.up,D.down].includes(n)))return Io[n]},Co=(e,o)=>e.map((s,n)=>e[(n+o)%e.length]),Ve=e=>{const{activeElement:o}=document;for(const s of e)if(s===o||(s.focus(),o!==document.activeElement))return},qe="currentTabIdChange",He="rovingFocusGroup.entryFocus",ko={bubbles:!1,cancelable:!0},So=E({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:vo,emits:[qe,"entryFocus"],setup(e,{emit:o}){var s;const n=x((s=e.currentTabId||e.defaultCurrentTabId)!=null?s:null),r=x(!1),c=x(!1),i=x(null),{getItems:u}=B(Oe,void 0),p=$(()=>[{outline:"none"},e.style]),_=f=>{o(qe,f)},g=()=>{r.value=!0},S=W(f=>{var T;(T=e.onMousedown)==null||T.call(e,f)},()=>{c.value=!0}),b=W(f=>{var T;(T=e.onFocus)==null||T.call(e,f)},f=>{const T=!t(c),{target:H,currentTarget:P}=f;if(H===P&&T&&!t(r)){const Y=new Event(He,ko);if(P==null||P.dispatchEvent(Y),!Y.defaultPrevented){const O=u().filter(K=>K.focusable),C=O.find(K=>K.active),w=O.find(K=>K.id===t(n)),R=[C,w,...O].filter(Boolean).map(K=>K.ref);Ve(R)}}c.value=!1}),d=W(f=>{var T;(T=e.onBlur)==null||T.call(e,f)},()=>{r.value=!1}),v=(...f)=>{o("entryFocus",...f)};he(Ne,{currentTabbedId:wt(n),loop:le(e,"loop"),tabIndex:$(()=>t(r)?-1:0),rovingFocusGroupRef:i,rovingFocusGroupRootStyle:p,orientation:le(e,"orientation"),dir:le(e,"dir"),onItemFocus:_,onItemShiftTab:g,onBlur:d,onFocus:b,onMousedown:S}),ie(()=>e.currentTabId,f=>{n.value=f??null}),yt(i,He,v)}});function To(e,o,s,n,r,c){return q(e.$slots,"default")}var Ro=Q(So,[["render",To],["__file","roving-focus-group-impl.vue"]]);const Lo=E({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:wo,ElRovingFocusGroupImpl:Ro}});function Mo(e,o,s,n,r,c){const i=M("el-roving-focus-group-impl"),u=M("el-focus-group-collection");return m(),k(u,null,{default:a(()=>[l(i,bt(It(e.$attrs)),{default:a(()=>[q(e.$slots,"default")]),_:3},16)]),_:3})}var xo=Q(Lo,[["render",Mo],["__file","roving-focus-group.vue"]]);const Fo=E({components:{ElRovingFocusCollectionItem:yo},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(e,{emit:o}){const{currentTabbedId:s,loop:n,onItemFocus:r,onItemShiftTab:c}=B(Ne,void 0),{getItems:i}=B(Oe,void 0),u=Ze(),p=x(null),_=W(d=>{o("mousedown",d)},d=>{e.focusable?r(t(u)):d.preventDefault()}),g=W(d=>{o("focus",d)},()=>{r(t(u))}),S=W(d=>{o("keydown",d)},d=>{const{key:v,shiftKey:f,target:T,currentTarget:H}=d;if(v===D.tab&&f){c();return}if(T!==H)return;const P=Eo(d);if(P){d.preventDefault();let O=i().filter(C=>C.focusable).map(C=>C.ref);switch(P){case"last":{O.reverse();break}case"prev":case"next":{P==="prev"&&O.reverse();const C=O.indexOf(H);O=n.value?Co(O,C+1):O.slice(C+1);break}}$t(()=>{Ve(O)})}}),b=$(()=>s.value===t(u));return he(rt,{rovingFocusGroupItemRef:p,tabIndex:$(()=>t(b)?0:-1),handleMousedown:_,handleFocus:g,handleKeydown:S}),{id:u,handleKeydown:S,handleFocus:g,handleMousedown:_}}});function Oo(e,o,s,n,r,c){const i=M("el-roving-focus-collection-item");return m(),k(i,{id:e.id,focusable:e.focusable,active:e.active},{default:a(()=>[q(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var No=Q(Fo,[["render",Oo],["__file","roving-focus-item.vue"]]);const Ee=Symbol("elDropdown"),{ButtonGroup:Vo}=A,Do=E({name:"ElDropdown",components:{ElButton:A,ElButtonGroup:Vo,ElScrollbar:jt,ElDropdownCollection:Qt,ElTooltip:Wt,ElRovingFocusGroup:xo,ElOnlyChild:Yt,ElIcon:Re,ArrowDown:Xe},props:Zt,emits:["visible-change","click","command"],setup(e,{emit:o}){const s=et(),n=Le("dropdown"),{t:r}=Et(),c=x(),i=x(),u=x(null),p=x(null),_=x(null),g=x(null),S=x(!1),b=[D.enter,D.space,D.down],d=$(()=>({maxHeight:Ct(e.maxHeight)})),v=$(()=>[n.m(C.value)]),f=$(()=>ao(e.trigger)),T=Ze().value,H=$(()=>e.id||T);ie([c,f],([y,z],[X])=>{var Be,Ae,Ge;(Be=X==null?void 0:X.$el)!=null&&Be.removeEventListener&&X.$el.removeEventListener("pointerenter",N),(Ae=y==null?void 0:y.$el)!=null&&Ae.removeEventListener&&y.$el.removeEventListener("pointerenter",N),(Ge=y==null?void 0:y.$el)!=null&&Ge.addEventListener&&z.includes("hover")&&y.$el.addEventListener("pointerenter",N)},{immediate:!0}),kt(()=>{var y,z;(z=(y=c.value)==null?void 0:y.$el)!=null&&z.removeEventListener&&c.value.$el.removeEventListener("pointerenter",N)});function P(){Y()}function Y(){var y;(y=u.value)==null||y.onClose()}function O(){var y;(y=u.value)==null||y.onOpen()}const C=St();function w(...y){o("command",...y)}function N(){var y,z;(z=(y=c.value)==null?void 0:y.$el)==null||z.focus()}function R(){}function K(){const y=t(p);f.value.includes("hover")&&(y==null||y.focus()),g.value=null}function Pe(y){g.value=y}function ue(y){S.value||(y.preventDefault(),y.stopImmediatePropagation())}function se(){o("visible-change",!0)}function ht(y){(y==null?void 0:y.type)==="keydown"&&p.value.focus()}function gt(){o("visible-change",!1)}return he(Ee,{contentRef:p,role:$(()=>e.role),triggerId:H,isUsingKeyboard:S,onItemEnter:R,onItemLeave:K}),he("elDropdown",{instance:s,dropdownSize:C,handleClick:P,commandHandler:w,trigger:le(e,"trigger"),hideOnClick:le(e,"hideOnClick")}),{t:r,ns:n,scrollbar:_,wrapStyle:d,dropdownTriggerKls:v,dropdownSize:C,triggerId:H,triggerKeys:b,currentTabId:g,handleCurrentTabIdChange:Pe,handlerMainButtonClick:y=>{o("click",y)},handleEntryFocus:ue,handleClose:Y,handleOpen:O,handleBeforeShowTooltip:se,handleShowTooltip:ht,handleBeforeHideTooltip:gt,onFocusAfterTrapped:y=>{var z,X;y.preventDefault(),(X=(z=p.value)==null?void 0:z.focus)==null||X.call(z,{preventScroll:!0})},popperRef:u,contentRef:p,triggeringElementRef:c,referenceElementRef:i}}});function Po(e,o,s,n,r,c){var i;const u=M("el-dropdown-collection"),p=M("el-roving-focus-group"),_=M("el-scrollbar"),g=M("el-only-child"),S=M("el-tooltip"),b=M("el-button"),d=M("arrow-down"),v=M("el-icon"),f=M("el-button-group");return m(),I("div",{class:ge([e.ns.b(),e.ns.is("disabled",e.disabled)])},[l(S,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(i=e.referenceElementRef)==null?void 0:i.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:"",onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},Tt({content:a(()=>[l(_,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:a(()=>[l(p,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:a(()=>[l(u,null,{default:a(()=>[q(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:a(()=>[l(g,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:a(()=>[q(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(m(),k(f,{key:0},{default:a(()=>[l(b,ee({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:a(()=>[q(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),l(b,ee({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:a(()=>[l(v,{class:ge(e.ns.e("icon"))},{default:a(()=>[l(d)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):L("v-if",!0)],2)}var Bo=Q(Do,[["render",Po],["__file","dropdown.vue"]]);const Ao=E({name:"DropdownItemImpl",components:{ElIcon:Re},props:nt,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:o}){const s=Le("dropdown"),{role:n}=B(Ee,void 0),{collectionItemRef:r}=B(Xt,void 0),{collectionItemRef:c}=B(bo,void 0),{rovingFocusGroupItemRef:i,tabIndex:u,handleFocus:p,handleKeydown:_,handleMousedown:g}=B(rt,void 0),S=st(r,c,i),b=$(()=>n.value==="menu"?"menuitem":n.value==="navigation"?"link":"button"),d=W(v=>{const{code:f}=v;if(f===D.enter||f===D.space)return v.preventDefault(),v.stopImmediatePropagation(),o("clickimpl",v),!0},_);return{ns:s,itemRef:S,dataset:{[eo]:""},role:b,tabIndex:u,handleFocus:p,handleKeydown:d,handleMousedown:g}}}),Go=["aria-disabled","tabindex","role"];function Ko(e,o,s,n,r,c){const i=M("el-icon");return m(),I(te,null,[e.divided?(m(),I("li",ee({key:0,role:"separator",class:e.ns.bem("menu","item","divided")},e.$attrs),null,16)):L("v-if",!0),h("li",ee({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:o[0]||(o[0]=u=>e.$emit("clickimpl",u)),onFocus:o[1]||(o[1]=(...u)=>e.handleFocus&&e.handleFocus(...u)),onKeydown:o[2]||(o[2]=Se((...u)=>e.handleKeydown&&e.handleKeydown(...u),["self"])),onMousedown:o[3]||(o[3]=(...u)=>e.handleMousedown&&e.handleMousedown(...u)),onPointermove:o[4]||(o[4]=u=>e.$emit("pointermove",u)),onPointerleave:o[5]||(o[5]=u=>e.$emit("pointerleave",u))}),[e.icon?(m(),k(i,{key:0},{default:a(()=>[(m(),k(Rt(e.icon)))]),_:1})):L("v-if",!0),q(e.$slots,"default")],16,Go)],64)}var Uo=Q(Ao,[["render",Ko],["__file","dropdown-item-impl.vue"]]);const it=()=>{const e=B("elDropdown",{}),o=$(()=>e==null?void 0:e.dropdownSize);return{elDropdown:e,_elDropdownSize:o}},qo=E({name:"ElDropdownItem",components:{ElDropdownCollectionItem:to,ElRovingFocusItem:No,ElDropdownItemImpl:Uo},inheritAttrs:!1,props:nt,emits:["pointermove","pointerleave","click"],setup(e,{emit:o,attrs:s}){const{elDropdown:n}=it(),r=et(),c=x(null),i=$(()=>{var d,v;return(v=(d=t(c))==null?void 0:d.textContent)!=null?v:""}),{onItemEnter:u,onItemLeave:p}=B(Ee,void 0),_=W(d=>(o("pointermove",d),d.defaultPrevented),Ue(d=>{if(e.disabled){p(d);return}const v=d.currentTarget;v===document.activeElement||v.contains(document.activeElement)||(u(d),d.defaultPrevented||v==null||v.focus())})),g=W(d=>(o("pointerleave",d),d.defaultPrevented),Ue(d=>{p(d)})),S=W(d=>{if(!e.disabled)return o("click",d),d.type!=="keydown"&&d.defaultPrevented},d=>{var v,f,T;if(e.disabled){d.stopImmediatePropagation();return}(v=n==null?void 0:n.hideOnClick)!=null&&v.value&&((f=n.handleClick)==null||f.call(n)),(T=n.commandHandler)==null||T.call(n,e.command,r,d)}),b=$(()=>({...e,...s}));return{handleClick:S,handlePointerMove:_,handlePointerLeave:g,textContent:i,propsAndAttrs:b}}});function Ho(e,o,s,n,r,c){var i;const u=M("el-dropdown-item-impl"),p=M("el-roving-focus-item"),_=M("el-dropdown-collection-item");return m(),k(_,{disabled:e.disabled,"text-value":(i=e.textValue)!=null?i:e.textContent},{default:a(()=>[l(p,{focusable:!e.disabled},{default:a(()=>[l(u,ee(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:a(()=>[q(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var ut=Q(qo,[["render",Ho],["__file","dropdown-item.vue"]]);const zo=E({name:"ElDropdownMenu",props:oo,setup(e){const o=Le("dropdown"),{_elDropdownSize:s}=it(),n=s.value,{focusTrapRef:r,onKeydown:c}=B(Lt,void 0),{contentRef:i,role:u,triggerId:p}=B(Ee,void 0),{collectionRef:_,getItems:g}=B(no,void 0),{rovingFocusGroupRef:S,rovingFocusGroupRootStyle:b,tabIndex:d,onBlur:v,onFocus:f,onMousedown:T}=B(Ne,void 0),{collectionRef:H}=B(Oe,void 0),P=$(()=>[o.b("menu"),o.bm("menu",n==null?void 0:n.value)]),Y=st(i,_,r,S,H),O=W(w=>{var N;(N=e.onKeydown)==null||N.call(e,w)},w=>{const{currentTarget:N,code:R,target:K}=w;if(N.contains(K),D.tab===R&&w.stopImmediatePropagation(),w.preventDefault(),K!==t(i)||!so.includes(R))return;const ue=g().filter(se=>!se.disabled).map(se=>se.ref);lo.includes(R)&&ue.reverse(),Ve(ue)});return{size:n,rovingFocusGroupRootStyle:b,tabIndex:d,dropdownKls:P,role:u,triggerId:p,dropdownListWrapperRef:Y,handleKeydown:w=>{O(w),c(w)},onBlur:v,onFocus:f,onMousedown:T}}}),Wo=["role","aria-labelledby"];function Yo(e,o,s,n,r,c){return m(),I("ul",{ref:e.dropdownListWrapperRef,class:ge(e.dropdownKls),style:Mt(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:o[0]||(o[0]=(...i)=>e.onBlur&&e.onBlur(...i)),onFocus:o[1]||(o[1]=(...i)=>e.onFocus&&e.onFocus(...i)),onKeydown:o[2]||(o[2]=Se((...i)=>e.handleKeydown&&e.handleKeydown(...i),["self"])),onMousedown:o[3]||(o[3]=Se((...i)=>e.onMousedown&&e.onMousedown(...i),["self"]))},[q(e.$slots,"default")],46,Wo)}var dt=Q(zo,[["render",Yo],["__file","dropdown-menu.vue"]]);const ct=xt(Bo,{DropdownItem:ut,DropdownMenu:dt}),pe=tt(ut),pt=tt(dt),jo={class:"flex items-center"},Jo={class:"ml-1 text-white text-lg flex"},Qo=h("span",{class:"mr-2"},"个人中心",-1),Zo=E({__name:"user",setup(e){const{setPopupType:o,toggleShowPopup:s}=Z(),n=oe(),r=()=>{o(G.LOGIN),s(!0)},c=async i=>{switch(i){case"logout":await Me.confirm("确定退出登录吗?"),await Ft(),n.logout()}};return(i,u)=>{const p=re;return m(),I("div",null,[t(n).isLogin?(m(),k(t(ct),{key:0,onCommand:c},{dropdown:a(()=>[l(t(pt),null,{default:a(()=>[l(p,{to:"/user/info"},{default:a(()=>[l(t(pe),{command:"user"},{default:a(()=>[F("个人信息")]),_:1})]),_:1}),l(p,{to:"/account/security"},{default:a(()=>[l(t(pe),{command:"account"},{default:a(()=>[F(" 账号安全 ")]),_:1})]),_:1}),l(t(pe),{command:"logout"},{default:a(()=>[F("退出登录")]),_:1})]),_:1})]),default:a(()=>[h("div",jo,[l(t(ro),{size:25,src:t(n).userInfo.avatar},null,8,["src"]),h("div",Jo,[Qo,l(t(Re),null,{default:a(()=>[l(t(Xe))]),_:1})])])]),_:1})):(m(),I("div",{key:1,class:"cursor-pointer text-lg",onClick:r}," 登录/注册 "))])}}}),Xo={class:"w-[250px] search"},en=E({__name:"search",setup(e){const o=Ot(),s=we(),n=x(),r=()=>{if(!n.value)return Me.msgError("请输入关键词");o.push({path:"/information/search",query:{keywords:n.value}})};return ie(s,c=>{c.path=="/information/search"?n.value=c.query.keywords:n.value=""},{immediate:!0}),(c,i)=>(m(),I("div",Xo,[l(t(U),{modelValue:t(n),"onUpdate:modelValue":i[0]||(i[0]=u=>ye(n)?n.value=u:null),modelModifiers:{trim:!0},placeholder:"请输入关键词","suffix-icon":t(Nt),onKeyup:Vt(r,["enter"])},null,8,["modelValue","suffix-icon","onKeyup"])]))}});const tn=ne(en,[["__scopeId","data-v-a5c2cedb"]]),on=["src"],nn=E({__name:"logo",setup(e){const o=be();return(s,n)=>{const r=re;return t(o).getWebsiteConfig.pc_logo?(m(),k(r,{key:0,class:"flex",to:"/"},{default:a(()=>[h("img",{src:t(o).getWebsiteConfig.pc_logo,class:"h-[26px]"},null,8,on)]),_:1})):L("",!0)}}}),sn=[{name:"首页",path:"/"},{name:"资讯中心",path:"/information",component:"information"},{name:"微信小程序",path:"/mobile",component:"mobile"},{name:"管理后台",path:"/admin",component:"admin"},{name:"供需管理",path:"/supply",component:"/supply"},{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"}],ln=[{module:"personal",hidden:!0,children:[{name:"个人中心",path:"/user",children:[{name:"个人信息",path:"info"}]},{name:"账户设置",path:"/account",children:[{name:"账户安全",path:"security"}]}]}];function mt(){const e=Dt(()=>sn,"$rhqQh4BJeQ"),o=we(),s=$(()=>an(o.meta.module)),n=$(()=>s.value.length);return{menu:e,sidebar:s,hasSidebar:n}}function an(e){const o=[];for(ln.forEach(s=>o.push(s));o.length;){const s=o.shift();if(s.module&&s.module==e)return s.children;s.children&&s.children.forEach(n=>o.push(n))}return[]}const De=E({__name:"menu-item",props:{menuItem:{type:Object,default:()=>({})},routePath:{type:String,required:!0}},setup(e){const o=e,s=$(()=>!!(o.menuItem.children??[]).filter(c=>!(c!=null&&c.hidden)).length),n=r=>ke(r)?r:io(`${o.routePath}/${r}`);return(r,c)=>{var p;const i=re,u=M("MenuItem",!0);return(p=e.menuItem)!=null&&p.hidden?L("",!0):(m(),I(te,{key:0},[t(s)?(m(),k(t(co),{key:1,index:e.routePath,"popper-offset":12},{title:a(()=>[h("span",null,j(e.menuItem.name),1)]),default:a(()=>[(m(!0),I(te,null,xe(e.menuItem.children,_=>(m(),k(u,{key:n(_.path),"menu-item":_,"route-path":n(_.path)},null,8,["menu-item","route-path"]))),128))]),_:1},8,["index"])):(m(),k(i,{key:0,to:e.routePath,class:"flex items-center w-full",custom:e.menuItem.type=="custom",external:t(ke)(e.routePath),target:t(ke)(e.routePath)?"_blank":""},{default:a(()=>[l(t(at),{class:"w-full",index:e.routePath},{title:a(()=>[h("span",null,j(e.menuItem.name),1)]),_:1},8,["index"])]),_:1},8,["to","custom","external","target"]))],64))}}}),rn=E({__name:"index",props:{menu:{type:Array,default:()=>[]},...po},setup(e){return(o,s)=>(m(),k(t(mo),ee({class:"menu"},o.$props,{ellipsis:!0}),{default:a(()=>[(m(!0),I(te,null,xe(e.menu,n=>(m(),I("div",{key:n.path},[q(o.$slots,"item",{item:n},()=>[l(De,{"menu-item":n,"route-path":n.path},null,8,["menu-item","route-path"])],!0)]))),128))]),_:3},16))}});const ft=ne(rn,[["__scopeId","data-v-858b94a4"]]),un={class:"flex items-center text-white"},dn={key:0,class:"ml-[-10px]"},cn=E({__name:"information",props:{menuItem:{type:Object,default:()=>({})}},async setup(e){let o,s;const{data:n}=([o,s]=Pt(()=>_o(()=>ho(),"$W6AA6qpnyW")),o=await o,s(),o),r=$(()=>n.value&&n.value.length);return(c,i)=>{const u=uo,p=re,_=Fe;return m(),k(_,null,{default:a(()=>[l(t(ct),{"max-height":200,disabled:!t(r)},{dropdown:a(()=>[l(t(pt),null,{default:a(()=>[(m(!0),I(te,null,xe(t(n),g=>(m(),k(p,{to:{path:"/information/default",query:{cid:g.id,name:g.name}},key:g.id},{default:a(()=>[l(t(pe),null,{default:a(()=>[F(j(g.name),1)]),_:2},1024)]),_:2},1032,["to"]))),128))]),_:1})]),default:a(()=>[h("span",un,[l(De,{"menu-item":e.menuItem,"route-path":e.menuItem.path},null,8,["menu-item","route-path"]),t(r)?(m(),I("span",dn,[l(u,{name:"el-icon-ArrowDown"})])):L("",!0)])]),_:1},8,["disabled"])]),_:1})}}}),pn={class:"text-center text-tx-primary"},mn=h("div",{class:"text-4xl font-medium"},"微信小程序端演示",-1),fn={class:"flex my-[40px] justify-around"},_n={key:0},hn=["src"],gn=h("div",{class:"mt-2.5"},"微信公众号演示",-1),vn={key:1},wn=["src"],yn=h("div",{class:"mt-2.5"},"微信小程序演示",-1),bn={key:2,class:"w-[180px] h-[180px] flex items-center justify-center"},In=E({__name:"mobile",props:{menuItem:{type:Object,default:()=>({})}},setup(e){const o=be(),s=$(()=>o.getQrcodeConfig.mnp),n=$(()=>o.getQrcodeConfig.oa),r=x(!1);return(c,i)=>{const u=Fe;return m(),I("div",null,[l(t(at),{index:e.menuItem.path,onClick:i[0]||(i[0]=p=>r.value=!0)},{title:a(()=>[h("span",null,j(e.menuItem.name),1)]),_:1},8,["index"]),l(u,null,{default:a(()=>[l(t(lt),{modelValue:t(r),"onUpdate:modelValue":i[1]||(i[1]=p=>ye(r)?r.value=p:null),onClose:i[2]||(i[2]=p=>r.value=!1),width:700},{default:a(()=>[h("div",pn,[mn,h("div",fn,[t(n)?(m(),I("div",_n,[h("img",{src:t(n),class:"w-[180px] h-[180px]",alt:""},null,8,hn),gn])):L("",!0),t(s)?(m(),I("div",vn,[h("img",{src:t(s),class:"w-[180px] h-[180px]",alt:""},null,8,wn),yn])):L("",!0),!t(s)&&!t(n)?(m(),I("div",bn," 暂无二维码 ")):L("",!0)])])]),_:1},8,["modelValue"])]),_:1})])}}}),$n={key:1},En=E({__name:"navbar",setup(e){const o=we(),s=$(()=>o.path),{menu:n}=mt();return(r,c)=>(m(),I("nav",null,[l(ft,{class:"navbar",menu:t(n),"default-active":t(s),mode:"horizontal",style:{"background-color":"#007b44"}},{item:a(({item:i})=>[i.component?(m(),I("div",$n,[i.component=="information"?(m(),k(cn,{key:0,"menu-item":i},null,8,["menu-item"])):L("",!0),i.component=="mobile"?(m(),k(In,{key:1,"menu-item":i},null,8,["menu-item"])):L("",!0),i.component=="/supply"?(m(),k(fo,{key:2,"menu-item":i},null,8,["menu-item"])):L("",!0)])):(m(),k(De,{key:0,"menu-item":i,"route-path":i.path},null,8,["menu-item","route-path"]))]),_:1},8,["menu","default-active"])]))}});const Cn=ne(En,[["__scopeId","data-v-0de8fe93"]]),kn=e=>(Bt("data-v-992f3434"),e=e(),At(),e),Sn={class:"layout-header text-white bg-primary"},Tn={class:"header-contain"},Rn=kn(()=>h("div",{class:"flex-1"},null,-1)),Ln=E({__name:"index",setup(e){return(o,s)=>(m(),I("header",Sn,[h("div",Tn,[l(nn,{class:"flex-none mr-4"}),l(Cn,{class:"w-[600px]"}),Rn,l(tn,{class:"mr-[40px] flex-none"}),l(Zo,{class:"flex-none"})])]))}});const Mn=ne(Ln,[["__scopeId","data-v-992f3434"]]),xn={class:"mx-auto w-[1200px] py-4"},Fn={key:0,class:"mr-4 bg-white rounded-[8px] overflow-hidden"},On=E({__name:"index",setup(e){const o=we(),s=$(()=>o.meta.activeMenu??o.path),{sidebar:n,hasSidebar:r}=mt();return(c,i)=>(m(),I("main",xn,[t(n).length?(m(),I("div",Fn,[l(ft,{menu:t(n),"default-active":t(s),mode:"vertical"},null,8,["menu","default-active"])])):L("",!0),h("div",{class:ge(["layout-page flex-1 min-w-0 rounded-[8px]",{"bg-body":t(r)}])},[q(c.$slots,"default")],2)]))}}),Nn=E({__name:"index",setup(e){return be(),(o,s)=>(m(),I("div"))}});var ve=(e=>(e.LOGIN="YZMDL",e.BIND_MOBILE="BDSJHM",e.CHANGE_MOBILE="BGSJHM",e.FIND_PASSWORD="ZHDLMM",e))(ve||{}),Te=(e=>(e.SERVICE="service",e.PRIVACY="privacy",e))(Te||{});const Vn={class:"login"},Dn=h("div",{class:"text-4xl"},"欢迎登录",-1),Pn={class:"flex"},Bn={class:"flex-1"},An={class:"mb-[-15px] mx-[-40px] mt-[30px] bg-primary-light-9 rounded-b-md px-[15px] flex leading-10"},Gn={class:"flex-1"},Kn={class:"text-tx-secondary text-sm"},Un=["href"],qn=["href"],Hn=h("span",{class:"text-sm"},"注册账号",-1),zn=E({__name:"login",setup(e){const o=be(),s=oe(),{setPopupType:n,toggleShowPopup:r}=Z(),c=x(!1),i=J(),u={account:[{required:!0,validator(C,w,N){if(w===""){N(new Error(p.scene==1?"请输入账号/手机号":"请输入手机号"));return}N()},trigger:["change","blur"]}],password:[{required:!0,message:"请输入密码",trigger:["change","blur"]}],code:[{required:!0,message:"请输入验证码",trigger:["change","blur"]}]},p=Ie({code:"",account:"",password:"",scene:0}),_=$(()=>p.scene==1),g=$(()=>p.scene==2),S=C=>{var w;return(w=o.getLoginConfig.login_way)==null?void 0:w.includes(String(C))};$(()=>o.getLoginConfig.wechat_auth);const b=$(()=>o.getLoginConfig.login_agreement==1);$(()=>o.getLoginConfig.third_auth==1);const d=$(()=>o.getLoginConfig.coerce_mobile==1),v=()=>{p.scene==1?p.scene=2:p.scene=1};J();const f=async()=>{var w;await((w=i.value)==null?void 0:w.validate());const C=await Gt(p);if(d.value&&!C.mobile){s.temToken=C.token,n(G.BIND_MOBILE);return}s.login(C.token),await s.getUser(),r(!1)},{lockFn:T,isLock:H}=ae(f),P=async()=>{c.value||(await Me.confirm("确认已阅读并同意《服务协议》和《隐私政策》"),c.value=!0)},Y=async()=>{await P(),await T()};return ae(async()=>{await P();const{url:C}=await Kt();window.location.href=C}),ie(()=>o.getLoginConfig,C=>{const{login_way:w}=C;w&&w.length&&(p.scene=w.at(0))},{immediate:!0}),(C,w)=>{const N=re;return m(),I("div",Vn,[Dn,l(t($e),{ref_key:"formRef",ref:i,class:"mt-[35px]",size:"large",model:t(p),rules:u},{default:a(()=>[t(_)&&S(1)?(m(),I(te,{key:0},[l(t(V),{prop:"account"},{default:a(()=>[l(t(U),{modelValue:t(p).account,"onUpdate:modelValue":w[0]||(w[0]=R=>t(p).account=R),placeholder:"请输入账号/手机号"},null,8,["modelValue"])]),_:1}),l(t(V),{prop:"password"},{default:a(()=>[l(t(U),{modelValue:t(p).password,"onUpdate:modelValue":w[1]||(w[1]=R=>t(p).password=R),type:"password","show-password":"",placeholder:"请输入密码"},null,8,["modelValue"])]),_:1})],64)):L("",!0),h("div",Pn,[h("div",Bn,[t(g)&&S(1)?(m(),k(t(A),{key:0,type:"primary",link:"",onClick:v},{default:a(()=>[F(" 账号密码登录 ")]),_:1})):L("",!0)]),t(_)?(m(),k(t(A),{key:0,link:"",onClick:w[2]||(w[2]=R=>t(n)(t(G).FORGOT_PWD))},{default:a(()=>[F(" 忘记密码? ")]),_:1})):L("",!0)]),l(t(V),{class:"mt-[30px]"},{default:a(()=>[l(t(A),{class:"w-full",type:"primary",loading:t(H),onClick:Y},{default:a(()=>[F(" 登录 ")]),_:1},8,["loading"])]),_:1}),h("div",An,[h("div",Gn,[t(b)?(m(),k(t(go),{key:0,modelValue:t(c),"onUpdate:modelValue":w[3]||(w[3]=R=>ye(c)?c.value=R:null)},{default:a(()=>[h("span",Kn,[F(" 已阅读并同意 "),l(N,{to:`/policy/${t(Te).SERVICE}`,custom:""},{default:a(({href:R})=>[h("a",{class:"text-tx-primary",href:R,target:"_blank"}," 《服务协议》 ",8,Un)]),_:1},8,["to"]),F(" 和 "),l(N,{class:"text-tx-primary",to:`/policy/${t(Te).PRIVACY}`,custom:""},{default:a(({href:R})=>[h("a",{class:"text-tx-primary",href:R,target:"_blank"}," 《隐私政策》 ",8,qn)]),_:1},8,["to"])])]),_:1},8,["modelValue"])):L("",!0)]),h("div",null,[l(t(A),{link:"",type:"primary",onClick:w[4]||(w[4]=R=>t(n)(t(G).REGISTER))},{default:a(()=>[Hn]),_:1})])])]),_:1},8,["model"])])}}}),Wn={class:"login"},Yn={class:"flex justify-between"},jn=h("span",{class:"text-4xl"},"注册账号",-1),Jn=E({__name:"register",setup(e){const{setPopupType:o}=Z(),s=J(),n={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(p,_,g){_===""?g(new Error("请再次输入密码")):_!==r.password?g(new Error("两次输入的密码不一致")):g()},trigger:["change","blur"]}]},r=Ie({account:"",password:"",password_confirm:""}),c=async()=>{var p;await((p=s.value)==null?void 0:p.validate()),await Ut(r),o(G.LOGIN)},{lockFn:i,isLock:u}=ae(c);return(p,_)=>(m(),I("div",Wn,[h("div",Yn,[jn,l(t(A),{type:"primary",link:"",onClick:_[0]||(_[0]=g=>t(o)(t(G).LOGIN))},{default:a(()=>[F(" 返回登录 ")]),_:1})]),l(t($e),{ref_key:"formRef",ref:s,class:"mt-[35px]",size:"large",model:t(r),rules:n},{default:a(()=>[l(t(V),{prop:"account"},{default:a(()=>[l(t(U),{modelValue:t(r).account,"onUpdate:modelValue":_[1]||(_[1]=g=>t(r).account=g),placeholder:"请输入创建的账号"},null,8,["modelValue"])]),_:1}),l(t(V),{prop:"password"},{default:a(()=>[l(t(U),{modelValue:t(r).password,"onUpdate:modelValue":_[2]||(_[2]=g=>t(r).password=g),type:"password","show-password":"",placeholder:"请输入6-20位数字+字母或符号组合"},null,8,["modelValue"])]),_:1}),l(t(V),{prop:"password_confirm"},{default:a(()=>[l(t(U),{modelValue:t(r).password_confirm,"onUpdate:modelValue":_[3]||(_[3]=g=>t(r).password_confirm=g),type:"password","show-password":"",placeholder:"请再次输入密码"},null,8,["modelValue"])]),_:1}),l(t(V),{class:"mt-[60px]"},{default:a(()=>[l(t(A),{class:"w-full",type:"primary",loading:t(u),onClick:t(i)},{default:a(()=>[F(" 注册 ")]),_:1},8,["loading","onClick"])]),_:1})]),_:1},8,["model"])]))}});/*! vue-countdown v2.1.1 | (c) 2018-present Chen Fengyuan | MIT */const me=1e3,fe=60*me,_e=60*fe,ze=24*_e,We="abort",Ye="end",je="progress",Je="start",Qe="visibilitychange";var Qn=E({name:"VueCountdown",props:{autoStart:{type:Boolean,default:!0},emitEvents:{type:Boolean,default:!0},interval:{type:Number,default:1e3,validator:e=>e>=0},now:{type:Function,default:()=>Date.now()},tag:{type:String,default:"span"},time:{type:Number,default:0,validator:e=>e>=0},transform:{type:Function,default:e=>e}},emits:[We,Ye,je,Je],data(){return{counting:!1,endTime:0,totalMilliseconds:0,requestId:0}},computed:{days(){return Math.floor(this.totalMilliseconds/ze)},hours(){return Math.floor(this.totalMilliseconds%ze/_e)},minutes(){return Math.floor(this.totalMilliseconds%_e/fe)},seconds(){return Math.floor(this.totalMilliseconds%fe/me)},milliseconds(){return Math.floor(this.totalMilliseconds%me)},totalDays(){return this.days},totalHours(){return Math.floor(this.totalMilliseconds/_e)},totalMinutes(){return Math.floor(this.totalMilliseconds/fe)},totalSeconds(){return Math.floor(this.totalMilliseconds/me)}},watch:{$props:{deep:!0,immediate:!0,handler(){this.totalMilliseconds=this.time,this.endTime=this.now()+this.time,this.autoStart&&this.start()}}},mounted(){document.addEventListener(Qe,this.handleVisibilityChange)},beforeUnmount(){document.removeEventListener(Qe,this.handleVisibilityChange),this.pause()},methods:{start(){this.counting||(this.counting=!0,this.emitEvents&&this.$emit(Je),document.visibilityState==="visible"&&this.continue())},continue(){if(!this.counting)return;const e=Math.min(this.totalMilliseconds,this.interval);if(e>0){let o,s;const n=r=>{o||(o=r),s||(s=r);const c=r-o;c>=e||c+(r-s)/2>=e?this.progress():this.requestId=requestAnimationFrame(n),s=r};this.requestId=requestAnimationFrame(n)}else this.end()},pause(){cancelAnimationFrame(this.requestId)},progress(){this.counting&&(this.update(),this.emitEvents&&this.totalMilliseconds>0&&this.$emit(je,{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(We))},end(){this.counting&&(this.pause(),this.totalMilliseconds=0,this.counting=!1,this.emitEvents&&this.$emit(Ye))},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 qt(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 Zn=E({components:{VueCountdown:Qn,ElButton:A},props:{seconds:{type:Number,default:60},startText:{type:String,default:"获取验证码"},changeText:{type:String,default:"x秒重新获取"},endText:{type:String,default:"重新获取"}},emits:["click-get"],setup(e,{emit:o}){const s=x(!1),n=x(!1),r=async()=>{s.value=!0},c=p=>e.changeText.replace("x",p),i=()=>{s.value=!1,n.value=!0},u=Ht(()=>{o("click-get")},1e3,!1);return{getChangeText:c,isStart:s,start:r,isRetry:n,handleEnd:i,handlStart:u}}});function Xn(e,o,s,n,r,c){const i=A,u=M("VueCountdown");return e.isStart?(m(),k(u,{key:1,ref:"vueCountdownRef",time:e.seconds*1e3,onEnd:e.handleEnd},{default:a(({totalSeconds:p})=>[F(j(e.getChangeText(p)),1)]),_:1},8,["time","onEnd"])):(m(),k(i,{key:0,onClick:e.handlStart,link:""},{default:a(()=>[F(j(e.isRetry?e.endText:e.startText),1)]),_:1},8,["onClick"]))}const _t=ne(Zn,[["render",Xn]]),es={class:"login"},ts={class:"flex justify-between"},os=h("span",{class:"text-4xl"},"忘记登录密码",-1),ns={class:"flex justify-center leading-5 w-[90px] pl-2.5 border-l border-br"},ss=E({__name:"forgot-pwd",setup(e){const o=oe(),{setPopupType:s,toggleShowPopup:n}=Z(),r=J(),c=J(),i={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(b,d,v){d===""?v(new Error("请再次输入密码")):d!==u.password?v(new Error("两次输入的密码不一致")):v()},trigger:["change","blur"]}]},u=Ie({mobile:"",password:"",code:"",password_confirm:""}),p=async()=>{var b,d;await((b=r.value)==null?void 0:b.validateField(["mobile"])),await ot({scene:ve.FIND_PASSWORD,mobile:u.mobile}),(d=c.value)==null||d.start()},_=async()=>{var b;await((b=r.value)==null?void 0:b.validate()),await zt(u),o.logout(),s(G.LOGIN)},{lockFn:g,isLock:S}=ae(_);return(b,d)=>{const v=_t;return m(),I("div",es,[h("div",ts,[os,t(o).isLogin?L("",!0):(m(),k(t(A),{key:0,type:"primary",link:"",onClick:d[0]||(d[0]=f=>t(s)(t(G).LOGIN))},{default:a(()=>[F(" 返回登录 ")]),_:1}))]),l(t($e),{ref_key:"formRef",ref:r,class:"mt-[35px]",size:"large",model:t(u),rules:i},{default:a(()=>[l(t(V),{prop:"mobile"},{default:a(()=>[l(t(U),{modelValue:t(u).mobile,"onUpdate:modelValue":d[1]||(d[1]=f=>t(u).mobile=f),placeholder:"请输入手机号码"},null,8,["modelValue"])]),_:1}),l(t(V),{prop:"code"},{default:a(()=>[l(t(U),{modelValue:t(u).code,"onUpdate:modelValue":d[2]||(d[2]=f=>t(u).code=f),placeholder:"请输入验证码"},{suffix:a(()=>[h("div",ns,[l(v,{ref_key:"verificationCodeRef",ref:c,onClickGet:p},null,512)])]),_:1},8,["modelValue"])]),_:1}),l(t(V),{prop:"password"},{default:a(()=>[l(t(U),{modelValue:t(u).password,"onUpdate:modelValue":d[3]||(d[3]=f=>t(u).password=f),placeholder:"请输入6-20位数字+字母或符号组合",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),l(t(V),{prop:"password_confirm"},{default:a(()=>[l(t(U),{modelValue:t(u).password_confirm,"onUpdate:modelValue":d[4]||(d[4]=f=>t(u).password_confirm=f),placeholder:"请再次输入密码",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),l(t(V),{class:"mt-[60px]"},{default:a(()=>[l(t(A),{class:"w-full",type:"primary",onClick:t(g),loading:t(S)},{default:a(()=>[F(" 确认 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"])])}}}),ls={class:"login"},as={class:"flex justify-between"},rs={class:"text-4xl"},is={class:"flex justify-center leading-5 w-[90px] pl-2.5 border-l border-br"},us=E({__name:"bind-mobile",setup(e){const{toggleShowPopup:o}=Z(),s=oe(),n=J(),r=J(),c={mobile:[{required:!0,message:"请输入手机号码",trigger:["change","blur"]}],code:[{required:!0,message:"请输入验证码",trigger:["change","blur"]}]},i=$(()=>!!s.userInfo.mobile),u=Ie({type:i.value?"change":"bind",mobile:"",code:""}),p=async()=>{var b,d;await((b=n.value)==null?void 0:b.validateField(["mobile"])),await ot({scene:i.value?ve.CHANGE_MOBILE:ve.BIND_MOBILE,mobile:u.mobile}),(d=r.value)==null||d.start()},_=async()=>{var b;await((b=n.value)==null?void 0:b.validate()),s.isLogin?await Ke(u):(await Ke(u,{token:s.temToken}),s.login(s.temToken),await s.getUser()),o(!1)},{lockFn:g,isLock:S}=ae(_);return(b,d)=>{const v=_t;return m(),I("div",ls,[h("div",as,[h("span",rs,j(t(i)?"更换手机号":"绑定手机号"),1)]),l(t($e),{ref_key:"formRef",ref:n,class:"mt-[35px]",size:"large",model:t(u),rules:c},{default:a(()=>[l(t(V),{prop:"mobile"},{default:a(()=>[l(t(U),{modelValue:t(u).mobile,"onUpdate:modelValue":d[0]||(d[0]=f=>t(u).mobile=f),placeholder:"请输入手机号码"},null,8,["modelValue"])]),_:1}),l(t(V),{prop:"code"},{default:a(()=>[l(t(U),{modelValue:t(u).code,"onUpdate:modelValue":d[1]||(d[1]=f=>t(u).code=f),placeholder:"请输入验证码"},{suffix:a(()=>[h("div",is,[l(v,{ref_key:"verificationCodeRef",ref:r,onClickGet:p},null,512)])]),_:1},8,["modelValue"])]),_:1}),l(t(V),{class:"mt-[60px]"},{default:a(()=>[l(t(A),{class:"w-full",type:"primary",onClick:t(g),loading:t(S)},{default:a(()=>[F(" 确认 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"])])}}}),ds={key:0,class:"account"},cs={class:"px-5 text-tx-primary"},ps=E({__name:"index",setup(e){const{popupType:o,showPopup:s}=Z(),n=oe();return ie(s,r=>{r||(n.temToken=null)}),(r,c)=>{const i=Fe;return t(s)?(m(),I("div",ds,[l(i,null,{default:a(()=>[l(t(lt),{modelValue:t(s),"onUpdate:modelValue":c[0]||(c[0]=u=>ye(s)?s.value=u:null),width:400,"close-on-click-modal":!1},{default:a(()=>[h("div",cs,[de(l(zn,null,null,512),[[ce,t(o)==t(G).LOGIN]]),de(l(Jn,null,null,512),[[ce,t(o)==t(G).REGISTER]]),de(l(ss,null,null,512),[[ce,t(o)==t(G).FORGOT_PWD]]),de(l(us,null,null,512),[[ce,t(o)==t(G).BIND_MOBILE]])])]),_:1},8,["modelValue"])]),_:1})])):L("",!0)}}}),ms={class:"flex flex-col justify-center items-center"},fs=h("div",{class:"text-tx-regular mb-4"},"您还未登录,请先登录",-1),_s=E({__name:"to-login",setup(e){const{setPopupType:o,toggleShowPopup:s}=Z(),n=()=>{o(G.LOGIN),s(!0)};return(r,c)=>(m(),I("div",ms,[fs,l(t(A),{onClick:n},{default:a(()=>[F("登录")]),_:1})]))}}),hs={class:"layout-default min-w-[1200px]"},gs={class:"main-contain"},vs=E({__name:"default",setup(e){const o=oe();return(s,n)=>(m(),I("section",hs,[l(Mn),h("div",gs,[l(On,{class:"flex-1 min-h-0 flex"},{default:a(()=>[t(o).isLogin||!s.$route.meta.auth?q(s.$slots,"default",{key:0},void 0,!0):(m(),k(_s,{key:1,class:"h-full"}))]),_:3}),l(Nn)]),l(ps)]))}});const As=ne(vs,[["__scopeId","data-v-6913b1ba"]]);export{As as default};
|