From 125591ebaedf37f816e54919dc898a33a22564ae Mon Sep 17 00:00:00 2001 From: eric Date: Sun, 13 Nov 2022 19:20:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=8C=E6=96=87=E6=9C=AC-=E5=86=85?= =?UTF-8?q?=E5=AE=B9CMS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/pages/home/index.js | 2 +- dist/pages/mountainPeak/index.js | 2 +- dist/pages/mountainPeak/index.js.LICENSE.txt | 2 ++ dist/pages/mountainPeak/index.wxss | 1 - src/pages/home/index.tsx | 3 +- src/pages/mountainPeak/index.scss | 2 +- src/pages/mountainPeak/index.tsx | 36 ++++++++++++++------ 7 files changed, 32 insertions(+), 16 deletions(-) diff --git a/dist/pages/home/index.js b/dist/pages/home/index.js index d15680f..9c163d6 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/divider/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),a=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),s=n("./node_modules/@antmjs/vantui/es/divider/wxs.js"),c=n("webpack/container/remote/react/jsx-runtime"),u=["dashed","hairline","contentPosition","borderColor","textColor","fontSize","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t=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,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),r=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"),s=n("./node_modules/@antmjs/vantui/es/grid/wxs.js"),c=n("webpack/container/remote/react/jsx-runtime"),u=["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,l=e.clickable,d=e.columnNum,m=void 0===d?4:d,f=e.center,p=void 0===f||f,v=e.border,j=void 0===v||v,b=e.direction,h=e.iconSize,g=void 0===h?"48":h,w=e.square,y=e.reverse,x=void 0!==y&&y,_=e.className,S=void 0===_?"":_,P=e.style,O=void 0===P?{}:P,k=(0,o.default)(e,u),C=(0,i.useRef)([]),N=(0,i.useCallback)((function(){C.current.forEach((function(e){e.updateStyle()}))}),[]);(0,i.useEffect)((function(){N()}),[N]);var T=(0,i.useCallback)((function(e,t){C.current[e]=t}),[]),D=(0,i.useMemo)((function(){var e=[];return k.children&&Array.isArray(k.children)&&k.children.forEach((function(t,o){e.push((0,i.cloneElement)(t,{setChildrenInstance:T,key:o,index:o,parentInstance:{columnNum:m,border:j,square:w,gutter:n,clickable:l,center:p,direction:b,reverse:x,iconSize:g}}))})),e}),[k.children,m]);return(0,c.jsx)(r.View,{className:"van-grid "+(j&&!n?"van-hairline--top":"")+" "+S,style:a.style([s.rootStyle({gutter:n}),O]),children:D})}},"./node_modules/@antmjs/vantui/es/grid/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=n("./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,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=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"),s=n("webpack/container/remote/react"),c=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),u=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/common/utils.js"),d=n("./node_modules/@antmjs/vantui/es/icon/index.js"),m=n("./node_modules/@antmjs/vantui/es/notice-bar/wxs.js"),f=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 o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0];h.current.timer&&clearTimeout(h.current.timer),h.current.timer=null,j((function(t){return _objectSpread(_objectSpread({},t),{},{animationData:h.current.resetAnimation.translateX(e?0:h.current.wrapWidth).step().export()})})),setTimeout((function(){(0,l.requestAnimationFrame)((function(){j((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:h.current.animation.translateX(-h.current.contentWidth).step().export()})}))}))}),10),h.current.timer=setTimeout((function(){J()}),h.current.duration)}),[]),B=(0,s.useCallback)((function(){(0,l.requestAnimationFrame)((function(){Promise.all([(0,l.getRect)(null,".van-notice-bar__content_".concat(o.unitag)),(0,l.getRect)(null,".van-notice-bar__wrap_".concat(o.unitag))]).then((function(e){var t=e[0],n=e[1];null!=t&&null!=n&&t.width&&n.width&&!1!==E&&(0,a.nextTick)((function(){(E||n.width<=t.width)&&(h.current.wrapWidth=n.width,h.current.contentWidth=t.width,h.current.duration=(n.width+t.width)/T*1e3,h.current.animation=(0,a.createAnimation)({duration:h.current.duration,timingFunction:"linear",delay:C}),J(!0))}))}))}))}),[o.unitag,E,T,C,J]),Q=(0,s.useCallback)((function(e){"closeable"===x&&(h.current.timer&&clearTimeout(h.current.timer),h.current.timer=null,j((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==F||F(e))}),[x,F]);return o.show&&(0,f.jsxs)(c.View,_objectSpread(_objectSpread({className:u.bem("notice-bar",{withicon:x,wrapable:Y})+" ".concat(L||""),style:u.style([m.rootStyle({color:q,backgroundColor:I,background:M}),U])},H),{},{onClick:W,children:[V?(0,f.jsx)(d.default,{name:V,className:"van-notice-bar__left-icon"}):R,(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!==E||Y?"":"van-ellipsis"),animation:o.animationData,children:[w,!w&&G]})}),"closeable"===x?(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:Q}):"link"===x?(0,f.jsx)(c.Navigator,{url:S,openType:O,children:(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"arrow"})}):K]}))}},"./node_modules/@antmjs/vantui/es/notice-bar/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var o=n("./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/swiper-item/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("webpack/container/remote/react"),i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),a=n("./node_modules/@antmjs/vantui/es/swiper/context.js"),s=n("webpack/container/remote/react/jsx-runtime");function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t=me&&xe({pace:-me})},ge=function prev(){he(),ke(),Pe((function(){Pe((function(){N.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},we=function next(){he(),ke(),Pe((function(){Pe((function(){N.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},ye=function to(e){he(),ke(),Pe((function(){Pe((function(){var t;N.current.moving=!1,t=c.loop&&me===e?0===M?0:e:e%me,xe({pace:t-M,isEmit:!0})}))}))},xe=function move(e){var t=e.pace,n=void 0===t?0:t,o=e.offset,r=void 0===o?0:o,i=e.isEmit,a=void 0!==i&&i;if(!(me<=1)){var s=_e(n),u=Se(s,r);if(c.loop){if(Array.isArray(d)&&d[0]&&u!==ve){var l=u0;te[me-1]=m?-fe:0}ne(te)}a&&M!==s&&c.onChange&&c.onChange((s+me)%me),M=s,Y(s),$(u),Ne(u)}},_e=function getActive(e){if(e){var t=M+e;return c.loop?Oe(t,-1,me):Oe(t,0,me-1)}return M},Se=function getOffset(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*Number(se);c.loop||(n=Math.min(n,-ve));var o=t-n;return c.loop||(o=Oe(o,ve,0)),o},Pe=function requestFrame(e){h.requestAnimationFrame.call(h,e)},Oe=function range(e,t,n){return Math.min(Math.max(e,t),n)},ke=function touchReset(){ue.startX=0,ue.startY=0,ue.deltaX=0,ue.deltaY=0,ue.offsetX=0,ue.offsetY=0,ue.delta=0,ue.stateDirection="",ue.touchTime=0},Ce=m()((n={},(0,a.default)(n,"van-swiper__inner",!0),(0,a.default)(n,"van-swiper__vertical",E),n)),Ne=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=C.current,n=0;if(S){var o=E?G:W,r=E?(null==A?void 0:A.height)-o:(null==A?void 0:A.width)-o;n=e+(M!==me-1||c.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(N.current.moving?0:c.duration,"ms"),t.style[E?"height":"width"]="".concat(Number(se)*me,"px"),t.style[E?"width":"height"]="".concat(E?W:G,"px"),t.style.transform="translate3D".concat(E?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,l.useEffect)((function(){N.current.activePagination=(M+me)%me}),[M]);var Te=function queryRect(e){return new Promise((function(t){var n=(0,f.createSelectorQuery)();n.select("#".concat(e.id))&&n.select("#".concat(e.id)).boundingClientRect(),n.exec((function(e){t(e[0])}))}))},De=function(){var e=(0,o.default)(u().mark((function _callee(){var e,t,n,o,r,i,a=arguments;return u().wrap((function _callee$(s){for(;;)switch(s.prev=s.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:+c.initPage,s.next=3,Te(k.current);case 3:t=s.sent,n=Math.max(Math.min(me-1,e),0),o=c.width?+c.width:null==t?void 0:t.width,r=c.height?+c.height:null==t?void 0:t.height,se=E?r:o,fe=me*Number(se),i=Se(n),N.current.moving=!0,ie&&(N.current.moving=!1),q(t),Y(n),F(o),H(r),$(i),ae(!0);case 18:case"end":return s.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){ie&&Ne()}),[E,W,G,Q,ie]),(0,l.useEffect)((function(){return function(){ae(!1)}}),[]),(0,l.useEffect)((function(){je(),be()}),[d]),(0,l.useEffect)((function(){De()}),[c.initPage]),(0,l.useEffect)((function(){return function(){je()}}),[]),(0,f.useReady)((function(){De(),p().nextTick((function(){setTimeout((function(){je(),be()}),16)}))}));var Ee=function itemStyle(e){var t={},n=c.direction||y,o=se;o&&(t["horizontal"===n?"width":"height"]="".concat(o,"px"));var r=te[e];return r&&(t.transform="translate3D".concat("horizontal"===n?"(".concat(r,"px,0,0)"):"(0,".concat(r,"px,0)"))),t};return(0,l.useImperativeHandle)(t,(function(){return{to:ye,next:we,prev:ge}})),(0,b.jsx)(j.DataContext.Provider,{value:pe,children:(0,b.jsxs)(v.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:k},O),{},{id:"container-"+D,onTouchStart:function onTouchStart(e){c.isPreventDefault&&e.preventDefault(),c.isStopPropagation&&e.stopPropagation(),c.touchable&&(!function touchStart(e){var t,n;ke(),ue.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,ue.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),ue.touchTime=Date.now(),je(),he())},onTouchMove:function onTouchMove(e){c.touchable&&N.current.moving&&(!function touchMove(e){var t,n;ue.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-ue.startX,ue.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-ue.startY,ue.offsetX=Math.abs(ue.deltaX),ue.offsetY=Math.abs(ue.deltaY),ue.delta=E?ue.deltaY:ue.deltaX,ue.stateDirection||(ue.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(ue.offsetX,ue.offsetY))}(e),ue.stateDirection===c.direction&&xe({offset:ue.delta}))},onTouchEnd:function onTouchEnd(){if(c.touchable&&N.current.moving){var e=ue.delta/(Date.now()-ue.touchTime),t=Math.abs(e)>.3||Math.abs(ue.delta)>+(se/2).toFixed(2),n=0;if(N.current.moving=!1,t&&ue.stateDirection===c.direction){var o=E?ue.offsetY:ue.offsetX;n=c.loop?o>0?ue.delta>0?-1:1:0:-Math[ue.delta>0?"ceil":"floor"](ue.delta/se),xe({pace:n,isEmit:!0})}else ue.delta?xe({pace:0}):Ne();be()}},catchMove:E,style:_objectSpread(_objectSpread({},P),{},{height:G}),children:[(0,b.jsxs)(v.View,{className:Ce,ref:C,children:[l.Children.map(de,(function(e,t){return(0,b.jsx)(v.View,{className:"van-swiper-item-wrapper",style:Ee(t),children:e},t)})),(0,b.jsx)(v.View,{className:"van-swiper-item-wrapper",style:Ee(0),children:de&&de.length?de[0]:""})]}),c.paginationVisible&&!("pageContent"in c)?(0,b.jsx)(v.View,{className:m()((s={},(0,a.default)(s,"van-swiper__pagination",!0),(0,a.default)(s,"van-swiper__pagination-vertical",E),s)),children:l.Children.map(de,(function(e,t){var n;return(0,b.jsx)(v.Text,{style:(M+me)%me===t?{backgroundColor:c.paginationColor}:void 0,className:m()((n={},(0,a.default)(n,"van-swiper__pagination-item",!0),(0,a.default)(n,"active",(M+me)%me===t),n))},t)}))}):(0,b.jsx)(v.View,{children:_})]}))})},x=(0,l.forwardRef)(y);t.default=x},"./node_modules/classnames/index.js":function(e,t,n){var o,r=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=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,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),r=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"),s=n("./node_modules/@antmjs/vantui/es/grid/wxs.js"),c=n("webpack/container/remote/react/jsx-runtime"),u=["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,l=e.clickable,d=e.columnNum,m=void 0===d?4:d,f=e.center,p=void 0===f||f,v=e.border,j=void 0===v||v,b=e.direction,h=e.iconSize,g=void 0===h?"48":h,w=e.square,y=e.reverse,x=void 0!==y&&y,_=e.className,S=void 0===_?"":_,P=e.style,O=void 0===P?{}:P,k=(0,o.default)(e,u),C=(0,i.useRef)([]),N=(0,i.useCallback)((function(){C.current.forEach((function(e){e.updateStyle()}))}),[]);(0,i.useEffect)((function(){N()}),[N]);var D=(0,i.useCallback)((function(e,t){C.current[e]=t}),[]),T=(0,i.useMemo)((function(){var e=[];return k.children&&Array.isArray(k.children)&&k.children.forEach((function(t,o){e.push((0,i.cloneElement)(t,{setChildrenInstance:D,key:o,index:o,parentInstance:{columnNum:m,border:j,square:w,gutter:n,clickable:l,center:p,direction:b,reverse:x,iconSize:g}}))})),e}),[k.children,m]);return(0,c.jsx)(r.View,{className:"van-grid "+(j&&!n?"van-hairline--top":"")+" "+S,style:a.style([s.rootStyle({gutter:n}),O]),children:T})}},"./node_modules/@antmjs/vantui/es/grid/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var o=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),r=n("./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,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=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"),s=n("webpack/container/remote/react"),c=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),u=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/common/utils.js"),d=n("./node_modules/@antmjs/vantui/es/icon/index.js"),m=n("./node_modules/@antmjs/vantui/es/notice-bar/wxs.js"),f=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 o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0];h.current.timer&&clearTimeout(h.current.timer),h.current.timer=null,j((function(t){return _objectSpread(_objectSpread({},t),{},{animationData:h.current.resetAnimation.translateX(e?0:h.current.wrapWidth).step().export()})})),setTimeout((function(){(0,l.requestAnimationFrame)((function(){j((function(e){return _objectSpread(_objectSpread({},e),{},{animationData:h.current.animation.translateX(-h.current.contentWidth).step().export()})}))}))}),10),h.current.timer=setTimeout((function(){J()}),h.current.duration)}),[]),B=(0,s.useCallback)((function(){(0,l.requestAnimationFrame)((function(){Promise.all([(0,l.getRect)(null,".van-notice-bar__content_".concat(o.unitag)),(0,l.getRect)(null,".van-notice-bar__wrap_".concat(o.unitag))]).then((function(e){var t=e[0],n=e[1];null!=t&&null!=n&&t.width&&n.width&&!1!==E&&(0,a.nextTick)((function(){(E||n.width<=t.width)&&(h.current.wrapWidth=n.width,h.current.contentWidth=t.width,h.current.duration=(n.width+t.width)/D*1e3,h.current.animation=(0,a.createAnimation)({duration:h.current.duration,timingFunction:"linear",delay:C}),J(!0))}))}))}))}),[o.unitag,E,D,C,J]),Q=(0,s.useCallback)((function(e){"closeable"===x&&(h.current.timer&&clearTimeout(h.current.timer),h.current.timer=null,j((function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})),null==F||F(e))}),[x,F]);return o.show&&(0,f.jsxs)(c.View,_objectSpread(_objectSpread({className:u.bem("notice-bar",{withicon:x,wrapable:Y})+" ".concat(L||""),style:u.style([m.rootStyle({color:q,backgroundColor:I,background:M}),U])},H),{},{onClick:W,children:[V?(0,f.jsx)(d.default,{name:V,className:"van-notice-bar__left-icon"}):R,(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!==E||Y?"":"van-ellipsis"),animation:o.animationData,children:[w,!w&&G]})}),"closeable"===x?(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"cross",onClick:Q}):"link"===x?(0,f.jsx)(c.Navigator,{url:S,openType:O,children:(0,f.jsx)(d.default,{className:"van-notice-bar__right-icon",name:"arrow"})}):K]}))}},"./node_modules/@antmjs/vantui/es/notice-bar/wxs.js":function(e,t,n){"use strict";n.d(t,{rootStyle:function(){return rootStyle}});var o=n("./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/swiper-item/index.js":function(e,t,n){"use strict";var o=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),r=n("webpack/container/remote/react"),i=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),a=n("./node_modules/@antmjs/vantui/es/swiper/context.js"),s=n("webpack/container/remote/react/jsx-runtime");function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(e){for(var t=1;t=me&&xe({pace:-me})},ge=function prev(){he(),ke(),Pe((function(){Pe((function(){N.current.moving=!1,xe({pace:-1,isEmit:!0})}))}))},we=function next(){he(),ke(),Pe((function(){Pe((function(){N.current.moving=!1,xe({pace:1,isEmit:!0})}))}))},ye=function to(e){he(),ke(),Pe((function(){Pe((function(){var t;N.current.moving=!1,t=c.loop&&me===e?0===M?0:e:e%me,xe({pace:t-M,isEmit:!0})}))}))},xe=function move(e){var t=e.pace,n=void 0===t?0:t,o=e.offset,r=void 0===o?0:o,i=e.isEmit,a=void 0!==i&&i;if(!(me<=1)){var s=_e(n),u=Se(s,r);if(c.loop){if(Array.isArray(d)&&d[0]&&u!==ve){var l=u0;te[me-1]=m?-fe:0}ne(te)}a&&M!==s&&c.onChange&&c.onChange((s+me)%me),M=s,Y(s),$(u),Ne(u)}},_e=function getActive(e){if(e){var t=M+e;return c.loop?Oe(t,-1,me):Oe(t,0,me-1)}return M},Se=function getOffset(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e*Number(se);c.loop||(n=Math.min(n,-ve));var o=t-n;return c.loop||(o=Oe(o,ve,0)),o},Pe=function requestFrame(e){h.requestAnimationFrame.call(h,e)},Oe=function range(e,t,n){return Math.min(Math.max(e,t),n)},ke=function touchReset(){ue.startX=0,ue.startY=0,ue.deltaX=0,ue.deltaY=0,ue.offsetX=0,ue.offsetY=0,ue.delta=0,ue.stateDirection="",ue.touchTime=0},Ce=m()((n={},(0,a.default)(n,"van-swiper__inner",!0),(0,a.default)(n,"van-swiper__vertical",E),n)),Ne=function getStyle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q,t=C.current,n=0;if(S){var o=E?G:W,r=E?(null==A?void 0:A.height)-o:(null==A?void 0:A.width)-o;n=e+(M!==me-1||c.loop?r/2:-r/2)}else n=e;t.style.transitionDuration="".concat(N.current.moving?0:c.duration,"ms"),t.style[E?"height":"width"]="".concat(Number(se)*me,"px"),t.style[E?"width":"height"]="".concat(E?W:G,"px"),t.style.transform="translate3D".concat(E?"(0,".concat(n,"px,0)"):"(".concat(n,"px,0,0)"))};(0,l.useEffect)((function(){N.current.activePagination=(M+me)%me}),[M]);var De=function queryRect(e){return new Promise((function(t){var n=(0,f.createSelectorQuery)();n.select("#".concat(e.id))&&n.select("#".concat(e.id)).boundingClientRect(),n.exec((function(e){t(e[0])}))}))},Te=function(){var e=(0,o.default)(u().mark((function _callee(){var e,t,n,o,r,i,a=arguments;return u().wrap((function _callee$(s){for(;;)switch(s.prev=s.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:+c.initPage,s.next=3,De(k.current);case 3:t=s.sent,n=Math.max(Math.min(me-1,e),0),o=c.width?+c.width:null==t?void 0:t.width,r=c.height?+c.height:null==t?void 0:t.height,se=E?r:o,fe=me*Number(se),i=Se(n),N.current.moving=!0,ie&&(N.current.moving=!1),q(t),Y(n),F(o),H(r),$(i),ae(!0);case 18:case"end":return s.stop()}}),_callee)})));return function init(){return e.apply(this,arguments)}}();(0,l.useEffect)((function(){ie&&Ne()}),[E,W,G,Q,ie]),(0,l.useEffect)((function(){return function(){ae(!1)}}),[]),(0,l.useEffect)((function(){je(),be()}),[d]),(0,l.useEffect)((function(){Te()}),[c.initPage]),(0,l.useEffect)((function(){return function(){je()}}),[]),(0,f.useReady)((function(){Te(),p().nextTick((function(){setTimeout((function(){je(),be()}),16)}))}));var Ee=function itemStyle(e){var t={},n=c.direction||y,o=se;o&&(t["horizontal"===n?"width":"height"]="".concat(o,"px"));var r=te[e];return r&&(t.transform="translate3D".concat("horizontal"===n?"(".concat(r,"px,0,0)"):"(0,".concat(r,"px,0)"))),t};return(0,l.useImperativeHandle)(t,(function(){return{to:ye,next:we,prev:ge}})),(0,b.jsx)(j.DataContext.Provider,{value:pe,children:(0,b.jsxs)(v.View,_objectSpread(_objectSpread({className:"van-swiper ".concat(x),ref:k},O),{},{id:"container-"+T,onTouchStart:function onTouchStart(e){c.isPreventDefault&&e.preventDefault(),c.isStopPropagation&&e.stopPropagation(),c.touchable&&(!function touchStart(e){var t,n;ke(),ue.startX=(null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0,ue.startY=(null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0}(e),ue.touchTime=Date.now(),je(),he())},onTouchMove:function onTouchMove(e){c.touchable&&N.current.moving&&(!function touchMove(e){var t,n;ue.deltaX=((null==e||null===(t=e.touches[0])||void 0===t?void 0:t.clientX)||0)-ue.startX,ue.deltaY=((null==e||null===(n=e.touches[0])||void 0===n?void 0:n.clientY)||0)-ue.startY,ue.offsetX=Math.abs(ue.deltaX),ue.offsetY=Math.abs(ue.deltaY),ue.delta=E?ue.deltaY:ue.deltaX,ue.stateDirection||(ue.stateDirection=function getDirection(e,t){return e>t&&e>5?"horizontal":t>e&&t>5?"vertical":""}(ue.offsetX,ue.offsetY))}(e),ue.stateDirection===c.direction&&xe({offset:ue.delta}))},onTouchEnd:function onTouchEnd(){if(c.touchable&&N.current.moving){var e=ue.delta/(Date.now()-ue.touchTime),t=Math.abs(e)>.3||Math.abs(ue.delta)>+(se/2).toFixed(2),n=0;if(N.current.moving=!1,t&&ue.stateDirection===c.direction){var o=E?ue.offsetY:ue.offsetX;n=c.loop?o>0?ue.delta>0?-1:1:0:-Math[ue.delta>0?"ceil":"floor"](ue.delta/se),xe({pace:n,isEmit:!0})}else ue.delta?xe({pace:0}):Ne();be()}},catchMove:E,style:_objectSpread(_objectSpread({},P),{},{height:G}),children:[(0,b.jsxs)(v.View,{className:Ce,ref:C,children:[l.Children.map(de,(function(e,t){return(0,b.jsx)(v.View,{className:"van-swiper-item-wrapper",style:Ee(t),children:e},t)})),(0,b.jsx)(v.View,{className:"van-swiper-item-wrapper",style:Ee(0),children:de&&de.length?de[0]:""})]}),c.paginationVisible&&!("pageContent"in c)?(0,b.jsx)(v.View,{className:m()((s={},(0,a.default)(s,"van-swiper__pagination",!0),(0,a.default)(s,"van-swiper__pagination-vertical",E),s)),children:l.Children.map(de,(function(e,t){var n;return(0,b.jsx)(v.Text,{style:(M+me)%me===t?{backgroundColor:c.paginationColor}:void 0,className:m()((n={},(0,a.default)(n,"van-swiper__pagination-item",!0),(0,a.default)(n,"active",(M+me)%me===t),n))},t)}))}):(0,b.jsx)(v.View,{children:_})]}))})},x=(0,l.forwardRef)(y);t.default=x},"./node_modules/classnames/index.js":function(e,t,n){var o,r=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 { console.log("res", res); }, } - getTable(objParams) + + getTableid(objParams); }, []); diff --git a/src/pages/mountainPeak/index.scss b/src/pages/mountainPeak/index.scss index d63dc23..250049a 100644 --- a/src/pages/mountainPeak/index.scss +++ b/src/pages/mountainPeak/index.scss @@ -1,5 +1,5 @@ .peakContent{ - background-color: yellow; + // background-color: yellow; display: flex; flex-direction: row; } \ No newline at end of file diff --git a/src/pages/mountainPeak/index.tsx b/src/pages/mountainPeak/index.tsx index a2b121b..b43bdde 100644 --- a/src/pages/mountainPeak/index.tsx +++ b/src/pages/mountainPeak/index.tsx @@ -1,11 +1,11 @@ import { RichText, View } from "@tarojs/components"; -import react from "react"; +import react, { useEffect, useState } from "react"; import { Sidebar, SidebarItem } from "@antmjs/vantui"; import "./index.scss"; -import {test} from '../../utils/index' - +import { getTable } from "../../utils/index"; const mountainPeak = () => { + const [dataSource, setdataSource] = useState([]); const state: any = { nodes: [ { @@ -23,9 +23,23 @@ const mountainPeak = () => { }, ], }; + + useEffect(() => { + let objParams2 = { + tableName: "cityNew", + id: "80516fb66370bcf300b8f43c5f4dd52b", + okFun: (res) => { + console.log("res", res); + setdataSource(res?.data ?? []); + }, + }; + // getTable(objParams) + getTable(objParams2); + }, []); + return ( - {" "} + {/* 边栏 */} @@ -35,14 +49,14 @@ const mountainPeak = () => { - - + + - { - test() - }}> - {" "} - + + {/* 富文本 */} + {}}> + {dataSource?.[0]?.actTitle} + );