From d98b4871a1711dde98c6fb615bd230f97ad078fa Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 26 Nov 2022 03:47:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=86=E4=BA=AB=E5=88=B0=E6=9C=8B?= =?UTF-8?q?=E5=8F=8B=E5=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 2 ++ dist/pages/home/index.js | 2 +- src/pages/home/index.tsx | 43 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/config/index.js b/config/index.js index 93f1643..77d7f02 100644 --- a/config/index.js +++ b/config/index.js @@ -1,4 +1,6 @@ const config = { + enableShareTimeline: true,//允许分享到朋友圈 + enableShareAppMessage: true, projectName: "myApp", date: "2022-11-13", designWidth: 750, diff --git a/dist/pages/home/index.js b/dist/pages/home/index.js index a6e2b0b..aac0dbe 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/dialog/dialog.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@antmjs/vantui/es/dialog/events.js");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;t1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.selector&&e.id!==t.selector.replace(/^#/,"")||(v(_objectSpread({},t)),pe(!!t.show))},n=function stopLoadingFn(){ge()},o=function closeFn(){he("close")};return(0,p.on)("alert",t),(0,p.on)("close",o),(0,p.on)("stopLoading",n),function(){(0,p.off)("alert",t),(0,p.off)("close",o),(0,p.off)("stopLoading",n)}}}),[he,ge,o,e.id]),(0,s.useEffect)((function(){return function(){(0,p.off)("confirm"),(0,p.off)("cancel"),(0,p.off)("alert"),(0,p.off)("close"),(0,p.off)("stopLoading")}}),[]),(0,g.jsxs)(m.default,{show:me,zIndex:O,overlay:w,className:"van-dialog van-dialog--"+_+" "+"".concat(te||""),style:h.style(["width: "+h.addUnit(S)+";",ee]),overlayStyle:k,closeOnClickOverlay:C,onClose:ve,children:[(T||X)&&(0,g.jsx)(i.View,{className:h.bem("dialog__header",{isolated:!(P||X)}),children:X||T&&(0,g.jsx)(g.Fragment,{children:T})}),Z||P&&(0,g.jsx)(i.View,{className:h.bem("dialog__message",[_,N,{hasTitle:T}]),children:(0,g.jsx)(i.Text,{className:"van-dialog__message-text",children:P})}),"round-button"===_?(0,g.jsxs)(d.default,{className:"van-dialog__footer--round-button",children:[E&&(0,g.jsx)(u.default,{loading:ce,className:"van-dialog__button van-hairline--right van-dialog__cancel",style:I?{color:I}:{},onClick:ye,children:A}),V&&(0,g.jsx)(u.default,_objectSpread(_objectSpread({className:"van-dialog__button van-dialog__confirm",style:D?{color:D}:{},loading:ae,openType:M,sessionFrom:B,sendMessageTitle:G,sendMessagePath:R,sendMessageImg:K,appParameter:q,onClick:je},ne),{},{children:Y}))]}):(0,g.jsxs)(i.View,{className:"van-hairline--top van-dialog__footer",children:[E&&(0,g.jsx)(f.default,{size:"large",loading:ce,className:"van-dialog__button van-dialog__cancel",style:I?{color:I}:{},onClick:ye,children:A}),V&&(0,g.jsx)(f.default,_objectSpread(_objectSpread({size:"large",className:"van-dialog__button van-dialog__confirm ".concat(E?"van-hairline--left":""),loading:ae,style:D?{color:D}:{},openType:M,sessionFrom:B,sendMessageTitle:G,sendMessagePath:R,sendMessageImg:K,showMessageCard:z,appParameter:q,onClick:je},ne),{},{children:Y}))]})]})}Dialog.alert=function(e){return v.default.alert(e)},Dialog.confirm=function(e){return v.default.confirm(e)},Dialog.close=function(){v.default.close()},Dialog.stopLoading=function(){v.default.stopLoading()},Dialog.setDefaultOptions=function(e){v.default.setDefaultOptions(e)},Dialog.resetDefaultOptions=function(){v.default.resetDefaultOptions()},t.default=Dialog},"./node_modules/@antmjs/vantui/es/field/index.js":function(e,t,n){"use strict";n.d(t,{Field:function(){return Field}});var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=n("webpack/container/remote/@tarojs/taro"),i=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"),c=n("./node_modules/@antmjs/vantui/es/cell/index.js"),u=n("./node_modules/@antmjs/vantui/es/icon/index.js"),d=(n("./node_modules/@antmjs/vantui/es/utils/index.js"),n("./node_modules/@antmjs/vantui/es/field/wxs.js")),f=n("webpack/container/remote/react/jsx-runtime");n("webpack/container/remote/@tarojs/runtime").document;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=W}),children:b.length>=W?W:b.length}),"/"+W]}),U&&(0,f.jsx)(s.View,{className:l.bem("field__error-message",[X,{disabled:A,error:H}]),children:U})]})}},"./node_modules/@antmjs/vantui/es/field/wxs.js":function(e,t,n){"use strict";n.d(t,{inputStyle:function(){return inputStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function inputStyle(e){return e&&"Object"===e.constructor.name?(0,o.style)({"min-height":(0,r.addUnit)(e.minHeight),"max-height":(0,r.addUnit)(e.maxHeight)}):""}},"./node_modules/@antmjs/vantui/es/goods-action-button/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("webpack/container/remote/react"),i=n("./node_modules/@antmjs/vantui/es/button/index.js"),s=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/common/jumpLink.js"),c=n("webpack/container/remote/react/jsx-runtime"),u=["text","url","linkType","plain","type","style","isFirst","isLast","onClick","children","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=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"),l=n("webpack/container/remote/react/jsx-runtime"),c=["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,f=void 0===d?4:d,m=e.center,p=void 0===m||m,h=e.border,v=void 0===h||h,g=e.direction,b=e.iconSize,j=void 0===b?"48":b,y=e.square,w=e.reverse,x=void 0!==w&&w,_=e.className,O=void 0===_?"":_,S=e.style,k=void 0===S?{}:S,C=(0,o.default)(e,c),P=(0,a.useRef)([]),T=(0,a.useCallback)((function(){P.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){T()}),[T]);var N=(0,a.useCallback)((function(e,t){P.current[e]=t}),[]),E=(0,a.useMemo)((function(){var e=[];return C.children&&Array.isArray(C.children)&&C.children.forEach((function(t,o){e.push((0,a.cloneElement)(t,{setChildrenInstance:N,key:o,index:o,parentInstance:{columnNum:f,border:v,square:y,gutter:n,clickable:u,center:p,direction:g,reverse:x,iconSize:j}}))})),e}),[C.children,f]);return(0,l.jsx)(r.View,{className:"van-grid "+(v&&!n?"van-hairline--top":"")+" "+O,style:i.style([s.rootStyle({gutter:n}),k]),children:E})}},"./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"),l=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=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"),f=n("./node_modules/@antmjs/vantui/es/notice-bar/wxs.js"),m=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(){U()}),b.current.duration)}),[]),$=(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)/N*1e3,b.current.animation=(0,i.createAnimation)({duration:b.current.duration,timingFunction:"linear",delay:P}),U(!0))}))}))}))}),[o.unitag,I,N,P,U]),J=(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==q||q(e))}),[x,q]);return o.show&&(0,m.jsxs)(l.View,_objectSpread(_objectSpread({className:c.bem("notice-bar",{withicon:x,wrapable:G})+" ".concat(Y||""),style:c.style([f.rootStyle({color:L,backgroundColor:M,background:B}),W])},H),{},{onClick:z,children:[F?(0,m.jsx)(d.default,{name:F,className:"van-notice-bar__left-icon"}):R,(0,m.jsx)(l.View,{className:"van-notice-bar__wrap van-notice-bar__wrap_".concat(o.unitag),children:(0,m.jsxs)(l.View,{className:"van-notice-bar__content van-notice-bar__content_".concat(o.unitag," ")+(!1!==I||G?"":"van-ellipsis"),animation:o.animationData,children:[y,!y&&X]})}),"closeable"===x?(0,m.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:J}):"link"===x?(0,m.jsx)(l.Navigator,{url:O,openType:k,children:(0,m.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/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"),l=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),c=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=fe&&xe({pace:-fe})},je=function prev(){be(),Ce(),Se((function(){Se((function(){T.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},ye=function next(){be(),Ce(),Se((function(){Se((function(){T.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},we=function to(e){be(),Ce(),Se((function(){Se((function(){var t;T.current.moving=!1,t=l.loop&&fe===e?0===B?0:e:e%fe,xe({pace:t-B,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(!(fe<=1)){var s=_e(n),c=Oe(s,r);if(l.loop){if(Array.isArray(d)&&d[0]&&c!==he){var u=c0;te[fe-1]=f?-me:0}ne(te)}i&&B!==s&&l.onChange&&l.onChange((s+fe)%fe),B=s,G(s),Q(c),Te(c)}},_e=function getActive(e){if(e){var t=B+e;return l.loop?ke(t,-1,fe):ke(t,0,fe-1)}return B},Oe=function getOffset(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*Number(se);l.loop||(n=Math.min(n,-he));var o=t-n;return l.loop||(o=ke(o,he,0)),o},Se=function requestFrame(e){b.requestAnimationFrame.call(b,e)},ke=function range(e,t,n){return Math.min(Math.max(e,t),n)},Ce=function touchReset(){ce.startX=0,ce.startY=0,ce.deltaX=0,ce.deltaY=0,ce.offsetX=0,ce.offsetY=0,ce.delta=0,ce.stateDirection="",ce.touchTime=0},Pe=f()((n={},(0,i.default)(n,"van-swiper__inner",!0),(0,i.default)(n,"van-swiper__vertical",I),n)),Te=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,t=P.current,n=0;if(O){var o=I?X:z,r=I?(null==A?void 0:A.height)-o:(null==A?void 0:A.width)-o;n=e+(B!==fe-1||l.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(T.current.moving?0:l.duration,"ms"),t.style[I?"height":"width"]="".concat(Number(se)*fe,"px"),t.style[I?"width":"height"]="".concat(I?z:X,"px"),t.style.transform="translate3D".concat(I?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,u.useEffect)((function(){T.current.activePagination=(B+fe)%fe}),[B]);var Ne=function queryRect(e){return new Promise((function(t){var n=(0,m.createSelectorQuery)();n.select("#".concat(e.id))&&n.select("#".concat(e.id)).boundingClientRect(),n.exec((function(e){t(e[0])}))}))},Ee=function(){var e=(0,o.default)(c().mark((function _callee(){var e,t,n,o,r,a,i=arguments;return c().wrap((function _callee$(s){for(;;)switch(s.prev=s.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:+l.initPage,s.next=3,Ne(C.current);case 3:t=s.sent,n=Math.max(Math.min(fe-1,e),0),o=l.width?+l.width:null==t?void 0:t.width,r=l.height?+l.height:null==t?void 0:t.height,se=I?r:o,me=fe*Number(se),a=Oe(n),T.current.moving=!0,ae&&(T.current.moving=!1),L(t),G(n),q(o),H(r),Q(a),ie(!0);case 18:case"end":return s.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){ae&&Te()}),[I,z,X,J,ae]),(0,u.useEffect)((function(){return function(){ie(!1)}}),[]),(0,u.useEffect)((function(){ve(),ge()}),[d]),(0,u.useEffect)((function(){Ee()}),[l.initPage]),(0,u.useEffect)((function(){return function(){ve()}}),[]),(0,m.useReady)((function(){Ee(),p().nextTick((function(){setTimeout((function(){ve(),ge()}),16)}))}));var Ie=function itemStyle(e){var t={},n=l.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:je}})),(0,g.jsx)(v.DataContext.Provider,{value:pe,children:(0,g.jsxs)(h.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:C},k),{},{id:"container-"+E,onTouchStart:function onTouchStart(e){l.isPreventDefault&&e.preventDefault(),l.isStopPropagation&&e.stopPropagation(),l.touchable&&(!function touchStart(e){var t,n;Ce(),ce.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,ce.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),ce.touchTime=Date.now(),ve(),be())},onTouchMove:function onTouchMove(e){l.touchable&&T.current.moving&&(!function touchMove(e){var t,n;ce.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-ce.startX,ce.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-ce.startY,ce.offsetX=Math.abs(ce.deltaX),ce.offsetY=Math.abs(ce.deltaY),ce.delta=I?ce.deltaY:ce.deltaX,ce.stateDirection||(ce.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(ce.offsetX,ce.offsetY))}(e),ce.stateDirection===l.direction&&xe({offset:ce.delta}))},onTouchEnd:function onTouchEnd(){if(l.touchable&&T.current.moving){var e=ce.delta/(Date.now()-ce.touchTime),t=Math.abs(e)>.3||Math.abs(ce.delta)>+(se/2).toFixed(2),n=0;if(T.current.moving=!1,t&&ce.stateDirection===l.direction){var o=I?ce.offsetY:ce.offsetX;n=l.loop?o>0?ce.delta>0?-1:1:0:-Math[ce.delta>0?"ceil":"floor"](ce.delta/se),xe({pace:n,isEmit:!0})}else ce.delta?xe({pace:0}):Te();ge()}},catchMove:I,style:_objectSpread(_objectSpread({},S),{},{height:X}),children:[(0,g.jsxs)(h.View,{className:Pe,ref:P,children:[u.Children.map(de,(function(e,t){return(0,g.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(t),children:e},t)})),(0,g.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(0),children:de&&de.length?de[0]:""})]}),l.paginationVisible&&!("pageContent"in l)?(0,g.jsx)(h.View,{className:f()((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,g.jsx)(h.Text,{style:(B+fe)%fe===t?{backgroundColor:l.paginationColor}:void 0,className:f()((n={},(0,i.default)(n,"van-swiper__pagination-item",!0),(0,i.default)(n,"active",(B+fe)%fe===t),n))},t)}))}):(0,g.jsx)(h.View,{children:_})]}))})},x=(0,u.forwardRef)(w);t.default=x},"./node_modules/@antmjs/vantui/es/utils/index.js":function(e,t,n){"use strict";n.d(t,{resizeTextarea:function(){return resizeTextarea}});n("./node_modules/@babel/runtime/helpers/esm/typeof.js"),n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),n("webpack/container/remote/react"),n("webpack/container/remote/@tarojs/taro");var o=n("./node_modules/@antmjs/vantui/es/utils/type.js"),r=n("webpack/container/remote/@tarojs/runtime").window,a=n("webpack/container/remote/@tarojs/runtime").document;function setScrollTop(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function resizeTextarea(e,t){var n=function getRootScrollTop(){return r.pageYOffset||a.documentElement.scrollTop||a.body.scrollTop||0}();e.style.height="auto",e.style.lineHeight="inherit",e.rows=1;var i=e.scrollHeight;if(console.info(i),(0,o.isObject)(t)){var s=t.maxHeight,l=t.minHeight;void 0!==s&&(i=Math.min(i,"number"==typeof s?s:Number(s.replace("px","")))),void 0!==l&&(i=Math.max(i,"number"==typeof l?l:Number(l.replace("px",""))))}i&&(e.style.height="".concat(i,"px"),function setRootScrollTop(e){setScrollTop(r,e),setScrollTop(a.body,e)}(n))}},"./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;t0&&(null!==(C=null==J||null===(P=J[0])||void 0===P?void 0:P.imagesArr)&&void 0!==C?C:[]).map((function(e,t){return(0,k.jsx)(i.default,{children:(0,k.jsx)(s.default,{src:null==e?void 0:e.url,fit:"cover",width:"100%",height:"200px"})},"swiper#demo1".concat(t))}))})}),(0,k.jsxs)(o.default,{children:[(0,k.jsx)(r.default,{icon:"star",text:"打卡",className:"iconStyle",onClick:(0,v.default)((0,h.default)().mark((function _callee8(){var e;return(0,h.default)().wrap((function _callee8$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,O.phoneLogin)();case 2:e=t.sent,ie(!0),console.log("isin",e),e?ue():m.default.fail({message:"请先登录",selector:"#vanToast-demo2"});case 6:case"end":return t.stop()}}),_callee8)})))}),(0,k.jsx)(r.default,{icon:"like",className:"iconStyle",text:"深圳十峰",onClick:function onClick(){x().navigateTo({url:"/pages/mountainPeak/index"})}}),(0,k.jsx)(r.default,{icon:"eye",className:"iconStyle",text:"活动",onClick:function onClick(){x().navigateTo({url:"/pages/activityList/index"})}}),(0,k.jsx)(r.default,{icon:"manager",className:"iconStyle",text:"组队",onClick:function onClick(){m.default.fail({message:"参加1次活动后,可发起组队",selector:"#vanToast-demo2"})}})]}),(null==X?void 0:X.length)>0&&(0,k.jsx)(b.View,{children:(null!==(T=null==X?void 0:X.splice(0,2))&&void 0!==T?T:[]).map((function(e,t){return(0,k.jsx)(b.View,{onClick:function onClick(){console.log("Card"),x().navigateTo({url:"/pages/activityList/components/details/index?id=".concat(null==e?void 0:e._id)})},children:(0,k.jsx)(S.default,{dataSource:e})})}))}),(0,k.jsxs)(b.View,{style:{marginTop:"20px"},children:[" ",(0,k.jsx)(b.OfficialAccount,{onLoad:function onLoad(e){console.log("加载成功",e)},onError:function onError(e){console.log("加载失败",e)}})]}),(0,k.jsx)(m.default,{id:"vanToast-demo2"}),(0,k.jsx)(_.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:[]}},{navigationBarTitleText:"首页"}||{}))},"./node_modules/@babel/runtime/helpers/regeneratorRuntime.js":function(e,t,n){var o=n("./node_modules/@babel/runtime/helpers/typeof.js").default;function _regeneratorRuntime(){"use strict";e.exports=_regeneratorRuntime=function _regeneratorRuntime(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function define(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{define({},"")}catch(e){define=function define(e,t,n){return e[t]=n}}function wrap(e,t,n,o){var r=t&&t.prototype instanceof Generator?t:Generator,i=Object.create(r.prototype),s=new Context(o||[]);return a(i,"_invoke",{value:makeInvokeMethod(e,n,s)}),i}function tryCatch(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=wrap;var u={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,s,(function(){return this}));var f=Object.getPrototypeOf,m=f&&f(f(values([])));m&&m!==n&&r.call(m,s)&&(d=m);var p=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(e){["next","throw","return"].forEach((function(t){define(e,t,(function(e){return this._invoke(t,e)}))}))}function AsyncIterator(e,t){function invoke(n,a,i,s){var l=tryCatch(e[n],e,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==o(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){invoke("next",e,i,s)}),(function(e){invoke("throw",e,i,s)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return invoke("throw",e,i,s)}))}s(l.arg)}var n;a(this,"_invoke",{value:function value(e,o){function callInvokeWithMethodAndArg(){return new t((function(t,n){invoke(e,o,t,n)}))}return n=n?n.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,t,n){var o="suspendedStart";return function(r,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw a;return doneResult()}for(n.method=r,n.arg=a;;){var i=n.delegate;if(i){var s=maybeInvokeDelegate(i,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=tryCatch(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}function maybeInvokeDelegate(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,maybeInvokeDelegate(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=tryCatch(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function pushTryEntry(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function resetTryEntry(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Context(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function next(){for(;++n=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var i=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(i&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),resetTryEntry(n),u}},catch:function _catch(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;resetTryEntry(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,t,n){return this.delegate={iterator:values(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}e.exports=_regeneratorRuntime,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/regenerator/index.js":function(e,t,n){var o=n("./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/home/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file +(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/home/index"],{"./node_modules/@antmjs/vantui/es/dialog/dialog.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@antmjs/vantui/es/dialog/events.js");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;t1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.selector&&e.id!==t.selector.replace(/^#/,"")||(v(_objectSpread({},t)),pe(!!t.show))},n=function stopLoadingFn(){ge()},o=function closeFn(){he("close")};return(0,p.on)("alert",t),(0,p.on)("close",o),(0,p.on)("stopLoading",n),function(){(0,p.off)("alert",t),(0,p.off)("close",o),(0,p.off)("stopLoading",n)}}}),[he,ge,o,e.id]),(0,s.useEffect)((function(){return function(){(0,p.off)("confirm"),(0,p.off)("cancel"),(0,p.off)("alert"),(0,p.off)("close"),(0,p.off)("stopLoading")}}),[]),(0,g.jsxs)(m.default,{show:me,zIndex:O,overlay:w,className:"van-dialog van-dialog--"+_+" "+"".concat(te||""),style:h.style(["width: "+h.addUnit(S)+";",ee]),overlayStyle:k,closeOnClickOverlay:C,onClose:ve,children:[(T||X)&&(0,g.jsx)(i.View,{className:h.bem("dialog__header",{isolated:!(P||X)}),children:X||T&&(0,g.jsx)(g.Fragment,{children:T})}),Z||P&&(0,g.jsx)(i.View,{className:h.bem("dialog__message",[_,N,{hasTitle:T}]),children:(0,g.jsx)(i.Text,{className:"van-dialog__message-text",children:P})}),"round-button"===_?(0,g.jsxs)(d.default,{className:"van-dialog__footer--round-button",children:[E&&(0,g.jsx)(u.default,{loading:ce,className:"van-dialog__button van-hairline--right van-dialog__cancel",style:I?{color:I}:{},onClick:ye,children:A}),M&&(0,g.jsx)(u.default,_objectSpread(_objectSpread({className:"van-dialog__button van-dialog__confirm",style:D?{color:D}:{},loading:ae,openType:V,sessionFrom:B,sendMessageTitle:G,sendMessagePath:R,sendMessageImg:K,appParameter:q,onClick:je},ne),{},{children:Y}))]}):(0,g.jsxs)(i.View,{className:"van-hairline--top van-dialog__footer",children:[E&&(0,g.jsx)(f.default,{size:"large",loading:ce,className:"van-dialog__button van-dialog__cancel",style:I?{color:I}:{},onClick:ye,children:A}),M&&(0,g.jsx)(f.default,_objectSpread(_objectSpread({size:"large",className:"van-dialog__button van-dialog__confirm ".concat(E?"van-hairline--left":""),loading:ae,style:D?{color:D}:{},openType:V,sessionFrom:B,sendMessageTitle:G,sendMessagePath:R,sendMessageImg:K,showMessageCard:z,appParameter:q,onClick:je},ne),{},{children:Y}))]})]})}Dialog.alert=function(e){return v.default.alert(e)},Dialog.confirm=function(e){return v.default.confirm(e)},Dialog.close=function(){v.default.close()},Dialog.stopLoading=function(){v.default.stopLoading()},Dialog.setDefaultOptions=function(e){v.default.setDefaultOptions(e)},Dialog.resetDefaultOptions=function(){v.default.resetDefaultOptions()},t.default=Dialog},"./node_modules/@antmjs/vantui/es/field/index.js":function(e,t,n){"use strict";n.d(t,{Field:function(){return Field}});var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=n("webpack/container/remote/@tarojs/taro"),i=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"),c=n("./node_modules/@antmjs/vantui/es/cell/index.js"),u=n("./node_modules/@antmjs/vantui/es/icon/index.js"),d=(n("./node_modules/@antmjs/vantui/es/utils/index.js"),n("./node_modules/@antmjs/vantui/es/field/wxs.js")),f=n("webpack/container/remote/react/jsx-runtime");n("webpack/container/remote/@tarojs/runtime").document;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=W}),children:b.length>=W?W:b.length}),"/"+W]}),U&&(0,f.jsx)(s.View,{className:l.bem("field__error-message",[X,{disabled:A,error:H}]),children:U})]})}},"./node_modules/@antmjs/vantui/es/field/wxs.js":function(e,t,n){"use strict";n.d(t,{inputStyle:function(){return inputStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function inputStyle(e){return e&&"Object"===e.constructor.name?(0,o.style)({"min-height":(0,r.addUnit)(e.minHeight),"max-height":(0,r.addUnit)(e.maxHeight)}):""}},"./node_modules/@antmjs/vantui/es/goods-action-button/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("webpack/container/remote/react"),i=n("./node_modules/@antmjs/vantui/es/button/index.js"),s=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/common/jumpLink.js"),c=n("webpack/container/remote/react/jsx-runtime"),u=["text","url","linkType","plain","type","style","isFirst","isLast","onClick","children","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=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"),l=n("webpack/container/remote/react/jsx-runtime"),c=["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,f=void 0===d?4:d,m=e.center,p=void 0===m||m,h=e.border,v=void 0===h||h,g=e.direction,b=e.iconSize,j=void 0===b?"48":b,y=e.square,w=e.reverse,x=void 0!==w&&w,_=e.className,O=void 0===_?"":_,S=e.style,k=void 0===S?{}:S,C=(0,o.default)(e,c),P=(0,a.useRef)([]),T=(0,a.useCallback)((function(){P.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){T()}),[T]);var N=(0,a.useCallback)((function(e,t){P.current[e]=t}),[]),E=(0,a.useMemo)((function(){var e=[];return C.children&&Array.isArray(C.children)&&C.children.forEach((function(t,o){e.push((0,a.cloneElement)(t,{setChildrenInstance:N,key:o,index:o,parentInstance:{columnNum:f,border:v,square:y,gutter:n,clickable:u,center:p,direction:g,reverse:x,iconSize:j}}))})),e}),[C.children,f]);return(0,l.jsx)(r.View,{className:"van-grid "+(v&&!n?"van-hairline--top":"")+" "+O,style:i.style([s.rootStyle({gutter:n}),k]),children:E})}},"./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"),l=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=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"),f=n("./node_modules/@antmjs/vantui/es/notice-bar/wxs.js"),m=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(){U()}),b.current.duration)}),[]),$=(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)/N*1e3,b.current.animation=(0,i.createAnimation)({duration:b.current.duration,timingFunction:"linear",delay:P}),U(!0))}))}))}))}),[o.unitag,I,N,P,U]),J=(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==q||q(e))}),[x,q]);return o.show&&(0,m.jsxs)(l.View,_objectSpread(_objectSpread({className:c.bem("notice-bar",{withicon:x,wrapable:G})+" ".concat(Y||""),style:c.style([f.rootStyle({color:L,backgroundColor:V,background:B}),W])},H),{},{onClick:z,children:[F?(0,m.jsx)(d.default,{name:F,className:"van-notice-bar__left-icon"}):R,(0,m.jsx)(l.View,{className:"van-notice-bar__wrap van-notice-bar__wrap_".concat(o.unitag),children:(0,m.jsxs)(l.View,{className:"van-notice-bar__content van-notice-bar__content_".concat(o.unitag," ")+(!1!==I||G?"":"van-ellipsis"),animation:o.animationData,children:[y,!y&&X]})}),"closeable"===x?(0,m.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:J}):"link"===x?(0,m.jsx)(l.Navigator,{url:O,openType:k,children:(0,m.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/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"),l=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),c=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=fe&&xe({pace:-fe})},je=function prev(){be(),Ce(),Se((function(){Se((function(){T.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},ye=function next(){be(),Ce(),Se((function(){Se((function(){T.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},we=function to(e){be(),Ce(),Se((function(){Se((function(){var t;T.current.moving=!1,t=l.loop&&fe===e?0===B?0:e:e%fe,xe({pace:t-B,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(!(fe<=1)){var s=_e(n),c=Oe(s,r);if(l.loop){if(Array.isArray(d)&&d[0]&&c!==he){var u=c0;te[fe-1]=f?-me:0}ne(te)}i&&B!==s&&l.onChange&&l.onChange((s+fe)%fe),B=s,G(s),Q(c),Te(c)}},_e=function getActive(e){if(e){var t=B+e;return l.loop?ke(t,-1,fe):ke(t,0,fe-1)}return B},Oe=function getOffset(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*Number(se);l.loop||(n=Math.min(n,-he));var o=t-n;return l.loop||(o=ke(o,he,0)),o},Se=function requestFrame(e){b.requestAnimationFrame.call(b,e)},ke=function range(e,t,n){return Math.min(Math.max(e,t),n)},Ce=function touchReset(){ce.startX=0,ce.startY=0,ce.deltaX=0,ce.deltaY=0,ce.offsetX=0,ce.offsetY=0,ce.delta=0,ce.stateDirection="",ce.touchTime=0},Pe=f()((n={},(0,i.default)(n,"van-swiper__inner",!0),(0,i.default)(n,"van-swiper__vertical",I),n)),Te=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,t=P.current,n=0;if(O){var o=I?X:z,r=I?(null==A?void 0:A.height)-o:(null==A?void 0:A.width)-o;n=e+(B!==fe-1||l.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(T.current.moving?0:l.duration,"ms"),t.style[I?"height":"width"]="".concat(Number(se)*fe,"px"),t.style[I?"width":"height"]="".concat(I?z:X,"px"),t.style.transform="translate3D".concat(I?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,u.useEffect)((function(){T.current.activePagination=(B+fe)%fe}),[B]);var Ne=function queryRect(e){return new Promise((function(t){var n=(0,m.createSelectorQuery)();n.select("#".concat(e.id))&&n.select("#".concat(e.id)).boundingClientRect(),n.exec((function(e){t(e[0])}))}))},Ee=function(){var e=(0,o.default)(c().mark((function _callee(){var e,t,n,o,r,a,i=arguments;return c().wrap((function _callee$(s){for(;;)switch(s.prev=s.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:+l.initPage,s.next=3,Ne(C.current);case 3:t=s.sent,n=Math.max(Math.min(fe-1,e),0),o=l.width?+l.width:null==t?void 0:t.width,r=l.height?+l.height:null==t?void 0:t.height,se=I?r:o,me=fe*Number(se),a=Oe(n),T.current.moving=!0,ae&&(T.current.moving=!1),L(t),G(n),q(o),H(r),Q(a),ie(!0);case 18:case"end":return s.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){ae&&Te()}),[I,z,X,J,ae]),(0,u.useEffect)((function(){return function(){ie(!1)}}),[]),(0,u.useEffect)((function(){ve(),ge()}),[d]),(0,u.useEffect)((function(){Ee()}),[l.initPage]),(0,u.useEffect)((function(){return function(){ve()}}),[]),(0,m.useReady)((function(){Ee(),p().nextTick((function(){setTimeout((function(){ve(),ge()}),16)}))}));var Ie=function itemStyle(e){var t={},n=l.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:je}})),(0,g.jsx)(v.DataContext.Provider,{value:pe,children:(0,g.jsxs)(h.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:C},k),{},{id:"container-"+E,onTouchStart:function onTouchStart(e){l.isPreventDefault&&e.preventDefault(),l.isStopPropagation&&e.stopPropagation(),l.touchable&&(!function touchStart(e){var t,n;Ce(),ce.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,ce.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),ce.touchTime=Date.now(),ve(),be())},onTouchMove:function onTouchMove(e){l.touchable&&T.current.moving&&(!function touchMove(e){var t,n;ce.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-ce.startX,ce.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-ce.startY,ce.offsetX=Math.abs(ce.deltaX),ce.offsetY=Math.abs(ce.deltaY),ce.delta=I?ce.deltaY:ce.deltaX,ce.stateDirection||(ce.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(ce.offsetX,ce.offsetY))}(e),ce.stateDirection===l.direction&&xe({offset:ce.delta}))},onTouchEnd:function onTouchEnd(){if(l.touchable&&T.current.moving){var e=ce.delta/(Date.now()-ce.touchTime),t=Math.abs(e)>.3||Math.abs(ce.delta)>+(se/2).toFixed(2),n=0;if(T.current.moving=!1,t&&ce.stateDirection===l.direction){var o=I?ce.offsetY:ce.offsetX;n=l.loop?o>0?ce.delta>0?-1:1:0:-Math[ce.delta>0?"ceil":"floor"](ce.delta/se),xe({pace:n,isEmit:!0})}else ce.delta?xe({pace:0}):Te();ge()}},catchMove:I,style:_objectSpread(_objectSpread({},S),{},{height:X}),children:[(0,g.jsxs)(h.View,{className:Pe,ref:P,children:[u.Children.map(de,(function(e,t){return(0,g.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(t),children:e},t)})),(0,g.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(0),children:de&&de.length?de[0]:""})]}),l.paginationVisible&&!("pageContent"in l)?(0,g.jsx)(h.View,{className:f()((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,g.jsx)(h.Text,{style:(B+fe)%fe===t?{backgroundColor:l.paginationColor}:void 0,className:f()((n={},(0,i.default)(n,"van-swiper__pagination-item",!0),(0,i.default)(n,"active",(B+fe)%fe===t),n))},t)}))}):(0,g.jsx)(h.View,{children:_})]}))})},x=(0,u.forwardRef)(w);t.default=x},"./node_modules/@antmjs/vantui/es/utils/index.js":function(e,t,n){"use strict";n.d(t,{resizeTextarea:function(){return resizeTextarea}});n("./node_modules/@babel/runtime/helpers/esm/typeof.js"),n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),n("webpack/container/remote/react"),n("webpack/container/remote/@tarojs/taro");var o=n("./node_modules/@antmjs/vantui/es/utils/type.js"),r=n("webpack/container/remote/@tarojs/runtime").window,a=n("webpack/container/remote/@tarojs/runtime").document;function setScrollTop(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function resizeTextarea(e,t){var n=function getRootScrollTop(){return r.pageYOffset||a.documentElement.scrollTop||a.body.scrollTop||0}();e.style.height="auto",e.style.lineHeight="inherit",e.rows=1;var i=e.scrollHeight;if(console.info(i),(0,o.isObject)(t)){var s=t.maxHeight,l=t.minHeight;void 0!==s&&(i=Math.min(i,"number"==typeof s?s:Number(s.replace("px","")))),void 0!==l&&(i=Math.max(i,"number"==typeof l?l:Number(l.replace("px",""))))}i&&(e.style.height="".concat(i,"px"),function setRootScrollTop(e){setScrollTop(r,e),setScrollTop(a.body,e)}(n))}},"./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;t0&&(null!==(P=null==Q||null===(T=Q[0])||void 0===T?void 0:T.imagesArr)&&void 0!==P?P:[]).map((function(e,t){return(0,k.jsx)(i.default,{children:(0,k.jsx)(s.default,{src:null==e?void 0:e.url,fit:"cover",width:"100%",height:"200px"})},"swiper#demo1".concat(t))}))})}),(0,k.jsxs)(o.default,{children:[(0,k.jsx)(r.default,{icon:"star",text:"打卡",className:"iconStyle",onClick:(0,v.default)((0,h.default)().mark((function _callee8(){var e;return(0,h.default)().wrap((function _callee8$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,O.phoneLogin)();case 2:e=t.sent,se(!0),console.log("isin",e),e?de():m.default.fail({message:"请先登录",selector:"#vanToast-demo2"});case 6:case"end":return t.stop()}}),_callee8)})))}),(0,k.jsx)(r.default,{icon:"like",className:"iconStyle",text:"深圳十峰",onClick:function onClick(){x().navigateTo({url:"/pages/mountainPeak/index"})}}),(0,k.jsx)(r.default,{icon:"eye",className:"iconStyle",text:"活动",onClick:function onClick(){x().navigateTo({url:"/pages/activityList/index"})}}),(0,k.jsx)(r.default,{icon:"manager",className:"iconStyle",text:"组队",onClick:function onClick(){m.default.fail({message:"参加1次活动后,可发起组队",selector:"#vanToast-demo2"})}})]}),(null==H?void 0:H.length)>0&&(0,k.jsx)(b.View,{children:(null!==(N=null==H?void 0:H.splice(0,2))&&void 0!==N?N:[]).map((function(e,t){return(0,k.jsx)(b.View,{onClick:function onClick(){console.log("Card"),x().navigateTo({url:"/pages/activityList/components/details/index?id=".concat(null==e?void 0:e._id)})},children:(0,k.jsx)(S.default,{dataSource:e})})}))}),(0,k.jsxs)(b.View,{style:{marginTop:"20px"},children:[" ",(0,k.jsx)(b.OfficialAccount,{onLoad:function onLoad(e){console.log("加载成功",e)},onError:function onError(e){console.log("加载失败",e)}})]}),(0,k.jsx)(m.default,{id:"vanToast-demo2"}),(0,k.jsx)(_.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");r.default.enableShareTimeline=!0,r.default.enableShareAppMessage=!0;Page((0,o.createPageConfig)(r.default,"pages/home/index",{root:{cn:[]}},{navigationBarTitleText:"首页"}||{}))},"./node_modules/@babel/runtime/helpers/regeneratorRuntime.js":function(e,t,n){var o=n("./node_modules/@babel/runtime/helpers/typeof.js").default;function _regeneratorRuntime(){"use strict";e.exports=_regeneratorRuntime=function _regeneratorRuntime(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function define(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{define({},"")}catch(e){define=function define(e,t,n){return e[t]=n}}function wrap(e,t,n,o){var r=t&&t.prototype instanceof Generator?t:Generator,i=Object.create(r.prototype),s=new Context(o||[]);return a(i,"_invoke",{value:makeInvokeMethod(e,n,s)}),i}function tryCatch(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=wrap;var u={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,s,(function(){return this}));var f=Object.getPrototypeOf,m=f&&f(f(values([])));m&&m!==n&&r.call(m,s)&&(d=m);var p=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(e){["next","throw","return"].forEach((function(t){define(e,t,(function(e){return this._invoke(t,e)}))}))}function AsyncIterator(e,t){function invoke(n,a,i,s){var l=tryCatch(e[n],e,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==o(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){invoke("next",e,i,s)}),(function(e){invoke("throw",e,i,s)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return invoke("throw",e,i,s)}))}s(l.arg)}var n;a(this,"_invoke",{value:function value(e,o){function callInvokeWithMethodAndArg(){return new t((function(t,n){invoke(e,o,t,n)}))}return n=n?n.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,t,n){var o="suspendedStart";return function(r,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw a;return doneResult()}for(n.method=r,n.arg=a;;){var i=n.delegate;if(i){var s=maybeInvokeDelegate(i,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=tryCatch(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}function maybeInvokeDelegate(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,maybeInvokeDelegate(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=tryCatch(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function pushTryEntry(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function resetTryEntry(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Context(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function next(){for(;++n=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var i=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(i&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),resetTryEntry(n),u}},catch:function _catch(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;resetTryEntry(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,t,n){return this.delegate={iterator:values(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}e.exports=_regeneratorRuntime,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/regenerator/index.js":function(e,t,n){var o=n("./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/home/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index 13fa3cd..be49f44 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -16,7 +16,7 @@ import React, { useCallback, useEffect, useState } from "react"; import { Swiper, SwiperItem, Image } from "@antmjs/vantui"; import react from "react"; import { NoticeBar } from "@antmjs/vantui"; -import Taro from "@tarojs/taro"; +import Taro, { useShareTimeline } from "@tarojs/taro"; import { Tabbar, TabbarItem } from "@antmjs/vantui"; import TabbarCom from "../components/TabbarCom"; import { @@ -51,6 +51,26 @@ const Home = () => { const onChange = (e) => {}; + Taro.useShareAppMessage((res) => { + if (res.from === "button") { + // 来自页面内转发按钮 + console.log(res.target); + } + return { + title: "自定义转发标题", + path: "/page/user?id=123", + }; + }); + + // 分享到朋友圈 + useShareTimeline(() => { + return { + title: "分享朋友圈", //字符串 自定义标题 + // query: `id=${this.data.shop.shop_id}`, //页面携带参数 + // imageUrl: moments //图片地址 + }; + }); + useEffect(() => { // 设置标题 definePageConfig({ @@ -464,7 +484,8 @@ const Home = () => { {/* 小红书图文/视频信息流 */} {/* 打开信息流 */} - + {/* 扫码的场景(才会显示) */} + {" "} {/* 个人版本未生效 */} { > + {/* 打开视频号主页-需要开放平台主主体认证 */} + {/* { + Taro.openChannelsUserProfile({ + finderUserName: "sphqzUmI0BlppCI", //视频号id + success: (res: any) => { + console.log("加载成功", res); + }, + fail: (error: any) => { + console.log("加载成功", error); + }, + }); + }} + > + {" "} + 打开视频号主页 + */} +