default.931be508.js 39 KB

1
  1. import{_ as re}from"./nuxt-link.22fe0c46.js";import{aq as bt,ar as Se,aa as D,_ as Z,f as E,r as x,O as B,y as $,S as he,cd as It,bZ as le,k as t,W as ie,a9 as $t,R as q,Z as L,o as m,m as k,w as a,b as l,ce as Et,cf as Ct,aD as et,X as kt,E as A,B as Le,aW as tt,N as xe,ac as St,bw as Tt,be as Rt,aR as Mt,c as I,b_ as Lt,bK as te,a2 as ge,n as M,a5 as ot,a as h,a1 as xt,a3 as Re,H as oe,cg as Ft,a4 as Ot,as as Nt,at as nt,i as X,h as ne,d as F,P as G,au as Fe,bQ as Vt,an as Dt,ao as we,l as ye,ch as Pt,aX as Bt,q as U,am as be,ci as At,t as J,cj as Te,I as Oe,g as Gt,p as Ie,e as $e,s as Q,j as Ee,ck as Kt,cl as Ut,cm as qt,Q as Ht,bM as zt,cn as st,co as Wt,cp as qe,$ as de,a0 as ce}from"./entry.97b97815.js";import{c as W,E as Yt,O as jt,w as He}from"./index.94c844ee.js";import{E as Jt}from"./index.f67f0c88.js";import{c as Qt,E as Zt,d as Xt,a as lt,C as eo,b as to,e as oo,f as no,g as so,F as lo,L as ao}from"./dropdown.5eac3253.js";import{c as ro,a as V,E as Ce}from"./index.3a0abab3.js";import{c as at,E as rt}from"./index.67c8bec4.js";import{E as io}from"./index.ac2dfdfc.js";import{_ as j}from"./_plugin-vue_export-helper.c27b6911.js";import{g as uo,_ as co}from"./index.vue.b3b57836.js";import{E as it,a as po,m as mo,b as fo,_ as _o}from"./index.vue.f2ab9a81.js";import{_ as Ne}from"./client-only.61395405.js";import{u as ho}from"./asyncData.800d6036.js";import{f as go}from"./news.fce18aa1.js";import{u as ae}from"./useLockFn.b1622c85.js";import{E as vo}from"./index.42c7f76c.js";import"./isUndefined.aa0326a0.js";import"./_getTag.3f72bbba.js";import"./index.4ffbacab.js";const wo=bt({style:{type:Se([String,Array,Object])},currentTabId:{type:Se(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Se(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:yo,ElCollectionItem:bo,COLLECTION_INJECTION_KEY:Ve,COLLECTION_ITEM_INJECTION_KEY:Io}=Qt("RovingFocusGroup"),De=Symbol("elRovingFocusGroup"),ut=Symbol("elRovingFocusGroupItem"),$o={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Eo=(e,o)=>{if(o!=="rtl")return e;switch(e){case D.right:return D.left;case D.left:return D.right;default:return e}},Co=(e,o,s)=>{const n=Eo(e.key,s);if(!(o==="vertical"&&[D.left,D.right].includes(n))&&!(o==="horizontal"&&[D.up,D.down].includes(n)))return $o[n]},ko=(e,o)=>e.map((s,n)=>e[(n+o)%e.length]),Pe=e=>{const{activeElement:o}=document;for(const s of e)if(s===o||(s.focus(),o!==document.activeElement))return},ze="currentTabIdChange",We="rovingFocusGroup.entryFocus",So={bubbles:!1,cancelable:!0},To=E({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:wo,emits:[ze,"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(Ve,void 0),p=$(()=>[{outline:"none"},e.style]),_=f=>{o(ze,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(We,So);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);Pe(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(De,{currentTabbedId:It(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}),$t(i,We,v)}});function Ro(e,o,s,n,r,c){return q(e.$slots,"default")}var Mo=Z(To,[["render",Ro],["__file","roving-focus-group-impl.vue"]]);const Lo=E({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:yo,ElRovingFocusGroupImpl:Mo}});function xo(e,o,s,n,r,c){const i=L("el-roving-focus-group-impl"),u=L("el-focus-group-collection");return m(),k(u,null,{default:a(()=>[l(i,Et(Ct(e.$attrs)),{default:a(()=>[q(e.$slots,"default")]),_:3},16)]),_:3})}var Fo=Z(Lo,[["render",xo],["__file","roving-focus-group.vue"]]);const Oo=E({components:{ElRovingFocusCollectionItem:bo},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(De,void 0),{getItems:i}=B(Ve,void 0),u=et(),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=Co(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?ko(O,C+1):O.slice(C+1);break}}kt(()=>{Pe(O)})}}),b=$(()=>s.value===t(u));return he(ut,{rovingFocusGroupItemRef:p,tabIndex:$(()=>t(b)?0:-1),handleMousedown:_,handleFocus:g,handleKeydown:S}),{id:u,handleKeydown:S,handleFocus:g,handleMousedown:_}}});function No(e,o,s,n,r,c){const i=L("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 Vo=Z(Oo,[["render",No],["__file","roving-focus-item.vue"]]);const ke=Symbol("elDropdown"),{ButtonGroup:Do}=A,Po=E({name:"ElDropdown",components:{ElButton:A,ElButtonGroup:Do,ElScrollbar:Jt,ElDropdownCollection:Zt,ElTooltip:Yt,ElRovingFocusGroup:Fo,ElOnlyChild:jt,ElIcon:Le,ArrowDown:tt},props:Xt,emits:["visible-change","click","command"],setup(e,{emit:o}){const s=ot(),n=xe("dropdown"),{t:r}=St(),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:Tt(e.maxHeight)})),v=$(()=>[n.m(C.value)]),f=$(()=>ro(e.trigger)),T=et().value,H=$(()=>e.id||T);ie([c,f],([y,z],[ee])=>{var Ge,Ke,Ue;(Ge=ee==null?void 0:ee.$el)!=null&&Ge.removeEventListener&&ee.$el.removeEventListener("pointerenter",N),(Ke=y==null?void 0:y.$el)!=null&&Ke.removeEventListener&&y.$el.removeEventListener("pointerenter",N),(Ue=y==null?void 0:y.$el)!=null&&Ue.addEventListener&&z.includes("hover")&&y.$el.addEventListener("pointerenter",N)},{immediate:!0}),Rt(()=>{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=Mt();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 Ae(y){g.value=y}function ue(y){S.value||(y.preventDefault(),y.stopImmediatePropagation())}function se(){o("visible-change",!0)}function wt(y){(y==null?void 0:y.type)==="keydown"&&p.value.focus()}function yt(){o("visible-change",!1)}return he(ke,{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:Ae,handlerMainButtonClick:y=>{o("click",y)},handleEntryFocus:ue,handleClose:Y,handleOpen:O,handleBeforeShowTooltip:se,handleShowTooltip:wt,handleBeforeHideTooltip:yt,onFocusAfterTrapped:y=>{var z,ee;y.preventDefault(),(ee=(z=p.value)==null?void 0:z.focus)==null||ee.call(z,{preventScroll:!0})},popperRef:u,contentRef:p,triggeringElementRef:c,referenceElementRef:i}}});function Bo(e,o,s,n,r,c){var i;const u=L("el-dropdown-collection"),p=L("el-roving-focus-group"),_=L("el-scrollbar"),g=L("el-only-child"),S=L("el-tooltip"),b=L("el-button"),d=L("arrow-down"),v=L("el-icon"),f=L("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},Lt({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,te({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,te({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})):M("v-if",!0)],2)}var Ao=Z(Po,[["render",Bo],["__file","dropdown.vue"]]);const Go=E({name:"DropdownItemImpl",components:{ElIcon:Le},props:lt,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:o}){const s=xe("dropdown"),{role:n}=B(ke,void 0),{collectionItemRef:r}=B(eo,void 0),{collectionItemRef:c}=B(Io,void 0),{rovingFocusGroupItemRef:i,tabIndex:u,handleFocus:p,handleKeydown:_,handleMousedown:g}=B(ut,void 0),S=at(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:{[to]:""},role:b,tabIndex:u,handleFocus:p,handleKeydown:d,handleMousedown:g}}}),Ko=["aria-disabled","tabindex","role"];function Uo(e,o,s,n,r,c){const i=L("el-icon");return m(),I(oe,null,[e.divided?(m(),I("li",te({key:0,role:"separator",class:e.ns.bem("menu","item","divided")},e.$attrs),null,16)):M("v-if",!0),h("li",te({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]=Re((...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(xt(e.icon)))]),_:1})):M("v-if",!0),q(e.$slots,"default")],16,Ko)],64)}var qo=Z(Go,[["render",Uo],["__file","dropdown-item-impl.vue"]]);const dt=()=>{const e=B("elDropdown",{}),o=$(()=>e==null?void 0:e.dropdownSize);return{elDropdown:e,_elDropdownSize:o}},Ho=E({name:"ElDropdownItem",components:{ElDropdownCollectionItem:oo,ElRovingFocusItem:Vo,ElDropdownItemImpl:qo},inheritAttrs:!1,props:lt,emits:["pointermove","pointerleave","click"],setup(e,{emit:o,attrs:s}){const{elDropdown:n}=dt(),r=ot(),c=x(null),i=$(()=>{var d,v;return(v=(d=t(c))==null?void 0:d.textContent)!=null?v:""}),{onItemEnter:u,onItemLeave:p}=B(ke,void 0),_=W(d=>(o("pointermove",d),d.defaultPrevented),He(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),He(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 zo(e,o,s,n,r,c){var i;const u=L("el-dropdown-item-impl"),p=L("el-roving-focus-item"),_=L("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,te(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 ct=Z(Ho,[["render",zo],["__file","dropdown-item.vue"]]);const Wo=E({name:"ElDropdownMenu",props:no,setup(e){const o=xe("dropdown"),{_elDropdownSize:s}=dt(),n=s.value,{focusTrapRef:r,onKeydown:c}=B(Ft,void 0),{contentRef:i,role:u,triggerId:p}=B(ke,void 0),{collectionRef:_,getItems:g}=B(so,void 0),{rovingFocusGroupRef:S,rovingFocusGroupRootStyle:b,tabIndex:d,onBlur:v,onFocus:f,onMousedown:T}=B(De,void 0),{collectionRef:H}=B(Ve,void 0),P=$(()=>[o.b("menu"),o.bm("menu",n==null?void 0:n.value)]),Y=at(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)||!lo.includes(R))return;const ue=g().filter(se=>!se.disabled).map(se=>se.ref);ao.includes(R)&&ue.reverse(),Pe(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}}}),Yo=["role","aria-labelledby"];function jo(e,o,s,n,r,c){return m(),I("ul",{ref:e.dropdownListWrapperRef,class:ge(e.dropdownKls),style:Ot(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]=Re((...i)=>e.handleKeydown&&e.handleKeydown(...i),["self"])),onMousedown:o[3]||(o[3]=Re((...i)=>e.onMousedown&&e.onMousedown(...i),["self"]))},[q(e.$slots,"default")],46,Yo)}var pt=Z(Wo,[["render",jo],["__file","dropdown-menu.vue"]]);const mt=Nt(Ao,{DropdownItem:ct,DropdownMenu:pt}),pe=nt(ct),ft=nt(pt),Jo={class:"flex items-center"},Qo={class:"ml-1 text-white text-lg flex"},Zo=h("span",{class:"mr-2"},"个人中心",-1),Xo=E({__name:"user",setup(e){const{setPopupType:o,toggleShowPopup:s}=X(),n=ne(),r=()=>{o(G.LOGIN),s(!0)},c=async i=>{switch(i){case"logout":await Fe.confirm("确定退出登录吗?"),await Vt(),n.logout()}};return(i,u)=>{const p=re;return m(),I("div",null,[t(n).isLogin?(m(),k(t(mt),{key:0,onCommand:c},{dropdown:a(()=>[l(t(ft),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(io),{size:25,src:t(n).userInfo.avatar},null,8,["src"]),h("div",Qo,[Zo,l(t(Le),null,{default:a(()=>[l(t(tt))]),_:1})])])]),_:1})):(m(),I("div",{key:1,class:"cursor-pointer text-lg",onClick:r}," 登录/注册 "))])}}}),en={class:"w-[250px] search"},tn=E({__name:"search",setup(e){const o=Dt(),s=we(),n=x(),r=()=>{if(!n.value)return Fe.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",en,[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(Pt),onKeyup:Bt(r,["enter"])},null,8,["modelValue","suffix-icon","onKeyup"])]))}});const on=j(tn,[["__scopeId","data-v-a5c2cedb"]]),nn=["src"],sn=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,nn)]),_:1})):M("",!0)}}}),ln=[{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"}],an=[{module:"personal",hidden:!0,children:[{name:"个人中心",path:"/user",children:[{name:"个人信息",path:"info"}]},{name:"账户设置",path:"/account",children:[{name:"账户安全",path:"security"}]}]}];function _t(){const e=At(()=>ln,"$rhqQh4BJeQ"),o=we(),s=$(()=>rn(o.meta.module)),n=$(()=>s.value.length);return{menu:e,sidebar:s,hasSidebar:n}}function rn(e){const o=[];for(an.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 Be=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=>Te(r)?r:uo(`${o.routePath}/${r}`);return(r,c)=>{var p;const i=re,u=L("MenuItem",!0);return(p=e.menuItem)!=null&&p.hidden?M("",!0):(m(),I(oe,{key:0},[t(s)?(m(),k(t(po),{key:1,index:e.routePath,"popper-offset":12},{title:a(()=>[h("span",null,J(e.menuItem.name),1)]),default:a(()=>[(m(!0),I(oe,null,Oe(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(Te)(e.routePath),target:t(Te)(e.routePath)?"_blank":""},{default:a(()=>[l(t(it),{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))}}}),un=E({__name:"index",props:{menu:{type:Array,default:()=>[]},...mo},setup(e){return(o,s)=>(m(),k(t(fo),te({class:"menu"},o.$props,{ellipsis:!0}),{default:a(()=>[(m(!0),I(oe,null,Oe(e.menu,n=>(m(),I("div",{key:n.path},[q(o.$slots,"item",{item:n},()=>[l(Be,{"menu-item":n,"route-path":n.path},null,8,["menu-item","route-path"])],!0)]))),128))]),_:3},16))}});const ht=j(un,[["__scopeId","data-v-858b94a4"]]),dn={class:"flex items-center text-white"},cn={key:0,class:"ml-[-10px]"},pn=E({__name:"information",props:{menuItem:{type:Object,default:()=>({})}},async setup(e){let o,s;const{data:n}=([o,s]=Gt(()=>ho(()=>go(),"$W6AA6qpnyW")),o=await o,s(),o),r=$(()=>n.value&&n.value.length);return(c,i)=>{const u=co,p=re,_=Ne;return m(),k(_,null,{default:a(()=>[l(t(mt),{"max-height":200,disabled:!t(r)},{dropdown:a(()=>[l(t(ft),null,{default:a(()=>[(m(!0),I(oe,null,Oe(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",dn,[l(Be,{"menu-item":e.menuItem,"route-path":e.menuItem.path},null,8,["menu-item","route-path"]),t(r)?(m(),I("span",cn,[l(u,{name:"el-icon-ArrowDown"})])):M("",!0)])]),_:1},8,["disabled"])]),_:1})}}}),mn={class:"text-center text-tx-primary"},fn=h("div",{class:"text-4xl font-medium"},"微信小程序端演示",-1),_n={class:"flex my-[40px] justify-around"},hn={key:0},gn=["src"],vn=h("div",{class:"mt-2.5"},"微信公众号演示",-1),wn={key:1},yn=["src"],bn=h("div",{class:"mt-2.5"},"微信小程序演示",-1),In={key:2,class:"w-[180px] h-[180px] flex items-center justify-center"},$n=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=Ne;return m(),I("div",null,[l(t(it),{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(rt),{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",mn,[fn,h("div",_n,[t(n)?(m(),I("div",hn,[h("img",{src:t(n),class:"w-[180px] h-[180px]",alt:""},null,8,gn),vn])):M("",!0),t(s)?(m(),I("div",wn,[h("img",{src:t(s),class:"w-[180px] h-[180px]",alt:""},null,8,yn),bn])):M("",!0),!t(s)&&!t(n)?(m(),I("div",In," 暂无二维码 ")):M("",!0)])])]),_:1},8,["modelValue"])]),_:1})])}}}),En={key:1},Cn=E({__name:"navbar",setup(e){const o=we(),s=$(()=>o.path),{menu:n}=_t();return(r,c)=>(m(),I("nav",null,[l(ht,{class:"navbar",menu:t(n),"default-active":t(s),mode:"horizontal",style:{"background-color":"#007b44"}},{item:a(({item:i})=>[i.component?(m(),I("div",En,[i.component=="information"?(m(),k(pn,{key:0,"menu-item":i},null,8,["menu-item"])):M("",!0),i.component=="mobile"?(m(),k($n,{key:1,"menu-item":i},null,8,["menu-item"])):M("",!0),i.component=="/supply"?(m(),k(_o,{key:2,"menu-item":i},null,8,["menu-item"])):M("",!0)])):(m(),k(Be,{key:0,"menu-item":i,"route-path":i.path},null,8,["menu-item","route-path"]))]),_:1},8,["menu","default-active"])]))}});const kn=j(Cn,[["__scopeId","data-v-0de8fe93"]]),Sn=e=>(Ie("data-v-992f3434"),e=e(),$e(),e),Tn={class:"layout-header text-white bg-primary"},Rn={class:"header-contain"},Mn=Sn(()=>h("div",{class:"flex-1"},null,-1)),Ln=E({__name:"index",setup(e){return(o,s)=>(m(),I("header",Tn,[h("div",Rn,[l(sn,{class:"flex-none mr-4"}),l(kn,{class:"w-[600px]"}),Mn,l(on,{class:"mr-[40px] flex-none"}),l(Xo,{class:"flex-none"})])]))}});const xn=j(Ln,[["__scopeId","data-v-992f3434"]]),Fn={class:"mx-auto w-[1200px] py-4"},On={key:0,class:"mr-4 bg-white rounded-[8px] overflow-hidden"},Nn=E({__name:"index",setup(e){const o=we(),s=$(()=>o.meta.activeMenu??o.path),{sidebar:n,hasSidebar:r}=_t();return(c,i)=>(m(),I("main",Fn,[t(n).length?(m(),I("div",On,[l(ht,{menu:t(n),"default-active":t(s),mode:"vertical"},null,8,["menu","default-active"])])):M("",!0),h("div",{class:ge(["layout-page flex-1 min-w-0 rounded-[8px]",{"bg-body":t(r)}])},[q(c.$slots,"default")],2)]))}}),Vn=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||{}),Me=(e=>(e.SERVICE="service",e.PRIVACY="privacy",e))(Me||{});const gt=e=>(Ie("data-v-c41bfc18"),e=e(),$e(),e),Dn={class:"login"},Pn=gt(()=>h("div",{class:"text-4xl"},"欢迎登录",-1)),Bn={class:"flex"},An={class:"flex-1"},Gn={class:"mb-[-15px] mx-[-40px] mt-[30px] bg-primary-light-9 rounded-b-md px-[15px] flex leading-10"},Kn={class:"flex-1"},Un={class:"text-tx-secondary text-sm"},qn=["href"],Hn=["href"],zn=gt(()=>h("span",{class:"text-sm"},"注册账号",-1)),Wn=E({__name:"login",setup(e){const o=be(),s=ne(),{setPopupType:n,toggleShowPopup:r}=X(),c=x(!1),i=Q(),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=Ee({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};Q();const f=async()=>{var w;await((w=i.value)==null?void 0:w.validate());const C=await Kt(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 Fe.confirm("确认已阅读并同意《服务协议》和《隐私政策》"),c.value=!0)},Y=async()=>{await P(),await T()};return ae(async()=>{await P();const{url:C}=await Ut();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",Dn,[Pn,l(t(Ce),{ref_key:"formRef",ref:i,class:"mt-[35px]",size:"large",model:t(p),rules:u},{default:a(()=>[t(_)&&S(1)?(m(),I(oe,{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)):M("",!0),h("div",Bn,[h("div",An,[t(g)&&S(1)?(m(),k(t(A),{key:0,type:"primary",link:"",onClick:v},{default:a(()=>[F(" 账号密码登录 ")]),_:1})):M("",!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})):M("",!0)]),l(t(V),{class:"mt-[30px]"},{default:a(()=>[l(t(A),{class:"w-full bgSty",type:"primary",loading:t(H),onClick:Y},{default:a(()=>[F(" 登录 ")]),_:1},8,["loading"])]),_:1}),h("div",Gn,[h("div",Kn,[t(b)?(m(),k(t(vo),{key:0,modelValue:t(c),"onUpdate:modelValue":w[3]||(w[3]=R=>ye(c)?c.value=R:null)},{default:a(()=>[h("span",Un,[F(" 已阅读并同意 "),l(N,{to:`/policy/${t(Me).SERVICE}`,custom:""},{default:a(({href:R})=>[h("a",{class:"text-tx-primary",href:R,target:"_blank"}," 《服务协议》 ",8,qn)]),_:1},8,["to"]),F(" 和 "),l(N,{class:"text-tx-primary",to:`/policy/${t(Me).PRIVACY}`,custom:""},{default:a(({href:R})=>[h("a",{class:"text-tx-primary",href:R,target:"_blank"}," 《隐私政策》 ",8,Hn)]),_:1},8,["to"])])]),_:1},8,["modelValue"])):M("",!0)]),h("div",null,[l(t(A),{link:"",type:"primary",onClick:w[4]||(w[4]=R=>t(n)(t(G).REGISTER))},{default:a(()=>[zn]),_:1})])])]),_:1},8,["model"])])}}});const Yn=j(Wn,[["__scopeId","data-v-c41bfc18"]]),jn=e=>(Ie("data-v-e840ea32"),e=e(),$e(),e),Jn={class:"login"},Qn={class:"flex justify-between"},Zn=jn(()=>h("span",{class:"text-4xl"},"注册账号",-1)),Xn=E({__name:"register",setup(e){const{setPopupType:o}=X(),s=Q(),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=Ee({account:"",password:"",password_confirm:""}),c=async()=>{var p;await((p=s.value)==null?void 0:p.validate()),await qt(r),o(G.LOGIN)},{lockFn:i,isLock:u}=ae(c);return(p,_)=>(m(),I("div",Jn,[h("div",Qn,[Zn,l(t(A),{type:"primary",link:"",onClick:_[0]||(_[0]=g=>t(o)(t(G).LOGIN))},{default:a(()=>[F(" 返回登录 ")]),_:1})]),l(t(Ce),{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 bgSty",type:"primary",loading:t(u),onClick:t(i)},{default:a(()=>[F(" 注册 ")]),_:1},8,["loading","onClick"])]),_:1})]),_:1},8,["model"])]))}});const es=j(Xn,[["__scopeId","data-v-e840ea32"]]);/*! vue-countdown v2.1.1 | (c) 2018-present Chen Fengyuan | MIT */const me=1e3,fe=60*me,_e=60*fe,Ye=24*_e,je="abort",Je="end",Qe="progress",Ze="start",Xe="visibilitychange";var ts=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:[je,Je,Qe,Ze],data(){return{counting:!1,endTime:0,totalMilliseconds:0,requestId:0}},computed:{days(){return Math.floor(this.totalMilliseconds/Ye)},hours(){return Math.floor(this.totalMilliseconds%Ye/_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(Xe,this.handleVisibilityChange)},beforeUnmount(){document.removeEventListener(Xe,this.handleVisibilityChange),this.pause()},methods:{start(){this.counting||(this.counting=!0,this.emitEvents&&this.$emit(Ze),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(Qe,{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(je))},end(){this.counting&&(this.pause(),this.totalMilliseconds=0,this.counting=!1,this.emitEvents&&this.$emit(Je))},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 Ht(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 os=E({components:{VueCountdown:ts,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=zt(()=>{o("click-get")},1e3,!1);return{getChangeText:c,isStart:s,start:r,isRetry:n,handleEnd:i,handlStart:u}}});function ns(e,o,s,n,r,c){const i=A,u=L("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 vt=j(os,[["render",ns]]),ss=e=>(Ie("data-v-c45613f6"),e=e(),$e(),e),ls={class:"login"},as={class:"flex justify-between"},rs=ss(()=>h("span",{class:"text-4xl"},"忘记登录密码",-1)),is={class:"flex justify-center leading-5 w-[90px] pl-2.5 border-l border-br"},us=E({__name:"forgot-pwd",setup(e){const o=ne(),{setPopupType:s,toggleShowPopup:n}=X(),r=Q(),c=Q(),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=Ee({mobile:"",password:"",code:"",password_confirm:""}),p=async()=>{var b,d;await((b=r.value)==null?void 0:b.validateField(["mobile"])),await st({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 Wt(u),o.logout(),s(G.LOGIN)},{lockFn:g,isLock:S}=ae(_);return(b,d)=>{const v=vt;return m(),I("div",ls,[h("div",as,[rs,t(o).isLogin?M("",!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(Ce),{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",is,[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 bgSty",type:"primary",onClick:t(g),loading:t(S)},{default:a(()=>[F(" 确认 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"])])}}});const ds=j(us,[["__scopeId","data-v-c45613f6"]]),cs={class:"login"},ps={class:"flex justify-between"},ms={class:"text-4xl"},fs={class:"flex justify-center leading-5 w-[90px] pl-2.5 border-l border-br"},_s=E({__name:"bind-mobile",setup(e){const{toggleShowPopup:o}=X(),s=ne(),n=Q(),r=Q(),c={mobile:[{required:!0,message:"请输入手机号码",trigger:["change","blur"]}],code:[{required:!0,message:"请输入验证码",trigger:["change","blur"]}]},i=$(()=>!!s.userInfo.mobile),u=Ee({type:i.value?"change":"bind",mobile:"",code:""}),p=async()=>{var b,d;await((b=n.value)==null?void 0:b.validateField(["mobile"])),await st({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 qe(u):(await qe(u,{token:s.temToken}),s.login(s.temToken),await s.getUser()),o(!1)},{lockFn:g,isLock:S}=ae(_);return(b,d)=>{const v=vt;return m(),I("div",cs,[h("div",ps,[h("span",ms,J(t(i)?"更换手机号":"绑定手机号"),1)]),l(t(Ce),{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",fs,[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 bgSty",type:"primary",onClick:t(g),loading:t(S)},{default:a(()=>[F(" 确认 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"])])}}});const hs=j(_s,[["__scopeId","data-v-4cfa35d7"]]),gs={key:0,class:"account"},vs={class:"px-5 text-tx-primary"},ws=E({__name:"index",setup(e){const{popupType:o,showPopup:s}=X(),n=ne();return ie(s,r=>{r||(n.temToken=null)}),(r,c)=>{const i=Ne;return t(s)?(m(),I("div",gs,[l(i,null,{default:a(()=>[l(t(rt),{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",vs,[de(l(Yn,null,null,512),[[ce,t(o)==t(G).LOGIN]]),de(l(es,null,null,512),[[ce,t(o)==t(G).REGISTER]]),de(l(ds,null,null,512),[[ce,t(o)==t(G).FORGOT_PWD]]),de(l(hs,null,null,512),[[ce,t(o)==t(G).BIND_MOBILE]])])]),_:1},8,["modelValue"])]),_:1})])):M("",!0)}}}),ys={class:"flex flex-col justify-center items-center"},bs=h("div",{class:"text-tx-regular mb-4"},"您还未登录,请先登录",-1),Is=E({__name:"to-login",setup(e){const{setPopupType:o,toggleShowPopup:s}=X(),n=()=>{o(G.LOGIN),s(!0)};return(r,c)=>(m(),I("div",ys,[bs,l(t(A),{onClick:n},{default:a(()=>[F("登录")]),_:1})]))}}),$s={class:"layout-default min-w-[1200px]"},Es={class:"main-contain"},Cs=E({__name:"default",setup(e){const o=ne();return(s,n)=>(m(),I("section",$s,[l(xn),h("div",Es,[l(Nn,{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(Is,{key:1,class:"h-full"}))]),_:3}),l(Vn)]),l(ws)]))}});const Ws=j(Cs,[["__scopeId","data-v-6913b1ba"]]);export{Ws as default};