diff --git a/dist/common.js b/dist/common.js index 45fa647..ee01384 100644 --- a/dist/common.js +++ b/dist/common.js @@ -1,2 +1,2 @@ /*! For license information please see common.js.LICENSE.txt */ -"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["common"],{"./src/pages/components/ActiveCard/index.tsx":function(e,n,a){var s=a("./node_modules/@antmjs/vantui/es/button/index.js"),t=a("./node_modules/@antmjs/vantui/es/image/index.js"),i=a("./node_modules/@antmjs/vantui/es/tag/index.js"),l=a("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),o=a("webpack/container/remote/react/jsx-runtime");n.default=function ActiveCard(){return(0,o.jsxs)(l.View,{className:"activeCard",children:[(0,o.jsxs)(l.View,{className:"left",children:[!1,(0,o.jsx)(l.View,{className:"leftImage",children:(0,o.jsx)(t.default,{width:"100%",height:"100px",fit:"cover",src:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images/v4-460px-Climb-a-Mountain-Step-9.jpg"})})]}),(0,o.jsxs)(l.View,{className:"middle",children:[(0,o.jsxs)(l.View,{className:"title",children:[(0,o.jsx)(i.default,{round:!0,type:"warning",style:{marginRight:"5px"},children:"标签"}),(0,o.jsx)(l.Text,{children:"这是标题这是标题这是标题这是标题这是标题"})]}),(0,o.jsxs)(l.View,{className:"down",children:[(0,o.jsxs)(l.View,{className:"date",children:[(0,o.jsx)(l.View,{className:"21",children:"莲花山公园"}),(0,o.jsx)(l.View,{className:"11",children:"2022年11月17日"})]}),(0,o.jsx)(l.View,{className:"btn",children:(0,o.jsx)(s.default,{plain:!0,hairline:!0,type:"primary",children:"立即报名"})})]})]})]})}},"./src/pages/components/TabbarCom/index.tsx":function(e,n,a){var s=a("./node_modules/@antmjs/vantui/es/tabbar/index.js"),t=a("./node_modules/@antmjs/vantui/es/tabbar-item/index.js"),i=a("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),l=a("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),o=a("webpack/container/remote/@tarojs/taro"),d=a.n(o),r=a("webpack/container/remote/react"),c=a.n(r),u=a("webpack/container/remote/react/jsx-runtime");n.default=function TabbarCom(e){var n,a=c().useState(null!==(n=null==e?void 0:e.active)&&void 0!==n?n:0),o=(0,i.default)(a,2),r=o[0],m=o[1];return(0,u.jsx)(l.View,{style:{marginTop:"40px"},children:(0,u.jsxs)(s.default,{active:r,onChange:function onChange(e){console.log("e",e),m(null==e?void 0:e.detail),0===(null==e?void 0:e.detail)&&d().redirectTo({url:"/pages/home/index"}),1===(null==e?void 0:e.detail)&&d().redirectTo({url:"/pages/activityList/index"}),2===(null==e?void 0:e.detail)&&d().redirectTo({url:"/pages/my/index"})},safeAreaInsetBottom:!0,children:[(0,u.jsx)(t.default,{icon:"home-o",children:"首页"}),(0,u.jsx)(t.default,{icon:"friends-o",children:"活动"}),(0,u.jsx)(t.default,{icon:"setting-o",children:"我的"})]})})}},"./src/utils/index.ts":function(e,n,a){a.d(n,{getTable:function(){return i}});var s=a("webpack/container/remote/@tarojs/taro"),t=a.n(s),i=function getTable(e){var n=e.env,a=e.tableName,s=e.okFun,i=t().cloud.database({env:n}),l=null==i?void 0:i.collection(a);null==l||l.get({success:function success(e){s(e)}})}}}]); \ No newline at end of file +"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["common"],{"./src/pages/components/ActiveCard/index.tsx":function(e,n,a){var t=a("./node_modules/@antmjs/vantui/es/button/index.js"),s=a("./node_modules/@antmjs/vantui/es/image/index.js"),i=a("./node_modules/@antmjs/vantui/es/tag/index.js"),l=a("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),o=a("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),d=a("webpack/container/remote/react"),c=a("webpack/container/remote/react/jsx-runtime");n.default=function ActiveCard(e){var n=(0,d.useState)({}),a=(0,l.default)(n,2),r=(a[0],a[1],null==e?void 0:e.dataSource),u=r.title,m=r.address,x=r.date,j=r.tagName,p=(r.tagCode,r.Status),v=r.images;r.isDelete;return(0,c.jsxs)(o.View,{className:"activeCard",children:[(0,c.jsxs)(o.View,{className:"left",children:[!1,(0,c.jsx)(o.View,{className:"leftImage",children:(0,c.jsx)(s.default,{width:"100%",height:"100px",fit:"cover",src:null==v?void 0:v[0]})})]}),(0,c.jsxs)(o.View,{className:"middle",children:[(0,c.jsxs)(o.View,{className:"title",children:[(0,c.jsx)(i.default,{round:!0,type:"warning",style:{marginRight:"5px"},children:j}),(0,c.jsx)(o.Text,{children:u})]}),(0,c.jsxs)(o.View,{className:"down",children:[(0,c.jsxs)(o.View,{className:"date",children:[(0,c.jsx)(o.View,{className:"21",children:m}),(0,c.jsx)(o.View,{className:"11",children:x})]}),(0,c.jsx)(o.View,{className:"btn",children:(0,c.jsx)(t.default,{plain:!0,hairline:!0,type:"primary",children:"0"===p?"立即报名":"取消"})})]})]})]})}},"./src/pages/components/TabbarCom/index.tsx":function(e,n,a){var t=a("./node_modules/@antmjs/vantui/es/tabbar/index.js"),s=a("./node_modules/@antmjs/vantui/es/tabbar-item/index.js"),i=a("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),l=a("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),o=a("webpack/container/remote/@tarojs/taro"),d=a.n(o),c=a("webpack/container/remote/react"),r=a.n(c),u=a("webpack/container/remote/react/jsx-runtime");n.default=function TabbarCom(e){var n,a=r().useState(null!==(n=null==e?void 0:e.active)&&void 0!==n?n:0),o=(0,i.default)(a,2),c=o[0],m=o[1];return(0,u.jsx)(l.View,{style:{marginTop:"40px"},children:(0,u.jsxs)(t.default,{active:c,onChange:function onChange(e){console.log("e",e),m(null==e?void 0:e.detail),0===(null==e?void 0:e.detail)&&d().redirectTo({url:"/pages/home/index"}),1===(null==e?void 0:e.detail)&&d().redirectTo({url:"/pages/activityList/index"}),2===(null==e?void 0:e.detail)&&d().redirectTo({url:"/pages/my/index"})},safeAreaInsetBottom:!0,children:[(0,u.jsx)(s.default,{icon:"home-o",children:"首页"}),(0,u.jsx)(s.default,{icon:"friends-o",children:"活动"}),(0,u.jsx)(s.default,{icon:"setting-o",children:"我的"})]})})}},"./src/utils/index.ts":function(e,n,a){a.d(n,{getTable:function(){return i},getTableid:function(){return l}});var t=a("webpack/container/remote/@tarojs/taro"),s=a.n(t),i=function getTable(e){var n=e.env,a=e.tableName,t=e.okFun,i=s().cloud.database({env:n}),l=null==i?void 0:i.collection(a);null==l||l.get({success:function success(e){t(e)}})},l=function getTableid(e){var n=e.env,a=e.tableName,t=e.id,i=e.okFun,l=s().cloud.database({env:n}),o=null==l?void 0:l.collection(a);null==o||o.doc(t).get({success:function success(e){i(e)}})}}}]); \ No newline at end of file diff --git a/dist/pages/activityList/components/details/index.js b/dist/pages/activityList/components/details/index.js index 01e63d1..37b1e81 100644 --- a/dist/pages/activityList/components/details/index.js +++ b/dist/pages/activityList/components/details/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/activityList/components/details/index"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/activityList/components/details/index.tsx":function(e,t,n){var s=n("./node_modules/@antmjs/vantui/es/button/index.js"),i=n("./node_modules/@antmjs/vantui/es/cell/index.js"),a=n("./node_modules/@antmjs/vantui/es/image/index.js"),o=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),c=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),l=n("webpack/container/remote/@tarojs/taro"),d=n.n(l),r=n("webpack/container/remote/react"),u=n("./src/utils/index.ts"),m=n("webpack/container/remote/react/jsx-runtime");t.default=function details(){var e,t=(0,r.useState)([]),n=(0,o.default)(t,2),l=n[0],p=n[1],x=(0,r.useState)(0),j=(0,o.default)(x,2),f=j[0],v=j[1];return(0,r.useEffect)((function(){}),[]),(0,r.useEffect)((function(){var e,t=d().getSystemInfoSync(),n=t.screenHeight,s=t.safeArea,i=void 0===s?{}:s,a=null!==(e=n-(null==i?void 0:i.bottom))&&void 0!==e?e:0;v(a);var o={tableName:"cityNew",id:"80516fb66370bcf300b8f43c5f4dd52b",okFun:function okFun(e){var t;console.log("res",e),p(null!==(t=null==e?void 0:e.data)&&void 0!==t?t:[])}};(0,u.getTable)(o)}),[]),(0,m.jsxs)(c.View,{className:"detailContent",children:[(0,m.jsxs)(c.View,{children:[(0,m.jsx)(c.View,{children:"活动标题活动标题活动标题活动标题活动标题活动标题活动标题"}),(0,m.jsx)(a.default,{width:"100%",height:"180px",fit:"cover",src:"https://img.yzcdn.cn/vant/cat.jpeg"}),(0,m.jsxs)(c.View,{children:[(0,m.jsx)(i.default,{isLink:!0,icon:"clock",title:"2022年11月22日",linkType:"navigateTo",url:"/pages/dashboard/index"}),(0,m.jsx)(i.default,{isLink:!0,icon:"location",title:"广东省深圳市龙华区你好",linkType:"navigateTo",url:"/pages/dashboard/index"})]}),(0,m.jsx)(c.View,{className:"imagesArr",children:[1,2,3,4].map((function(e){return(0,m.jsx)(a.default,{round:!0,width:"30px",height:"30px",src:"https://img.yzcdn.cn/vant/cat.jpeg",style:{marginRight:"5px"}})}))})]}),(0,m.jsx)(c.View,{onClick:function onClick(){},className:"RichText",children:(0,m.jsx)(c.RichText,{nodes:null==l||null===(e=l[0])||void 0===e?void 0:e.richText})}),(0,m.jsx)(c.View,{className:"detailBtn",style:{bottom:"".concat(null!=f?f:0,"px")},children:(0,m.jsx)(s.default,{type:"primary",block:!0,children:"立即参加"})})]})}},"./src/pages/activityList/components/details/index.tsx":function(e,t,n){var s=n("webpack/container/remote/@tarojs/runtime"),i=n("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/activityList/components/details/index.tsx");Page((0,s.createPageConfig)(i.default,"pages/activityList/components/details/index",{root:{cn:[]}},{navigationBarTitleText:"活动详情"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/activityList/components/details/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file +"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/activityList/components/details/index"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/activityList/components/details/index.tsx":function(e,t,n){var i=n("./node_modules/@antmjs/vantui/es/button/index.js"),s=n("./node_modules/@antmjs/vantui/es/cell/index.js"),a=n("./node_modules/@antmjs/vantui/es/image/index.js"),o=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),l=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),d=n("webpack/container/remote/@tarojs/taro"),c=n.n(d),r=n("webpack/container/remote/react"),u=n("./src/utils/index.ts"),m=n("webpack/container/remote/react/jsx-runtime");t.default=function details(){var e,t,n,p=(0,r.useState)([]),x=(0,o.default)(p,2),j=x[0],v=x[1],g=(0,r.useState)(0),f=(0,o.default)(g,2),h=f[0],b=f[1],w=(0,d.getCurrentInstance)(),y=(null!==(e=null==w||null===(t=w.router)||void 0===t?void 0:t.params)&&void 0!==e?e:{}).id;return(0,r.useEffect)((function(){}),[]),(0,r.useEffect)((function(){var e,t=c().getSystemInfoSync(),n=t.screenHeight,i=t.safeArea,s=void 0===i?{}:i,a=null!==(e=n-(null==s?void 0:s.bottom))&&void 0!==e?e:0;b(a);var o={tableName:"details",id:y,okFun:function okFun(e){var t;console.log("res",e),v(null!==(t=null==e?void 0:e.data)&&void 0!==t?t:[])}};(0,u.getTableid)(o)}),[]),(0,m.jsxs)(l.View,{className:"detailContent",children:[(0,m.jsxs)(l.View,{children:[(0,m.jsx)(l.View,{children:"活动标题活动标题活动标题活动标题活动标题活动标题活动标题"}),(0,m.jsx)(a.default,{width:"100%",height:"180px",fit:"cover",src:"https://img.yzcdn.cn/vant/cat.jpeg"}),(0,m.jsxs)(l.View,{children:[(0,m.jsx)(s.default,{isLink:!0,icon:"clock",title:"2022年11月22日",linkType:"navigateTo",url:"/pages/dashboard/index"}),(0,m.jsx)(s.default,{isLink:!0,icon:"location",title:"广东省深圳市龙华区你好",linkType:"navigateTo",url:"/pages/dashboard/index"})]}),(0,m.jsx)(l.View,{className:"imagesArr",children:[1,2,3,4].map((function(e){return(0,m.jsx)(a.default,{round:!0,width:"30px",height:"30px",src:"https://img.yzcdn.cn/vant/cat.jpeg",style:{marginRight:"5px"}})}))})]}),(0,m.jsx)(l.View,{onClick:function onClick(){},className:"RichText",children:(0,m.jsx)(l.RichText,{nodes:null==j||null===(n=j[0])||void 0===n?void 0:n.richText})}),(0,m.jsx)(l.View,{className:"detailBtn",style:{bottom:"".concat(null!=h?h:0,"px")},children:(0,m.jsx)(i.default,{type:"primary",block:!0,children:"立即参加"})})]})}},"./src/pages/activityList/components/details/index.tsx":function(e,t,n){var i=n("webpack/container/remote/@tarojs/runtime"),s=n("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/activityList/components/details/index.tsx");Page((0,i.createPageConfig)(s.default,"pages/activityList/components/details/index",{root:{cn:[]}},{navigationBarTitleText:"活动详情"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/activityList/components/details/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/dist/pages/home/index.js b/dist/pages/home/index.js index 4ff2ffc..71cb1e0 100644 --- a/dist/pages/home/index.js +++ b/dist/pages/home/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/home/index"],{"./node_modules/@antmjs/vantui/es/grid-item/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),a=n("webpack/container/remote/react"),c=n("./node_modules/@antmjs/vantui/es/common/jumpLink.js"),s=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/icon/index.js"),u=n("./node_modules/@antmjs/vantui/es/grid-item/wxs.js"),d=n("webpack/container/remote/react/jsx-runtime"),f=["icon","iconColor","iconPrefix","dot","info","badge","text","setChildrenInstance","parentInstance","index","url","linkType","style","className"];t.default=function GridItem(e){var t=e.icon,n=e.iconColor,m=e.iconPrefix,p=void 0===m?"van-icon":m,h=e.dot,v=e.info,g=e.badge,y=e.text,b=e.setChildrenInstance,j=e.parentInstance,w=e.index,x=e.url,_=e.linkType,S=e.style,k=e.className,C=(0,o.default)(e,f),P=(0,a.useState)({}),O=(0,r.default)(P,2),N=O[0],T=O[1];(0,a.useEffect)((function(){b(w,{updateStyle:E})}),[w,b]),(0,a.useEffect)((function(){E()}),[j.columnNum]);var E=(0,a.useCallback)((function(){var e=j.columnNum,t=j.border,n=j.square,r=j.gutter,o=j.clickable,i=j.center,a=j.direction,c=j.reverse,s=j.iconSize;T({center:i,border:t,square:n,gutter:r,clickable:o,direction:a,reverse:c,iconSize:s,index:w,columnNum:e})}),[j,w]);return(0,d.jsx)(i.View,{className:" "+s.bem("grid-item",{square:null==N?void 0:N.square})+" "+k,style:s.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}),S]),onClick:function onClick(e){var t;x&&(0,c.jumpLink)(x,_),null==C||null===(t=C.onClick)||void 0===t||t.call(C,e)},children:(0,d.jsx)(i.View,{className:"content-class "+s.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)(i.View,{className:"van-grid-item__icon icon-class",children:t?(0,d.jsx)(l.default,{name:t,color:n,classPrefix:p,dot:h,info:g||v,size:null==N?void 0:N.iconSize}):N.renderIcon}),(0,d.jsx)(i.View,{className:"van-grid-item__text text-class",children:y?(0,d.jsx)(i.Text,{children:y}):N.renderText})]})})})}},"./node_modules/@antmjs/vantui/es/grid-item/wxs.js":function(e,t,n){"use strict";n.d(t,{wrapperStyle:function(){return wrapperStyle},contentStyle:function(){return contentStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),o=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function wrapperStyle(e){var t=100/e.columnNum+"%";return(0,r.style)({width:t,"padding-top":e.square?t:null,"padding-right":(0,o.addUnit)(e.gutter),"margin-top":e.index>=e.columnNum&&!e.square?(0,o.addUnit)(e.gutter):null})}function contentStyle(e){return e.square?(0,r.style)({right:(0,o.addUnit)(e.gutter),bottom:(0,o.addUnit)(e.gutter),height:"auto"}):""}},"./node_modules/@antmjs/vantui/es/grid/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),o=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=n("webpack/container/remote/react"),a=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),c=n("./node_modules/@antmjs/vantui/es/grid/wxs.js"),s=n("webpack/container/remote/react/jsx-runtime"),l=["gutter","clickable","columnNum","center","border","direction","iconSize","square","reverse","className","style"];t.default=function Grid(e){var t=e.gutter,n=void 0===t?null:t,u=e.clickable,d=e.columnNum,f=void 0===d?4:d,m=e.center,p=void 0===m||m,h=e.border,v=void 0===h||h,g=e.direction,y=e.iconSize,b=void 0===y?"48":y,j=e.square,w=e.reverse,x=void 0!==w&&w,_=e.className,S=void 0===_?"":_,k=e.style,C=void 0===k?{}:k,P=(0,r.default)(e,l),O=(0,i.useRef)([]),N=(0,i.useCallback)((function(){O.current.forEach((function(e){e.updateStyle()}))}),[]);(0,i.useEffect)((function(){N()}),[N]);var T=(0,i.useCallback)((function(e,t){O.current[e]=t}),[]),E=(0,i.useMemo)((function(){var e=[];return P.children&&Array.isArray(P.children)&&P.children.forEach((function(t,r){e.push((0,i.cloneElement)(t,{setChildrenInstance:T,key:r,index:r,parentInstance:{columnNum:f,border:v,square:j,gutter:n,clickable:u,center:p,direction:g,reverse:x,iconSize:b}}))})),e}),[P.children,f]);return(0,s.jsx)(o.View,{className:"van-grid "+(v&&!n?"van-hairline--top":"")+" "+S,style:a.style([c.rootStyle({gutter:n}),C]),children:E})}},"./node_modules/@antmjs/vantui/es/grid/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),o=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function rootStyle(e){return(0,r.style)({"padding-left":(0,o.addUnit)(e.gutter)})}},"./node_modules/@antmjs/vantui/es/notice-bar/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/@tarojs/taro"),c=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"),u=n("./node_modules/@antmjs/vantui/es/common/utils.js"),d=n("./node_modules/@antmjs/vantui/es/icon/index.js"),f=n("./node_modules/@antmjs/vantui/es/notice-bar/wxs.js"),m=n("webpack/container/remote/react/jsx-runtime"),p=["text","mode","url","openType","delay","speed","scrollable","leftIcon","color","backgroundColor","background","wrapable","renderLeftIcon","renderRightIcon","onClick","onClose","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var 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;t0&&void 0!==arguments[0]&&arguments[0];y.current.timer&&clearTimeout(y.current.timer),y.current.timer=null,v((function(t){return _objectSpread(_objectSpread({},t),{},{animationData:y.current.resetAnimation.translateX(e?0:y.current.wrapWidth).step().export()})})),setTimeout((function(){(0,u.requestAnimationFrame)((function(){v((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:y.current.animation.translateX(-y.current.contentWidth).step().export()})}))}))}),10),y.current.timer=setTimeout((function(){H()}),y.current.duration)}),[]),J=(0,c.useCallback)((function(){(0,u.requestAnimationFrame)((function(){Promise.all([(0,u.getRect)(null,".van-notice-bar__content_".concat(r.unitag)),(0,u.getRect)(null,".van-notice-bar__wrap_".concat(r.unitag))]).then((function(e){var t=e[0],n=e[1];null!=t&&null!=n&&t.width&&n.width&&!1!==I&&(0,a.nextTick)((function(){(I||n.width<=t.width)&&(y.current.wrapWidth=n.width,y.current.contentWidth=t.width,y.current.duration=(n.width+t.width)/T*1e3,y.current.animation=(0,a.createAnimation)({duration:y.current.duration,timingFunction:"linear",delay:O}),H(!0))}))}))}))}),[r.unitag,I,T,O,H]),Q=(0,c.useCallback)((function(e){"closeable"===x&&(y.current.timer&&clearTimeout(y.current.timer),y.current.timer=null,v((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==X||X(e))}),[x,X]);return r.show&&(0,m.jsxs)(s.View,_objectSpread(_objectSpread({className:l.bem("notice-bar",{withicon:x,wrapable:R})+" ".concat(K||""),style:l.style([f.rootStyle({color:V,backgroundColor:G,background:M}),W])},U),{},{onClick:Y,children:[D?(0,m.jsx)(d.default,{name:D,className:"van-notice-bar__left-icon"}):z,(0,m.jsx)(s.View,{className:"van-notice-bar__wrap van-notice-bar__wrap_".concat(r.unitag),children:(0,m.jsxs)(s.View,{className:"van-notice-bar__content van-notice-bar__content_".concat(r.unitag," ")+(!1!==I||R?"":"van-ellipsis"),animation:r.animationData,children:[j,!j&&B]})}),"closeable"===x?(0,m.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:Q}):"link"===x?(0,m.jsx)(s.Navigator,{url:S,openType:C,children:(0,m.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"arrow"})}):q]}))}},"./node_modules/@antmjs/vantui/es/notice-bar/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js");function rootStyle(e){return(0,r.style)({color:e.color,"background-color":e.backgroundColor,background:e.background})}},"./node_modules/@antmjs/vantui/es/search/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=n("webpack/container/remote/react"),c=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/field/index.js"),u=n("webpack/container/remote/react/jsx-runtime"),d=["value","defaultValue","label","focus","error","disabled","readonly","inputAlign","showAction","leftIcon","rightIcon","placeholder","placeholderStyle","actionText","background","maxlength","shape","clearable","clearTrigger","clearIcon","renderLabel","renderLeftIcon","renderRightIcon","renderAction","onFocus","onBlur","onChange","onClear","onClickInput","onSearch","onCancel","style","className"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var 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=fe&&xe({pace:-fe})},be=function prev(){ye(),Pe(),ke((function(){ke((function(){N.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},je=function next(){ye(),Pe(),ke((function(){ke((function(){N.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},we=function to(e){ye(),Pe(),ke((function(){ke((function(){var t;N.current.moving=!1,t=s.loop&&fe===e?0===M?0:e:e%fe,xe({pace:t-M,isEmit:!0})}))}))},xe=function move(e){var t=e.pace,n=void 0===t?0:t,r=e.offset,o=void 0===r?0:r,i=e.isEmit,a=void 0!==i&&i;if(!(fe<=1)){var c=_e(n),l=Se(c,o);if(s.loop){if(Array.isArray(d)&&d[0]&&l!==he){var u=l0;te[fe-1]=f?-me:0}ne(te)}a&&M!==c&&s.onChange&&s.onChange((c+fe)%fe),M=c,R(c),$(l),Ne(l)}},_e=function getActive(e){if(e){var t=M+e;return s.loop?Ce(t,-1,fe):Ce(t,0,fe-1)}return M},Se=function getOffset(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*Number(ce);s.loop||(n=Math.min(n,-he));var r=t-n;return s.loop||(r=Ce(r,he,0)),r},ke=function requestFrame(e){y.requestAnimationFrame.call(y,e)},Ce=function range(e,t,n){return Math.min(Math.max(e,t),n)},Pe=function touchReset(){le.startX=0,le.startY=0,le.deltaX=0,le.deltaY=0,le.offsetX=0,le.offsetY=0,le.delta=0,le.stateDirection="",le.touchTime=0},Oe=f()((n={},(0,a.default)(n,"van-swiper__inner",!0),(0,a.default)(n,"van-swiper__vertical",I),n)),Ne=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=O.current,n=0;if(S){var r=I?B:Y,o=I?(null==L?void 0:L.height)-r:(null==L?void 0:L.width)-r;n=e+(M!==fe-1||s.loop?o/2:-o/2)}else n=e;t.style.transitionDuration="".concat(N.current.moving?0:s.duration,"ms"),t.style[I?"height":"width"]="".concat(Number(ce)*fe,"px"),t.style[I?"width":"height"]="".concat(I?Y:B,"px"),t.style.transform="translate3D".concat(I?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,u.useEffect)((function(){N.current.activePagination=(M+fe)%fe}),[M]);var Te=function queryRect(e){return new Promise((function(t){var n=(0,m.createSelectorQuery)();n.select("#".concat(e.id))&&n.select("#".concat(e.id)).boundingClientRect(),n.exec((function(e){t(e[0])}))}))},Ee=function(){var e=(0,r.default)(l().mark((function _callee(){var e,t,n,r,o,i,a=arguments;return l().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:+s.initPage,c.next=3,Te(P.current);case 3:t=c.sent,n=Math.max(Math.min(fe-1,e),0),r=s.width?+s.width:null==t?void 0:t.width,o=s.height?+s.height:null==t?void 0:t.height,ce=I?o:r,me=fe*Number(ce),i=Se(n),N.current.moving=!0,ie&&(N.current.moving=!1),V(t),R(n),X(r),U(o),$(i),ae(!0);case 18:case"end":return c.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){ie&&Ne()}),[I,Y,B,Q,ie]),(0,u.useEffect)((function(){return function(){ae(!1)}}),[]),(0,u.useEffect)((function(){ve(),ge()}),[d]),(0,u.useEffect)((function(){Ee()}),[s.initPage]),(0,u.useEffect)((function(){return function(){ve()}}),[]),(0,m.useReady)((function(){Ee(),p().nextTick((function(){setTimeout((function(){ve(),ge()}),16)}))}));var Ie=function itemStyle(e){var t={},n=s.direction||w,r=ce;r&&(t["horizontal"===n?"width":"height"]="".concat(r,"px"));var o=te[e];return o&&(t.transform="translate3D".concat("horizontal"===n?"(".concat(o,"px,0,0)"):"(0,".concat(o,"px,0)"))),t};return(0,u.useImperativeHandle)(t,(function(){return{to:we,next:je,prev:be}})),(0,g.jsx)(v.DataContext.Provider,{value:pe,children:(0,g.jsxs)(h.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:P},C),{},{id:"container-"+E,onTouchStart:function onTouchStart(e){s.isPreventDefault&&e.preventDefault(),s.isStopPropagation&&e.stopPropagation(),s.touchable&&(!function touchStart(e){var t,n;Pe(),le.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,le.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),le.touchTime=Date.now(),ve(),ye())},onTouchMove:function onTouchMove(e){s.touchable&&N.current.moving&&(!function touchMove(e){var t,n;le.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-le.startX,le.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-le.startY,le.offsetX=Math.abs(le.deltaX),le.offsetY=Math.abs(le.deltaY),le.delta=I?le.deltaY:le.deltaX,le.stateDirection||(le.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(le.offsetX,le.offsetY))}(e),le.stateDirection===s.direction&&xe({offset:le.delta}))},onTouchEnd:function onTouchEnd(){if(s.touchable&&N.current.moving){var e=le.delta/(Date.now()-le.touchTime),t=Math.abs(e)>.3||Math.abs(le.delta)>+(ce/2).toFixed(2),n=0;if(N.current.moving=!1,t&&le.stateDirection===s.direction){var r=I?le.offsetY:le.offsetX;n=s.loop?r>0?le.delta>0?-1:1:0:-Math[le.delta>0?"ceil":"floor"](le.delta/ce),xe({pace:n,isEmit:!0})}else le.delta?xe({pace:0}):Ne();ge()}},catchMove:I,style:_objectSpread(_objectSpread({},k),{},{height:B}),children:[(0,g.jsxs)(h.View,{className:Oe,ref:O,children:[u.Children.map(de,(function(e,t){return(0,g.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(t),children:e},t)})),(0,g.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(0),children:de&&de.length?de[0]:""})]}),s.paginationVisible&&!("pageContent"in s)?(0,g.jsx)(h.View,{className:f()((c={},(0,a.default)(c,"van-swiper__pagination",!0),(0,a.default)(c,"van-swiper__pagination-vertical",I),c)),children:u.Children.map(de,(function(e,t){var n;return(0,g.jsx)(h.Text,{style:(M+fe)%fe===t?{backgroundColor:s.paginationColor}:void 0,className:f()((n={},(0,a.default)(n,"van-swiper__pagination-item",!0),(0,a.default)(n,"active",(M+fe)%fe===t),n))},t)}))}):(0,g.jsx)(h.View,{children:_})]}))})},x=(0,u.forwardRef)(w);t.default=x},"./node_modules/classnames/index.js":function(e,t,n){var r,o=n("webpack/container/remote/@tarojs/runtime").window,i=n("./node_modules/@babel/runtime/helpers/typeof.js").default;!function(){"use strict";var a={}.hasOwnProperty;function classNames(){for(var e=[],t=0;t=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),resetTryEntry(n),l}},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),l}},e}}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/home/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file +(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/home/index"],{"./node_modules/@antmjs/vantui/es/grid-item/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),a=n("webpack/container/remote/react"),c=n("./node_modules/@antmjs/vantui/es/common/jumpLink.js"),s=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/icon/index.js"),u=n("./node_modules/@antmjs/vantui/es/grid-item/wxs.js"),d=n("webpack/container/remote/react/jsx-runtime"),f=["icon","iconColor","iconPrefix","dot","info","badge","text","setChildrenInstance","parentInstance","index","url","linkType","style","className"];t.default=function GridItem(e){var t=e.icon,n=e.iconColor,m=e.iconPrefix,p=void 0===m?"van-icon":m,h=e.dot,v=e.info,g=e.badge,y=e.text,b=e.setChildrenInstance,j=e.parentInstance,w=e.index,x=e.url,_=e.linkType,S=e.style,k=e.className,C=(0,o.default)(e,f),P=(0,a.useState)({}),O=(0,r.default)(P,2),N=O[0],T=O[1];(0,a.useEffect)((function(){b(w,{updateStyle:E})}),[w,b]),(0,a.useEffect)((function(){E()}),[j.columnNum]);var E=(0,a.useCallback)((function(){var e=j.columnNum,t=j.border,n=j.square,r=j.gutter,o=j.clickable,i=j.center,a=j.direction,c=j.reverse,s=j.iconSize;T({center:i,border:t,square:n,gutter:r,clickable:o,direction:a,reverse:c,iconSize:s,index:w,columnNum:e})}),[j,w]);return(0,d.jsx)(i.View,{className:" "+s.bem("grid-item",{square:null==N?void 0:N.square})+" "+k,style:s.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}),S]),onClick:function onClick(e){var t;x&&(0,c.jumpLink)(x,_),null==C||null===(t=C.onClick)||void 0===t||t.call(C,e)},children:(0,d.jsx)(i.View,{className:"content-class "+s.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)(i.View,{className:"van-grid-item__icon icon-class",children:t?(0,d.jsx)(l.default,{name:t,color:n,classPrefix:p,dot:h,info:g||v,size:null==N?void 0:N.iconSize}):N.renderIcon}),(0,d.jsx)(i.View,{className:"van-grid-item__text text-class",children:y?(0,d.jsx)(i.Text,{children:y}):N.renderText})]})})})}},"./node_modules/@antmjs/vantui/es/grid-item/wxs.js":function(e,t,n){"use strict";n.d(t,{wrapperStyle:function(){return wrapperStyle},contentStyle:function(){return contentStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),o=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function wrapperStyle(e){var t=100/e.columnNum+"%";return(0,r.style)({width:t,"padding-top":e.square?t:null,"padding-right":(0,o.addUnit)(e.gutter),"margin-top":e.index>=e.columnNum&&!e.square?(0,o.addUnit)(e.gutter):null})}function contentStyle(e){return e.square?(0,r.style)({right:(0,o.addUnit)(e.gutter),bottom:(0,o.addUnit)(e.gutter),height:"auto"}):""}},"./node_modules/@antmjs/vantui/es/grid/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),o=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=n("webpack/container/remote/react"),a=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),c=n("./node_modules/@antmjs/vantui/es/grid/wxs.js"),s=n("webpack/container/remote/react/jsx-runtime"),l=["gutter","clickable","columnNum","center","border","direction","iconSize","square","reverse","className","style"];t.default=function Grid(e){var t=e.gutter,n=void 0===t?null:t,u=e.clickable,d=e.columnNum,f=void 0===d?4:d,m=e.center,p=void 0===m||m,h=e.border,v=void 0===h||h,g=e.direction,y=e.iconSize,b=void 0===y?"48":y,j=e.square,w=e.reverse,x=void 0!==w&&w,_=e.className,S=void 0===_?"":_,k=e.style,C=void 0===k?{}:k,P=(0,r.default)(e,l),O=(0,i.useRef)([]),N=(0,i.useCallback)((function(){O.current.forEach((function(e){e.updateStyle()}))}),[]);(0,i.useEffect)((function(){N()}),[N]);var T=(0,i.useCallback)((function(e,t){O.current[e]=t}),[]),E=(0,i.useMemo)((function(){var e=[];return P.children&&Array.isArray(P.children)&&P.children.forEach((function(t,r){e.push((0,i.cloneElement)(t,{setChildrenInstance:T,key:r,index:r,parentInstance:{columnNum:f,border:v,square:j,gutter:n,clickable:u,center:p,direction:g,reverse:x,iconSize:b}}))})),e}),[P.children,f]);return(0,s.jsx)(o.View,{className:"van-grid "+(v&&!n?"van-hairline--top":"")+" "+S,style:a.style([c.rootStyle({gutter:n}),C]),children:E})}},"./node_modules/@antmjs/vantui/es/grid/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),o=n("./node_modules/@antmjs/vantui/es/wxs/add-unit.js");function rootStyle(e){return(0,r.style)({"padding-left":(0,o.addUnit)(e.gutter)})}},"./node_modules/@antmjs/vantui/es/notice-bar/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/@tarojs/taro"),c=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"),u=n("./node_modules/@antmjs/vantui/es/common/utils.js"),d=n("./node_modules/@antmjs/vantui/es/icon/index.js"),f=n("./node_modules/@antmjs/vantui/es/notice-bar/wxs.js"),m=n("webpack/container/remote/react/jsx-runtime"),p=["text","mode","url","openType","delay","speed","scrollable","leftIcon","color","backgroundColor","background","wrapable","renderLeftIcon","renderRightIcon","onClick","onClose","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var 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;t0&&void 0!==arguments[0]&&arguments[0];y.current.timer&&clearTimeout(y.current.timer),y.current.timer=null,v((function(t){return _objectSpread(_objectSpread({},t),{},{animationData:y.current.resetAnimation.translateX(e?0:y.current.wrapWidth).step().export()})})),setTimeout((function(){(0,u.requestAnimationFrame)((function(){v((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:y.current.animation.translateX(-y.current.contentWidth).step().export()})}))}))}),10),y.current.timer=setTimeout((function(){H()}),y.current.duration)}),[]),J=(0,c.useCallback)((function(){(0,u.requestAnimationFrame)((function(){Promise.all([(0,u.getRect)(null,".van-notice-bar__content_".concat(r.unitag)),(0,u.getRect)(null,".van-notice-bar__wrap_".concat(r.unitag))]).then((function(e){var t=e[0],n=e[1];null!=t&&null!=n&&t.width&&n.width&&!1!==I&&(0,a.nextTick)((function(){(I||n.width<=t.width)&&(y.current.wrapWidth=n.width,y.current.contentWidth=t.width,y.current.duration=(n.width+t.width)/T*1e3,y.current.animation=(0,a.createAnimation)({duration:y.current.duration,timingFunction:"linear",delay:O}),H(!0))}))}))}))}),[r.unitag,I,T,O,H]),Q=(0,c.useCallback)((function(e){"closeable"===x&&(y.current.timer&&clearTimeout(y.current.timer),y.current.timer=null,v((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==X||X(e))}),[x,X]);return r.show&&(0,m.jsxs)(s.View,_objectSpread(_objectSpread({className:l.bem("notice-bar",{withicon:x,wrapable:R})+" ".concat(K||""),style:l.style([f.rootStyle({color:V,backgroundColor:G,background:M}),W])},U),{},{onClick:Y,children:[D?(0,m.jsx)(d.default,{name:D,className:"van-notice-bar__left-icon"}):z,(0,m.jsx)(s.View,{className:"van-notice-bar__wrap van-notice-bar__wrap_".concat(r.unitag),children:(0,m.jsxs)(s.View,{className:"van-notice-bar__content van-notice-bar__content_".concat(r.unitag," ")+(!1!==I||R?"":"van-ellipsis"),animation:r.animationData,children:[j,!j&&B]})}),"closeable"===x?(0,m.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:Q}):"link"===x?(0,m.jsx)(s.Navigator,{url:S,openType:C,children:(0,m.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"arrow"})}):q]}))}},"./node_modules/@antmjs/vantui/es/notice-bar/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js");function rootStyle(e){return(0,r.style)({color:e.color,"background-color":e.backgroundColor,background:e.background})}},"./node_modules/@antmjs/vantui/es/search/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=n("webpack/container/remote/react"),c=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),s=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/field/index.js"),u=n("webpack/container/remote/react/jsx-runtime"),d=["value","defaultValue","label","focus","error","disabled","readonly","inputAlign","showAction","leftIcon","rightIcon","placeholder","placeholderStyle","actionText","background","maxlength","shape","clearable","clearTrigger","clearIcon","renderLabel","renderLeftIcon","renderRightIcon","renderAction","onFocus","onBlur","onChange","onClear","onClickInput","onSearch","onCancel","style","className"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var 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=fe&&xe({pace:-fe})},be=function prev(){ye(),Pe(),ke((function(){ke((function(){N.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},je=function next(){ye(),Pe(),ke((function(){ke((function(){N.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},we=function to(e){ye(),Pe(),ke((function(){ke((function(){var t;N.current.moving=!1,t=s.loop&&fe===e?0===M?0:e:e%fe,xe({pace:t-M,isEmit:!0})}))}))},xe=function move(e){var t=e.pace,n=void 0===t?0:t,r=e.offset,o=void 0===r?0:r,i=e.isEmit,a=void 0!==i&&i;if(!(fe<=1)){var c=_e(n),l=Se(c,o);if(s.loop){if(Array.isArray(d)&&d[0]&&l!==he){var u=l0;te[fe-1]=f?-me:0}ne(te)}a&&M!==c&&s.onChange&&s.onChange((c+fe)%fe),M=c,R(c),$(l),Ne(l)}},_e=function getActive(e){if(e){var t=M+e;return s.loop?Ce(t,-1,fe):Ce(t,0,fe-1)}return M},Se=function getOffset(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*Number(ce);s.loop||(n=Math.min(n,-he));var r=t-n;return s.loop||(r=Ce(r,he,0)),r},ke=function requestFrame(e){y.requestAnimationFrame.call(y,e)},Ce=function range(e,t,n){return Math.min(Math.max(e,t),n)},Pe=function touchReset(){le.startX=0,le.startY=0,le.deltaX=0,le.deltaY=0,le.offsetX=0,le.offsetY=0,le.delta=0,le.stateDirection="",le.touchTime=0},Oe=f()((n={},(0,a.default)(n,"van-swiper__inner",!0),(0,a.default)(n,"van-swiper__vertical",I),n)),Ne=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=O.current,n=0;if(S){var r=I?B:Y,o=I?(null==L?void 0:L.height)-r:(null==L?void 0:L.width)-r;n=e+(M!==fe-1||s.loop?o/2:-o/2)}else n=e;t.style.transitionDuration="".concat(N.current.moving?0:s.duration,"ms"),t.style[I?"height":"width"]="".concat(Number(ce)*fe,"px"),t.style[I?"width":"height"]="".concat(I?Y:B,"px"),t.style.transform="translate3D".concat(I?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,u.useEffect)((function(){N.current.activePagination=(M+fe)%fe}),[M]);var Te=function queryRect(e){return new Promise((function(t){var n=(0,m.createSelectorQuery)();n.select("#".concat(e.id))&&n.select("#".concat(e.id)).boundingClientRect(),n.exec((function(e){t(e[0])}))}))},Ee=function(){var e=(0,r.default)(l().mark((function _callee(){var e,t,n,r,o,i,a=arguments;return l().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:+s.initPage,c.next=3,Te(P.current);case 3:t=c.sent,n=Math.max(Math.min(fe-1,e),0),r=s.width?+s.width:null==t?void 0:t.width,o=s.height?+s.height:null==t?void 0:t.height,ce=I?o:r,me=fe*Number(ce),i=Se(n),N.current.moving=!0,ie&&(N.current.moving=!1),V(t),R(n),X(r),U(o),$(i),ae(!0);case 18:case"end":return c.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){ie&&Ne()}),[I,Y,B,Q,ie]),(0,u.useEffect)((function(){return function(){ae(!1)}}),[]),(0,u.useEffect)((function(){ve(),ge()}),[d]),(0,u.useEffect)((function(){Ee()}),[s.initPage]),(0,u.useEffect)((function(){return function(){ve()}}),[]),(0,m.useReady)((function(){Ee(),p().nextTick((function(){setTimeout((function(){ve(),ge()}),16)}))}));var Ie=function itemStyle(e){var t={},n=s.direction||w,r=ce;r&&(t["horizontal"===n?"width":"height"]="".concat(r,"px"));var o=te[e];return o&&(t.transform="translate3D".concat("horizontal"===n?"(".concat(o,"px,0,0)"):"(0,".concat(o,"px,0)"))),t};return(0,u.useImperativeHandle)(t,(function(){return{to:we,next:je,prev:be}})),(0,g.jsx)(v.DataContext.Provider,{value:pe,children:(0,g.jsxs)(h.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:P},C),{},{id:"container-"+E,onTouchStart:function onTouchStart(e){s.isPreventDefault&&e.preventDefault(),s.isStopPropagation&&e.stopPropagation(),s.touchable&&(!function touchStart(e){var t,n;Pe(),le.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,le.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),le.touchTime=Date.now(),ve(),ye())},onTouchMove:function onTouchMove(e){s.touchable&&N.current.moving&&(!function touchMove(e){var t,n;le.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-le.startX,le.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-le.startY,le.offsetX=Math.abs(le.deltaX),le.offsetY=Math.abs(le.deltaY),le.delta=I?le.deltaY:le.deltaX,le.stateDirection||(le.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(le.offsetX,le.offsetY))}(e),le.stateDirection===s.direction&&xe({offset:le.delta}))},onTouchEnd:function onTouchEnd(){if(s.touchable&&N.current.moving){var e=le.delta/(Date.now()-le.touchTime),t=Math.abs(e)>.3||Math.abs(le.delta)>+(ce/2).toFixed(2),n=0;if(N.current.moving=!1,t&&le.stateDirection===s.direction){var r=I?le.offsetY:le.offsetX;n=s.loop?r>0?le.delta>0?-1:1:0:-Math[le.delta>0?"ceil":"floor"](le.delta/ce),xe({pace:n,isEmit:!0})}else le.delta?xe({pace:0}):Ne();ge()}},catchMove:I,style:_objectSpread(_objectSpread({},k),{},{height:B}),children:[(0,g.jsxs)(h.View,{className:Oe,ref:O,children:[u.Children.map(de,(function(e,t){return(0,g.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(t),children:e},t)})),(0,g.jsx)(h.View,{className:"van-swiper-item-wrapper",style:Ie(0),children:de&&de.length?de[0]:""})]}),s.paginationVisible&&!("pageContent"in s)?(0,g.jsx)(h.View,{className:f()((c={},(0,a.default)(c,"van-swiper__pagination",!0),(0,a.default)(c,"van-swiper__pagination-vertical",I),c)),children:u.Children.map(de,(function(e,t){var n;return(0,g.jsx)(h.Text,{style:(M+fe)%fe===t?{backgroundColor:s.paginationColor}:void 0,className:f()((n={},(0,a.default)(n,"van-swiper__pagination-item",!0),(0,a.default)(n,"active",(M+fe)%fe===t),n))},t)}))}):(0,g.jsx)(h.View,{children:_})]}))})},x=(0,u.forwardRef)(w);t.default=x},"./node_modules/classnames/index.js":function(e,t,n){var r,o=n("webpack/container/remote/@tarojs/runtime").window,i=n("./node_modules/@babel/runtime/helpers/typeof.js").default;!function(){"use strict";var a={}.hasOwnProperty;function classNames(){for(var e=[],t=0;t=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),resetTryEntry(n),l}},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),l}},e}}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/home/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/dist/pages/home/index.js.LICENSE.txt b/dist/pages/home/index.js.LICENSE.txt index 696bf37..885658d 100644 --- a/dist/pages/home/index.js.LICENSE.txt +++ b/dist/pages/home/index.js.LICENSE.txt @@ -6,6 +6,8 @@ /*! ../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./index.tsx */ +/*! ../../utils/index */ + /*! ../common/jumpLink */ /*! ../common/utils */ diff --git a/src/pages/activityList/components/details/index.tsx b/src/pages/activityList/components/details/index.tsx index e06b9f6..5b29fac 100644 --- a/src/pages/activityList/components/details/index.tsx +++ b/src/pages/activityList/components/details/index.tsx @@ -1,14 +1,16 @@ import { Button, Cell } from "@antmjs/vantui"; import { RichText, View } from "@tarojs/components"; -import Taro from "@tarojs/taro"; +import Taro, { getCurrentInstance } from "@tarojs/taro"; import react, { useEffect, useState } from "react"; -import { getTable } from "../../../../utils/index"; +import { getTable, getTableid } from "../../../../utils/index"; import "./index.scss"; import { Image } from "@antmjs/vantui"; const details = () => { const [dataSource, setdataSource] = useState([]); const [bottomheight, setbottomheight] = useState(0); + let $instance: any = getCurrentInstance(); + const { id } = $instance?.router?.params??{}; //活动id useEffect(() => { // 设置标题 @@ -24,15 +26,15 @@ const details = () => { setbottomheight(newBottom); let objParams = { - tableName: "cityNew", - id: "80516fb66370bcf300b8f43c5f4dd52b", + tableName: "details", + id: id, okFun: (res) => { console.log("res", res); setdataSource(res?.data ?? []); }, }; - // getTable(objParams) - getTable(objParams); + getTableid(objParams) //指定活动详情id + // getTable(objParams); }, []); // console.log('SafeAreaResult',Taro.getSystemInfoSync()) @@ -65,7 +67,7 @@ const details = () => { {/* 头像列表 */} - + {[1, 2, 3, 4].map((item: any) => { return ( { width="30px" height="30px" src="https://img.yzcdn.cn/vant/cat.jpeg" - style={{marginRight:'5px'}} + style={{ marginRight: "5px" }} /> ); })} - - {/* 富文本 */} {}} className="RichText"> diff --git a/src/pages/components/ActiveCard/index.tsx b/src/pages/components/ActiveCard/index.tsx index 257db05..9f8077c 100644 --- a/src/pages/components/ActiveCard/index.tsx +++ b/src/pages/components/ActiveCard/index.tsx @@ -1,46 +1,59 @@ import { Button, Tabbar, TabbarItem } from "@antmjs/vantui"; import { View, Text } from "@tarojs/components"; import Taro from "@tarojs/taro"; -import react from "react"; +import react, { useState } from "react"; import { Image } from "@antmjs/vantui"; import "./index.scss"; import { Tag } from "@antmjs/vantui"; -const ActiveCard = () => { +const ActiveCard = (props: any) => { + const [dataSource, setdataSource] = useState({}); //活动详情 + const { title, address, date, tagName, tagCode, Status, images, isDelete } = + props?.dataSource; + return ( - {false && - - 标签 - - } + {false && ( + + + 标签 + + + )} - 标签 + {/* 标签 */} + {tagName} - 这是标题这是标题这是标题这是标题这是标题 + + {/* 标题 */} + {title} - 莲花山公园 - 2022年11月17日 + {/* 地址 */} + {address} + {/* 日期 */} + {date} + {/* 活动状态 0 待开放 1开放中 2已取消 3进行中 4已结束 5已关闭 */} diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index eddb49c..dba3476 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -35,6 +35,8 @@ const Home = () => { const [SearchValue, setSearchValue] = useState(""); + const [details,setdetails]=useState([]) //活动详情 + const onChange = (e) => {}; const images = [ "cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/download.jpg", @@ -55,15 +57,18 @@ const Home = () => { withShareTicket: true, success() {}, }); - // let objParams = { - // tableName: "test", - // id: "80516fb66370bcf300b8f43c5f4dd52b", - // okFun: (res) => { - // console.log("res", res); - // }, - // }; - // getTableid(objParams); + + let objParams = { + tableName: "details", + // id: "80516fb66370bcf300b8f43c5f4dd52b", + okFun: (res) => { + console.log("details--", res); + setdetails(res?.data??[]) + }, + }; + + getTable(objParams); }, []); const uploadTaro = (tempFilePaths: any) => { @@ -300,26 +305,18 @@ const Home = () => { */} {/* 截取数组2个活动 */} - {[1, 2, 3, 4].splice(0, 2).map((item: any) => { + {details.splice(0, 2).map((item: any,index:any) => { return ( { console.log("Card"); Taro.navigateTo({ - url: "/pages/activityList/components/details/index", + url: `/pages/activityList/components/details/index?id=${item?._id}`, }); }} > {/* 活动卡片 */} - - - {/* */} + ); })} diff --git a/src/utils/index.ts b/src/utils/index.ts index f023c10..a2d058a 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,4 +1,6 @@ import Taro from "@tarojs/taro"; +import { getCurrentInstance } from "@tarojs/taro"; + // 数据库环境 // const db: any = Taro.cloud.database({ @@ -13,6 +15,10 @@ interface Typeint { okFun: any; } +const params=()=>{ + let $instance: any = getCurrentInstance(); + return $instance.router.params; +} // 添加数据 export const addTable: any = ({ env,tableName, objData, okFun }: Typeint) => { // 数据库环境 @@ -30,7 +36,7 @@ export const addTable: any = ({ env,tableName, objData, okFun }: Typeint) => { }); }; -// 获取指定集合数据 +// 获取指定集合数据表 export const getTable: any = ({ env,tableName, okFun }: Typeint) => { // 数据库环境 const db: any = Taro.cloud.database({ @@ -45,6 +51,24 @@ export const getTable: any = ({ env,tableName, okFun }: Typeint) => { }); }; + // 获取指定id数据数据 +export const getTableid: any = ({ env,tableName, id, okFun }: Typeint) => { + // 数据库环境 + const db: any = Taro.cloud.database({ + env: env, + }); + + let nowtable: any = db?.collection(tableName); + nowtable?.doc(id).get({ + success: (res: any) => { + okFun(res); + }, + }); +}; + + + + // 更新数据 export const updateTableid: any = ({ env,tableName,objData, id, okFun }: Typeint) => { // 数据库环境 @@ -77,17 +101,3 @@ export const deleteTableid: any = ({ env,tableName, id, okFun }: Typeint) => { -// 获取指定id数据数据 -export const getTableid: any = ({ env,tableName, id, okFun }: Typeint) => { - // 数据库环境 - const db: any = Taro.cloud.database({ - env: env, - }); - - let nowtable: any = db?.collection(tableName); - nowtable?.doc(id).get({ - success: (res: any) => { - okFun(res); - }, - }); -};