2 lines
36 KiB
JavaScript
2 lines
36 KiB
JavaScript
/*! For license information please see index.js.LICENSE.txt */
|
|
(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/home/index"],{"./node_modules/@antmjs/vantui/es/divider/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),s=n("./node_modules/@antmjs/vantui/es/divider/wxs.js"),c=n("webpack/container/remote/react/jsx-runtime"),u=["dashed","hairline","contentPosition","borderColor","textColor","fontSize","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function Divider(e){var t=e.dashed,n=void 0!==t&&t,o=e.hairline,l=void 0!==o&&o,d=e.contentPosition,m=e.borderColor,f=e.textColor,p=e.fontSize,j=e.style,v=e.className,b=e.children,h=(0,r.default)(e,u);return(0,c.jsx)(a.View,_objectSpread(_objectSpread({className:" "+i.bem("divider",[{dashed:n,hairline:l},d])+" ".concat(v||""),style:i.style([s.rootStyle({borderColor:m,textColor:f,fontSize:p}),j])},h),{},{children:b}))}},"./node_modules/@antmjs/vantui/es/divider/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function rootStyle(e){return(0,o.style)([{"border-color":e.borderColor,color:e.textColor,"font-size":(0,r.addUnit)(e.fontSize)}])}},"./node_modules/@antmjs/vantui/es/grid-item/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),r=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=n("webpack/container/remote/react"),s=n("./node_modules/@antmjs/vantui/es/common/jumpLink.js"),c=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),u=n("./node_modules/@antmjs/vantui/es/icon/index.js"),l=n("./node_modules/@antmjs/vantui/es/grid-item/wxs.js"),d=n("webpack/container/remote/react/jsx-runtime"),m=["icon","iconColor","iconPrefix","dot","info","badge","text","setChildrenInstance","parentInstance","index","url","linkType","style","className"];t.default=function GridItem(e){var t=e.icon,n=e.iconColor,f=e.iconPrefix,p=void 0===f?"van-icon":f,j=e.dot,v=e.info,b=e.badge,h=e.text,g=e.setChildrenInstance,y=e.parentInstance,w=e.index,x=e.url,_=e.linkType,S=e.style,O=e.className,k=(0,r.default)(e,m),P=(0,i.useState)({}),C=(0,o.default)(P,2),N=C[0],T=C[1];(0,i.useEffect)((function(){g(w,{updateStyle:D})}),[w,g]),(0,i.useEffect)((function(){D()}),[y.columnNum]);var D=(0,i.useCallback)((function(){var e=y.columnNum,t=y.border,n=y.square,o=y.gutter,r=y.clickable,a=y.center,i=y.direction,s=y.reverse,c=y.iconSize;T({center:a,border:t,square:n,gutter:o,clickable:r,direction:i,reverse:s,iconSize:c,index:w,columnNum:e})}),[y,w]);return(0,d.jsx)(a.View,{className:" "+c.bem("grid-item",{square:null==N?void 0:N.square})+" "+O,style:c.style([l.wrapperStyle({square:null==N?void 0:N.square,gutter:null==N?void 0:N.gutter,columnNum:null==N?void 0:N.columnNum,index:null==N?void 0:N.index}),S]),onClick:function onClick(e){var t;x&&(0,s.jumpLink)(x,_),null==k||null===(t=k.onClick)||void 0===t||t.call(k,e)},children:(0,d.jsx)(a.View,{className:"content-class "+c.bem("grid-item__content",[null==N?void 0:N.direction,{center:null==N?void 0:N.center,square:null==N?void 0:N.square,reverse:null==N?void 0:N.reverse,clickable:null==N?void 0:N.clickable,surround:(null==N?void 0:N.border)&&(null==N?void 0:N.gutter)}])+" "+(null!=N&&N.border?"van-hairline--surround":""),style:l.contentStyle({square:null==N?void 0:N.square,gutter:null==N?void 0:N.gutter}),children:k.children||(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.View,{className:"van-grid-item__icon icon-class",children:t?(0,d.jsx)(u.default,{name:t,color:n,classPrefix:p,dot:j,info:b||v,size:null==N?void 0:N.iconSize}):N.renderIcon}),(0,d.jsx)(a.View,{className:"van-grid-item__text text-class",children:h?(0,d.jsx)(a.Text,{children:h}):N.renderText})]})})})}},"./node_modules/@antmjs/vantui/es/grid-item/wxs.js":function(e,t,n){"use strict";n.d(t,{wrapperStyle:function(){return wrapperStyle},contentStyle:function(){return contentStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function wrapperStyle(e){var t=100/e.columnNum+"%";return(0,o.style)({width:t,"padding-top":e.square?t:null,"padding-right":(0,r.addUnit)(e.gutter),"margin-top":e.index>=e.columnNum&&!e.square?(0,r.addUnit)(e.gutter):null})}function contentStyle(e){return e.square?(0,o.style)({right:(0,r.addUnit)(e.gutter),bottom:(0,r.addUnit)(e.gutter),height:"auto"}):""}},"./node_modules/@antmjs/vantui/es/grid/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),r=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),a=n("webpack/container/remote/react"),i=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),s=n("./node_modules/@antmjs/vantui/es/grid/wxs.js"),c=n("webpack/container/remote/react/jsx-runtime"),u=["gutter","clickable","columnNum","center","border","direction","iconSize","square","reverse","className","style"];t.default=function Grid(e){var t=e.gutter,n=void 0===t?null:t,l=e.clickable,d=e.columnNum,m=void 0===d?4:d,f=e.center,p=void 0===f||f,j=e.border,v=void 0===j||j,b=e.direction,h=e.iconSize,g=void 0===h?"48":h,y=e.square,w=e.reverse,x=void 0!==w&&w,_=e.className,S=void 0===_?"":_,O=e.style,k=void 0===O?{}:O,P=(0,o.default)(e,u),C=(0,a.useRef)([]),N=(0,a.useCallback)((function(){C.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){N()}),[N]);var T=(0,a.useCallback)((function(e,t){C.current[e]=t}),[]),D=(0,a.useMemo)((function(){var e=[];return P.children&&Array.isArray(P.children)&&P.children.forEach((function(t,o){e.push((0,a.cloneElement)(t,{setChildrenInstance:T,key:o,index:o,parentInstance:{columnNum:m,border:v,square:y,gutter:n,clickable:l,center:p,direction:b,reverse:x,iconSize:g}}))})),e}),[P.children,m]);return(0,c.jsx)(r.View,{className:"van-grid "+(v&&!n?"van-hairline--top":"")+" "+S,style:i.style([s.rootStyle({gutter:n}),k]),children:D})}},"./node_modules/@antmjs/vantui/es/grid/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function rootStyle(e){return(0,o.style)({"padding-left":(0,r.addUnit)(e.gutter)})}},"./node_modules/@antmjs/vantui/es/loading/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=n("webpack/container/remote/react"),c=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),u=n("./node_modules/@antmjs/vantui/es/loading/wxs.js"),l=n("webpack/container/remote/react/jsx-runtime"),d=["vertical","type","color","size","textSize","className","children","style"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function Loading(e){var t=e.vertical,n=e.type,o=void 0===n?"circular":n,m=e.color,f=e.size,p=e.textSize,j=e.className,v=e.children,b=e.style,h=(0,a.default)(e,d),g=(0,s.useState)(Array.from({length:12})),y=(0,r.default)(g,1)[0];return(0,l.jsxs)(i.View,_objectSpread(_objectSpread({className:" "+c.bem("loading",{vertical:t})+" "+j,style:c.style([b])},h),{},{children:[(0,l.jsx)(i.View,{className:"van-loading__spinner van-loading__spinner--"+o,style:u.spinnerStyle({color:m,size:f}),children:"spinner"===o&&(0,l.jsx)(l.Fragment,{children:y.map((function(e,t){return(0,l.jsx)(i.View,{className:"van-loading__dot"},"van-loading__dot_".concat(t))}))})}),(0,l.jsx)(i.View,{className:"van-loading__text",style:u.textStyle({textSize:p}),children:v})]}))}},"./node_modules/@antmjs/vantui/es/loading/wxs.js":function(e,t,n){"use strict";n.d(t,{spinnerStyle:function(){return spinnerStyle},textStyle:function(){return textStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),r=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function spinnerStyle(e){return(0,o.style)({color:e.color,width:(0,r.addUnit)(e.size),height:(0,r.addUnit)(e.size)})}function textStyle(e){return(0,o.style)({"font-size":(0,r.addUnit)(e.textSize)})}},"./node_modules/@antmjs/vantui/es/notice-bar/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=n("webpack/container/remote/@tarojs/taro"),s=n("webpack/container/remote/react"),c=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),u=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/common/utils.js"),d=n("./node_modules/@antmjs/vantui/es/icon/index.js"),m=n("./node_modules/@antmjs/vantui/es/notice-bar/wxs.js"),f=n("webpack/container/remote/react/jsx-runtime"),p=["text","mode","url","openType","delay","speed","scrollable","leftIcon","color","backgroundColor","background","wrapable","renderLeftIcon","renderRightIcon","onClick","onClose","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=0;t.default=function NoticeBar(e){var t=(0,s.useState)({ready:!1,show:!0,animationData:{actions:[]},unitag:0}),n=(0,a.default)(t,2),o=n[0],v=n[1],b={animation:null,resetAnimation:null,timer:null,wrapWidth:void 0,contentWidth:void 0,duration:void 0},h=(0,s.useRef)(b),g=e.text,y=void 0===g?"":g,w=e.mode,x=void 0===w?"":w,_=e.url,S=void 0===_?"":_,O=e.openType,k=void 0===O?"navigate":O,P=e.delay,C=void 0===P?1:P,N=e.speed,T=void 0===N?60:N,D=e.scrollable,z=void 0===D?null:D,E=e.leftIcon,V=void 0===E?"":E,A=e.color,q=void 0===A?"#ed6a0c":A,I=e.backgroundColor,M=void 0===I?"#fffbe8":I,K=e.background,X=e.wrapable,R=e.renderLeftIcon,Y=e.renderRightIcon,W=e.onClick,F=e.onClose,L=e.style,U=e.className,G=e.children,H=(0,r.default)(e,p);(0,s.useEffect)((function(){v((function(e){return _objectSpread(_objectSpread({},e),{},{unitag:j++})}))}),[]),(0,i.useReady)((function(){h.current.resetAnimation=(0,i.createAnimation)({duration:0,timingFunction:"linear"}),v((function(e){return _objectSpread(_objectSpread({},e),{},{ready:!0})}))})),(0,s.useEffect)((function(){h.current.resetAnimation=(0,i.createAnimation)({duration:0,timingFunction:"linear"}),v((function(e){return _objectSpread(_objectSpread({},e),{},{ready:!0})}))}),[]),(0,s.useEffect)((function(){return y&&o.ready&&B(),function(){h.current.timer&&clearTimeout(h.current.timer)}}),[y,T,o.ready]);var J=(0,s.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h.current.timer&&clearTimeout(h.current.timer),h.current.timer=null,v((function(t){return _objectSpread(_objectSpread({},t),{},{animationData:h.current.resetAnimation.translateX(e?0:h.current.wrapWidth).step().export()})})),setTimeout((function(){(0,l.requestAnimationFrame)((function(){v((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:h.current.animation.translateX(-h.current.contentWidth).step().export()})}))}))}),10),h.current.timer=setTimeout((function(){J()}),h.current.duration)}),[]),B=(0,s.useCallback)((function(){(0,l.requestAnimationFrame)((function(){Promise.all([(0,l.getRect)(null,".van-notice-bar__content_".concat(o.unitag)),(0,l.getRect)(null,".van-notice-bar__wrap_".concat(o.unitag))]).then((function(e){var t=e[0],n=e[1];null!=t&&null!=n&&t.width&&n.width&&!1!==z&&(0,i.nextTick)((function(){(z||n.width<=t.width)&&(h.current.wrapWidth=n.width,h.current.contentWidth=t.width,h.current.duration=(n.width+t.width)/T*1e3,h.current.animation=(0,i.createAnimation)({duration:h.current.duration,timingFunction:"linear",delay:C}),J(!0))}))}))}))}),[o.unitag,z,T,C,J]),Q=(0,s.useCallback)((function(e){"closeable"===x&&(h.current.timer&&clearTimeout(h.current.timer),h.current.timer=null,v((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==F||F(e))}),[x,F]);return o.show&&(0,f.jsxs)(c.View,_objectSpread(_objectSpread({className:u.bem("notice-bar",{withicon:x,wrapable:X})+" ".concat(U||""),style:u.style([m.rootStyle({color:q,backgroundColor:M,background:K}),L])},H),{},{onClick:W,children:[V?(0,f.jsx)(d.default,{name:V,className:"van-notice-bar__left-icon"}):R,(0,f.jsx)(c.View,{className:"van-notice-bar__wrap van-notice-bar__wrap_".concat(o.unitag),children:(0,f.jsxs)(c.View,{className:"van-notice-bar__content van-notice-bar__content_".concat(o.unitag," ")+(!1!==z||X?"":"van-ellipsis"),animation:o.animationData,children:[y,!y&&G]})}),"closeable"===x?(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:Q}):"link"===x?(0,f.jsx)(c.Navigator,{url:S,openType:k,children:(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"arrow"})}):Y]}))}},"./node_modules/@antmjs/vantui/es/notice-bar/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/style.js");function rootStyle(e){return(0,o.style)({color:e.color,"background-color":e.backgroundColor,background:e.background})}},"./node_modules/@antmjs/vantui/es/swiper-item/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("webpack/container/remote/react"),a=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=n("./node_modules/@antmjs/vantui/es/swiper/context.js"),s=n("webpack/container/remote/react/jsx-runtime");function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={direction:"horizontal",className:""};t.default=function SwiperItem(e){var t=_objectSpread(_objectSpread({},c),e),n=t.children,o=t.direction,u=t.size,l=t.className,d=(0,r.useContext)(i.DataContext);return(0,s.jsx)(a.View,{className:"van-swiper-item ".concat(l),style:function style(){var style={},e=(null==d?void 0:d.propSwiper.direction)||o,t=(null==d?void 0:d.size)||u;return t&&(style["horizontal"===e?"width":"height"]="".concat(t,"px")),style}(),children:n})}},"./node_modules/@antmjs/vantui/es/swiper/context.js":function(e,t,n){"use strict";n.d(t,{DataContext:function(){return r}});var o=n("webpack/container/remote/react"),r=(0,o.createContext)({})},"./node_modules/@antmjs/vantui/es/swiper/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@antmjs/vantui/es/swiper/swiper.js");t.default=o.default},"./node_modules/@antmjs/vantui/es/swiper/swiper.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),r=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),s=n("./node_modules/@babel/runtime/helpers/esm/typeof.js"),c=n("./node_modules/@babel/runtime/regenerator/index.js"),u=n.n(c),l=n("webpack/container/remote/react"),d=n("./node_modules/classnames/index.js"),m=n.n(d),f=n("webpack/container/remote/@tarojs/taro"),p=n.n(f),j=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),v=n("./node_modules/@antmjs/vantui/es/swiper/context.js"),b=n("webpack/container/remote/react/jsx-runtime"),h=n("webpack/container/remote/@tarojs/runtime").window,g=["children","direction","className","pageContent","onChange","initPage","paginationColor","paginationVisible","touchable","isPreventDefault","isStopPropagation","autoPlay","isCenter","style"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y={width:"object"===(void 0===h?"undefined":(0,s.default)(h))?h.innerWidth:375,height:0,duration:500,initPage:0,autoPlay:0,direction:"horizontal",paginationColor:"#fff",paginationVisible:!1,loop:!0,touchable:!0,isPreventDefault:!0,isStopPropagation:!0,isCenter:!1,className:""},w=function Swiper(e,t){var n,s,c=_objectSpread(_objectSpread({},y),e),d=c.children,w=c.direction,x=c.className,_=c.pageContent,S=(c.onChange,c.initPage,c.paginationColor,c.paginationVisible,c.touchable,c.isPreventDefault,c.isStopPropagation,c.autoPlay,c.isCenter),O=c.style,k=(0,a.default)(c,g),P=(0,l.useRef)(null),C=(0,l.useRef)(null),N=(0,l.useRef)({moving:!1,autoplayTimer:null,width:0,height:0,offset:0,size:0}),T=(0,l.useState)(Math.random().toString(36).slice(-8)),D=(0,r.default)(T,1)[0],z="vertical"===w,E=(0,l.useState)(null),V=(0,r.default)(E,2),A=V[0],q=V[1],I=(0,l.useState)(0),M=(0,r.default)(I,2),K=M[0],X=M[1],R=(0,l.useState)(0),Y=(0,r.default)(R,2),W=Y[0],F=Y[1],L=(0,l.useState)(0),U=(0,r.default)(L,2),G=U[0],H=U[1],J=(0,l.useState)(0),B=(0,r.default)(J,2),Q=B[0],$=B[1],Z=(0,l.useState)([]),ee=(0,r.default)(Z,2),te=ee[0],ne=ee[1],oe=(0,l.useState)(!1),re=(0,r.default)(oe,2),ae=re[0],ie=re[1],se=z?G:W,ce=(0,l.useState)({startX:0,startY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,stateDirection:"",delta:0,touchTime:0}),ue=(0,r.default)(ce,1)[0],le=(0,l.useMemo)((function(){var e=0;return{childs:l.Children.map(c.children,(function(t){return(0,l.isValidElement)(t)?(e++,t):null})),childCount:e}}),[c.children]),de=le.childs,me=le.childCount,fe=me*Number(se),pe={propSwiper:c,size:se},je=A?(z?null==A?void 0:A.height:null==A?void 0:A.width)-Number(se)*me:0,ve=function stopAutoPlay(){clearTimeout(N.current.autoplayTimer),N.current.autoplayTimer=null},be=function autoplay(){c.autoPlay<=0||me<=1||(ve(),N.current.autoplayTimer=setTimeout((function(){ye(),autoplay()}),Number(c.autoPlay)))},he=function resettPosition(){N.current.moving=!0,K<=-1&&xe({pace:me}),K>=me&&xe({pace:-me})},ge=function prev(){he(),Pe(),Oe((function(){Oe((function(){N.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},ye=function next(){he(),Pe(),Oe((function(){Oe((function(){N.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},we=function to(e){he(),Pe(),Oe((function(){Oe((function(){var t;N.current.moving=!1,t=c.loop&&me===e?0===K?0:e:e%me,xe({pace:t-K,isEmit:!0})}))}))},xe=function move(e){var t=e.pace,n=void 0===t?0:t,o=e.offset,r=void 0===o?0:o,a=e.isEmit,i=void 0!==a&&a;if(!(me<=1)){var s=_e(n),u=Se(s,r);if(c.loop){if(Array.isArray(d)&&d[0]&&u!==je){var l=u<je;te[0]=l?fe:0}if(Array.isArray(d)&&d[me-1]&&0!==u){var m=u>0;te[me-1]=m?-fe:0}ne(te)}i&&K!==s&&c.onChange&&c.onChange((s+me)%me),K=s,X(s),$(u),Ne(u)}},_e=function getActive(e){if(e){var t=K+e;return c.loop?ke(t,-1,me):ke(t,0,me-1)}return K},Se=function getOffset(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*Number(se);c.loop||(n=Math.min(n,-je));var o=t-n;return c.loop||(o=ke(o,je,0)),o},Oe=function requestFrame(e){h.requestAnimationFrame.call(h,e)},ke=function range(e,t,n){return Math.min(Math.max(e,t),n)},Pe=function touchReset(){ue.startX=0,ue.startY=0,ue.deltaX=0,ue.deltaY=0,ue.offsetX=0,ue.offsetY=0,ue.delta=0,ue.stateDirection="",ue.touchTime=0},Ce=m()((n={},(0,i.default)(n,"van-swiper__inner",!0),(0,i.default)(n,"van-swiper__vertical",z),n)),Ne=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=C.current,n=0;if(S){var o=z?G:W,r=z?(null==A?void 0:A.height)-o:(null==A?void 0:A.width)-o;n=e+(K!==me-1||c.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(N.current.moving?0:c.duration,"ms"),t.style[z?"height":"width"]="".concat(Number(se)*me,"px"),t.style[z?"width":"height"]="".concat(z?W:G,"px"),t.style.transform="translate3D".concat(z?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,l.useEffect)((function(){N.current.activePagination=(K+me)%me}),[K]);var Te=function queryRect(e){return new Promise((function(t){var n=(0,f.createSelectorQuery)();n.select("#".concat(e.id))&&n.select("#".concat(e.id)).boundingClientRect(),n.exec((function(e){t(e[0])}))}))},De=function(){var e=(0,o.default)(u().mark((function _callee(){var e,t,n,o,r,a,i=arguments;return u().wrap((function _callee$(s){for(;;)switch(s.prev=s.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:+c.initPage,s.next=3,Te(P.current);case 3:t=s.sent,n=Math.max(Math.min(me-1,e),0),o=c.width?+c.width:null==t?void 0:t.width,r=c.height?+c.height:null==t?void 0:t.height,se=z?r:o,fe=me*Number(se),a=Se(n),N.current.moving=!0,ae&&(N.current.moving=!1),q(t),X(n),F(o),H(r),$(a),ie(!0);case 18:case"end":return s.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){ae&&Ne()}),[z,W,G,Q,ae]),(0,l.useEffect)((function(){return function(){ie(!1)}}),[]),(0,l.useEffect)((function(){ve(),be()}),[d]),(0,l.useEffect)((function(){De()}),[c.initPage]),(0,l.useEffect)((function(){return function(){ve()}}),[]),(0,f.useReady)((function(){De(),p().nextTick((function(){setTimeout((function(){ve(),be()}),16)}))}));var ze=function itemStyle(e){var t={},n=c.direction||w,o=se;o&&(t["horizontal"===n?"width":"height"]="".concat(o,"px"));var r=te[e];return r&&(t.transform="translate3D".concat("horizontal"===n?"(".concat(r,"px,0,0)"):"(0,".concat(r,"px,0)"))),t};return(0,l.useImperativeHandle)(t,(function(){return{to:we,next:ye,prev:ge}})),(0,b.jsx)(v.DataContext.Provider,{value:pe,children:(0,b.jsxs)(j.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:P},k),{},{id:"container-"+D,onTouchStart:function onTouchStart(e){c.isPreventDefault&&e.preventDefault(),c.isStopPropagation&&e.stopPropagation(),c.touchable&&(!function touchStart(e){var t,n;Pe(),ue.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,ue.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),ue.touchTime=Date.now(),ve(),he())},onTouchMove:function onTouchMove(e){c.touchable&&N.current.moving&&(!function touchMove(e){var t,n;ue.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-ue.startX,ue.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-ue.startY,ue.offsetX=Math.abs(ue.deltaX),ue.offsetY=Math.abs(ue.deltaY),ue.delta=z?ue.deltaY:ue.deltaX,ue.stateDirection||(ue.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(ue.offsetX,ue.offsetY))}(e),ue.stateDirection===c.direction&&xe({offset:ue.delta}))},onTouchEnd:function onTouchEnd(){if(c.touchable&&N.current.moving){var e=ue.delta/(Date.now()-ue.touchTime),t=Math.abs(e)>.3||Math.abs(ue.delta)>+(se/2).toFixed(2),n=0;if(N.current.moving=!1,t&&ue.stateDirection===c.direction){var o=z?ue.offsetY:ue.offsetX;n=c.loop?o>0?ue.delta>0?-1:1:0:-Math[ue.delta>0?"ceil":"floor"](ue.delta/se),xe({pace:n,isEmit:!0})}else ue.delta?xe({pace:0}):Ne();be()}},catchMove:z,style:_objectSpread(_objectSpread({},O),{},{height:G}),children:[(0,b.jsxs)(j.View,{className:Ce,ref:C,children:[l.Children.map(de,(function(e,t){return(0,b.jsx)(j.View,{className:"van-swiper-item-wrapper",style:ze(t),children:e},t)})),(0,b.jsx)(j.View,{className:"van-swiper-item-wrapper",style:ze(0),children:de&&de.length?de[0]:""})]}),c.paginationVisible&&!("pageContent"in c)?(0,b.jsx)(j.View,{className:m()((s={},(0,i.default)(s,"van-swiper__pagination",!0),(0,i.default)(s,"van-swiper__pagination-vertical",z),s)),children:l.Children.map(de,(function(e,t){var n;return(0,b.jsx)(j.Text,{style:(K+me)%me===t?{backgroundColor:c.paginationColor}:void 0,className:m()((n={},(0,i.default)(n,"van-swiper__pagination-item",!0),(0,i.default)(n,"active",(K+me)%me===t),n))},t)}))}):(0,b.jsx)(j.View,{children:_})]}))})},x=(0,l.forwardRef)(w);t.default=x},"./node_modules/@antmjs/vantui/es/toast/events.js":function(e,t,n){"use strict";n.d(t,{on:function(){return on},off:function(){return off},trigger:function(){return trigger}});var o=n("webpack/container/remote/@tarojs/taro"),r=new o.Events;function trigger(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return r.trigger.apply(r,[e].concat(n))}function on(e,t){return r.on(e,t)}function off(e,t){return r.off(e,t)}},"./node_modules/@antmjs/vantui/es/toast/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=n("webpack/container/remote/react"),c=n("./node_modules/@antmjs/vantui/es/transition/index.js"),u=n("./node_modules/@antmjs/vantui/es/overlay/index.js"),l=n("./node_modules/@antmjs/vantui/es/icon/index.js"),d=n("./node_modules/@antmjs/vantui/es/loading/index.js"),m=n("./node_modules/@antmjs/vantui/es/common/validator.js"),f=n("./node_modules/@antmjs/vantui/es/toast/events.js"),p=n("./node_modules/@antmjs/vantui/es/toast/toast.js"),j=n("webpack/container/remote/react/jsx-runtime"),v=["style","className","children","zIndex"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b="van-toast",h={show:!0,duration:2e3,mask:!1,forbidClick:!1,type:"text",position:"middle",message:"",loadingType:"circular",selector:"#van-toast",id:b},g=Object.assign({},h),y=null;function Toast(e){var t=(0,s.useState)({show:!1,duration:2e3,mask:!1,forbidClick:!1,type:"text",position:"middle",message:"",loadingType:"circular",selector:"#van-toast"}),n=(0,a.default)(t,2),o=n[0],w=n[1],x=e.style,_=e.className,S=e.children,O=e.zIndex,k=(0,r.default)(e,v),P=e.id||b;(0,s.useLayoutEffect)((function(){w((function(e){return _objectSpread({},e)}))}),[e]);var C=(0,s.useCallback)((function(e){var t;w((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==e||null===(t=e.onClose)||void 0===t||t.call(e)}),[]),N=function tShowListener(e){var t=Object.assign(Object.assign({},g),function parseOptions(e){return(0,m.isObj)(e)?e:{message:e}}(e));"#van-toast"!==t.selector&&t.selector.replace("#","")!==P||(p.default.clear(),w((function(e){return _objectSpread(_objectSpread({},e),t)})),clearTimeout(y),null!=t.duration&&t.duration>0&&(y=setTimeout((function(){(0,f.trigger)("toast_clear",e)}),t.duration)))},T=(0,s.useCallback)((function(e){C(e)}),[]),D=(0,s.useCallback)((function(e){g=Object.assign(g,e)}),[]),z=(0,s.useCallback)((function(){g=Object.assign({},h)}),[]);return(0,s.useEffect)((function(){return(0,f.on)("toast_show",N),(0,f.on)("toast_clear",T),(0,f.on)("toast_setDefaultOptions",D),(0,f.on)("toast_resetDefaultOptions",z),function(){(0,f.off)("toast_show",N),(0,f.off)("toast_clear",T),(0,f.off)("toast_setDefaultOptions",D),(0,f.off)("toast_resetDefaultOptions",z)}}),[]),(0,j.jsxs)(i.View,{children:[(o.mask||o.forbidClick)&&(0,j.jsx)(u.default,{show:o.show,zIndex:O,style:o.mask?"":"background-color: transparent;"}),(0,j.jsx)(c.default,{show:o.show,style:O?{zIndex:O}:{},className:"van-toast__container",children:(0,j.jsxs)(i.View,_objectSpread(_objectSpread({id:"van-toast",className:"van-toast van-toast--"+("text"===o.type||"html"===o.type?"text":"icon")+" van-toast--".concat(o.position," ").concat(_),style:x,onTouchMove:function noop(){}},k),{},{children:["text"===o.type?(0,j.jsx)(i.Text,{children:o.message}):"html"===o.type?(0,j.jsx)(i.RichText,{nodes:o.message}):(0,j.jsxs)(i.View,{className:"van-toast__box",children:["loading"===o.type?(0,j.jsx)(d.default,{color:"white",type:o.loadingType,className:"van-toast__loading"}):(0,j.jsx)(l.default,{className:"van-toast__icon",name:o.type}),o.message&&(0,j.jsx)(i.Text,{className:"van-toast__text",children:o.message})]}),S]}))})]})}Toast.show=p.default,Toast.loading=p.default.loading,Toast.success=p.default.success,Toast.fail=p.default.fail,Toast.clear=p.default.clear,Toast.setDefaultOptions=p.default.setDefaultOptions,Toast.resetDefaultOptions=p.default.resetDefaultOptions,t.default=Toast},"./node_modules/@antmjs/vantui/es/toast/toast.js":function(e,t,n){"use strict";var o=n("./node_modules/@antmjs/vantui/es/common/validator.js"),r=n("./node_modules/@antmjs/vantui/es/toast/events.js");var a=function createMethod(e){return function(t){return i(Object.assign({type:e},function parseOptions(e){return(0,o.isObj)(e)?e:{message:e}}(t)))}},i=function Toast(e){(0,r.trigger)("toast_show",e)};i.loading=a("loading"),i.success=a("success"),i.fail=a("fail"),i.clear=function(e){(0,r.trigger)("toast_clear",e)},i.setDefaultOptions=function(e){(0,r.trigger)("toast_setDefaultOptions",e)},i.resetDefaultOptions=function(){(0,r.trigger)("toast_resetDefaultOptions")},t.default=i},"./node_modules/classnames/index.js":function(e,t,n){var o,r=n("webpack/container/remote/@tarojs/runtime").window,a=n("./node_modules/@babel/runtime/helpers/typeof.js").default;!function(){"use strict";var i={}.hasOwnProperty;function classNames(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=a(n);if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var r=classNames.apply(null,n);r&&e.push(r)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)i.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(classNames.default=classNames,e.exports=classNames):"object"===a(n.amdO)&&n.amdO?void 0===(o=function(){return classNames}.apply(t,[]))||(e.exports=o):r.classNames=classNames}()},"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/home/index.tsx":function(e,t,n){"use strict";var o=n("./node_modules/@antmjs/vantui/es/card/index.js"),r=n("./node_modules/@antmjs/vantui/es/divider/index.js"),a=n("./node_modules/@antmjs/vantui/es/grid/index.js"),i=n("./node_modules/@antmjs/vantui/es/grid-item/index.js"),s=n("./node_modules/@antmjs/vantui/es/toast/index.js"),c=n("./node_modules/@antmjs/vantui/es/swiper/index.js"),u=n("./node_modules/@antmjs/vantui/es/swiper-item/index.js"),l=n("./node_modules/@antmjs/vantui/es/image/index.js"),d=n("./node_modules/@antmjs/vantui/es/tag/index.js"),m=n("./node_modules/@antmjs/vantui/es/notice-bar/index.js"),f=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),p=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),j=n("webpack/container/remote/react"),v=n.n(j),b=n("webpack/container/remote/@tarojs/taro"),h=n.n(b),g=n("./src/pages/components/TabbarCom/index.tsx"),y=n("webpack/container/remote/react/jsx-runtime");t.default=function Home(){var e=v().useState(0),t=(0,f.default)(e,2),n=t[0],b=(t[1],v().useState(0)),w=(0,f.default)(b,2);w[0],w[1];return(0,j.useEffect)((function(){h().showShareMenu({withShareTicket:!0}),h().updateShareMenu({withShareTicket:!0,success:function success(){}})}),[]),(0,y.jsxs)(p.View,{children:[(0,y.jsx)(m.default,{leftIcon:"volume-o",text:"在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。"}),(0,y.jsx)(p.View,{children:(0,y.jsx)(d.default,{plain:!0,type:"primary",children:"深圳"})}),(0,y.jsx)(p.View,{className:"demo-box",children:(0,y.jsx)(c.default,{height:200,paginationColor:"#426543",autoPlay:"3000",initPage:n,paginationVisible:!0,onChange:function onChange(e){},children:["cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/download.jpg","cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images.jpg"].map((function(e,t){return(0,y.jsx)(u.default,{children:(0,y.jsx)(l.default,{src:e,fit:"cover",width:"100%",height:"200px"})},"swiper#demo1".concat(t))}))})}),(0,y.jsxs)(a.default,{children:[(0,y.jsx)(i.default,{icon:"photo-o",text:"打卡",onClick:function onClick(){s.default.fail({message:"暂未开放",selector:"#vanToast-demo2"})}}),(0,y.jsx)(i.default,{icon:"photo-o",text:"十峰",onClick:function onClick(){h().navigateTo({url:"/pages/mountainPeak/index"})}}),(0,y.jsx)(i.default,{icon:"photo-o",text:"活动",onClick:function onClick(){h().navigateTo({url:"/pages/activityList/index"})}}),(0,y.jsx)(i.default,{icon:"photo-o",text:"招募",onClick:function onClick(){s.default.fail({message:"暂未开放",selector:"#vanToast-demo2"})}})]}),(0,y.jsx)(p.View,{children:(0,y.jsx)(r.default,{})}),[1,2].map((function(e){return(0,y.jsxs)(p.View,{onClick:function onClick(){console.log("Card"),h().navigateTo({url:"/pages/activityList/components/details/index"})},children:[" ",(0,y.jsx)(o.default,{num:"",price:"",desc:"报名中",title:"周末爬山",thumb:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images.jpg"})]})})),(0,y.jsx)(s.default,{id:"vanToast-demo2"}),(0,y.jsx)(g.default,{active:0})]})}},"./src/pages/home/index.tsx":function(e,t,n){"use strict";var o=n("webpack/container/remote/@tarojs/runtime"),r=n("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/home/index.tsx");Page((0,o.createPageConfig)(r.default,"pages/home/index",{root:{cn:[]}},{}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/home/index.tsx",e(e.s=t);var t}));e.O()}]); |