Files
gitlab-instance-0a899031_ci…/dist/pages/my/index.js
2022-12-10 20:09:03 +08:00

2 lines
34 KiB
JavaScript

/*! For license information please see index.js.LICENSE.txt */
(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./node_modules/@antmjs/vantui/es/mixins/page-scroll.js":function(e,t,n){"use strict";n.d(t,{usePageScroll:function(){return usePageScroll}});var r=n("webpack/container/remote/react"),o=n("webpack/container/remote/@tarojs/taro");n("webpack/container/remote/@tarojs/runtime"),n("webpack/container/remote/@tarojs/runtime").document;function usePageScroll(e){(0,r.useEffect)((function(){return void 0}),[e]),(0,o.usePageScroll)((function(t){e(t)}))}},"./node_modules/@antmjs/vantui/es/sticky/index.js":function(e,t,n){"use strict";n.d(t,{Sticky:function(){return Sticky}});var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=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/common/utils.js"),u=n("./node_modules/@antmjs/vantui/es/common/validator.js"),d=n("./node_modules/@antmjs/vantui/es/mixins/page-scroll.js"),f=n("./node_modules/@antmjs/vantui/es/sticky/wxs.js"),p=n("webpack/container/remote/react/jsx-runtime"),m=["zIndex","offsetTop","scrollTop","disabled","container","onScroll","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sticky(e){var t=(0,a.useRef)("".concat(+new Date).concat(Math.ceil(1e4*Math.random()))),n=(0,a.useState)({height:0,fixed:!1,transform:0}),r=(0,i.default)(n,2),h=r[0],v=r[1],b=e.zIndex,y=e.offsetTop,x=void 0===y?0:y,g=e.scrollTop,j=e.disabled,w=e.container,_=e.onScroll,k=e.style,S=e.className,T=e.children,O=(0,o.default)(e,m),C=(0,a.useRef)({}),I=(0,a.useCallback)((function(){var e=null==w?void 0:w();return new Promise((function(t){return null==e?void 0:e.boundingClientRect().exec((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t(e[0])}))}))}),[w]),P=(0,a.useCallback)((function(e){var t=Object.keys(e).reduce((function(t,n){return e[n]!==h[n]&&(t[n]=e[n]),t}),{});Object.keys(t).length>0&&v((function(e){return _objectSpread(_objectSpread({},e),t)})),null==_||_({detail:{scrollTop:C.current.scrollTop,isFixed:e.fixed||h.fixed}})}),[_,h]),E=(0,a.useCallback)((function(e){j?P({fixed:!1,transform:0}):(C.current.scrollTop=e||C.current.scrollTop,"function"!=typeof w?(0,c.getRect)(null,"#sticky-com-index".concat(t.current)).then((function(e){(0,u.isDef)(e)&&(x>=e.top?P({fixed:!0,height:e.height}):P({fixed:!1}))})):Promise.all([(0,c.getRect)(null,"#sticky-com-index".concat(t.current)),I()]).then((function(e){var t=(0,i.default)(e,2),n=t[0],r=t[1];n&&r&&(x+n.height>r.height+r.top?P({fixed:!1,transform:r.height-n.height}):x>=n.top?P({fixed:!0,height:n.height,transform:0}):P({fixed:!1,transform:0}))})).catch((function(e){console.log(e)})))}),[w,j,I,x,P]);return(0,a.useEffect)((function(){E(g)}),[g,w,j,x]),(0,d.usePageScroll)((function(e){E(e.scrollTop)})),(0,p.jsx)(s.View,_objectSpread(_objectSpread({id:"sticky-com-index".concat(t.current),className:" van-sticky "+(S||""),style:l.style([f.containerStyle({fixed:h.fixed,height:h.height,zIndex:b}),k])},O),{},{children:(0,p.jsx)(s.View,{className:l.bem("sticky-wrap",{fixed:h.fixed})+" ".concat(S||""),style:l.style([f.wrapStyle({fixed:h.fixed,offsetTop:x,transform:h.transform,zIndex:b}),k]),children:T})}))}},"./node_modules/@antmjs/vantui/es/sticky/wxs.js":function(e,t,n){"use strict";n.d(t,{wrapStyle:function(){return wrapStyle},containerStyle:function(){return containerStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js");function wrapStyle(e){return(0,r.style)({transform:e.transform?"translate3d(0, "+e.transform+"px, 0)":"",top:e.fixed?e.offsetTop+"px":"","z-index":e.zIndex})}function containerStyle(e){return(0,r.style)({height:e.fixed?e.height+"px":"","z-index":e.zIndex})}},"./node_modules/@antmjs/vantui/es/tab/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=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("webpack/container/remote/react/jsx-runtime"),u=["children","style","className","active","lazyRender","lazyTimeout","animated","title"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function Tab(e){var t=(0,a.useState)(!1),n=(0,i.default)(t,2),r=n[0],d=n[1],f=e.children,p=e.style,m=e.className,h=e.active,v=e.lazyRender,b=e.lazyTimeout,y=e.animated,x=(e.title,(0,o.default)(e,u));return(0,a.useEffect)((function(){b?setTimeout((function(){d((function(e){return e||h}))}),b):d((function(e){return e||h}))}),[h]),(0,c.jsx)(s.View,_objectSpread(_objectSpread({className:" "+l.bem("tab__pane",{active:h,inactive:!h})+" ".concat(m||""),style:l.style([h||y?"":"display: none;",p])},x),{},{children:(r||!v)&&f}))}},"./node_modules/@antmjs/vantui/es/tabs/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),s=n("./node_modules/@babel/runtime/regenerator/index.js"),l=n.n(s),c=n("webpack/container/remote/@tarojs/taro"),u=n("webpack/container/remote/react"),d=n("./node_modules/rc-util/lib/Children/toArray.js"),f=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),p=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),m=n("./node_modules/@antmjs/vantui/es/common/validator.js"),h=n("./node_modules/@antmjs/vantui/es/sticky/index.js"),v=n("./node_modules/@antmjs/vantui/es/common/utils.js"),b=n("./node_modules/@antmjs/vantui/es/info/index.js"),y=n("./node_modules/@antmjs/vantui/es/tabs/wxs.js"),x=n("webpack/container/remote/react/jsx-runtime"),g=["swipeable","active","lazyRender","type","sticky","container","zIndex","offsetTop","border","color","ellipsis","lineHeight","duration","lineWidth","titleActiveColor","titleInactiveColor","swipeThreshold","animated","renderNavLeft","renderNavRight","onScroll","onClick","onChange","onDisabled","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function Tabs(e){var t=(0,u.useRef)({skipInit:!1,direction:"",deltaX:0,deltaY:0,offsetX:0,offsetY:0,startX:0,startY:0,swiping:!1}),n=(0,u.useRef)("".concat(+new Date).concat(Math.ceil(1e4*Math.random()))),a=(0,u.useState)(!1),s=(0,i.default)(a,2),j=s[0],w=s[1],_=(0,u.useState)("100%"),k=(0,i.default)(_,2),S=k[0],T=k[1],O=(0,u.useState)({tabs:[],scrollLeft:0,scrollable:!1,currentIndex:0,skipTransition:!0,scrollWithAnimation:!1,lineOffsetLeft:0}),C=(0,i.default)(O,2),I=C[0],P=C[1],E=I.scrollLeft,L=I.scrollable,N=I.currentIndex,A=I.skipTransition,R=I.scrollWithAnimation,F=I.lineOffsetLeft,V=e.swipeable,D=e.active,G=void 0===D?0:D,z=e.lazyRender,M=void 0===z||z,X=e.type,Y=void 0===X?"line":X,W=e.sticky,K=e.container,$=e.zIndex,H=e.offsetTop,q=void 0===H?0:H,U=e.border,B=e.color,J=e.ellipsis,Q=void 0===J||J,Z=e.lineHeight,ee=void 0===Z?-1:Z,te=e.duration,ne=void 0===te?.3:te,re=e.lineWidth,oe=void 0===re?40:re,ie=e.titleActiveColor,ae=e.titleInactiveColor,se=e.swipeThreshold,le=void 0===se?5:se,ce=e.animated,ue=e.renderNavLeft,de=e.renderNavRight,fe=e.onScroll,pe=e.onClick,me=e.onChange,he=e.onDisabled,ve=e.style,be=e.className,ye=e.children,xe=(0,o.default)(e,g);(0,u.useEffect)((function(){w(!0)}),[]);var ge=(0,u.useMemo)((function(){return function parseTabList(e){return(0,d.default)(e).map((function(e){return(0,u.isValidElement)(e)?_objectSpread(_objectSpread({key:void 0!==e.key?String(e.key):void 0},e.props),{},{node:e}):null})).filter((function(e){return e}))}(ye)}),[ye]),je=(0,u.useMemo)((function(){return ge.map((function(e,t){return(0,u.cloneElement)(e.node,{key:t,active:N===t,lazyRender:M,animated:ce,index:t})}))}),[ce,N,M,ge]),we=function trigger(e,t){var n,r=t||je[N];if((0,m.isDef)(r)){var o={onClick:pe,onChange:me,onDisabled:he};null===(n=o[e])||void 0===n||n.call(o,{detail:{index:r.props.index,name:r.props.name||r.props.index,title:r.props.title}})}},_e=function getCurrentName(){var e=je[N];if(e)return e.props.name||e.props.index},ke=function setCurrentIndex(e){if(!(!(0,m.isDef)(e)||e>=je.length||e<0)&&e!==N){var t=null!==N;P((function(t){return _objectSpread(_objectSpread({},t),{},{currentIndex:e})})),(0,v.requestAnimationFrame)((function(){Te(e),Ce(e)})),(0,c.nextTick)((function(){t&&we("onChange",je[e])}))}},Se=function setCurrentIndexByName(e){var t=je.filter((function(t){return(t.props.name||t.props.index)===e}));t.length&&ke(t[0].props.index)},Te=function resize(e){var r;"line"===Y&&(e=null!==(r=e)&&void 0!==r?r:N,(0,c.nextTick)((function(){Promise.all([(0,v.getAllRect)(null,".tabs-com-index".concat(n.current," .van-tab")),(0,v.getRect)(null,".tabs-com-index".concat(n.current," .van-tabs__line"))]).then((function(n){var r=(0,i.default)(n,2),o=r[0],a=void 0===o?[]:o,s=r[1];if(a&&s){var l=a[e];if(null==l)return;var u=a.slice(0,e).reduce((function(e,t){return e+t.width}),0);u+=(l.width-s.width)/2+(Q?0:8),P((function(e){return _objectSpread(_objectSpread({},e),{},{lineOffsetLeft:u})})),t.current.swiping=!0,A&&(0,c.nextTick)((function(){P((function(e){return _objectSpread(_objectSpread({},e),{},{skipTransition:!1})}))}))}}))})))},Oe=function onTap(e){var t=e.currentTarget.dataset.index;t=parseInt(t);var n=je[t];n.props.disabled?we("onDisabled",n):(ke(t),(0,c.nextTick)((function(){we("onClick",n)})))},Ce=function scrollIntoView(e){var t;L&&(e=null!==(t=e)&&void 0!==t?t:N,Promise.all([(0,v.getAllRect)(null,".tabs-com-index".concat(n.current," .van-tab")),(0,v.getRect)(null,".tabs-com-index".concat(n.current," .van-tabs__nav"))]).then((function(t){var n=(0,i.default)(t,2),r=n[0],o=n[1];if(r&&o){var a=r[e],s=r.slice(0,e).reduce((function(e,t){return e+t.width}),0);P((function(e){return _objectSpread(_objectSpread({},e),{},{scrollLeft:s-(o.width-a.width)/2})})),R||(0,c.nextTick)((function(){P((function(e){return _objectSpread(_objectSpread({},e),{},{scrollWithAnimation:!0})}))}))}})))},Ie=function touchStart(e){!function resetTouchStatus(){t.current.direction="",t.current.deltaX=0,t.current.deltaY=0,t.current.offsetX=0,t.current.offsetY=0}();var n=e.touches[0];t.current.startX=n.clientX,t.current.startY=n.clientY},Pe=function onTouchEnd(){if(V&&t.current.swiping){var e=t.current,n=e.direction,r=e.deltaX,o=e.offsetX;if("horizontal"===n&&o>=50){var i=function getAvaiableTab(e){for(var t=e>0?-1:1,n=t;N+n<ge.length&&N+n>=0;n+=t){var r=N+n;if(r>=0&&r<ge.length&&ge[r]&&!ge[r].disabled)return r}return-1}(r);-1!==i&&ke(i)}t.current.swiping=!1}};(0,u.useEffect)((function(){t.current.swiping=!0}),[]),(0,u.useEffect)((function(){(0,c.nextTick)((function(){var e;Te(),Ce(),G===_e()||null!==(e=t.current)&&void 0!==e&&e.swiping||V||Se(G)}))}),[_e()]),(0,u.useEffect)((function(){Te(),Ce()}),[oe]),(0,u.useEffect)((function(){G!==_e()&&Se(G)}),[G]),(0,u.useEffect)((function(){P((function(e){return _objectSpread(_objectSpread({},e),{},{scrollable:je.length>le||!Q})}))}),[le,je,Q]),(0,u.useEffect)((function(){(0,c.nextTick)((function(){Te()}))}),[je]);var Ee=(0,u.useCallback)((0,r.default)(l().mark((function _callee(){var e,t,r;return l().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(e=0,!ue||!j){o.next=6;break}return o.next=4,(0,v.getAllRect)(null,"."+p.bem("renderNavLeft"+n.current));case 4:(t=o.sent).length&&(e+=t[0].width);case 6:if(!de||!j){o.next=11;break}return o.next=9,(0,v.getAllRect)(null,"."+p.bem("renderNavRight"+n.current));case 9:(r=o.sent).length&&(e+=r[0].width);case 11:e&&T("calc(100% - ".concat(e,"px)"));case 12:case"end":return o.stop()}}),_callee)}))),[ue,j,de]);return(0,u.useEffect)((function(){setTimeout((function(){Ee()}))}),[Ee,j]),(0,x.jsxs)(f.View,_objectSpread(_objectSpread({className:"tabs-com-index".concat(n.current," ")+" "+p.bem("tabs",[Y]+" ".concat(be||"")),style:ve},xe),{},{children:[(0,x.jsx)(h.Sticky,{disabled:!W,zIndex:$,offsetTop:q,container:K,onScroll:fe,children:(0,x.jsxs)(f.View,{className:p.bem("tabs__wrap",{scrollable:L})+" "+("line"===Y&&U?"van-hairline--top-bottom":""),children:[(0,x.jsx)(f.View,{className:p.bem("renderNavLeft"+n.current),children:ue}),(0,x.jsx)(f.ScrollView,{scrollX:L,scrollWithAnimation:R,scrollLeft:E,className:p.bem("tabs__scroll",[Y]),style:{width:S,borderColor:B},children:(0,x.jsxs)(f.View,{className:p.bem("tabs__nav",[Y,{complete:!Q}])+" nav-class",style:y.navStyle(B,Y),children:["line"===Y&&(0,x.jsx)(f.View,{className:"van-tabs__line",style:y.lineStyle({color:B,lineOffsetLeft:F,lineHeight:ee,skipTransition:A,duration:ne,lineWidth:oe})}),ge.map((function(e,t){return(0,x.jsx)(f.View,{"data-index":t,className:y.tabClass(t===N,Q)+" "+p.bem("tab",{active:t===N,disabled:e.disabled,complete:!Q}),style:y.tabStyle({active:t===N,ellipsis:Q,color:B,type:Y,disabled:e.disabled,titleActiveColor:ie,titleInactiveColor:ae,swipeThreshold:le,scrollable:L}),onClick:Oe,children:(0,x.jsxs)(f.View,{className:Q?"van-ellipsis":"",style:e.titleStyle,children:[e.title,(null!==e.info||e.dot)&&(0,x.jsx)(b.Info,{info:e.info,dot:e.dot,className:"van-tab__title__info"})]})},t)}))]})}),(0,x.jsx)(f.View,{className:p.bem("renderNavRight"+n.current),children:de})]})}),(0,x.jsx)(f.View,{className:"van-tabs__content",onTouchStart:function onTouchStart(e){V&&(t.current.swiping=!0,Ie(e))},onTouchMove:function onTouchMove(e){V&&t.current.swiping&&function touchMove(e){var n=e.touches[0];t.current.deltaX=n.clientX-t.current.startX,t.current.deltaY=n.clientY-t.current.startY,t.current.offsetX=Math.abs(t.current.deltaX),t.current.offsetY=Math.abs(t.current.deltaY),t.current.direction=t.current.direction||function getDirection(e,t){return e>t&&e>10?"horizontal":t>e&&t>10?"vertical":""}(t.current.offsetX,t.current.offsetY)}(e)},onTouchEnd:Pe,onTouchCancel:Pe,children:(0,x.jsx)(f.View,{className:p.bem("tabs__track",[{animated:ce}])+" van-tabs__track",style:y.trackStyle({duration:ne,currentIndex:N,animated:ce}),children:je})})]}))}},"./node_modules/@antmjs/vantui/es/tabs/wxs.js":function(e,t,n){"use strict";n.d(t,{tabClass:function(){return tabClass},tabStyle:function(){return tabStyle},trackStyle:function(){return trackStyle},lineStyle:function(){return lineStyle},navStyle:function(){return navStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),o=n("./node_modules/@antmjs/vantui/es/wxs/utils.js");function tabClass(e,t){var n=["tab-class"];return e&&n.push("tab-active-class"),t&&n.push("van-ellipsis"),n.join(" ")}function tabStyle(e){var t=e.active?e.titleActiveColor:e.titleInactiveColor,n=e.scrollable&&e.ellipsis;return"card"===e.type?(0,r.style)({"border-color":e.color,"background-color":!e.disabled&&e.active?e.color:null,color:t||(e.disabled||e.active?null:e.color),"flex-basis":n?88/e.swipeThreshold+"%":null}):(0,r.style)({color:t,"flex-basis":n?88/e.swipeThreshold+"%":null})}function navStyle(e,t){return(0,r.style)({"border-color":"card"===t&&e?e:null})}function trackStyle(e){return e.animated?(0,r.style)({transform:"translate3d(".concat(-100*e.currentIndex,"%, 0px, 0px)"),"-webkit-transform":"translate3d(".concat(-100*e.currentIndex,"%, 0px, 0px)"),"transition-duration":e.duration+"s","-webkit-transition-duration":e.duration+"s",transition:e.duration+"s"}):""}function lineStyle(e){return(0,r.style)({visibility:0===e.lineOffsetLeft?"hidden":"visible",width:o.addUnit(e.lineWidth),transform:"translateX("+e.lineOffsetLeft+"px)","-webkit-transform":"translateX("+e.lineOffsetLeft+"px)","background-color":e.color,height:-1!==e.lineHeight?o.addUnit(e.lineHeight):null,"border-radius":-1!==e.lineHeight?o.addUnit(e.lineHeight):null,"transition-duration":e.skipTransition?null:e.duration+"s","-webkit-transition-duration":e.skipTransition?null:e.duration+"s"})}},"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx":function(e,t,n){"use strict";var r=n("./node_modules/@antmjs/vantui/es/icon/index.js"),o=n("./node_modules/@antmjs/vantui/es/cell/index.js"),i=n("./node_modules/@antmjs/vantui/es/toast/index.js"),a=n("./node_modules/@antmjs/vantui/es/tabs/index.js"),s=n("./node_modules/@antmjs/vantui/es/tab/index.js"),l=n("./node_modules/@antmjs/vantui/es/button/index.js"),c=n("./node_modules/@antmjs/vantui/es/image/index.js"),u=n("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),d=n("./node_modules/@antmjs/vantui/es/empty/index.js"),f=n("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),p=n("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),m=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),h=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),v=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),b=n("webpack/container/remote/react"),y=n("./src/pages/components/TabbarCom/index.tsx"),x=n("webpack/container/remote/@tarojs/taro"),g=n.n(x),j=n("./src/pages/components/ActiveCard/index.tsx"),w=n("./src/utils/index.ts"),_=n("./config.js"),k=n("webpack/container/remote/react/jsx-runtime");t.default=function my(e){var t=(0,b.useState)({}),n=(0,h.default)(t,2),x=(n[0],n[1]),S=(0,b.useState)(""),T=(0,h.default)(S,2),O=T[0],C=T[1],I=(0,b.useState)([]),P=(0,h.default)(I,2),E=(P[0],P[1]),L=(0,b.useState)([]),N=(0,h.default)(L,2),A=N[0],R=N[1],F=(0,b.useState)(0),V=(0,h.default)(F,2),D=V[0],G=V[1],z=(0,b.useState)(!1),M=(0,h.default)(z,2),X=M[0],Y=M[1],W=(0,b.useState)(!1),K=(0,h.default)(W,2),$=K[0],H=K[1];(0,b.useEffect)((function(){q()}),[]);var q=function(){var e=(0,m.default)((0,p.default)().mark((function _callee(){var e;return(0,p.default)().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,w.phoneLogin)();case 2:e=t.sent,console.log("isLogin",e),Y(e),H(!0);case 6:case"end":return t.stop()}}),_callee)})));return function getLogin(){return e.apply(this,arguments)}}();(0,b.useEffect)((function(){X&&U()}),[X]);var U=function getUserInfo(){var e;g().cloud.callFunction({name:"getOpenid",complete:(e=(0,m.default)((0,p.default)().mark((function _callee2(e){var t,n,r,o,i;return(0,p.default)().wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:console.log("callFunction test result: ",e),o=null==e||null===(t=e.result)||void 0===t||null===(n=t.event)||void 0===n||null===(r=n.userInfo)||void 0===r?void 0:r.openId,C(o),i={tableName:"userInfo",keyValue:{openId:o},okFun:function okFun(e){var t,n,r,i;console.log("userinfo--",e),x(null!==(t=null==e||null===(n=e.data)||void 0===n?void 0:n[0])&&void 0!==t?t:{}),E(null!==(r=null==e||null===(i=e.data)||void 0===i?void 0:i.activeidArr)&&void 0!==r?r:[]),B(o,"1")}},(0,w.getTable)(i);case 5:case"end":return a.stop()}}),_callee2)}))),function complete(t){return e.apply(this,arguments)})})},B=function getDetails(e,t){var n=g().cloud.database({}).command,r=t?{peopleArr:n.elemMatch({openid:n.eq(e),status:n.eq(t)})}:{peopleArr:n.elemMatch({openid:n.eq(e)})},o={tableName:"details",keyValue:(0,f.default)({},r),okFun:function okFun(e){var t;console.log("detailsData/usero--",e),R(null!==(t=null==e?void 0:e.data)&&void 0!==t?t:[])}};(0,w.getTable)(o)};(0,b.useEffect)((function(){}),[]);return(0,k.jsxs)(v.View,{className:"myContent",children:[(0,k.jsxs)(v.View,{className:"myImage",children:[(0,k.jsx)(c.default,{round:!0,width:"100px",height:"100px",src:"cloud://citynew-0givkbre03955d8c.6369-citynew-0givkbre03955d8c-1253655588/images/touxiang/images.jpg"}),!X&&$&&(0,k.jsx)(v.View,{className:"loginBtn",children:(0,k.jsx)(l.default,{type:"primary",size:"mini",lang:"zh_CN",onClick:(0,m.default)((0,p.default)().mark((function _callee8(){return(0,p.default)().wrap((function _callee8$(e){for(;;)switch(e.prev=e.next){case 0:g().chooseAddress({success:function success(e){var t;console.log("AddressRes",e),g().cloud.callFunction({name:"getOpenid",complete:(t=(0,m.default)((0,p.default)().mark((function _callee7(t){var n,r,o,i,a;return(0,p.default)().wrap((function _callee7$(s){for(;;)switch(s.prev=s.next){case 0:return i=null==t||null===(n=t.result)||void 0===n||null===(r=n.event)||void 0===r||null===(o=r.userInfo)||void 0===o?void 0:o.openId,console.log("openid",i),a={tableName:"userInfo",keyValue:{openId:i},okFun:function(){var t=(0,m.default)((0,p.default)().mark((function _callee6(t){var n,r,o,i,a,s;return(0,p.default)().wrap((function _callee6$(l){for(;;)switch(l.prev=l.next){case 0:return console.log("userRes",t),s={tableName:"userInfo",id:null==t||null===(n=t.data)||void 0===n||null===(r=n[0])||void 0===r?void 0:r._id,objData:{authInfo:[].concat((0,u.default)(null!==(o=null==t||null===(i=t.data)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.authInfo)&&void 0!==o?o:[]),[e])},okFun:function(){var e=(0,m.default)((0,p.default)().mark((function _callee5(e){return(0,p.default)().wrap((function _callee5$(t){for(;;)switch(t.prev=t.next){case 0:console.log("添加用户认证信息",e),Y(!0);case 2:case"end":return t.stop()}}),_callee5)})));return function okFun(t){return e.apply(this,arguments)}}()},l.next=4,(0,w.updateTableid)((0,f.default)({},s));case 4:case"end":return l.stop()}}),_callee6)})));return function okFun(e){return t.apply(this,arguments)}}()},s.next=5,(0,w.getTable)((0,f.default)({},a));case 5:case"end":return s.stop()}}),_callee7)}))),function complete(e){return t.apply(this,arguments)})}),console.log(e.telNumber)}});case 1:case"end":return e.stop()}}),_callee8)}))),children:"登录"})})]}),(0,k.jsxs)(v.View,{children:[(0,k.jsxs)(a.default,{sticky:!0,active:D,onClick:function(){var e=(0,m.default)((0,p.default)().mark((function _callee9(e){var t,n;return(0,p.default)().wrap((function _callee9$(r){for(;;)switch(r.prev=r.next){case 0:return console.log("e",e),G(null==e||null===(t=e.detail)||void 0===t?void 0:t.index),r.next=4,B(O,null==e||null===(n=e.detail)||void 0===n?void 0:n.name);case 4:case"end":return r.stop()}}),_callee9)})));return function(t){return e.apply(this,arguments)}}(),children:[(0,k.jsx)(s.default,{title:"待审核",name:"1"}),(0,k.jsx)(s.default,{title:"待参加",name:"2"}),(0,k.jsx)(s.default,{title:"已取消",name:"4"})]}),(0,k.jsx)(v.View,{children:function CardCom(){return(0,k.jsx)(v.View,{children:(null==A?void 0:A.length)>0?(0,k.jsx)(v.View,{children:A.splice(0,2).map((function(e,t){return(0,k.jsx)(v.View,{onClick:function onClick(){console.log("Card"),g().navigateTo({url:"/pages/activityList/components/details/index?id=".concat(null==e?void 0:e._id)})},children:(0,k.jsx)(j.default,{dataSource:e})})}))}):(0,k.jsx)(v.View,{children:(0,k.jsx)(d.default,{className:"customImage",image:"https://img.yzcdn.cn/vant/custom-empty-image.png"})})})}()})]}),(0,k.jsxs)(v.View,{className:"cellArr",children:[(0,k.jsx)(o.default,{icon:"star",title:"打卡记录",isLink:!0,onClick:function onClick(){X?g().navigateTo({url:"/pages/my/components/CheckinDetail/index"}):i.default.fail({message:"请先登录",selector:"#vanToast-demo2"})}}),(0,k.jsx)(o.default,{icon:"manager",title:"申请成为领队",isLink:!0,onClick:function onClick(){i.default.fail({message:"首次参加活动后,可申请成为领队",selector:"#vanToast-demo2"})}}),(0,k.jsxs)(v.View,{className:"wechat",children:[(0,k.jsx)(r.default,{name:"wechat",size:"16px",className:"icon"}),(0,k.jsx)(l.default,{"open-type":"contact",className:"wecahtBtn",children:"联系客服"})]}),"people"!==_.type&&(0,k.jsx)(o.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){g().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,k.jsx)(o.default,{icon:"friends",title:"关于我们",isLink:!0,onClick:function onClick(){g().navigateTo({url:"/pages/my/components/AbountUs/index"})}}),(0,k.jsx)(o.default,{icon:"setting",title:"版本日志",isLink:!0,onClick:function onClick(){g().navigateTo({url:"/pages/my/components/Version/index"})}})]}),(0,k.jsx)(i.default,{id:"vanToast-demo2"}),(0,k.jsx)(y.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,t,n){"use strict";var r=n("webpack/container/remote/@tarojs/runtime"),o=n("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx");Page((0,r.createPageConfig)(o.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))},"./node_modules/@babel/runtime/helpers/regeneratorRuntime.js":function(e,t,n){var r=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,o=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.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,r){var o=t&&t.prototype instanceof Generator?t:Generator,a=Object.create(o.prototype),s=new Context(r||[]);return i(a,"_invoke",{value:makeInvokeMethod(e,n,s)}),a}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,p=f&&f(f(values([])));p&&p!==n&&o.call(p,s)&&(d=p);var m=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,i,a,s){var l=tryCatch(e[n],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==r(u)&&o.call(u,"__await")?t.resolve(u.__await).then((function(e){invoke("next",e,a,s)}),(function(e){invoke("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return invoke("throw",e,a,s)}))}s(l.arg)}var n;i(this,"_invoke",{value:function value(e,r){function callInvokeWithMethodAndArg(){return new t((function(t,n){invoke(e,r,t,n)}))}return n=n?n.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return doneResult()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=maybeInvokeDelegate(a,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"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=tryCatch(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="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 r=tryCatch(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(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,r=function next(){for(;++n<e.length;)if(o.call(e,n))return next.value=e[n],next.done=!1,next;return next.value=void 0,next.done=!0,next};return r.next=r}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(m,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===GeneratorFunction||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,define(e,c,"GeneratorFunction")),e.prototype=Object.create(m),e},t.awrap=function(e){return{__await:e}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},defineIteratorMethods(m),define(m,c,"Generator"),define(m,s,(function(){return this})),define(m,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function next(){for(;n.length;){var e=n.pop();if(e in t)return next.value=e,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function stop(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function dispatchException(e){if(this.done)throw e;var t=this;function handle(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],i=r.completion;if("root"===r.tryLoc)return handle("end");if(r.tryLoc<=this.prev){var a=o.call(r,"catchLoc"),s=o.call(r,"finallyLoc");if(a&&s){if(this.prev<r.catchLoc)return handle(r.catchLoc,!0);if(this.prev<r.finallyLoc)return handle(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return handle(r.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return handle(r.finallyLoc)}}}},abrupt:function abrupt(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function complete(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function finish(e){for(var t=this.tryEntries.length-1;t>=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 r=n.completion;if("throw"===r.type){var o=r.arg;resetTryEntry(n)}return o}}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 r=n("./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/my/index.tsx",e(e.s=t);var t}));e.O()}]);