From 35af0e07ee6685a11b3e989a792fb4208830ea82 Mon Sep 17 00:00:00 2001 From: eric Date: Sun, 20 Nov 2022 14:29:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=AD=BE=E5=88=B0=E6=89=93=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/pages/home/index.js | 2 +- src/pages/home/components/CheckIn/index.tsx | 2 +- src/pages/home/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/pages/home/index.js b/dist/pages/home/index.js index 5756d43..c5db426 100644 --- a/dist/pages/home/index.js +++ b/dist/pages/home/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/home/index"],{"./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"),l=n("./node_modules/@antmjs/vantui/es/icon/index.js"),u=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,h=e.dot,v=e.info,j=e.badge,b=e.text,g=e.setChildrenInstance,y=e.parentInstance,w=e.index,x=e.url,_=e.linkType,S=e.style,k=e.className,C=(0,r.default)(e,m),P=(0,i.useState)({}),O=(0,o.default)(P,2),N=O[0],T=O[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})+" "+k,style:c.style([u.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==C||null===(t=C.onClick)||void 0===t||t.call(C,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:u.contentStyle({square:null==N?void 0:N.square,gutter:null==N?void 0:N.gutter}),children:C.children||(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.View,{className:"van-grid-item__icon icon-class",children:t?(0,d.jsx)(l.default,{name:t,color:n,classPrefix:p,dot:h,info:j||v,size:null==N?void 0:N.iconSize}):N.renderIcon}),(0,d.jsx)(a.View,{className:"van-grid-item__text text-class",children:b?(0,d.jsx)(a.Text,{children:b}):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"),l=["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,u=e.clickable,d=e.columnNum,m=void 0===d?4:d,f=e.center,p=void 0===f||f,h=e.border,v=void 0===h||h,j=e.direction,b=e.iconSize,g=void 0===b?"48":b,y=e.square,w=e.reverse,x=void 0!==w&&w,_=e.className,S=void 0===_?"":_,k=e.style,C=void 0===k?{}:k,P=(0,o.default)(e,l),O=(0,a.useRef)([]),N=(0,a.useCallback)((function(){O.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){N()}),[N]);var T=(0,a.useCallback)((function(e,t){O.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:u,center:p,direction:j,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}),C]),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/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"),l=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),u=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;t0&&void 0!==arguments[0]&&arguments[0];b.current.timer&&clearTimeout(b.current.timer),b.current.timer=null,v((function(t){return _objectSpread(_objectSpread({},t),{},{animationData:b.current.resetAnimation.translateX(e?0:b.current.wrapWidth).step().export()})})),setTimeout((function(){(0,u.requestAnimationFrame)((function(){v((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:b.current.animation.translateX(-b.current.contentWidth).step().export()})}))}))}),10),b.current.timer=setTimeout((function(){H()}),b.current.duration)}),[]),J=(0,s.useCallback)((function(){(0,u.requestAnimationFrame)((function(){Promise.all([(0,u.getRect)(null,".van-notice-bar__content_".concat(o.unitag)),(0,u.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!==I&&(0,i.nextTick)((function(){(I||n.width<=t.width)&&(b.current.wrapWidth=n.width,b.current.contentWidth=t.width,b.current.duration=(n.width+t.width)/T*1e3,b.current.animation=(0,i.createAnimation)({duration:b.current.duration,timingFunction:"linear",delay:O}),H(!0))}))}))}))}),[o.unitag,I,T,O,H]),Q=(0,s.useCallback)((function(e){"closeable"===x&&(b.current.timer&&clearTimeout(b.current.timer),b.current.timer=null,v((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==W||W(e))}),[x,W]);return o.show&&(0,f.jsxs)(c.View,_objectSpread(_objectSpread({className:l.bem("notice-bar",{withicon:x,wrapable:X})+" ".concat(B||""),style:l.style([m.rootStyle({color:z,backgroundColor:M,background:R}),L])},G),{},{onClick:K,children:[A?(0,f.jsx)(d.default,{name:A,className:"van-notice-bar__left-icon"}):F,(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!==I||X?"":"van-ellipsis"),animation:o.animationData,children:[y,!y&&U]})}),"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:C,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/search/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("webpack/container/remote/react"),s=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/field/index.js"),u=n("webpack/container/remote/react/jsx-runtime"),d=["value","defaultValue","label","focus","error","disabled","readonly","inputAlign","showAction","leftIcon","rightIcon","placeholder","placeholderStyle","actionText","background","maxlength","shape","clearable","clearTrigger","clearIcon","renderLabel","renderLeftIcon","renderRightIcon","renderAction","onFocus","onBlur","onChange","onClear","onClickInput","onSearch","onCancel","style","className"];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=me&&xe({pace:-me})},ge=function prev(){be(),Pe(),ke((function(){ke((function(){N.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},ye=function next(){be(),Pe(),ke((function(){ke((function(){N.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},we=function to(e){be(),Pe(),ke((function(){ke((function(){var t;N.current.moving=!1,t=c.loop&&me===e?0===R?0:e:e%me,xe({pace:t-R,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),l=Se(s,r);if(c.loop){if(Array.isArray(d)&&d[0]&&l!==he){var u=l0;te[me-1]=m?-fe:0}ne(te)}i&&R!==s&&c.onChange&&c.onChange((s+me)%me),R=s,X(s),$(l),Ne(l)}},_e=function getActive(e){if(e){var t=R+e;return c.loop?Ce(t,-1,me):Ce(t,0,me-1)}return R},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,-he));var o=t-n;return c.loop||(o=Ce(o,he,0)),o},ke=function requestFrame(e){b.requestAnimationFrame.call(b,e)},Ce=function range(e,t,n){return Math.min(Math.max(e,t),n)},Pe=function touchReset(){le.startX=0,le.startY=0,le.deltaX=0,le.deltaY=0,le.offsetX=0,le.offsetY=0,le.delta=0,le.stateDirection="",le.touchTime=0},Oe=m()((n={},(0,i.default)(n,"van-swiper__inner",!0),(0,i.default)(n,"van-swiper__vertical",I),n)),Ne=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=O.current,n=0;if(S){var o=I?U:K,r=I?(null==E?void 0:E.height)-o:(null==E?void 0:E.width)-o;n=e+(R!==me-1||c.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(N.current.moving?0:c.duration,"ms"),t.style[I?"height":"width"]="".concat(Number(se)*me,"px"),t.style[I?"width":"height"]="".concat(I?K:U,"px"),t.style.transform="translate3D".concat(I?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,u.useEffect)((function(){N.current.activePagination=(R+me)%me}),[R]);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)(l().mark((function _callee(){var e,t,n,o,r,a,i=arguments;return l().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=I?r:o,fe=me*Number(se),a=Se(n),N.current.moving=!0,ae&&(N.current.moving=!1),z(t),X(n),W(o),G(r),$(a),ie(!0);case 18:case"end":return s.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){ae&&Ne()}),[I,K,U,Q,ae]),(0,u.useEffect)((function(){return function(){ie(!1)}}),[]),(0,u.useEffect)((function(){ve(),je()}),[d]),(0,u.useEffect)((function(){De()}),[c.initPage]),(0,u.useEffect)((function(){return function(){ve()}}),[]),(0,f.useReady)((function(){De(),p().nextTick((function(){setTimeout((function(){ve(),je()}),16)}))}));var Ie=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,u.useImperativeHandle)(t,(function(){return{to:we,next:ye,prev:ge}})),(0,j.jsx)(v.DataContext.Provider,{value:pe,children:(0,j.jsxs)(h.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:P},C),{},{id:"container-"+D,onTouchStart:function onTouchStart(e){c.isPreventDefault&&e.preventDefault(),c.isStopPropagation&&e.stopPropagation(),c.touchable&&(!function touchStart(e){var t,n;Pe(),le.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,le.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),le.touchTime=Date.now(),ve(),be())},onTouchMove:function onTouchMove(e){c.touchable&&N.current.moving&&(!function touchMove(e){var t,n;le.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-le.startX,le.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-le.startY,le.offsetX=Math.abs(le.deltaX),le.offsetY=Math.abs(le.deltaY),le.delta=I?le.deltaY:le.deltaX,le.stateDirection||(le.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(le.offsetX,le.offsetY))}(e),le.stateDirection===c.direction&&xe({offset:le.delta}))},onTouchEnd:function onTouchEnd(){if(c.touchable&&N.current.moving){var e=le.delta/(Date.now()-le.touchTime),t=Math.abs(e)>.3||Math.abs(le.delta)>+(se/2).toFixed(2),n=0;if(N.current.moving=!1,t&&le.stateDirection===c.direction){var o=I?le.offsetY:le.offsetX;n=c.loop?o>0?le.delta>0?-1:1:0:-Math[le.delta>0?"ceil":"floor"](le.delta/se),xe({pace:n,isEmit:!0})}else le.delta?xe({pace:0}):Ne();je()}},catchMove:I,style:_objectSpread(_objectSpread({},k),{},{height:U}),children:[(0,j.jsxs)(h.View,{className:Oe,ref:O,children:[u.Children.map(de,(function(e,t){return(0,j.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(t),children:e},t)})),(0,j.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(0),children:de&&de.length?de[0]:""})]}),c.paginationVisible&&!("pageContent"in c)?(0,j.jsx)(h.View,{className:m()((s={},(0,i.default)(s,"van-swiper__pagination",!0),(0,i.default)(s,"van-swiper__pagination-vertical",I),s)),children:u.Children.map(de,(function(e,t){var n;return(0,j.jsx)(h.Text,{style:(R+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",(R+me)%me===t),n))},t)}))}):(0,j.jsx)(h.View,{children:_})]}))})},x=(0,u.forwardRef)(w);t.default=x},"./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=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"),c=n("./node_modules/@antmjs/vantui/es/grid/wxs.js"),s=n("webpack/container/remote/react/jsx-runtime"),l=["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,u=e.clickable,d=e.columnNum,m=void 0===d?4:d,f=e.center,p=void 0===f||f,h=e.border,v=void 0===h||h,j=e.direction,b=e.iconSize,g=void 0===b?"48":b,y=e.square,w=e.reverse,x=void 0!==w&&w,_=e.className,S=void 0===_?"":_,k=e.style,C=void 0===k?{}:k,P=(0,o.default)(e,l),O=(0,a.useRef)([]),N=(0,a.useCallback)((function(){O.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){N()}),[N]);var T=(0,a.useCallback)((function(e,t){O.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:u,center:p,direction:j,reverse:x,iconSize:g}}))})),e}),[P.children,m]);return(0,s.jsx)(r.View,{className:"van-grid "+(v&&!n?"van-hairline--top":"")+" "+S,style:i.style([c.rootStyle({gutter:n}),C]),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/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"),c=n("webpack/container/remote/react"),s=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),l=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),u=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;t0&&void 0!==arguments[0]&&arguments[0];b.current.timer&&clearTimeout(b.current.timer),b.current.timer=null,v((function(t){return _objectSpread(_objectSpread({},t),{},{animationData:b.current.resetAnimation.translateX(e?0:b.current.wrapWidth).step().export()})})),setTimeout((function(){(0,u.requestAnimationFrame)((function(){v((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:b.current.animation.translateX(-b.current.contentWidth).step().export()})}))}))}),10),b.current.timer=setTimeout((function(){H()}),b.current.duration)}),[]),J=(0,c.useCallback)((function(){(0,u.requestAnimationFrame)((function(){Promise.all([(0,u.getRect)(null,".van-notice-bar__content_".concat(o.unitag)),(0,u.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!==I&&(0,i.nextTick)((function(){(I||n.width<=t.width)&&(b.current.wrapWidth=n.width,b.current.contentWidth=t.width,b.current.duration=(n.width+t.width)/T*1e3,b.current.animation=(0,i.createAnimation)({duration:b.current.duration,timingFunction:"linear",delay:O}),H(!0))}))}))}))}),[o.unitag,I,T,O,H]),Q=(0,c.useCallback)((function(e){"closeable"===x&&(b.current.timer&&clearTimeout(b.current.timer),b.current.timer=null,v((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==W||W(e))}),[x,W]);return o.show&&(0,f.jsxs)(s.View,_objectSpread(_objectSpread({className:l.bem("notice-bar",{withicon:x,wrapable:X})+" ".concat(B||""),style:l.style([m.rootStyle({color:z,backgroundColor:M,background:R}),L])},G),{},{onClick:K,children:[A?(0,f.jsx)(d.default,{name:A,className:"van-notice-bar__left-icon"}):F,(0,f.jsx)(s.View,{className:"van-notice-bar__wrap van-notice-bar__wrap_".concat(o.unitag),children:(0,f.jsxs)(s.View,{className:"van-notice-bar__content van-notice-bar__content_".concat(o.unitag," ")+(!1!==I||X?"":"van-ellipsis"),animation:o.animationData,children:[y,!y&&U]})}),"closeable"===x?(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:Q}):"link"===x?(0,f.jsx)(s.Navigator,{url:S,openType:C,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/search/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("webpack/container/remote/react"),c=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/field/index.js"),u=n("webpack/container/remote/react/jsx-runtime"),d=["value","defaultValue","label","focus","error","disabled","readonly","inputAlign","showAction","leftIcon","rightIcon","placeholder","placeholderStyle","actionText","background","maxlength","shape","clearable","clearTrigger","clearIcon","renderLabel","renderLeftIcon","renderRightIcon","renderAction","onFocus","onBlur","onChange","onClear","onClickInput","onSearch","onCancel","style","className"];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=me&&xe({pace:-me})},ge=function prev(){be(),Pe(),ke((function(){ke((function(){N.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},ye=function next(){be(),Pe(),ke((function(){ke((function(){N.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},we=function to(e){be(),Pe(),ke((function(){ke((function(){var t;N.current.moving=!1,t=s.loop&&me===e?0===R?0:e:e%me,xe({pace:t-R,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 c=_e(n),l=Se(c,r);if(s.loop){if(Array.isArray(d)&&d[0]&&l!==he){var u=l0;te[me-1]=m?-fe:0}ne(te)}i&&R!==c&&s.onChange&&s.onChange((c+me)%me),R=c,X(c),$(l),Ne(l)}},_e=function getActive(e){if(e){var t=R+e;return s.loop?Ce(t,-1,me):Ce(t,0,me-1)}return R},Se=function getOffset(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*Number(ce);s.loop||(n=Math.min(n,-he));var o=t-n;return s.loop||(o=Ce(o,he,0)),o},ke=function requestFrame(e){b.requestAnimationFrame.call(b,e)},Ce=function range(e,t,n){return Math.min(Math.max(e,t),n)},Pe=function touchReset(){le.startX=0,le.startY=0,le.deltaX=0,le.deltaY=0,le.offsetX=0,le.offsetY=0,le.delta=0,le.stateDirection="",le.touchTime=0},Oe=m()((n={},(0,i.default)(n,"van-swiper__inner",!0),(0,i.default)(n,"van-swiper__vertical",I),n)),Ne=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=O.current,n=0;if(S){var o=I?U:K,r=I?(null==E?void 0:E.height)-o:(null==E?void 0:E.width)-o;n=e+(R!==me-1||s.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(N.current.moving?0:s.duration,"ms"),t.style[I?"height":"width"]="".concat(Number(ce)*me,"px"),t.style[I?"width":"height"]="".concat(I?K:U,"px"),t.style.transform="translate3D".concat(I?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,u.useEffect)((function(){N.current.activePagination=(R+me)%me}),[R]);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)(l().mark((function _callee(){var e,t,n,o,r,a,i=arguments;return l().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:+s.initPage,c.next=3,Te(P.current);case 3:t=c.sent,n=Math.max(Math.min(me-1,e),0),o=s.width?+s.width:null==t?void 0:t.width,r=s.height?+s.height:null==t?void 0:t.height,ce=I?r:o,fe=me*Number(ce),a=Se(n),N.current.moving=!0,ae&&(N.current.moving=!1),z(t),X(n),W(o),G(r),$(a),ie(!0);case 18:case"end":return c.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){ae&&Ne()}),[I,K,U,Q,ae]),(0,u.useEffect)((function(){return function(){ie(!1)}}),[]),(0,u.useEffect)((function(){ve(),je()}),[d]),(0,u.useEffect)((function(){De()}),[s.initPage]),(0,u.useEffect)((function(){return function(){ve()}}),[]),(0,f.useReady)((function(){De(),p().nextTick((function(){setTimeout((function(){ve(),je()}),16)}))}));var Ie=function itemStyle(e){var t={},n=s.direction||w,o=ce;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,u.useImperativeHandle)(t,(function(){return{to:we,next:ye,prev:ge}})),(0,j.jsx)(v.DataContext.Provider,{value:pe,children:(0,j.jsxs)(h.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:P},C),{},{id:"container-"+D,onTouchStart:function onTouchStart(e){s.isPreventDefault&&e.preventDefault(),s.isStopPropagation&&e.stopPropagation(),s.touchable&&(!function touchStart(e){var t,n;Pe(),le.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,le.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),le.touchTime=Date.now(),ve(),be())},onTouchMove:function onTouchMove(e){s.touchable&&N.current.moving&&(!function touchMove(e){var t,n;le.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-le.startX,le.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-le.startY,le.offsetX=Math.abs(le.deltaX),le.offsetY=Math.abs(le.deltaY),le.delta=I?le.deltaY:le.deltaX,le.stateDirection||(le.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(le.offsetX,le.offsetY))}(e),le.stateDirection===s.direction&&xe({offset:le.delta}))},onTouchEnd:function onTouchEnd(){if(s.touchable&&N.current.moving){var e=le.delta/(Date.now()-le.touchTime),t=Math.abs(e)>.3||Math.abs(le.delta)>+(ce/2).toFixed(2),n=0;if(N.current.moving=!1,t&&le.stateDirection===s.direction){var o=I?le.offsetY:le.offsetX;n=s.loop?o>0?le.delta>0?-1:1:0:-Math[le.delta>0?"ceil":"floor"](le.delta/ce),xe({pace:n,isEmit:!0})}else le.delta?xe({pace:0}):Ne();je()}},catchMove:I,style:_objectSpread(_objectSpread({},k),{},{height:U}),children:[(0,j.jsxs)(h.View,{className:Oe,ref:O,children:[u.Children.map(de,(function(e,t){return(0,j.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(t),children:e},t)})),(0,j.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(0),children:de&&de.length?de[0]:""})]}),s.paginationVisible&&!("pageContent"in s)?(0,j.jsx)(h.View,{className:m()((c={},(0,i.default)(c,"van-swiper__pagination",!0),(0,i.default)(c,"van-swiper__pagination-vertical",I),c)),children:u.Children.map(de,(function(e,t){var n;return(0,j.jsx)(h.Text,{style:(R+me)%me===t?{backgroundColor:s.paginationColor}:void 0,className:m()((n={},(0,i.default)(n,"van-swiper__pagination-item",!0),(0,i.default)(n,"active",(R+me)%me===t),n))},t)}))}):(0,j.jsx)(h.View,{children:_})]}))})},x=(0,u.forwardRef)(w);t.default=x},"./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 diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index ac468a6..6634e63 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -164,7 +164,7 @@ const Home = () => { // 云开发存储文件 [/自动创建文件路径] Taro.cloud.uploadFile({ - cloudPath: `images/dev/example.png`, + cloudPath: `images/dev/${new Date()?.getTime()}.png`, filePath: tempFilePaths?.[0], // 文件路径 success: (res: any) => { // get resource ID