default.5313054d.js 39 KB

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