Files
gitlab-instance-0a899031_ci…/dist/pages/home/index.js
2022-12-18 17:43:17 +08:00

2 lines
33 KiB
JavaScript

/*! For license information please see index.js.LICENSE.txt */
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/home/index"],{"./node_modules/@antmjs/vantui/es/field/index.js":function(e,n,t){t.d(n,{Field:function(){return Field}});var o=t("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=t("webpack/container/remote/@tarojs/taro"),l=t("webpack/container/remote/react"),i=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),s=t("./node_modules/@antmjs/vantui/es/cell/index.js"),u=t("./node_modules/@antmjs/vantui/es/icon/index.js"),d=(t("./node_modules/@antmjs/vantui/es/utils/index.js"),t("./node_modules/@antmjs/vantui/es/field/wxs.js")),m=t("webpack/container/remote/react/jsx-runtime");t("webpack/container/remote/@tarojs/runtime").document;function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach((function(n){(0,o.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=0;function Field(e){var n=(0,l.useRef)({focused:!1}),t=(0,l.useState)({showClear:!1,unitag:"van-field"}),o=(0,r.default)(t,2),p=o[0],v=o[1],h=(0,l.useState)(""),b=(0,r.default)(h,2),j=b[0],g=b[1],x=p.showClear,y=e.size,_=e.leftIcon,w=e.center,k=e.border,S=void 0===k||k,C=e.isLink,T=e.required,I=e.clickable,N=e.className,O=e.titleWidth,P=void 0===O?"6.2em":O,A=e.style,E=e.arrowDirection,V=e.label,F=e.disabled,D=e.type,L=void 0===D?"text":D,q=e.inputAlign,z=e.clearIcon,R=void 0===z?"clear":z,B=e.rightIcon,H=e.icon,K=e.iconClass,U=e.value,W=e.maxlength,M=e.showWordLimit,$=e.errorMessageAlign,X=e.error,Q=e.errorMessage,G=e.fixed,J=e.focus,Z=e.cursor,Y=void 0===Z?-1:Z,ee=e.autoFocus,ne=e.readonly,te=e.placeholder,oe=e.placeholderStyle,re=e.autosize,ae=e.cursorSpacing,le=void 0===ae?50:ae,ie=e.adjustPosition,ce=void 0===ie||ie,se=e.showConfirmBar,ue=void 0===se||se,de=e.holdKeyboard,me=e.selectionEnd,fe=void 0===me?-1:me,pe=e.selectionStart,ve=void 0===pe?-1:pe,he=e.alwaysEmbed,be=e.disableDefaultPadding,je=void 0===be||be,ge=e.confirmType,xe=e.confirmHold,ye=e.password,_e=e.clearable,we=e.clearTrigger,ke=void 0===we?"focus":we,Se=e.renderLeftIcon,Ce=e.renderTitle,Te=e.renderInput,Ie=e.renderRightIcon,Ne=e.renderIcon,Oe=e.renderButton,Pe=e.onChange,Ae=e.onFocus,Ee=e.onBlur,Ve=e.onClear,Fe=e.onConfirm,De=e.onInput,Le=e.onClickInput,qe=e.onClickIcon,ze=e.onLineChange,Re=e.onKeyboardHeightChange;(0,l.useEffect)((function(){v((function(e){return _objectSpread(_objectSpread({},e),{},{unitag:"van-field_uni_".concat(f++)})}))}),[]);var Be=function emitChange(e){e=e||{detail:{value:""}},Object.defineProperty(e,"detail",{value:e.detail.value}),g(e.detail||""),(0,a.nextTick)((function(){null==De||De(e),null==Pe||Pe(e)}))},He=function setShowClear(e){var t=!1;if(_e&&!ne){var o=!!e,r="always"===ke||"focus"===ke&&n.current.focused;t=o&&r}v((function(e){return _objectSpread(_objectSpread({},e),{},{showClear:t})}))},Ke=function _input(e){var n=(e.detail||{}).value;He(void 0===n?"":n),Be(e)},Ue=function _focus(e){n.current.focused=!0,setTimeout((function(){He(j)})),Object.defineProperty(e,"detail",{value:e.detail.value}),null==Ae||Ae(e)},We=function _blur(e){n.current.focused=!1,He(j),Object.defineProperty(e,"detail",{value:e.detail.value}),null==Ee||Ee(e)},Me=function _confirm(e){var n=(e.detail||{}).value;He(void 0===n?"":n),Object.defineProperty(e,"detail",{value:e.detail.value}),null==Fe||Fe(e)};return(0,l.useEffect)((function(){He(j)}),[ne,_e]),(0,l.useEffect)((function(){g(null!=U?U:"")}),[U]),(0,l.useEffect)((function(){0}),[j]),(0,m.jsxs)(s.Cell,{size:y,icon:_,center:w,border:S,isLink:C,required:T,clickable:I,titleWidth:P,titleStyle:{marginRight:"12px"},style:A,arrowDirection:E,className:"van-field "+"".concat(N||""),renderIcon:(0,m.jsx)(m.Fragment,{children:Se}),renderTitle:(0,m.jsx)(m.Fragment,{children:V?(0,m.jsx)(i.View,{className:"label-class "+c.bem("field__label",{disabled:F}),children:V}):Ce}),children:[(0,m.jsxs)(i.View,{className:c.bem("field__body",[L]),children:[(0,m.jsx)(i.View,{className:c.bem("field__control",[q,"custom"]),onClick:Le,children:Te}),"textarea"===L?(0,m.jsx)(i.Textarea,{className:c.bem("field__control",[q,L,{disabled:F,error:X}])+" input-class ".concat(re?"autosize":""," ").concat(p.unitag)+"".concat(""),fixed:G,focus:J,cursor:Y,value:j,autoFocus:ee,disabled:F||ne,maxlength:W,placeholder:te,placeholderStyle:oe,placeholderClass:c.bem("field__placeholder",{error:X,disabled:F}),nativeProps:re?{rows:1}:{},autoHeight:!!re,style:d.inputStyle(re),cursorSpacing:le,adjustPosition:ce,showConfirmBar:ue,holdKeyboard:de,selectionEnd:fe,selectionStart:ve,disableDefaultPadding:je,onInput:Ke,onClick:Le,onBlur:We,onFocus:Ue,onConfirm:Me,onLineChange:ze,onKeyboardHeightChange:Re}):(0,m.jsx)(i.Input,{className:c.bem("field__control",[q,{disabled:F,error:X}])+" input-class",type:L,focus:J,cursor:Y,value:j,autoFocus:ee,disabled:F||ne,maxlength:W,placeholder:te,placeholderStyle:oe,placeholderClass:c.bem("field__placeholder",{error:X}),confirmType:ge,confirmHold:xe,holdKeyboard:de,cursorSpacing:le,adjustPosition:ce,selectionEnd:fe,selectionStart:ve,alwaysEmbed:he,password:ye||"password"===L,onInput:Ke,onClick:Le,onBlur:We,onFocus:Ue,onConfirm:Me,onKeyboardHeightChange:Re}),x&&(0,m.jsx)(u.Icon,{name:R,className:"van-field__clear-root van-field__icon-root",onTouchStart:function _clear(){g(""),He(""),(0,a.nextTick)((function(){Be(),null==Ve||Ve()}))}}),(0,m.jsxs)(i.View,{className:"van-field__icon-container",onClick:qe,children:[(B||H)&&(0,m.jsx)(u.Icon,{name:B||H,className:"van-field__icon-root "+K+" right-icon-class"}),Ie,Ne]}),(0,m.jsx)(i.View,{className:"van-field__button",children:Oe})]}),M&&W&&(0,m.jsxs)(i.View,{className:"van-field__word-limit",children:[(0,m.jsx)(i.View,{className:c.bem("field__word-num",{full:j.length>=W}),children:j.length>=W?W:j.length}),"/"+W]}),Q&&(0,m.jsx)(i.View,{className:c.bem("field__error-message",[$,{disabled:F,error:X}]),children:Q})]})}},"./node_modules/@antmjs/vantui/es/field/wxs.js":function(e,n,t){t.d(n,{inputStyle:function(){return inputStyle}});var o=t("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=t("./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/grid-item/index.js":function(e,n,t){var o=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),r=t("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),l=t("webpack/container/remote/react"),i=t("./node_modules/@antmjs/vantui/es/common/jumpLink.js"),c=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),s=t("./node_modules/@antmjs/vantui/es/icon/index.js"),u=t("./node_modules/@antmjs/vantui/es/grid-item/wxs.js"),d=t("webpack/container/remote/react/jsx-runtime"),m=["icon","iconColor","iconPrefix","dot","info","badge","text","setChildrenInstance","parentInstance","index","url","linkType","style","className"];n.default=function GridItem(e){var n=e.icon,t=e.iconColor,f=e.iconPrefix,p=void 0===f?"van-icon":f,v=e.dot,h=e.info,b=e.badge,j=e.text,g=e.setChildrenInstance,x=e.parentInstance,y=e.index,_=e.url,w=e.linkType,k=e.style,S=e.className,C=(0,r.default)(e,m),T=(0,l.useState)({}),I=(0,o.default)(T,2),N=I[0],O=I[1];(0,l.useEffect)((function(){g(y,{updateStyle:P})}),[y,g]),(0,l.useEffect)((function(){P()}),[x.columnNum]);var P=(0,l.useCallback)((function(){var e=x.columnNum,n=x.border,t=x.square,o=x.gutter,r=x.clickable,a=x.center,l=x.direction,i=x.reverse,c=x.iconSize;O({center:a,border:n,square:t,gutter:o,clickable:r,direction:l,reverse:i,iconSize:c,index:y,columnNum:e})}),[x,y]);return(0,d.jsx)(a.View,{className:" "+c.bem("grid-item",{square:null==N?void 0:N.square})+" "+S,style:c.style([u.wrapperStyle({square:null==N?void 0:N.square,gutter:null==N?void 0:N.gutter,columnNum:null==N?void 0:N.columnNum,index:null==N?void 0:N.index}),k]),onClick:function onClick(e){var n;_&&(0,i.jumpLink)(_,w),null==C||null===(n=C.onClick)||void 0===n||n.call(C,e)},children:(0,d.jsx)(a.View,{className:"content-class "+c.bem("grid-item__content",[null==N?void 0:N.direction,{center:null==N?void 0:N.center,square:null==N?void 0:N.square,reverse:null==N?void 0:N.reverse,clickable:null==N?void 0:N.clickable,surround:(null==N?void 0:N.border)&&(null==N?void 0:N.gutter)}])+" "+(null!=N&&N.border?"van-hairline--surround":""),style:u.contentStyle({square:null==N?void 0:N.square,gutter:null==N?void 0:N.gutter}),children:C.children||(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.View,{className:"van-grid-item__icon icon-class",children:n?(0,d.jsx)(s.default,{name:n,color:t,classPrefix:p,dot:v,info:b||h,size:null==N?void 0:N.iconSize}):N.renderIcon}),(0,d.jsx)(a.View,{className:"van-grid-item__text text-class",children:j?(0,d.jsx)(a.Text,{children:j}):N.renderText})]})})})}},"./node_modules/@antmjs/vantui/es/grid-item/wxs.js":function(e,n,t){t.d(n,{wrapperStyle:function(){return wrapperStyle},contentStyle:function(){return contentStyle}});var o=t("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=t("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function wrapperStyle(e){var n=100/e.columnNum+"%";return(0,o.style)({width:n,"padding-top":e.square?n:null,"padding-right":(0,r.addUnit)(e.gutter),"margin-top":e.index>=e.columnNum&&!e.square?(0,r.addUnit)(e.gutter):null})}function contentStyle(e){return e.square?(0,o.style)({right:(0,r.addUnit)(e.gutter),bottom:(0,r.addUnit)(e.gutter),height:"auto"}):""}},"./node_modules/@antmjs/vantui/es/grid/index.js":function(e,n,t){var o=t("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),r=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),a=t("webpack/container/remote/react"),l=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),i=t("./node_modules/@antmjs/vantui/es/grid/wxs.js"),c=t("webpack/container/remote/react/jsx-runtime"),s=["gutter","clickable","columnNum","center","border","direction","iconSize","square","reverse","className","style"];n.default=function Grid(e){var n=e.gutter,t=void 0===n?null:n,u=e.clickable,d=e.columnNum,m=void 0===d?4:d,f=e.center,p=void 0===f||f,v=e.border,h=void 0===v||v,b=e.direction,j=e.iconSize,g=void 0===j?"48":j,x=e.square,y=e.reverse,_=void 0!==y&&y,w=e.className,k=void 0===w?"":w,S=e.style,C=void 0===S?{}:S,T=(0,o.default)(e,s),I=(0,a.useRef)([]),N=(0,a.useCallback)((function(){I.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){N()}),[N]);var O=(0,a.useCallback)((function(e,n){I.current[e]=n}),[]),P=(0,a.useMemo)((function(){var e=[];return T.children&&Array.isArray(T.children)&&T.children.forEach((function(n,o){e.push((0,a.cloneElement)(n,{setChildrenInstance:O,key:o,index:o,parentInstance:{columnNum:m,border:h,square:x,gutter:t,clickable:u,center:p,direction:b,reverse:_,iconSize:g}}))})),e}),[T.children,m]);return(0,c.jsx)(r.View,{className:"van-grid "+(h&&!t?"van-hairline--top":"")+" "+k,style:l.style([i.rootStyle({gutter:t}),C]),children:P})}},"./node_modules/@antmjs/vantui/es/grid/wxs.js":function(e,n,t){t.d(n,{rootStyle:function(){return rootStyle}});var o=t("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=t("./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,n,t){var o=t("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=t("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),l=t("webpack/container/remote/@tarojs/taro"),i=t("webpack/container/remote/react"),c=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),u=t("./node_modules/@antmjs/vantui/es/common/utils.js"),d=t("./node_modules/@antmjs/vantui/es/icon/index.js"),m=t("./node_modules/@antmjs/vantui/es/notice-bar/wxs.js"),f=t("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,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach((function(n){(0,o.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var v=0;n.default=function NoticeBar(e){var n=(0,i.useState)({ready:!1,show:!0,animationData:{actions:[]},unitag:0}),t=(0,a.default)(n,2),o=t[0],h=t[1],b={animation:null,resetAnimation:null,timer:null,wrapWidth:void 0,contentWidth:void 0,duration:void 0},j=(0,i.useRef)(b),g=e.text,x=void 0===g?"":g,y=e.mode,_=void 0===y?"":y,w=e.url,k=void 0===w?"":w,S=e.openType,C=void 0===S?"navigate":S,T=e.delay,I=void 0===T?1:T,N=e.speed,O=void 0===N?60:N,P=e.scrollable,A=void 0===P?null:P,E=e.leftIcon,V=void 0===E?"":E,F=e.color,D=void 0===F?"#ed6a0c":F,L=e.backgroundColor,q=void 0===L?"#fffbe8":L,z=e.background,R=e.wrapable,B=e.renderLeftIcon,H=e.renderRightIcon,K=e.onClick,U=e.onClose,W=e.style,M=e.className,$=e.children,X=(0,r.default)(e,p);(0,i.useEffect)((function(){h((function(e){return _objectSpread(_objectSpread({},e),{},{unitag:v++})}))}),[]),(0,l.useReady)((function(){j.current.resetAnimation=(0,l.createAnimation)({duration:0,timingFunction:"linear"}),h((function(e){return _objectSpread(_objectSpread({},e),{},{ready:!0})}))})),(0,i.useEffect)((function(){j.current.resetAnimation=(0,l.createAnimation)({duration:0,timingFunction:"linear"}),h((function(e){return _objectSpread(_objectSpread({},e),{},{ready:!0})}))}),[]),(0,i.useEffect)((function(){return x&&o.ready&&G(),function(){j.current.timer&&clearTimeout(j.current.timer)}}),[x,O,o.ready]);var Q=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];j.current.timer&&clearTimeout(j.current.timer),j.current.timer=null,h((function(n){return _objectSpread(_objectSpread({},n),{},{animationData:j.current.resetAnimation.translateX(e?0:j.current.wrapWidth).step().export()})})),setTimeout((function(){(0,u.requestAnimationFrame)((function(){h((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:j.current.animation.translateX(-j.current.contentWidth).step().export()})}))}))}),10),j.current.timer=setTimeout((function(){Q()}),j.current.duration)}),[]),G=(0,i.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 n=e[0],t=e[1];null!=n&&null!=t&&n.width&&t.width&&!1!==A&&(0,l.nextTick)((function(){(A||t.width<=n.width)&&(j.current.wrapWidth=t.width,j.current.contentWidth=n.width,j.current.duration=(t.width+n.width)/O*1e3,j.current.animation=(0,l.createAnimation)({duration:j.current.duration,timingFunction:"linear",delay:I}),Q(!0))}))}))}))}),[o.unitag,A,O,I,Q]),J=(0,i.useCallback)((function(e){"closeable"===_&&(j.current.timer&&clearTimeout(j.current.timer),j.current.timer=null,h((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==U||U(e))}),[_,U]);return o.show&&(0,f.jsxs)(c.View,_objectSpread(_objectSpread({className:s.bem("notice-bar",{withicon:_,wrapable:R})+" ".concat(M||""),style:s.style([m.rootStyle({color:D,backgroundColor:q,background:z}),W])},X),{},{onClick:K,children:[V?(0,f.jsx)(d.default,{name:V,className:"van-notice-bar__left-icon"}):B,(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!==A||R?"":"van-ellipsis"),animation:o.animationData,children:[x,!x&&$]})}),"closeable"===_?(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:J}):"link"===_?(0,f.jsx)(c.Navigator,{url:k,openType:C,children:(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"arrow"})}):H]}))}},"./node_modules/@antmjs/vantui/es/notice-bar/wxs.js":function(e,n,t){t.d(n,{rootStyle:function(){return rootStyle}});var o=t("./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,n,t){var o=t("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=t("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),l=t("webpack/container/remote/react"),i=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),s=t("./node_modules/@antmjs/vantui/es/field/index.js"),u=t("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,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach((function(n){(0,o.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.default=function Search(e){var n=e.value,t=e.defaultValue,o=void 0===t?"":t,m=e.label,f=e.focus,p=e.error,v=e.disabled,h=e.readonly,b=e.inputAlign,j=e.showAction,g=e.leftIcon,x=void 0===g?"search":g,y=e.rightIcon,_=e.placeholder,w=e.placeholderStyle,k=e.actionText,S=void 0===k?"取消":k,C=e.background,T=void 0===C?"#ffffff":C,I=e.maxlength,N=void 0===I?-1:I,O=e.shape,P=void 0===O?"square":O,A=e.clearable,E=void 0===A||A,V=e.clearTrigger,F=void 0===V?"focus":V,D=e.clearIcon,L=void 0===D?"clear":D,q=e.renderLabel,z=e.renderLeftIcon,R=e.renderRightIcon,B=e.renderAction,H=e.onFocus,K=e.onBlur,U=e.onChange,W=e.onClear,M=e.onClickInput,$=e.onSearch,X=e.onCancel,Q=e.style,G=e.className,J=(0,a.default)(e,d),Z=(0,l.useMemo)((function(){return void 0===n}),[n]),Y=(0,l.useState)(Z?o:n),ee=(0,r.default)(Y,2),ne=ee[0],te=ee[1];(0,l.useEffect)((function(){Z||te(n)}),[Z,n]);var oe=Z?ne:n;return(0,u.jsxs)(i.View,_objectSpread(_objectSpread({className:"".concat(c.bem("search",{withaction:j||!!B})," ").concat(G),style:c.style([{background:T},Q])},J),{},{children:[(0,u.jsxs)(i.View,{className:c.bem("search__content",[P]),children:[m?(0,u.jsx)(i.View,{className:"van-search__label",children:m}):q,(0,u.jsx)(s.Field,{type:"text",leftIcon:z?"":x,rightIcon:R?"":y,focus:f,error:p,border:!1,confirmType:"search",className:"van-search__field field-class",value:oe,disabled:v,readonly:h,clearable:E,clearTrigger:F,clearIcon:L,maxlength:N,inputAlign:b,placeholder:_,"placeholder-style":w,renderLeftIcon:z,renderRightIcon:R,style:"padding: 5px 10px 5px 0; background-color: transparent;",onBlur:K,onFocus:H,onChange:function _change(e){Z&&te(e.detail),null==U||U(e)},onConfirm:$,onClear:W,onClickInput:M})]}),(j||B)&&(0,u.jsx)(i.View,{className:"van-search__action",hoverClass:"van-search__action--hover",hoverStayTime:70,children:B||(0,u.jsx)(i.View,{onClick:function _cancel(e){setTimeout((function(){te(""),null==X||X(),Object.defineProperty(e,"detail",{value:""}),null==U||U(e)}),200)},className:"cancel-class",children:S})})]}))}},"./node_modules/@antmjs/vantui/es/utils/index.js":function(e,n,t){t.d(n,{resizeTextarea:function(){return resizeTextarea}});t("./node_modules/@babel/runtime/helpers/esm/typeof.js"),t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),t("webpack/container/remote/react"),t("webpack/container/remote/@tarojs/taro");var o=t("./node_modules/@antmjs/vantui/es/utils/type.js"),r=t("webpack/container/remote/@tarojs/runtime").window,a=t("webpack/container/remote/@tarojs/runtime").document;function setScrollTop(e,n){"scrollTop"in e?e.scrollTop=n:e.scrollTo(e.scrollX,n)}function resizeTextarea(e,n){var t=function getRootScrollTop(){return r.pageYOffset||a.documentElement.scrollTop||a.body.scrollTop||0}();e.style.height="auto",e.style.lineHeight="inherit",e.rows=1;var l=e.scrollHeight;if(console.info(l),(0,o.isObject)(n)){var i=n.maxHeight,c=n.minHeight;void 0!==i&&(l=Math.min(l,"number"==typeof i?i:Number(i.replace("px","")))),void 0!==c&&(l=Math.max(l,"number"==typeof c?c:Number(c.replace("px",""))))}l&&(e.style.height="".concat(l,"px"),function setRootScrollTop(e){setScrollTop(r,e),setScrollTop(a.body,e)}(t))}},"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/home/index.tsx":function(e,n,t){var o=t("./node_modules/@antmjs/vantui/es/skeleton/index.js"),r=t("./node_modules/@antmjs/vantui/es/grid/index.js"),a=t("./node_modules/@antmjs/vantui/es/grid-item/index.js"),l=t("./node_modules/@antmjs/vantui/es/image/index.js"),i=t("./node_modules/@antmjs/vantui/es/search/index.js"),c=t("./node_modules/@antmjs/vantui/es/notice-bar/index.js"),s=t("./node_modules/@antmjs/vantui/es/dialog/index.js"),u=t("./node_modules/@antmjs/vantui/es/tag/index.js"),d=t("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),m=t("./node_modules/@antmjs/vantui/es/toast/index.js"),f=t("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),p=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),v=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),h=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),b=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),j=t("webpack/container/remote/react"),g=t.n(j),x=t("webpack/container/remote/@tarojs/taro"),y=t.n(x),_=t("./src/pages/components/TabbarCom/index.tsx"),w=t("./src/utils/index.ts"),k=t("./src/pages/components/ActiveCard/index.tsx"),S=t("webpack/container/remote/react/jsx-runtime");n.default=function Home(){var e,n,t,C,T,I,N,O,P=g().useState(0),A=(0,h.default)(P,2),E=(A[0],A[1],g().useState(0)),V=(0,h.default)(E,2),F=(V[0],V[1],g().useState(!1)),D=(0,h.default)(F,2),L=D[0],q=D[1],z=g().useState(""),R=(0,h.default)(z,2),B=(R[0],R[1],(0,j.useState)("")),H=(0,h.default)(B,2),K=H[0],U=H[1],W=(0,j.useState)([]),M=(0,h.default)(W,2),$=M[0],X=M[1],Q=(0,j.useState)({}),G=(0,h.default)(Q,2),J=G[0],Z=G[1],Y=(0,j.useState)(),ee=(0,h.default)(Y,2),ne=ee[0],te=ee[1],oe=(0,j.useState)(!1),re=(0,h.default)(oe,2),ae=re[0],le=re[1];(0,j.useEffect)((function(){ie()}),[]);var ie=function(){var e=(0,v.default)((0,p.default)().mark((function _callee(){var e;return(0,p.default)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,w.phoneLogin)();case 2:e=n.sent,console.log("isLogin",e),le(e);case 5:case"end":return n.stop()}}),_callee)})));return function getLogin(){return e.apply(this,arguments)}}();y().useShareAppMessage((function(e){return"button"===e.from&&console.log(e.target),{title:"cityNew",path:"/pages/home/index"}})),(0,x.useShareTimeline)((function(){return{title:"一起来玩吧"}}));(0,j.useEffect)((function(){}),[]),(0,j.useEffect)((function(){y().showShareMenu({withShareTicket:!0}),y().updateShareMenu({withShareTicket:!0,success:function success(){}})}),[]),(0,j.useEffect)((function(){se(),setTimeout((function(){ce()}),1e3)}),[]),(0,j.useEffect)((function(){var e;y().cloud.callFunction({name:"getOpenid",complete:(e=(0,v.default)((0,p.default)().mark((function _callee4(e){var n,t,o,r;return(0,p.default)().wrap((function _callee4$(a){for(;;)switch(a.prev=a.next){case 0:console.log("callFunction test result: ",e),r=null==e||null===(n=e.result)||void 0===n||null===(t=n.event)||void 0===t||null===(o=t.userInfo)||void 0===o?void 0:o.openId,te(r);case 3:case"end":return a.stop()}}),_callee4)}))),function complete(n){return e.apply(this,arguments)})})}),[ae]);var ce=function(){var e=(0,v.default)((0,p.default)().mark((function _callee6(){var e;return(0,p.default)().wrap((function _callee6$(n){for(;;)switch(n.prev=n.next){case 0:return e={tableName:"details",okFun:function(){var e=(0,v.default)((0,p.default)().mark((function _callee5(e){var n;return(0,p.default)().wrap((function _callee5$(t){for(;;)switch(t.prev=t.next){case 0:return console.log("details11--",e),t.next=3,X(null!==(n=null==e?void 0:e.data)&&void 0!==n?n:[]);case 3:case"end":return t.stop()}}),_callee5)})));return function okFun(n){return e.apply(this,arguments)}}()},n.next=3,(0,w.getTable)(e);case 3:case"end":return n.stop()}}),_callee6)})));return function getdetails(){return e.apply(this,arguments)}}(),se=function(){var e=(0,v.default)((0,p.default)().mark((function _callee8(){var e;return(0,p.default)().wrap((function _callee8$(n){for(;;)switch(n.prev=n.next){case 0:return e={tableName:"systemConfig",okFun:function(){var e=(0,v.default)((0,p.default)().mark((function _callee7(e){var n;return(0,p.default)().wrap((function _callee7$(t){for(;;)switch(t.prev=t.next){case 0:return console.log("systemConfig--",e),t.next=3,Z(null!==(n=null==e?void 0:e.data)&&void 0!==n?n:[]);case 3:case"end":return t.stop()}}),_callee7)})));return function okFun(n){return e.apply(this,arguments)}}()},n.next=3,(0,w.getTable)(e);case 3:case"end":return n.stop()}}),_callee8)})));return function getsystemConfig(){return e.apply(this,arguments)}}(),ue=function(){var e=(0,v.default)((0,p.default)().mark((function _callee9(e){var n;return(0,p.default)().wrap((function _callee9$(t){for(;;)switch(t.prev=t.next){case 0:console.log("data=====",e),n={tableName:"userInfo",keyValue:{openId:ne},okFun:function okFun(n){var t,o,r,a,l,i,c;console.log("提交打卡,res",n);var s={tableName:"userInfo",id:null==n||null===(t=n.data)||void 0===t||null===(o=t[0])||void 0===o?void 0:o._id,objData:{checkInArr:[].concat((0,f.default)(null!==(r=null==n||null===(a=n.data)||void 0===a||null===(l=a[0])||void 0===l?void 0:l.checkInArr)&&void 0!==r?r:[]),[{imageUrl:null==e?void 0:e.imageUrl,checkTime:(new Date).valueOf(),latitude:null==e||null===(i=e.lbsInfo)||void 0===i?void 0:i.latitude,longitude:null==e||null===(c=e.lbsInfo)||void 0===c?void 0:c.longitude}])},okFun:function okFun(e){console.log("提交打卡,res",e),m.default.success({message:"打卡成功",selector:"#vanToast-demo2",duration:2e3,onClose:function onClose(){}})}};(0,w.updateTableid)((0,d.default)({},s))}},(0,w.getTable)((0,d.default)({},n));case 3:case"end":return t.stop()}}),_callee9)})));return function checkIn(n){return e.apply(this,arguments)}}(),de=function chooseImage(e){y().chooseImage({count:1,sizeType:["original"],sourceType:["camera"],success:function success(n){var t=n.tempFilePaths;console.log("tempFilePaths===",t),function uploadTaro(e,n){var t;y().cloud.uploadFile({cloudPath:"images/checkIn/".concat(null===(t=new Date)||void 0===t?void 0:t.getTime(),".png"),filePath:null==e?void 0:e[0],success:function success(e){console.log("res",null==e?void 0:e.fileID),ue({imageUrl:null==e?void 0:e.fileID,lbsInfo:n})},fail:function fail(e){console.log("err",e)}})}(t,e)},complete:function complete(){se(),setTimeout((function(){ce()}),800)}})};return(0,S.jsxs)(b.View,{className:"homeContent",children:[(0,S.jsx)(b.View,{children:(0,S.jsx)(s.default,{id:"vanDialog3",showConfirmButton:!1,showCancelButton:!1,show:L,onClose:function onClose(){q(!1),ce()},children:(0,S.jsx)(b.View,{className:"tagArr",children:[{city:"深圳",color:""},{city:"北京",color:"#8c8c8c"},{city:"上海",color:"#8c8c8c"},{city:"广州",color:"#8c8c8c"},{city:"武汉",color:"#8c8c8c"},{city:"杭州",color:"#8c8c8c"},{city:"成都",color:"#8c8c8c"}].map((function(e){return(0,S.jsx)(u.default,{plain:!0,type:"primary",color:null==e?void 0:e.color,size:"large",style:{marginRight:"30px",marginBottom:"10px"},children:null==e?void 0:e.city})}))})})}),(null==J?void 0:J.length)>0&&!(null!=J&&null!==(e=J[0])&&void 0!==e&&null!==(n=e.notice)&&void 0!==n&&n.isHidden)&&(0,S.jsx)(c.default,{leftIcon:"volume-o",text:null==J||null===(t=J[0])||void 0===t||null===(C=t.notice)||void 0===C?void 0:C.text}),(0,S.jsxs)(b.View,{className:"topHome",children:[(0,S.jsx)(b.View,{onClick:function onClick(){return q(!0)},children:(0,S.jsx)(u.default,{plain:!0,type:"primary",size:"large",children:"深圳"})}),(0,S.jsx)(b.View,{children:(0,S.jsx)(i.default,{value:K,onChange:function onChange(e){return U(e.detail)},placeholder:"请输入搜索关键词",style:{width:"320px"},onSearch:function onSearch(e){console.log("e---",e),U(""),y().navigateTo({url:"/pages/activityList/index"})}})})]}),(0,S.jsx)(b.View,{className:"Swiper-box",children:(null==J?void 0:J.length)>0&&(0,S.jsx)(b.Swiper,{className:"Swiper",indicatorActiveColor:"#333",circular:!0,indicatorDots:!0,autoplay:!0,children:(null!==(T=null==J||null===(I=J[0])||void 0===I?void 0:I.imagesArr)&&void 0!==T?T:[]).map((function(e,n){return(0,S.jsx)(b.SwiperItem,{children:(0,S.jsx)(l.default,{className:"SwiperImg",src:null==e?void 0:e.url,fit:"cover",width:"100%",height:"150px"})})}))})}),(0,S.jsxs)(r.default,{children:[(0,S.jsx)(a.default,{icon:"star",text:"打卡",className:"iconStyle",onClick:(0,v.default)((0,p.default)().mark((function _callee11(){return(0,p.default)().wrap((function _callee11$(e){for(;;)switch(e.prev=e.next){case 0:if(!ae){e.next=4;break}y().getLocation({type:"gcj02",success:function success(e){console.log("lbs",e);null==e||e.latitude,null==e||e.longitude;var n={latitude:null==e?void 0:e.latitude,longitude:null==e?void 0:e.longitude};de(n)},fail:function fail(){m.default.fail({message:"定位授权异常,无法签到打卡",selector:"#vanToast-demo2"})}}),e.next=7;break;case 4:return e.next=6,ce();case 6:m.default.fail({message:"请先登录",selector:"#vanToast-demo2",duration:2e3,onClose:function onClose(){y().navigateTo({url:"/pages/my/index"})}});case 7:case"end":return e.stop()}}),_callee11)})))}),(0,S.jsx)(a.default,{icon:"like",className:"iconStyle",text:"深圳十峰",onClick:function onClick(){y().navigateTo({url:"/pages/mountainPeak/index"})}}),(0,S.jsx)(a.default,{icon:"eye",className:"iconStyle",text:"活动",onClick:function onClick(){y().navigateTo({url:"/pages/activityList/index"})}}),(0,S.jsx)(a.default,{icon:"video",className:"iconStyle",text:"视频",onClick:function onClick(){var e,n,t,o,r,a;y().openChannelsActivity({finderUserName:null!==(e=null==J||null===(n=J[0])||void 0===n||null===(t=n.videoObj)||void 0===t?void 0:t.finderUserName)&&void 0!==e?e:"sphqzUmI0BlppCI",feedId:null!==(o=null==J||null===(r=J[0])||void 0===r||null===(a=r.videoObj)||void 0===a?void 0:a.feedId)&&void 0!==o?o:"export/UzFfAgtgekIEAQAAAAAAeIIQA5S-0wAAAAstQy6ubaLX4KHWvLEZgBPEj6MUcExXaL37zNPgMJpEUVVnZ9njxR_hb9_u-bQj",success:function success(e){console.log("res",e)}})}})]}),(null==$?void 0:$.length)>0?(0,S.jsx)(b.View,{children:(null!==(N=null==$||null===(O=$.reverse())||void 0===O?void 0:O.splice(0,2))&&void 0!==N?N:[]).map((function(e,n){return(0,S.jsx)(b.View,{onClick:function onClick(){console.log("Card"),y().navigateTo({url:"/pages/activityList/components/details/index?id=".concat(null==e?void 0:e._id)})},children:(0,S.jsx)(k.default,{dataSource:e})})}))}):(0,S.jsx)(o.default,{title:!0,row:4}),(0,S.jsxs)(b.View,{style:{marginTop:"20px"},children:[" ",(0,S.jsx)(b.OfficialAccount,{onLoad:function onLoad(e){console.log("加载成功",e)},onError:function onError(e){console.log("加载失败",e)}})]}),(0,S.jsx)(m.default,{id:"vanToast-demo2"}),(0,S.jsx)(_.default,{active:0})]})}},"./src/pages/home/index.tsx":function(e,n,t){var o=t("webpack/container/remote/@tarojs/runtime"),r=t("./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:"首页"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return n="./src/pages/home/index.tsx",e(e.s=n);var n}));e.O()}]);