From 57a0b5381ba9b8abd0ff08d3916ed5c7f56f4098 Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 10 Dec 2022 20:39:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=8F=B7-api=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/pages/home/index.js | 2 +- dist/pages/home/index.js.LICENSE.txt | 6 --- dist/pages/home/index.wxss | 49 +++---------------------- src/pages/home/index.scss | 12 +++++- src/pages/home/index.tsx | 55 ++++++++++------------------ 5 files changed, 35 insertions(+), 89 deletions(-) diff --git a/dist/pages/home/index.js b/dist/pages/home/index.js index 7fdf4be..75d8785 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 */ -"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=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;n0&&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;n0&&(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()}]); \ No newline at end of file +"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=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;n0&&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;n0&&(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 _callee9(){return(0,p.default)().wrap((function _callee9$(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()}}),_callee9)})))}),(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()}]); \ 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 ba47279..1e20503 100644 --- a/dist/pages/home/index.js.LICENSE.txt +++ b/dist/pages/home/index.js.LICENSE.txt @@ -26,8 +26,6 @@ /*! ../wxs/utils */ -/*! ./components/WeGroup */ - /*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ @@ -90,10 +88,6 @@ !*** ./node_modules/@antmjs/vantui/es/field/wxs.js ***! \*****************************************************/ -/*!*****************************************************!*\ - !*** ./src/pages/home/components/WeGroup/index.tsx ***! - \*****************************************************/ - /*!******************************************************!*\ !*** ./node_modules/@antmjs/vantui/es/grid/index.js ***! \******************************************************/ diff --git a/dist/pages/home/index.wxss b/dist/pages/home/index.wxss index 1aa81f3..1c75de0 100644 --- a/dist/pages/home/index.wxss +++ b/dist/pages/home/index.wxss @@ -51,50 +51,11 @@ } .Swiper-box { min-height: 150rpx; + border-radius: 15%; } -/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/cache-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[3]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[5]!./src/pages/home/components/WeGroup/index.scss ***! - \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -.weGroup { - margin-top: 40rpx; - padding: 20rpx; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - background-color: #f5f5f5; - min-height: 100rpx; +.Swiper-box .Swiper { + border-radius: 15%; } -.weGroup .left { - width: 50x; - height: 50rpx; - margin-right: 40rpx; -} -.weGroup .right { - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - padding-right: 20rpx; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; -} -.weGroup .right .rightup { - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; +.Swiper-box .Swiper .SwiperImg { + border-radius: 15%; } diff --git a/src/pages/home/index.scss b/src/pages/home/index.scss index 37f42c9..b6e8856 100644 --- a/src/pages/home/index.scss +++ b/src/pages/home/index.scss @@ -26,6 +26,14 @@ justify-content: space-between; } -.Swiper-box{ +.Swiper-box { min-height: 150px; -} \ No newline at end of file + border-radius: 15%; + + .Swiper { + border-radius: 15%; + .SwiperImg { + border-radius: 15%; + } + } +} diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index d220905..fbeebcd 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -1,4 +1,3 @@ - import { Button, Card, @@ -21,10 +20,10 @@ import { View, WebView, // ChannelVideo, - SwiperItem + SwiperItem, } from "@tarojs/components"; import React, { useCallback, useEffect, useState } from "react"; -import { Image } from "@antmjs/vantui"; +import { Image } from "@antmjs/vantui"; import react from "react"; import { NoticeBar } from "@antmjs/vantui"; import Taro, { useShareTimeline } from "@tarojs/taro"; @@ -150,7 +149,7 @@ const Home = () => { await setsystemConfig(res?.data ?? []); setTimeout(() => { getdetails(); - }, 700); + }, 800); }, }; await getTable(objParams); @@ -280,9 +279,9 @@ const Home = () => { complete: () => { // 刷新页面数据 getsystemConfig(); //获取系统配置 - // setTimeout(() => { - // getdetails(); //获取活动详情 - // }, 700); + setTimeout(() => { + getdetails(); //获取活动详情 + }, 800); }, }); }; @@ -370,18 +369,19 @@ const Home = () => { {systemConfig?.length > 0 && ( {(systemConfig?.[0]?.imagesArr ?? []).map( (item: any, index: any) => ( - + { ) )} - - )} @@ -491,8 +489,10 @@ const Home = () => { onClick={() => { // 打开视频号-指定视频 Taro.openChannelsActivity({ - finderUserName: "sphqzUmI0BlppCI", //视频号id + // finderUserName: "sphqzUmI0BlppCI", //视频号id, + finderUserName: systemConfig?.[0]?.videoObj?.finderUserName ?? "sphqzUmI0BlppCI", feedId: + systemConfig?.[0]?.videoObj?.feedId ?? "export/UzFfAgtgekIEAQAAAAAAeIIQA5S-0wAAAAstQy6ubaLX4KHWvLEZgBPEj6MUcExXaL37zNPgMJpEUVVnZ9njxR_hb9_u-bQj", //视频 feedId success: (res: any) => { console.log("res", res); @@ -574,24 +574,7 @@ const Home = () => { )} {/* 加入微信群 */} - - {/* - - - - - - 户外 | 梧桐山 - 09:18 - - cady: 周末组队,谁有空一起? - - */} + {/* */} {/* 打卡精选 */} {/* 瀑布流 */}