2 lines
33 KiB
JavaScript
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"),i=t("webpack/container/remote/react"),l=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),c=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,i.useRef)({focused:!1}),t=(0,i.useState)({showClear:!1,unitag:"van-field"}),o=(0,r.default)(t,2),p=o[0],v=o[1],h=(0,i.useState)(""),j=(0,r.default)(h,2),b=j[0],g=j[1],x=p.showClear,y=e.size,w=e.leftIcon,_=e.center,k=e.border,S=void 0===k||k,C=e.isLink,T=e.required,N=e.clickable,I=e.className,O=e.titleWidth,P=void 0===O?"6.2em":O,A=e.style,V=e.arrowDirection,E=e.label,F=e.disabled,L=e.type,D=void 0===L?"text":L,q=e.inputAlign,z=e.clearIcon,R=void 0===z?"clear":z,W=e.rightIcon,B=e.icon,H=e.iconClass,K=e.value,U=e.maxlength,M=e.showWordLimit,$=e.errorMessageAlign,G=e.error,X=e.errorMessage,Q=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,ie=void 0===ae?50:ae,le=e.adjustPosition,se=void 0===le||le,ce=e.showConfirmBar,ue=void 0===ce||ce,de=e.holdKeyboard,me=e.selectionEnd,fe=void 0===me?-1:me,pe=e.selectionStart,ve=void 0===pe?-1:pe,he=e.alwaysEmbed,je=e.disableDefaultPadding,be=void 0===je||je,ge=e.confirmType,xe=e.confirmHold,ye=e.password,we=e.clearable,_e=e.clearTrigger,ke=void 0===_e?"focus":_e,Se=e.renderLeftIcon,Ce=e.renderTitle,Te=e.renderInput,Ne=e.renderRightIcon,Ie=e.renderIcon,Oe=e.renderButton,Pe=e.onChange,Ae=e.onFocus,Ve=e.onBlur,Ee=e.onClear,Fe=e.onConfirm,Le=e.onInput,De=e.onClickInput,qe=e.onClickIcon,ze=e.onLineChange,Re=e.onKeyboardHeightChange;(0,i.useEffect)((function(){v((function(e){return _objectSpread(_objectSpread({},e),{},{unitag:"van-field_uni_".concat(f++)})}))}),[]);var We=function emitChange(e){e=e||{detail:{value:""}},Object.defineProperty(e,"detail",{value:e.detail.value}),g(e.detail||""),(0,a.nextTick)((function(){null==Le||Le(e),null==Pe||Pe(e)}))},Be=function setShowClear(e){var t=!1;if(we&&!ne){var o=!!e,r="always"===ke||"focus"===ke&&n.current.focused;t=o&&r}v((function(e){return _objectSpread(_objectSpread({},e),{},{showClear:t})}))},He=function _input(e){var n=(e.detail||{}).value;Be(void 0===n?"":n),We(e)},Ke=function _focus(e){n.current.focused=!0,setTimeout((function(){Be(b)})),Object.defineProperty(e,"detail",{value:e.detail.value}),null==Ae||Ae(e)},Ue=function _blur(e){n.current.focused=!1,Be(b),Object.defineProperty(e,"detail",{value:e.detail.value}),null==Ve||Ve(e)},Me=function _confirm(e){var n=(e.detail||{}).value;Be(void 0===n?"":n),Object.defineProperty(e,"detail",{value:e.detail.value}),null==Fe||Fe(e)};return(0,i.useEffect)((function(){Be(b)}),[ne,we]),(0,i.useEffect)((function(){g(null!=K?K:"")}),[K]),(0,i.useEffect)((function(){0}),[b]),(0,m.jsxs)(c.Cell,{size:y,icon:w,center:_,border:S,isLink:C,required:T,clickable:N,titleWidth:P,titleStyle:{marginRight:"12px"},style:A,arrowDirection:V,className:"van-field "+"".concat(I||""),renderIcon:(0,m.jsx)(m.Fragment,{children:Se}),renderTitle:(0,m.jsx)(m.Fragment,{children:E?(0,m.jsx)(l.View,{className:"label-class "+s.bem("field__label",{disabled:F}),children:E}):Ce}),children:[(0,m.jsxs)(l.View,{className:s.bem("field__body",[D]),children:[(0,m.jsx)(l.View,{className:s.bem("field__control",[q,"custom"]),onClick:De,children:Te}),"textarea"===D?(0,m.jsx)(l.Textarea,{className:s.bem("field__control",[q,D,{disabled:F,error:G}])+" input-class ".concat(re?"autosize":""," ").concat(p.unitag)+"".concat(""),fixed:Q,focus:J,cursor:Y,value:b,autoFocus:ee,disabled:F||ne,maxlength:U,placeholder:te,placeholderStyle:oe,placeholderClass:s.bem("field__placeholder",{error:G,disabled:F}),nativeProps:re?{rows:1}:{},autoHeight:!!re,style:d.inputStyle(re),cursorSpacing:ie,adjustPosition:se,showConfirmBar:ue,holdKeyboard:de,selectionEnd:fe,selectionStart:ve,disableDefaultPadding:be,onInput:He,onClick:De,onBlur:Ue,onFocus:Ke,onConfirm:Me,onLineChange:ze,onKeyboardHeightChange:Re}):(0,m.jsx)(l.Input,{className:s.bem("field__control",[q,{disabled:F,error:G}])+" input-class",type:D,focus:J,cursor:Y,value:b,autoFocus:ee,disabled:F||ne,maxlength:U,placeholder:te,placeholderStyle:oe,placeholderClass:s.bem("field__placeholder",{error:G}),confirmType:ge,confirmHold:xe,holdKeyboard:de,cursorSpacing:ie,adjustPosition:se,selectionEnd:fe,selectionStart:ve,alwaysEmbed:he,password:ye||"password"===D,onInput:He,onClick:De,onBlur:Ue,onFocus:Ke,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(""),Be(""),(0,a.nextTick)((function(){We(),null==Ee||Ee()}))}}),(0,m.jsxs)(l.View,{className:"van-field__icon-container",onClick:qe,children:[(W||B)&&(0,m.jsx)(u.Icon,{name:W||B,className:"van-field__icon-root "+H+" right-icon-class"}),Ne,Ie]}),(0,m.jsx)(l.View,{className:"van-field__button",children:Oe})]}),M&&U&&(0,m.jsxs)(l.View,{className:"van-field__word-limit",children:[(0,m.jsx)(l.View,{className:s.bem("field__word-num",{full:b.length>=U}),children:b.length>=U?U:b.length}),"/"+U]}),X&&(0,m.jsx)(l.View,{className:s.bem("field__error-message",[$,{disabled:F,error:G}]),children:X})]})}},"./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"),i=t("webpack/container/remote/react"),l=t("./node_modules/@antmjs/vantui/es/common/jumpLink.js"),s=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),c=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,j=e.badge,b=e.text,g=e.setChildrenInstance,x=e.parentInstance,y=e.index,w=e.url,_=e.linkType,k=e.style,S=e.className,C=(0,r.default)(e,m),T=(0,i.useState)({}),N=(0,o.default)(T,2),I=N[0],O=N[1];(0,i.useEffect)((function(){g(y,{updateStyle:P})}),[y,g]),(0,i.useEffect)((function(){P()}),[x.columnNum]);var P=(0,i.useCallback)((function(){var e=x.columnNum,n=x.border,t=x.square,o=x.gutter,r=x.clickable,a=x.center,i=x.direction,l=x.reverse,s=x.iconSize;O({center:a,border:n,square:t,gutter:o,clickable:r,direction:i,reverse:l,iconSize:s,index:y,columnNum:e})}),[x,y]);return(0,d.jsx)(a.View,{className:" "+s.bem("grid-item",{square:null==I?void 0:I.square})+" "+S,style:s.style([u.wrapperStyle({square:null==I?void 0:I.square,gutter:null==I?void 0:I.gutter,columnNum:null==I?void 0:I.columnNum,index:null==I?void 0:I.index}),k]),onClick:function onClick(e){var n;w&&(0,l.jumpLink)(w,_),null==C||null===(n=C.onClick)||void 0===n||n.call(C,e)},children:(0,d.jsx)(a.View,{className:"content-class "+s.bem("grid-item__content",[null==I?void 0:I.direction,{center:null==I?void 0:I.center,square:null==I?void 0:I.square,reverse:null==I?void 0:I.reverse,clickable:null==I?void 0:I.clickable,surround:(null==I?void 0:I.border)&&(null==I?void 0:I.gutter)}])+" "+(null!=I&&I.border?"van-hairline--surround":""),style:u.contentStyle({square:null==I?void 0:I.square,gutter:null==I?void 0:I.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)(c.default,{name:n,color:t,classPrefix:p,dot:v,info:j||h,size:null==I?void 0:I.iconSize}):I.renderIcon}),(0,d.jsx)(a.View,{className:"van-grid-item__text text-class",children:b?(0,d.jsx)(a.Text,{children:b}):I.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"),i=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=t("./node_modules/@antmjs/vantui/es/grid/wxs.js"),s=t("webpack/container/remote/react/jsx-runtime"),c=["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,j=e.direction,b=e.iconSize,g=void 0===b?"48":b,x=e.square,y=e.reverse,w=void 0!==y&&y,_=e.className,k=void 0===_?"":_,S=e.style,C=void 0===S?{}:S,T=(0,o.default)(e,c),N=(0,a.useRef)([]),I=(0,a.useCallback)((function(){N.current.forEach((function(e){e.updateStyle()}))}),[]);(0,a.useEffect)((function(){I()}),[I]);var O=(0,a.useCallback)((function(e,n){N.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:j,reverse:w,iconSize:g}}))})),e}),[T.children,m]);return(0,s.jsx)(r.View,{className:"van-grid "+(h&&!t?"van-hairline--top":"")+" "+k,style:i.style([l.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"),i=t("webpack/container/remote/@tarojs/taro"),l=t("webpack/container/remote/react"),s=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=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,l.useState)({ready:!1,show:!0,animationData:{actions:[]},unitag:0}),t=(0,a.default)(n,2),o=t[0],h=t[1],j={animation:null,resetAnimation:null,timer:null,wrapWidth:void 0,contentWidth:void 0,duration:void 0},b=(0,l.useRef)(j),g=e.text,x=void 0===g?"":g,y=e.mode,w=void 0===y?"":y,_=e.url,k=void 0===_?"":_,S=e.openType,C=void 0===S?"navigate":S,T=e.delay,N=void 0===T?1:T,I=e.speed,O=void 0===I?60:I,P=e.scrollable,A=void 0===P?null:P,V=e.leftIcon,E=void 0===V?"":V,F=e.color,L=void 0===F?"#ed6a0c":F,D=e.backgroundColor,q=void 0===D?"#fffbe8":D,z=e.background,R=e.wrapable,W=e.renderLeftIcon,B=e.renderRightIcon,H=e.onClick,K=e.onClose,U=e.style,M=e.className,$=e.children,G=(0,r.default)(e,p);(0,l.useEffect)((function(){h((function(e){return _objectSpread(_objectSpread({},e),{},{unitag:v++})}))}),[]),(0,i.useReady)((function(){b.current.resetAnimation=(0,i.createAnimation)({duration:0,timingFunction:"linear"}),h((function(e){return _objectSpread(_objectSpread({},e),{},{ready:!0})}))})),(0,l.useEffect)((function(){b.current.resetAnimation=(0,i.createAnimation)({duration:0,timingFunction:"linear"}),h((function(e){return _objectSpread(_objectSpread({},e),{},{ready:!0})}))}),[]),(0,l.useEffect)((function(){return x&&o.ready&&Q(),function(){b.current.timer&&clearTimeout(b.current.timer)}}),[x,O,o.ready]);var X=(0,l.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];b.current.timer&&clearTimeout(b.current.timer),b.current.timer=null,h((function(n){return _objectSpread(_objectSpread({},n),{},{animationData:b.current.resetAnimation.translateX(e?0:b.current.wrapWidth).step().export()})})),setTimeout((function(){(0,u.requestAnimationFrame)((function(){h((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:b.current.animation.translateX(-b.current.contentWidth).step().export()})}))}))}),10),b.current.timer=setTimeout((function(){X()}),b.current.duration)}),[]),Q=(0,l.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,i.nextTick)((function(){(A||t.width<=n.width)&&(b.current.wrapWidth=t.width,b.current.contentWidth=n.width,b.current.duration=(t.width+n.width)/O*1e3,b.current.animation=(0,i.createAnimation)({duration:b.current.duration,timingFunction:"linear",delay:N}),X(!0))}))}))}))}),[o.unitag,A,O,N,X]),J=(0,l.useCallback)((function(e){"closeable"===w&&(b.current.timer&&clearTimeout(b.current.timer),b.current.timer=null,h((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==K||K(e))}),[w,K]);return o.show&&(0,f.jsxs)(s.View,_objectSpread(_objectSpread({className:c.bem("notice-bar",{withicon:w,wrapable:R})+" ".concat(M||""),style:c.style([m.rootStyle({color:L,backgroundColor:q,background:z}),U])},G),{},{onClick:H,children:[E?(0,f.jsx)(d.default,{name:E,className:"van-notice-bar__left-icon"}):W,(0,f.jsx)(s.View,{className:"van-notice-bar__wrap van-notice-bar__wrap_".concat(o.unitag),children:(0,f.jsxs)(s.View,{className:"van-notice-bar__content van-notice-bar__content_".concat(o.unitag," ")+(!1!==A||R?"":"van-ellipsis"),animation:o.animationData,children:[x,!x&&$]})}),"closeable"===w?(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:J}):"link"===w?(0,f.jsx)(s.Navigator,{url:k,openType:C,children:(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"arrow"})}):B]}))}},"./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"),i=t("webpack/container/remote/react"),l=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=t("./node_modules/@antmjs/vantui/es/wxs/utils.js"),c=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,j=e.inputAlign,b=e.showAction,g=e.leftIcon,x=void 0===g?"search":g,y=e.rightIcon,w=e.placeholder,_=e.placeholderStyle,k=e.actionText,S=void 0===k?"取消":k,C=e.background,T=void 0===C?"#ffffff":C,N=e.maxlength,I=void 0===N?-1:N,O=e.shape,P=void 0===O?"square":O,A=e.clearable,V=void 0===A||A,E=e.clearTrigger,F=void 0===E?"focus":E,L=e.clearIcon,D=void 0===L?"clear":L,q=e.renderLabel,z=e.renderLeftIcon,R=e.renderRightIcon,W=e.renderAction,B=e.onFocus,H=e.onBlur,K=e.onChange,U=e.onClear,M=e.onClickInput,$=e.onSearch,G=e.onCancel,X=e.style,Q=e.className,J=(0,a.default)(e,d),Z=(0,i.useMemo)((function(){return void 0===n}),[n]),Y=(0,i.useState)(Z?o:n),ee=(0,r.default)(Y,2),ne=ee[0],te=ee[1];(0,i.useEffect)((function(){Z||te(n)}),[Z,n]);var oe=Z?ne:n;return(0,u.jsxs)(l.View,_objectSpread(_objectSpread({className:"".concat(s.bem("search",{withaction:b||!!W})," ").concat(Q),style:s.style([{background:T},X])},J),{},{children:[(0,u.jsxs)(l.View,{className:s.bem("search__content",[P]),children:[m?(0,u.jsx)(l.View,{className:"van-search__label",children:m}):q,(0,u.jsx)(c.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:V,clearTrigger:F,clearIcon:D,maxlength:I,inputAlign:j,placeholder:w,"placeholder-style":_,renderLeftIcon:z,renderRightIcon:R,style:"padding: 5px 10px 5px 0; background-color: transparent;",onBlur:H,onFocus:B,onChange:function _change(e){Z&&te(e.detail),null==K||K(e)},onConfirm:$,onClear:U,onClickInput:M})]}),(b||W)&&(0,u.jsx)(l.View,{className:"van-search__action",hoverClass:"van-search__action--hover",hoverStayTime:70,children:W||(0,u.jsx)(l.View,{onClick:function _cancel(e){setTimeout((function(){te(""),null==G||G(),Object.defineProperty(e,"detail",{value:""}),null==K||K(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 i=e.scrollHeight;if(console.info(i),(0,o.isObject)(n)){var l=n.maxHeight,s=n.minHeight;void 0!==l&&(i=Math.min(i,"number"==typeof l?l:Number(l.replace("px","")))),void 0!==s&&(i=Math.max(i,"number"==typeof s?s:Number(s.replace("px",""))))}i&&(e.style.height="".concat(i,"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"),i=t("./node_modules/@antmjs/vantui/es/image/index.js"),l=t("./node_modules/@antmjs/vantui/es/search/index.js"),s=t("./node_modules/@antmjs/vantui/es/notice-bar/index.js"),c=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"),j=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),b=t("webpack/container/remote/react"),g=t.n(b),x=t("webpack/container/remote/@tarojs/taro"),y=t.n(x),w=t("./src/pages/components/TabbarCom/index.tsx"),_=t("./src/utils/index.ts"),k=t("./src/pages/components/ActiveCard/index.tsx"),S=t("./src/pages/home/components/WeGroup/index.tsx"),C=t("webpack/container/remote/react/jsx-runtime");n.default=function Home(){var e,n,t,T,N,I,O,P,A=g().useState(0),V=(0,h.default)(A,2),E=(V[0],V[1],g().useState(0)),F=(0,h.default)(E,2),L=(F[0],F[1],g().useState(!1)),D=(0,h.default)(L,2),q=D[0],z=D[1],R=g().useState(""),W=(0,h.default)(R,2),B=(W[0],W[1],(0,b.useState)("")),H=(0,h.default)(B,2),K=H[0],U=H[1],M=(0,b.useState)([]),$=(0,h.default)(M,2),G=$[0],X=$[1],Q=(0,b.useState)({}),J=(0,h.default)(Q,2),Z=J[0],Y=J[1],ee=(0,b.useState)(),ne=(0,h.default)(ee,2),te=ne[0],oe=ne[1],re=(0,b.useState)(!1),ae=(0,h.default)(re,2),ie=ae[0],le=ae[1];(0,b.useEffect)((function(){se()}),[]);var se=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,_.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,b.useEffect)((function(){y().showShareMenu({withShareTicket:!0}),y().updateShareMenu({withShareTicket:!0,success:function success(){}})}),[]),(0,b.useEffect)((function(){ue()}),[]),(0,b.useEffect)((function(){var e;y().cloud.callFunction({name:"getOpenid",complete:(e=(0,v.default)((0,p.default)().mark((function _callee2(e){var n,t,o,r;return(0,p.default)().wrap((function _callee2$(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,oe(r);case 3:case"end":return a.stop()}}),_callee2)}))),function complete(n){return e.apply(this,arguments)})})}),[ie]);var ce=function(){var e=(0,v.default)((0,p.default)().mark((function _callee4(){var e;return(0,p.default)().wrap((function _callee4$(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 _callee3(e){var n;return(0,p.default)().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return console.log("details--",e),t.next=3,X(null!==(n=null==e?void 0:e.data)&&void 0!==n?n:[]);case 3:case"end":return t.stop()}}),_callee3)})));return function okFun(n){return e.apply(this,arguments)}}()},n.next=3,(0,_.getTable)(e);case 3:case"end":return n.stop()}}),_callee4)})));return function getdetails(){return e.apply(this,arguments)}}(),ue=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:"systemConfig",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("systemConfig--",e),t.next=3,Y(null!==(n=null==e?void 0:e.data)&&void 0!==n?n:[]);case 3:setTimeout((function(){ce()}),700);case 4:case"end":return t.stop()}}),_callee5)})));return function okFun(n){return e.apply(this,arguments)}}()},n.next=3,(0,_.getTable)(e);case 3:case"end":return n.stop()}}),_callee6)})));return function getsystemConfig(){return e.apply(this,arguments)}}(),de=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:console.log("data=====",e),n={tableName:"userInfo",keyValue:{openId:te},okFun:function okFun(n){var t,o,r,a,i,l,s;console.log("提交打卡,res",n);var c={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===(i=a[0])||void 0===i?void 0:i.checkInArr)&&void 0!==r?r:[]),[{imageUrl:null==e?void 0:e.imageUrl,checkTime:(new Date).valueOf(),latitude:null==e||null===(l=e.lbsInfo)||void 0===l?void 0:l.latitude,longitude:null==e||null===(s=e.lbsInfo)||void 0===s?void 0:s.longitude}])},okFun:function okFun(e){console.log("提交打卡,res",e),m.default.success({message:"打卡成功",selector:"#vanToast-demo2",duration:2e3,onClose:function onClose(){}})}};(0,_.updateTableid)((0,d.default)({},c))}},(0,_.getTable)((0,d.default)({},n));case 3:case"end":return t.stop()}}),_callee7)})));return function checkIn(n){return e.apply(this,arguments)}}(),me=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),de({imageUrl:null==e?void 0:e.fileID,lbsInfo:n})},fail:function fail(e){console.log("err",e)}})}(t,e)},complete:function complete(){ue()}})};return(0,C.jsxs)(j.View,{className:"homeContent",children:[(0,C.jsx)(j.View,{children:(0,C.jsx)(c.default,{id:"vanDialog3",showConfirmButton:!1,showCancelButton:!1,show:q,onClose:function onClose(){return z(!1)},children:(0,C.jsx)(j.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,C.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!=Z&&null!==(e=Z[0])&&void 0!==e&&null!==(n=e.notice)&&void 0!==n&&n.isHidden)&&(0,C.jsx)(s.default,{leftIcon:"volume-o",text:null==Z||null===(t=Z[0])||void 0===t||null===(T=t.notice)||void 0===T?void 0:T.text}),(0,C.jsxs)(j.View,{className:"topHome",children:[(0,C.jsx)(j.View,{onClick:function onClick(){return z(!0)},children:(0,C.jsx)(u.default,{plain:!0,type:"primary",size:"large",children:"深圳"})}),(0,C.jsx)(j.View,{children:(0,C.jsx)(l.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,C.jsx)(j.View,{className:"Swiper-box",children:(null==Z?void 0:Z.length)>0&&(0,C.jsx)(j.Swiper,{className:"test-h",indicatorActiveColor:"#333",circular:!0,indicatorDots:!0,autoplay:!0,children:(null!==(N=null==Z||null===(I=Z[0])||void 0===I?void 0:I.imagesArr)&&void 0!==N?N:[]).map((function(e,n){return(0,C.jsx)(j.SwiperItem,{children:(0,C.jsx)(i.default,{src:null==e?void 0:e.url,fit:"cover",width:"100%",height:"150px"})})}))})}),(0,C.jsxs)(r.default,{children:[(0,C.jsx)(a.default,{icon:"star",text:"打卡",className:"iconStyle",onClick:(0,v.default)((0,p.default)().mark((function _callee9(){return(0,p.default)().wrap((function _callee9$(e){for(;;)switch(e.prev=e.next){case 0:if(!ie){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};me(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()}}),_callee9)})))}),(0,C.jsx)(a.default,{icon:"like",className:"iconStyle",text:"深圳十峰",onClick:function onClick(){y().navigateTo({url:"/pages/mountainPeak/index"})}}),(0,C.jsx)(a.default,{icon:"eye",className:"iconStyle",text:"活动",onClick:function onClick(){y().navigateTo({url:"/pages/activityList/index"})}}),(0,C.jsx)(a.default,{icon:"video",className:"iconStyle",text:"视频",onClick:function onClick(){y().openChannelsActivity({finderUserName:"sphqzUmI0BlppCI",feedId:"export/UzFfAgtgekIEAQAAAAAAeIIQA5S-0wAAAAstQy6ubaLX4KHWvLEZgBPEj6MUcExXaL37zNPgMJpEUVVnZ9njxR_hb9_u-bQj",success:function success(e){console.log("res",e)}})}})]}),(null==G?void 0:G.length)>0?(0,C.jsx)(j.View,{children:(null!==(O=null==G||null===(P=G.reverse())||void 0===P?void 0:P.splice(0,2))&&void 0!==O?O:[]).map((function(e,n){return(0,C.jsx)(j.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,C.jsx)(k.default,{dataSource:e})})}))}):(0,C.jsx)(o.default,{title:!0,row:4}),(0,C.jsx)(S.default,{}),(0,C.jsxs)(j.View,{style:{marginTop:"20px"},children:[" ",(0,C.jsx)(j.OfficialAccount,{onLoad:function onLoad(e){console.log("加载成功",e)},onError:function onError(e){console.log("加载失败",e)}})]}),(0,C.jsx)(m.default,{id:"vanToast-demo2"}),(0,C.jsx)(w.default,{active:0})]})}},"./src/pages/home/components/WeGroup/index.tsx":function(e,n,t){var o=t("./node_modules/@antmjs/vantui/es/image/index.js"),r=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),a=t("webpack/container/remote/react/jsx-runtime");n.default=function WeGroup(){return(0,a.jsxs)(r.View,{className:"weGroup",children:[(0,a.jsx)(r.View,{className:"left",children:(0,a.jsx)(o.default,{width:"50px",height:"50px",fit:"cover",src:"cloud://citynew-0givkbre03955d8c.6369-citynew-0givkbre03955d8c-1253655588/images/swiper/download-1.jpg"})}),(0,a.jsxs)(r.View,{className:"right",children:[(0,a.jsxs)(r.View,{className:"rightup",children:[(0,a.jsx)(r.View,{className:"rightupLeft",children:"户外 | 梧桐山"}),(0,a.jsx)(r.View,{className:"rightupRight",children:"09:18"})]}),(0,a.jsx)(r.View,{className:"rightdown",children:"cady: 周末组队,谁有空一起?"})]})]})}},"./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()}]); |