From 354b7dcb64b81a4938d96ab5a659411f6681ba1f Mon Sep 17 00:00:00 2001 From: eric Date: Sun, 13 Nov 2022 22:06:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8B=9B=E5=8B=9F-=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/app.json | 2 +- dist/pages/home/index.js | 2 +- dist/project.private.config.json | 16 ---------------- src/app.config.ts | 1 + src/pages/formSubmit/index.tsx | 8 ++++++++ src/pages/home/index.tsx | 12 ++++++------ 6 files changed, 17 insertions(+), 24 deletions(-) delete mode 100644 dist/project.private.config.json create mode 100644 src/pages/formSubmit/index.tsx diff --git a/dist/app.json b/dist/app.json index 40a613b..dc58d5f 100644 --- a/dist/app.json +++ b/dist/app.json @@ -1 +1 @@ -{"pages":["pages/home/index","pages/activityList/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}} \ No newline at end of file +{"pages":["pages/home/index","pages/activityList/index","pages/formSubmit/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}} \ No newline at end of file diff --git a/dist/pages/home/index.js b/dist/pages/home/index.js index 96068d9..753f90e 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/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=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,w=e.square,y=e.reverse,x=void 0!==y&&y,_=e.className,S=void 0===_?"":_,O=e.style,k=void 0===O?{}:O,P=(0,o.default)(e,u),C=(0,a.useRef)([]),T=(0,a.useCallback)((function(){C.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){T()}),[T]);var N=(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:N,key:o,index:o,parentInstance:{columnNum:m,border:v,square:w,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/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;t0&&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(){H()}),h.current.duration)}),[]),J=(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!==E&&(0,i.nextTick)((function(){(E||n.width<=t.width)&&(h.current.wrapWidth=n.width,h.current.contentWidth=t.width,h.current.duration=(n.width+t.width)/N*1e3,h.current.animation=(0,i.createAnimation)({duration:h.current.duration,timingFunction:"linear",delay:C}),H(!0))}))}))}))}),[o.unitag,E,N,C,H]),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:R})+" ".concat(U||""),style:u.style([m.rootStyle({color:q,backgroundColor:M,background:X}),L])},B),{},{onClick:W,children:[V?(0,f.jsx)(d.default,{name:V,className:"van-notice-bar__left-icon"}):Y,(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!==E||R?"":"van-ellipsis"),animation:o.animationData,children:[w,!w&&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"})}):K]}))}},"./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=me&&xe({pace:-me})},ge=function prev(){he(),Pe(),Oe((function(){Oe((function(){T.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},we=function next(){he(),Pe(),Oe((function(){Oe((function(){T.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},ye=function to(e){he(),Pe(),Oe((function(){Oe((function(){var t;T.current.moving=!1,t=c.loop&&me===e?0===X?0:e:e%me,xe({pace:t-X,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=u0;te[me-1]=m?-fe:0}ne(te)}i&&X!==s&&c.onChange&&c.onChange((s+me)%me),X=s,R(s),$(u),Te(u)}},_e=function getActive(e){if(e){var t=X+e;return c.loop?ke(t,-1,me):ke(t,0,me-1)}return X},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",E),n)),Te=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=C.current,n=0;if(S){var o=E?G:W,r=E?(null==A?void 0:A.height)-o:(null==A?void 0:A.width)-o;n=e+(X!==me-1||c.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(T.current.moving?0:c.duration,"ms"),t.style[E?"height":"width"]="".concat(Number(se)*me,"px"),t.style[E?"width":"height"]="".concat(E?W:G,"px"),t.style.transform="translate3D".concat(E?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,l.useEffect)((function(){T.current.activePagination=(X+me)%me}),[X]);var Ne=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,Ne(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=E?r:o,fe=me*Number(se),a=Se(n),T.current.moving=!0,ae&&(T.current.moving=!1),q(t),R(n),F(o),B(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&&Te()}),[E,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 Ee=function itemStyle(e){var t={},n=c.direction||y,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:ye,next:we,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&&T.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=E?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&&T.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(T.current.moving=!1,t&&ue.stateDirection===c.direction){var o=E?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}):Te();be()}},catchMove:E,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:Ee(t),children:e},t)})),(0,b.jsx)(j.View,{className:"van-swiper-item-wrapper",style:Ee(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",E),s)),children:l.Children.map(de,(function(e,t){var n;return(0,b.jsx)(j.Text,{style:(X+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",(X+me)%me===t),n))},t)}))}):(0,b.jsx)(j.View,{children:_})]}))})},x=(0,l.forwardRef)(y);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;o0&&(w=setTimeout((function(){(0,f.trigger)("toast_clear",e)}),t.duration)))},N=(0,s.useCallback)((function(e){C(e)}),[]),D=(0,s.useCallback)((function(e){g=Object.assign(g,e)}),[]),E=(0,s.useCallback)((function(){g=Object.assign({},h)}),[]);return(0,s.useEffect)((function(){return(0,f.on)("toast_show",T),(0,f.on)("toast_clear",N),(0,f.on)("toast_setDefaultOptions",D),(0,f.on)("toast_resetDefaultOptions",E),function(){(0,f.off)("toast_show",T),(0,f.off)("toast_clear",N),(0,f.off)("toast_setDefaultOptions",D),(0,f.off)("toast_resetDefaultOptions",E)}}),[]),(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=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,w=e.square,y=e.reverse,x=void 0!==y&&y,_=e.className,S=void 0===_?"":_,O=e.style,k=void 0===O?{}:O,P=(0,o.default)(e,u),C=(0,a.useRef)([]),T=(0,a.useCallback)((function(){C.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){T()}),[T]);var N=(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:N,key:o,index:o,parentInstance:{columnNum:m,border:v,square:w,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/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;t0&&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(){H()}),h.current.duration)}),[]),J=(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!==E&&(0,i.nextTick)((function(){(E||n.width<=t.width)&&(h.current.wrapWidth=n.width,h.current.contentWidth=t.width,h.current.duration=(n.width+t.width)/N*1e3,h.current.animation=(0,i.createAnimation)({duration:h.current.duration,timingFunction:"linear",delay:C}),H(!0))}))}))}))}),[o.unitag,E,N,C,H]),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:R})+" ".concat(U||""),style:u.style([m.rootStyle({color:q,backgroundColor:M,background:X}),L])},B),{},{onClick:W,children:[V?(0,f.jsx)(d.default,{name:V,className:"van-notice-bar__left-icon"}):Y,(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!==E||R?"":"van-ellipsis"),animation:o.animationData,children:[w,!w&&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"})}):K]}))}},"./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=me&&xe({pace:-me})},ge=function prev(){he(),Pe(),Oe((function(){Oe((function(){T.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},we=function next(){he(),Pe(),Oe((function(){Oe((function(){T.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},ye=function to(e){he(),Pe(),Oe((function(){Oe((function(){var t;T.current.moving=!1,t=c.loop&&me===e?0===X?0:e:e%me,xe({pace:t-X,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=u0;te[me-1]=m?-fe:0}ne(te)}i&&X!==s&&c.onChange&&c.onChange((s+me)%me),X=s,R(s),$(u),Te(u)}},_e=function getActive(e){if(e){var t=X+e;return c.loop?ke(t,-1,me):ke(t,0,me-1)}return X},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",E),n)),Te=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=C.current,n=0;if(S){var o=E?G:W,r=E?(null==A?void 0:A.height)-o:(null==A?void 0:A.width)-o;n=e+(X!==me-1||c.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(T.current.moving?0:c.duration,"ms"),t.style[E?"height":"width"]="".concat(Number(se)*me,"px"),t.style[E?"width":"height"]="".concat(E?W:G,"px"),t.style.transform="translate3D".concat(E?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,l.useEffect)((function(){T.current.activePagination=(X+me)%me}),[X]);var Ne=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,Ne(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=E?r:o,fe=me*Number(se),a=Se(n),T.current.moving=!0,ae&&(T.current.moving=!1),q(t),R(n),F(o),B(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&&Te()}),[E,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 Ee=function itemStyle(e){var t={},n=c.direction||y,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:ye,next:we,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&&T.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=E?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&&T.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(T.current.moving=!1,t&&ue.stateDirection===c.direction){var o=E?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}):Te();be()}},catchMove:E,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:Ee(t),children:e},t)})),(0,b.jsx)(j.View,{className:"van-swiper-item-wrapper",style:Ee(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",E),s)),children:l.Children.map(de,(function(e,t){var n;return(0,b.jsx)(j.Text,{style:(X+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",(X+me)%me===t),n))},t)}))}):(0,b.jsx)(j.View,{children:_})]}))})},x=(0,l.forwardRef)(y);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;o0&&(w=setTimeout((function(){(0,f.trigger)("toast_clear",e)}),t.duration)))},N=(0,s.useCallback)((function(e){C(e)}),[]),D=(0,s.useCallback)((function(e){g=Object.assign(g,e)}),[]),E=(0,s.useCallback)((function(){g=Object.assign({},h)}),[]);return(0,s.useEffect)((function(){return(0,f.on)("toast_show",T),(0,f.on)("toast_clear",N),(0,f.on)("toast_setDefaultOptions",D),(0,f.on)("toast_resetDefaultOptions",E),function(){(0,f.off)("toast_show",T),(0,f.off)("toast_clear",N),(0,f.off)("toast_setDefaultOptions",D),(0,f.off)("toast_resetDefaultOptions",E)}}),[]),(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{ + return formSubmit +} + +export default formSubmit \ No newline at end of file diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index 766488d..a9e6ea6 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -99,8 +99,8 @@ const Home = () => { icon="photo-o" text="打卡" onClick={() => { - Toast.fail({ - message: "暂未开放", + Toast.success({ + message: "打卡成功", selector: "#vanToast-demo2", }); }} @@ -130,10 +130,10 @@ const Home = () => { icon="photo-o" text="招募" onClick={() => { - Toast.fail({ - message: "暂未开放", - selector: "#vanToast-demo2", - }); + // 跳转到目的页面,打开新页面 + Taro.navigateTo({ + url: "/pages/formSubmit/index", + }); }} />