12345 |
- import{x as Oe,W as re,aT as De,y as Se,z as J,A as je,d as j,O as N,P as xe,a0 as Ke,Z as Ce,bp as ze,i as p,aQ as Fe,a3 as Ge,aw as Qe,F as _e,S as ie,E as Je,J as Ye,aW as qe,K as Ee,a6 as ae,a7 as Xe,N as Ze,ad as $e,aP as et,al as tt,ac as ot,V as Ie,T as nt,w as rt,ar as at,p as Z,b as pe,a$ as st,bw as it,e as ct,a as lt}from"./index.7bb55078.js";import{I as ce}from"./index.749e125e.js";import{a as Te,S as Re}from"./index.a5a8c52d.js";import"./index.42cceb7c.js";import{T as ut,a as fe}from"./index.01cc5499.js";import{T as de}from"./index.198045ea.js";import{c as Be,g as he}from"./shop-mall.bb410701.js";import"./use-id.094b39a0.js";import"./use-tab-status.872d1634.js";import"./use-refs.5ae3183e.js";import"./index.970d15ef.js";import"./index.29906d26.js";import"./index.2a04e69a.js";import"./index.5f9dd77b.js";import"./index.443cfe6c.js";import"./index.6b15ad74.js";import"./index.809474bb.js";import"./icon-sell-out.98742fd0.js";function C(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pe(e){var t=C(e).Element;return e instanceof t||e instanceof Element}function x(e){var t=C(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Le(e){if(typeof ShadowRoot=="undefined")return!1;var t=C(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var D=Math.round;function $(e,t){t===void 0&&(t=!1);var o=e.getBoundingClientRect(),n=1,r=1;if(x(e)&&t){var a=e.offsetHeight,s=e.offsetWidth;s>0&&(n=D(o.width)/s||1),a>0&&(r=D(o.height)/a||1)}return{width:o.width/n,height:o.height/r,top:o.top/r,right:o.right/n,bottom:o.bottom/r,left:o.left/n,x:o.left/n,y:o.top/r}}function ke(e){var t=C(e),o=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:o,scrollTop:n}}function pt(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ft(e){return e===C(e)||!x(e)?ke(e):pt(e)}function E(e){return e?(e.nodeName||"").toLowerCase():null}function oe(e){return((Pe(e)?e.ownerDocument:e.document)||window.document).documentElement}function dt(e){return $(oe(e)).left+ke(e).scrollLeft}function I(e){return C(e).getComputedStyle(e)}function le(e){var t=I(e),o=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+n)}function ht(e){var t=e.getBoundingClientRect(),o=D(t.width)/e.offsetWidth||1,n=D(t.height)/e.offsetHeight||1;return o!==1||n!==1}function vt(e,t,o){o===void 0&&(o=!1);var n=x(t),r=x(t)&&ht(t),a=oe(t),s=$(e,r),l={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(n||!n&&!o)&&((E(t)!=="body"||le(a))&&(l=ft(t)),x(t)?(i=$(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=dt(a))),{x:s.left+l.scrollLeft-i.x,y:s.top+l.scrollTop-i.y,width:s.width,height:s.height}}function mt(e){var t=$(e),o=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-o)<=1&&(o=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:n}}function ue(e){return E(e)==="html"?e:e.assignedSlot||e.parentNode||(Le(e)?e.host:null)||oe(e)}function We(e){return["html","body","#document"].indexOf(E(e))>=0?e.ownerDocument.body:x(e)&&le(e)?e:We(ue(e))}function X(e,t){var o;t===void 0&&(t=[]);var n=We(e),r=n===((o=e.ownerDocument)==null?void 0:o.body),a=C(n),s=r?[a].concat(a.visualViewport||[],le(n)?n:[]):n,l=t.concat(s);return r?l:l.concat(X(ue(s)))}function gt(e){return["table","td","th"].indexOf(E(e))>=0}function ve(e){return!x(e)||I(e).position==="fixed"?null:e.offsetParent}function At(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,o=navigator.userAgent.indexOf("Trident")!==-1;if(o&&x(e)){var n=I(e);if(n.position==="fixed")return null}var r=ue(e);for(Le(r)&&(r=r.host);x(r)&&["html","body"].indexOf(E(r))<0;){var a=I(r);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return r;r=r.parentNode}return null}function Ue(e){for(var t=C(e),o=ve(e);o&>(o)&&I(o).position==="static";)o=ve(o);return o&&(E(o)==="html"||E(o)==="body"&&I(o).position==="static")?t:o||At(e)||t}var M="top",ee="bottom",_="right",U="left",Ve="auto",wt=[M,ee,_,U],He="start",te="end",bt=[].concat(wt,[Ve]).reduce(function(e,t){return e.concat([t,t+"-"+He,t+"-"+te])},[]),yt="beforeRead",Ot="read",St="afterRead",xt="beforeMain",Ct="main",Et="afterMain",It="beforeWrite",Tt="write",Rt="afterWrite",se=[yt,Ot,St,xt,Ct,Et,It,Tt,Rt];function Bt(e){var t=new Map,o=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function r(a){o.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!o.has(l)){var i=t.get(l);i&&r(i)}}),n.push(a)}return e.forEach(function(a){o.has(a.name)||r(a)}),n}function Pt(e){var t=Bt(e);return se.reduce(function(o,n){return o.concat(t.filter(function(r){return r.phase===n}))},[])}function Lt(e){var t;return function(){return t||(t=new Promise(function(o){Promise.resolve().then(function(){t=void 0,o(e())})})),t}}function B(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];return[].concat(o).reduce(function(r,a){return r.replace(/%s/,a)},e)}var k='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',kt='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',me=["name","enabled","phase","fn","effect","requires","options"];function Wt(e){e.forEach(function(t){[].concat(Object.keys(t),me).filter(function(o,n,r){return r.indexOf(o)===n}).forEach(function(o){switch(o){case"name":typeof t.name!="string"&&console.error(B(k,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(B(k,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":se.indexOf(t.phase)<0&&console.error(B(k,t.name,'"phase"',"either "+se.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(B(k,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(B(k,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(B(k,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(B(k,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+me.map(function(n){return'"'+n+'"'}).join(", ")+'; but "'+o+'" was provided.')}t.requires&&t.requires.forEach(function(n){e.find(function(r){return r.name===n})==null&&console.error(B(kt,String(t.name),n,n))})})})}function Ut(e,t){var o=new Set;return e.filter(function(n){var r=t(n);if(!o.has(r))return o.add(r),!0})}function ne(e){return e.split("-")[0]}function Vt(e){var t=e.reduce(function(o,n){var r=o[n.name];return o[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,o},{});return Object.keys(t).map(function(o){return t[o]})}function Ne(e){return e.split("-")[1]}function Ht(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Nt(e){var t=e.reference,o=e.element,n=e.placement,r=n?ne(n):null,a=n?Ne(n):null,s=t.x+t.width/2-o.width/2,l=t.y+t.height/2-o.height/2,i;switch(r){case M:i={x:s,y:t.y-o.height};break;case ee:i={x:s,y:t.y+t.height};break;case _:i={x:t.x+t.width,y:l};break;case U:i={x:t.x-o.width,y:l};break;default:i={x:t.x,y:t.y}}var f=r?Ht(r):null;if(f!=null){var c=f==="y"?"height":"width";switch(a){case He:i[f]=i[f]-(t[c]/2-o[c]/2);break;case te:i[f]=i[f]+(t[c]/2-o[c]/2);break}}return i}var ge="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Mt="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",Ae={placement:"bottom",modifiers:[],strategy:"absolute"};function we(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Dt(e){e===void 0&&(e={});var t=e,o=t.defaultModifiers,n=o===void 0?[]:o,r=t.defaultOptions,a=r===void 0?Ae:r;return function(l,i,f){f===void 0&&(f=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ae,a),modifiersData:{},elements:{reference:l,popper:i},attributes:{},styles:{}},m=[],S=!1,g={state:c,setOptions:function(A){var y=typeof A=="function"?A(c.options):A;b(),c.options=Object.assign({},a,c.options,y),c.scrollParents={reference:Pe(l)?X(l):l.contextElement?X(l.contextElement):[],popper:X(i)};var u=Pt(Vt([].concat(n,c.options.modifiers)));c.orderedModifiers=u.filter(function(O){return O.enabled});{var h=Ut([].concat(u,c.options.modifiers),function(O){var V=O.name;return V});if(Wt(h),ne(c.options.placement)===Ve){var v=c.orderedModifiers.find(function(O){var V=O.name;return V==="flip"});v||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var w=I(i),R=w.marginTop,L=w.marginRight,K=w.marginBottom,z=w.marginLeft;[R,L,K,z].some(function(O){return parseFloat(O)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return T(),g.update()},forceUpdate:function(){if(!S){var A=c.elements,y=A.reference,u=A.popper;if(!we(y,u)){console.error(ge);return}c.rects={reference:vt(y,Ue(u),c.options.strategy==="fixed"),popper:mt(u)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(O){return c.modifiersData[O.name]=Object.assign({},O.data)});for(var h=0,v=0;v<c.orderedModifiers.length;v++){if(h+=1,h>100){console.error(Mt);break}if(c.reset===!0){c.reset=!1,v=-1;continue}var w=c.orderedModifiers[v],R=w.fn,L=w.options,K=L===void 0?{}:L,z=w.name;typeof R=="function"&&(c=R({state:c,options:K,name:z,instance:g})||c)}}},update:Lt(function(){return new Promise(function(d){g.forceUpdate(),d(c)})}),destroy:function(){b(),S=!0}};if(!we(l,i))return console.error(ge),g;g.setOptions(f).then(function(d){!S&&f.onFirstUpdate&&f.onFirstUpdate(d)});function T(){c.orderedModifiers.forEach(function(d){var A=d.name,y=d.options,u=y===void 0?{}:y,h=d.effect;if(typeof h=="function"){var v=h({state:c,name:A,instance:g,options:u}),w=function(){};m.push(v||w)}})}function b(){m.forEach(function(d){return d()}),m=[]}return g}}var Y={passive:!0};function jt(e){var t=e.state,o=e.instance,n=e.options,r=n.scroll,a=r===void 0?!0:r,s=n.resize,l=s===void 0?!0:s,i=C(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(c){c.addEventListener("scroll",o.update,Y)}),l&&i.addEventListener("resize",o.update,Y),function(){a&&f.forEach(function(c){c.removeEventListener("scroll",o.update,Y)}),l&&i.removeEventListener("resize",o.update,Y)}}var Kt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jt,data:{}};function zt(e){var t=e.state,o=e.name;t.modifiersData[o]=Nt({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Ft={name:"popperOffsets",enabled:!0,phase:"read",fn:zt,data:{}},Gt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qt(e){var t=e.x,o=e.y,n=window,r=n.devicePixelRatio||1;return{x:D(t*r)/r||0,y:D(o*r)/r||0}}function be(e){var t,o=e.popper,n=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,l=e.position,i=e.gpuAcceleration,f=e.adaptive,c=e.roundOffsets,m=e.isFixed,S=s.x,g=S===void 0?0:S,T=s.y,b=T===void 0?0:T,d=typeof c=="function"?c({x:g,y:b}):{x:g,y:b};g=d.x,b=d.y;var A=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),u=U,h=M,v=window;if(f){var w=Ue(o),R="clientHeight",L="clientWidth";if(w===C(o)&&(w=oe(o),I(w).position!=="static"&&l==="absolute"&&(R="scrollHeight",L="scrollWidth")),w=w,r===M||(r===U||r===_)&&a===te){h=ee;var K=m&&w===v&&v.visualViewport?v.visualViewport.height:w[R];b-=K-n.height,b*=i?1:-1}if(r===U||(r===M||r===ee)&&a===te){u=_;var z=m&&w===v&&v.visualViewport?v.visualViewport.width:w[L];g-=z-n.width,g*=i?1:-1}}var O=Object.assign({position:l},f&&Gt),V=c===!0?Qt({x:g,y:b}):{x:g,y:b};if(g=V.x,b=V.y,i){var F;return Object.assign({},O,(F={},F[h]=y?"0":"",F[u]=A?"0":"",F.transform=(v.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",F))}return Object.assign({},O,(t={},t[h]=y?b+"px":"",t[u]=A?g+"px":"",t.transform="",t))}function _t(e){var t=e.state,o=e.options,n=o.gpuAcceleration,r=n===void 0?!0:n,a=o.adaptive,s=a===void 0?!0:a,l=o.roundOffsets,i=l===void 0?!0:l;{var f=I(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(m){return f.indexOf(m)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
- `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
- `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var c={placement:ne(t.placement),variation:Ne(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,be(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,be(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Jt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_t,data:{}};function Yt(e){var t=e.state;Object.keys(t.elements).forEach(function(o){var n=t.styles[o]||{},r=t.attributes[o]||{},a=t.elements[o];!x(a)||!E(a)||(Object.assign(a.style,n),Object.keys(r).forEach(function(s){var l=r[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function qt(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach(function(n){var r=t.elements[n],a=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:o[n]),l=s.reduce(function(i,f){return i[f]="",i},{});!x(r)||!E(r)||(Object.assign(r.style,l),Object.keys(a).forEach(function(i){r.removeAttribute(i)}))})}}var Xt={name:"applyStyles",enabled:!0,phase:"write",fn:Yt,effect:qt,requires:["computeStyles"]},Zt=[Kt,Ft,Jt,Xt],$t=Dt({defaultModifiers:Zt});function eo(e,t,o){var n=ne(e),r=[U,M].indexOf(n)>=0?-1:1,a=typeof o=="function"?o(Object.assign({},t,{placement:e})):o,s=a[0],l=a[1];return s=s||0,l=(l||0)*r,[U,_].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function to(e){var t=e.state,o=e.options,n=e.name,r=o.offset,a=r===void 0?[0,0]:r,s=bt.reduce(function(c,m){return c[m]=eo(m,t.rects,a),c},{}),l=s[t.placement],i=l.x,f=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=f),t.modifiersData[n]=s}var oo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:to};const[no,W]=Oe("popover"),ro=["show","overlay","duration","teleport","overlayStyle","overlayClass","closeOnClickOverlay"],ao={show:Boolean,theme:re("light"),overlay:Boolean,actions:De(),trigger:re("click"),duration:Se,showArrow:J,placement:re("bottom"),iconPrefix:String,overlayClass:je,overlayStyle:Object,closeOnClickAction:J,closeOnClickOverlay:J,closeOnClickOutside:J,offset:{type:Array,default:()=>[0,8]},teleport:{type:[String,Object],default:"body"}};var so=j({name:no,props:ao,emits:["select","touchstart","update:show"],setup(e,{emit:t,slots:o,attrs:n}){let r;const a=N(),s=N(),l=()=>a.value&&s.value?$t(a.value,s.value.popupRef.value,{placement:e.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},Je({},oo,{options:{offset:e.offset}})]}):null,i=()=>{ie(()=>{!e.show||(r?r.setOptions({placement:e.placement}):r=l())})},f=d=>t("update:show",d),c=()=>{e.trigger==="click"&&f(!e.show)},m=d=>{d.stopPropagation(),t("touchstart",d)},S=(d,A)=>{d.disabled||(t("select",d,A),e.closeOnClickAction&&f(!1))},g=()=>{e.closeOnClickOutside&&(!e.overlay||e.closeOnClickOverlay)&&f(!1)},T=(d,A)=>o.action?o.action({action:d,index:A}):[d.icon&&p(Ye,{name:d.icon,classPrefix:e.iconPrefix,class:W("action-icon")},null),p("div",{class:[W("action-text"),qe]},[d.text])],b=(d,A)=>{const{icon:y,color:u,disabled:h,className:v}=d;return p("div",{role:"menuitem",class:[W("action",{disabled:h,"with-icon":y}),v],style:{color:u},tabindex:h?void 0:0,"aria-disabled":h||void 0,onClick:()=>S(d,A)},[T(d,A)])};return xe(i),Ke(()=>{r&&(r.destroy(),r=null)}),Ce(()=>[e.show,e.placement],i),ze(a,g,{eventName:"touchstart"}),()=>{var d;return p(_e,null,[p("span",{ref:a,class:W("wrapper"),onClick:c},[(d=o.reference)==null?void 0:d.call(o)]),p(Fe,Ge({ref:s,class:W([e.theme]),position:"",transition:"van-popover-zoom",lockScroll:!1,onTouchstart:m,"onUpdate:show":f},n,Qe(e,ro)),{default:()=>[e.showArrow&&p("div",{class:W("arrow")},null),p("div",{role:"menu",class:W("content")},[o.default?o.default():e.actions.map(b)])]})])}}});const io=Ee(so),[co,G,lo]=Oe("pull-refresh"),Me=50,uo=["pulling","loosing","success"],po={disabled:Boolean,modelValue:Boolean,headHeight:ae(Me),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:Se,successDuration:ae(500),animationDuration:ae(300)};var fo=j({name:co,props:po,emits:["refresh","update:modelValue"],setup(e,{emit:t,slots:o}){let n;const r=N(),a=Xe(r),s=Ze({status:"normal",distance:0,duration:0}),l=$e(),i=()=>{if(e.headHeight!==Me)return{height:`${e.headHeight}px`}},f=()=>s.status!=="loading"&&s.status!=="success"&&!e.disabled,c=u=>{const h=+(e.pullDistance||e.headHeight);return u>h&&(u<h*2?u=h+(u-h)/2:u=h*1.5+(u-h*2)/4),Math.round(u)},m=(u,h)=>{const v=+(e.pullDistance||e.headHeight);s.distance=u,h?s.status="loading":u===0?s.status="normal":u<v?s.status="pulling":s.status="loosing"},S=()=>{const{status:u}=s;return u==="normal"?"":e[`${u}Text`]||lo(u)},g=()=>{const{status:u,distance:h}=s;if(o[u])return o[u]({distance:h});const v=[];return uo.includes(u)&&v.push(p("div",{class:G("text")},[S()])),u==="loading"&&v.push(p(et,{class:G("loading")},{default:S})),v},T=()=>{s.status="success",setTimeout(()=>{m(0)},+e.successDuration)},b=u=>{n=ot(a.value)===0,n&&(s.duration=0,l.start(u))},d=u=>{f()&&b(u)},A=u=>{if(f()){n||b(u);const{deltaY:h}=l;l.move(u),n&&h.value>=0&&l.isVertical()&&(tt(u),m(c(h.value)))}},y=()=>{n&&l.deltaY.value&&f()&&(s.duration=+e.animationDuration,s.status==="loosing"?(m(+e.headHeight,!0),t("update:modelValue",!0),ie(()=>t("refresh"))):m(0))};return Ce(()=>e.modelValue,u=>{s.duration=+e.animationDuration,u?m(+e.headHeight,!0):o.success||e.successText?T():m(0,!1)}),()=>{var u;const h={transitionDuration:`${s.duration}ms`,transform:s.distance?`translate3d(0,${s.distance}px, 0)`:""};return p("div",{ref:r,class:G()},[p("div",{class:G("track"),style:h,onTouchstart:d,onTouchmove:A,onTouchend:y,onTouchcancel:y},[p("div",{class:G("head"),style:i()},[g()]),(u=o.default)==null?void 0:u.call(o)])])}}});const ho=Ee(fo);var vo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAoCAYAAACIC2hQAAAAAXNSR0IArs4c6QAAA9pJREFUWEfN2H1oVWUcwPHvc69Z0ybONpGZmU6NEt2mhdsw06B8AVFcW4hS4gvOl0jDNJUsRSgyUHoPEl+CEZso+s/Y/lDKV2jSNrXwlXKuLIZOXc2md4/85J7tuYe7c869ec7t+e/ee57n+dzzvP2enwIKgB3AU4AitrQB3wGLgIjtt0A/CuwM8IxLr/OAXYHKbJ0J9BqQ4YL4EliaaugHwDsuiGpgSqqh0v+Ltjk6AXjVgJ0HRvwfoHbDTGCf8WU7kAZ0pAprX+WWYzRQb6IGrV0yI3P6pBuBQnuEdaSDSw0FxVe6gz4K3DS3q5xt635PH5efHSgU0OgOQuGl3UHF8xeQZcEGrlrYnFU8OTNoqPSnFVedoCeAcRas/+uz7maXze6RCihw3QlaDsy2YH3GP3dt6JbV/VIE/ckJuhlYb8FU2sP1uQfLlwUBVUTWaNR0qy8Ne52gC4BvDNifwIAgoHnHKqtRvNzZl1IfO0EnAQcNmAbSgb/9xuYdrzwHDO+ChpY5QQcDv9pQo4DTvkK1DuWd2CNRW8/OaQfTnKBh4B+zAjADOOAndGxtxRORO+o3s4+IVk87QeVZOeOHGZVWAtv8hOYdr5wI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iJuEEHbMmyJlI5lS6goA+BoAllbRPYeIx+zURESjxhj7vAgR7Uhm//Mp4xgA2NnxcSnlHt/3FwkhTp93B4oflFKXIeJ7RFRWrfWmwNGb8Dyvt62tbb9S6hkAuM+eN1LKn8rSXM0xEaHW2vbxHUR05UyDI+KnRNQnpTyllHoRAB4p+DhjjFkTjUa/L/qseTEZGxu7dHx8/EFE3EpEYhoQ29SOMsb2cs4HrK5Sah0AVJ4nZxHxViHEcatTE8ANWBixuhGxnYjsncHeCcYZY7aXnDTGDEgpz1ZCaq2fMMaUmk/h+wQirhdC9NcNMNM0uPpKqccQ8Vmb2tLWI2YYY3fOC4ANqrV+2BhjB9JSTMbY/nkDsBCJROJ+RLStmAHAgXQ6vWleASyE7/ubAeAWzvkWe/n5F1ek5boVi45TAAAAAElFTkSuQmCC";const yo="_hotGoods_1xtmi_1",Oo="_title_1xtmi_8",So="_tips_1xtmi_20",xo="_hotGoodsSection_1xtmi_36",Co="_hotGoodsItem_1xtmi_42",Eo="_hotGoodsItemImg_1xtmi_43",Io="_hotGoodsWrap_1xtmi_50",To="_hotIcon_1xtmi_53";var q={hotGoods:yo,title:Oo,tips:So,hotGoodsSection:xo,hotGoodsItem:Co,hotGoodsItemImg:Eo,hotGoodsWrap:Io,hotIcon:To},Ro=j({name:"hot-goods",props:{hotProductList:{type:Array,default:[]},onOpenWebView:{type:Function,default:e=>{}}},render(){return p("div",{class:q.hotGoods},[p("div",{class:q.hotGoodsSection},[this.hotProductList.map(e=>p("div",{class:q.hotGoodsItem,onClick:()=>{this.onOpenWebView("/goodsDetail?id="+e.id)}},[p(ce,{class:q.hotGoodsItemImg,src:e.pic,fit:"cover"},null)]))])])}});const Bo="_swipeType_se6u6_1",Po="_swipeTypeShow_se6u6_17",Lo="_typeSection_se6u6_20",ko="_typeItem_se6u6_24",Wo="_swipeTypeImg_se6u6_28",Uo="_typeName_se6u6_34";var H={swipeType:Bo,swipeTypeShow:Po,typeSection:Lo,typeItem:ko,swipeTypeImg:Wo,typeName:Uo};function ye(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ie(e)}var Vo=j({name:"menu-list",props:{productList:{type:Array,default:[]},onOpenWebView:{type:Function,default:e=>{}}},render(){let e;return p(Re,{class:[H.swipeType,this.productList.length>1&&H.swipeTypeShow],"indicator-color":"var(--van-primary)",loop:!1,showIndicators:this.productList.length>1},ye(e=this.productList.map(t=>{let o;return p(Te,{class:H.typeSection},ye(o=t.map(n=>p("div",{class:H.typeItem,onClick:()=>{this.onOpenWebView("/goodsList?id="+n.id+"&tag="+encodeURIComponent(n.name))}},[p(ce,{class:H.swipeTypeImg,src:n.icon,fit:"cover"},null),p("p",{class:H.typeName},[n.name])])))?o:{default:()=>[o]})}))?e:{default:()=>[e]})}});const Ho="_shopMall_3fob3_1",No="_hotContent_3fob3_5",Mo="_dot_3fob3_15",Do="_iconBadge_3fob3_24",jo="_searchBox_3fob3_27",Ko="_swipe_3fob3_33",zo="_swipeItemImg_3fob3_38",Fo="_tabs_3fob3_53";var Q={shopMall:Ho,hotContent:No,"icon-shop-cart":"_icon-shop-cart_3fob3_10",dot:Mo,iconBadge:Do,searchBox:jo,swipe:Ko,swipeItemImg:zo,tabs:Fo};const Go="_theHomeHeader_1wz49_1",Qo="_content_1wz49_8",_o="_mall_1wz49_12",Jo="_cart_1wz49_17",Yo="_more_1wz49_22",qo="_searchBox_1wz49_29",Xo="_iconSearch_1wz49_41",Zo="_popover_1wz49_46";var P={theHomeHeader:Go,content:Qo,mall:_o,cart:Jo,more:Yo,searchBox:qo,iconSearch:Xo,popover:Zo};var $o=j({name:"TheHomeHeader",emits:["cart","more","search","headerDom"],setup(e,{emit:t}){const o=N(sessionStorage.getItem("navHeight")),n=N(null);(()=>{Z({api:"setBarStatus",content:{status:0}}),!o.value&&Z({api:"getNavHeight"},i=>{const{content:f}=i,c=f.dpi||2;if(f.navHeight){const m=f.navHeight/c+"";sessionStorage.setItem("navHeight",m),o.value=m}})})();const a={reference:()=>p("img",{class:P.more,src:Ao,onClick:()=>t("more")},null)};xe(()=>{ie(()=>{setTimeout(()=>{const{height:i}=nt(n);t("headerDom",i)},300)})});const s=N(!1),l=[{text:"\u6211\u7684\u8BA2\u5355",icon:wo,url:"/goodsOrder"},{text:"\u6211\u7684\u5730\u5740",icon:mo,url:"/"}];return()=>p("div",{class:P.theHomeHeader,ref:n},[p("div",{style:{height:o.value+"px",background:"#fff"}},null),p("div",{class:P.content},[p("img",{class:P.mall,src:go},null),p("div",{class:P.searchBox,onClick:()=>t("search")},[p("img",{class:P.iconSearch,src:bo},null),p("span",null,[rt("\u641C\u7D22\u4F60\u559C\u6B22\u7684\u5185\u5BB9")])]),p(at,{content:Be.value,showZero:!1},{default:()=>[p("img",{class:P.cart,src:vo,onClick:()=>t("cart")},null)]}),p(io,{placement:"bottom-end",class:P.popover,show:s.value,"onUpdate:show":i=>s.value=i,actions:l,onSelect:i=>t("more",i)},a)])])}});function en(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ie(e)}var bn=j({name:"shop-mall",data(){return{loading:!1,height:"auto",count:0,advertiseList:[],productList:[],hotProductList:[],productCategoryList:[]}},mounted(){this.init(),pe().ios?document.addEventListener("visibilitychange",e=>{if(!document.hidden){he();const t=this.$refs.tabFirst;t==null||t.onSearch()}}):st("UpdateToken",e=>{e!=null&&e.content.token&<(e==null?void 0:e.content.token),he();const t=this.$refs.tabFirst;t==null||t.onSearch()})},unmounted(){it("UpdateToken",()=>{})},methods:{onRefresh(){this.productCategoryList=[],this.$nextTick(()=>{this.init()});const e=this.$refs.tabFirst;e==null||e.onSearch()},async init(){try{const t=(await ct.get("/api-mall-portal/home/content")).data||{};this.count=t.count,Be.value=t.count,this.advertiseList=t.advertiseList;const o=t.productCategoryList||[],n=[];for(;o.length>0;){const r=o.splice(0,5);n.push(r)}this.productList=n,this.hotProductList=t.hotProductList||[],this.productCategoryList=t.productAttributeCategoryList||[]}catch{}setTimeout(()=>{this.loading=!1},500)},openWebView(e){try{const t=location.origin+location.pathname+"#";if(!e)return;if(e.indexOf("http")<0&&(e=t+e),console.log("\u8DF3\u8F6Curl:",e),!pe().isApp){location.href=e;return}Z({api:"openWebView",content:{url:e,orientation:1,isHideTitle:!1}})}catch{}}},render(){let e;return p("div",{class:Q.shopMall},[p($o,{onCart:()=>this.openWebView("/cart"),onSearch:()=>this.openWebView("/goodsList?input=focus"),onHeaderDom:t=>{console.log(t,"height"),this.height=t+"px"},onMore:t=>{!t||(t.text=="\u6211\u7684\u5730\u5740"?Z({api:"setAddress",content:{}}):this.openWebView(t.url))}},null),p(ho,{modelValue:this.loading,"onUpdate:modelValue":t=>this.loading=t,"loading-text":"\u6B63\u5728\u5237\u65B0...","success-text":"\u5237\u65B0\u5B8C\u6210",onRefresh:()=>this.onRefresh()},{default:()=>[p("div",{class:Q.hotContent},[p(Re,{class:Q.swipe,autoplay:3e3},en(e=this.advertiseList.map(t=>p(Te,{onClick:()=>this.openWebView(t.url)},{default:()=>[p(ce,{class:Q.swipeItemImg,src:t.pic,fit:"fill"},null)]})))?e:{default:()=>[e]}),p(Vo,{productList:this.productList,onOpenWebView:this.openWebView},null)]),this.hotProductList.length===3&&p(Ro,{hotProductList:this.hotProductList,onOpenWebView:this.openWebView},null),p(ut,{shrink:!0,lineWidth:25,background:"#f6f8f9",color:"var(--van-primary)",class:Q.tabs,sticky:!0,offsetTop:this.height,lazyRender:!0},{default:()=>[p(fe,{title:"\u5168\u90E8",name:0},{default:()=>[p(de,{ref:"tabFirst",isTab:!0,productAttributeCategoryId:0,onOpenWebView:this.openWebView,showAdd:!1},null)]}),this.productCategoryList.map(t=>p(fe,{title:t.name,name:t.id},{default:()=>[p(de,{isTab:!0,showAdd:!1,productAttributeCategoryId:t.id,onOpenWebView:this.openWebView},null)]}))]})]})])}});export{bn as default};
|