diff --git a/.cloudbase/container/debug.json b/.cloudbase/container/debug.json new file mode 100644 index 0000000..0d44458 --- /dev/null +++ b/.cloudbase/container/debug.json @@ -0,0 +1 @@ +{"containers":[],"config":{}} \ No newline at end of file diff --git a/dist/common.js b/dist/common.js index 7a22407..b225132 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"],{"./config.js":function(e,n,t){t.d(n,{type:function(){return a},appId:function(){return l},envConfig:function(){return o}});var a="people",l="people"===a?"wx515bd42ee0db5c5d":"wx2b2ec2ba5ee694bc",o="people"===a?"citynew-0givkbre03955d8c":"cloud1-5g5xrgza12a0dd6d"},"./src/pages/components/ActiveCard/index.tsx":function(e,n,t){var a=t("./node_modules/@antmjs/vantui/es/button/index.js"),l=t("./node_modules/@antmjs/vantui/es/image/index.js"),o=t("./node_modules/@antmjs/vantui/es/tag/index.js"),c=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),r=t("webpack/container/remote/react"),s=t("webpack/container/remote/moment"),u=t.n(s),d=t("webpack/container/remote/react/jsx-runtime");n.default=function ActiveCard(e){var n,t=(0,r.useState)({}),s=(0,c.default)(t,2),f=(s[0],s[1],null==e?void 0:e.dataSource),p=f.title,m=f.address,v=f.date,b=f.tagName,g=(f.tagCode,f.Status,f.images);f.isDelete;return(0,d.jsxs)(i.View,{className:"activeCard",children:[(0,d.jsxs)(i.View,{className:"left",children:[!1,(0,d.jsx)(i.View,{className:"leftImage",children:(0,d.jsx)(l.default,{width:"100%",height:"100px",fit:"cover",src:null==g||null===(n=g[0])||void 0===n?void 0:n.url})})]}),(0,d.jsxs)(i.View,{className:"middle",children:[(0,d.jsxs)(i.View,{className:"title",children:[(0,d.jsx)(o.default,{round:!0,type:"warning",style:{marginRight:"5px"},children:b}),(0,d.jsx)(i.Text,{children:p})]}),(0,d.jsxs)(i.View,{className:"down",children:[(0,d.jsxs)(i.View,{className:"date",children:[(0,d.jsx)(i.View,{className:"",children:m}),(0,d.jsx)(i.View,{className:"",children:u()(v).format("YYYY-MM-DD")})]}),(0,d.jsx)(i.View,{className:"btn",children:(0,d.jsx)(a.default,{plain:!0,hairline:!0,type:"primary",children:"立即查看"})})]})]})]})}},"./src/pages/components/TabbarCom/index.tsx":function(e,n,t){var a=t("./node_modules/@antmjs/vantui/es/tabbar/index.js"),l=t("./node_modules/@antmjs/vantui/es/tabbar-item/index.js"),o=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),c=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=t("webpack/container/remote/@tarojs/taro"),r=t.n(i),s=t("webpack/container/remote/react"),u=t.n(s),d=t("webpack/container/remote/react/jsx-runtime");n.default=function TabbarCom(e){var n,t=u().useState(null!==(n=null==e?void 0:e.active)&&void 0!==n?n:0),i=(0,o.default)(t,2),s=i[0],f=i[1];return(0,d.jsx)(c.View,{style:{marginTop:"40px"},children:(0,d.jsxs)(a.default,{active:s,onChange:function onChange(e){console.log("e",e),f(null==e?void 0:e.detail),0===(null==e?void 0:e.detail)&&r().redirectTo({url:"/pages/home/index"}),1===(null==e?void 0:e.detail)&&r().redirectTo({url:"/pages/activityList/index"}),2===(null==e?void 0:e.detail)&&r().redirectTo({url:"/pages/my/index"})},safeAreaInsetBottom:!0,children:[(0,d.jsx)(l.default,{icon:"home-o",children:"首页"}),(0,d.jsx)(l.default,{icon:"friends-o",children:"活动"}),(0,d.jsx)(l.default,{icon:"setting-o",children:"我的"})]})})}},"./src/utils/index.ts":function(e,n,t){t.d(n,{getTable:function(){return s},getTableid:function(){return u},updateTableid:function(){return d},phoneLogin:function(){return f},cloudcall:function(){return p}});var a=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),l=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=t("webpack/container/remote/@tarojs/taro"),c=t.n(o),i=t("./config.js"),r=function addTable(e){var n=e.env,t=e.tableName,a=e.objData,l=e.okFun,o=c().cloud.database({env:n}),i=null==o?void 0:o.collection(t);null==i||i.add({data:a,success:function success(e){l(e)},fail:function fail(e){console.log("err",e)}})},s=function getTable(e){var n,t=e.env,a=e.tableName,l=e.keyValue,o=void 0===l?{}:l,i=e.okFun,r=c().cloud.database({env:t}),s=null==r?void 0:r.collection(a);(null===(n=Object.keys(o))||void 0===n?void 0:n.length)>0?null==s||s.where(o).get({success:function success(e){i(e)}}):null==s||s.get({success:function success(e){i(e)}})},u=function getTableid(e){var n,t,a=e.env,l=e.tableName,o=e.id,i=e.keyValue,r=void 0===i?{}:i,s=e.okFun,u=c().cloud.database({env:a}),d=null==u?void 0:u.collection(l);(null===(n=Object.keys(r))||void 0===n?void 0:n.length)>0?null==d||d.doc(o).where(r).get({success:function success(e){s(e)},fail:function fail(e){console.log("err",e)}}):null==d||null===(t=d.doc(o))||void 0===t||t.get({success:function success(e){s(e)},fail:function fail(e){console.log("err",e)}})},d=function updateTableid(e){var n=e.env,t=e.tableName,a=e.objData,l=e.id,o=e.okFun,i=c().cloud.database({env:n});(null==i?void 0:i.collection(t)).doc(l).update({data:a,success:function success(e){o(e)},fail:function fail(e){console.log("err",e)}})},f=function(){var e=(0,l.default)((0,a.default)().mark((function _callee4(){return(0,a.default)().wrap((function _callee4$(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var t,o=c().cloud.database({}).command,u="";c().cloud.callFunction({name:"getOpenid",complete:(t=(0,l.default)((0,a.default)().mark((function _callee3(n){var t,l,c;return(0,a.default)().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:console.log("callFunction test result: ",n),u=null==n||null===(t=n.result)||void 0===t||null===(l=t.event)||void 0===l||null===(c=l.userInfo)||void 0===c?void 0:c.openId,console.log("openId--",u),s({tableName:"userInfo",keyValue:{openId:o.eq(u)},okFun:function okFun(n){var t;console.log("res",n);var a,l,o,c=null!==(t=null==n?void 0:n.data)&&void 0!==t?t:[];if(0!==(null==c?void 0:c.length))return null!=c&&null!==(a=c[0])&&void 0!==a&&null!==(l=a.authInfo)&&void 0!==l&&null!==(o=l[0])&&void 0!==o&&o.telNumber?(e(!0),!0):(i.type,e(!1),!1);r({tableName:"userInfo",objData:{openId:u},okFun:function okFun(e){}})}});case 4:case"end":return a.stop()}}),_callee3)}))),function complete(e){return t.apply(this,arguments)})})})));case 1:case"end":return e.stop()}}),_callee4)})));return function phoneLogin(){return e.apply(this,arguments)}}(),p=function(){var e=(0,l.default)((0,a.default)().mark((function _callee5(e){var n,t,l,o,r=arguments;return(0,a.default)().wrap((function _callee5$(a){for(;;)switch(a.prev=a.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:0,(t={}).cloud=new(c().cloud.Cloud)({resourceAppid:i.appId,resourceEnv:"prod-4go74loxa6ac34a8"}),a.next=5,null==t?void 0:t.cloud.init();case 5:return a.prev=5,a.next=8,t.cloud.callContainer({path:e.path,method:e.method||"GET",header:{"X-WX-SERVICE":"fastapi"}});case 8:return l=a.sent,console.log("微信云托管调用结果".concat(l.errMsg," | callid:").concat(l.callID)),a.abrupt("return",l.data);case 13:if(a.prev=13,a.t0=a.catch(5),!(-1!=(o=a.t0.toString()).indexOf("Cloud API isn't enabled")&&n<3)){a.next=20;break}return a.abrupt("return",new Promise((function(a){setTimeout((function(){a(t.call(e,n+1))}),300)})));case 20:throw new Error("微信云托管调用失败".concat(o));case 21:case"end":return a.stop()}}),_callee5,null,[[5,13]])})));return function cloudcall(n){return e.apply(this,arguments)}}()}}]); \ No newline at end of file +"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["common"],{"./config.js":function(e,n,t){t.d(n,{type:function(){return a},appId:function(){return l},envConfig:function(){return o}});var a="people",l="people"===a?"wx515bd42ee0db5c5d":"wx2b2ec2ba5ee694bc",o="people"===a?"citynew-0givkbre03955d8c":"cloud1-5g5xrgza12a0dd6d"},"./src/pages/components/ActiveCard/index.tsx":function(e,n,t){var a=t("./node_modules/@antmjs/vantui/es/button/index.js"),l=t("./node_modules/@antmjs/vantui/es/image/index.js"),o=t("./node_modules/@antmjs/vantui/es/tag/index.js"),c=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),r=t("webpack/container/remote/react"),s=t("webpack/container/remote/moment"),u=t.n(s),d=t("webpack/container/remote/react/jsx-runtime");n.default=function ActiveCard(e){var n,t=(0,r.useState)({}),s=(0,c.default)(t,2),f=(s[0],s[1],null==e?void 0:e.dataSource),p=f.title,m=f.address,v=f.date,b=f.tagName,g=(f.tagCode,f.Status,f.images);f.isDelete;return(0,d.jsxs)(i.View,{className:"activeCard",children:[(0,d.jsxs)(i.View,{className:"left",children:[!1,(0,d.jsx)(i.View,{className:"leftImage",children:(0,d.jsx)(l.default,{width:"100%",height:"100px",fit:"cover",src:null==g||null===(n=g[0])||void 0===n?void 0:n.url})})]}),(0,d.jsxs)(i.View,{className:"middle",children:[(0,d.jsxs)(i.View,{className:"title",children:[(0,d.jsx)(o.default,{round:!0,type:"warning",style:{marginRight:"5px"},children:b}),(0,d.jsx)(i.Text,{children:p})]}),(0,d.jsxs)(i.View,{className:"down",children:[(0,d.jsxs)(i.View,{className:"date",children:[(0,d.jsx)(i.View,{className:"",children:m}),(0,d.jsx)(i.View,{className:"",children:u()(v).format("YYYY-MM-DD")})]}),(0,d.jsx)(i.View,{className:"btn",children:(0,d.jsx)(a.default,{plain:!0,hairline:!0,type:"primary",children:"立即查看"})})]})]})]})}},"./src/pages/components/TabbarCom/index.tsx":function(e,n,t){var a=t("./node_modules/@antmjs/vantui/es/tabbar/index.js"),l=t("./node_modules/@antmjs/vantui/es/tabbar-item/index.js"),o=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),c=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=t("webpack/container/remote/@tarojs/taro"),r=t.n(i),s=t("webpack/container/remote/react"),u=t.n(s),d=t("webpack/container/remote/react/jsx-runtime");n.default=function TabbarCom(e){var n,t=u().useState(null!==(n=null==e?void 0:e.active)&&void 0!==n?n:0),i=(0,o.default)(t,2),s=i[0],f=i[1];return(0,d.jsx)(c.View,{style:{marginTop:"40px"},children:(0,d.jsxs)(a.default,{active:s,onChange:function onChange(e){console.log("e",e),f(null==e?void 0:e.detail),0===(null==e?void 0:e.detail)&&r().redirectTo({url:"/pages/home/index"}),1===(null==e?void 0:e.detail)&&r().redirectTo({url:"/pages/activityList/index"}),2===(null==e?void 0:e.detail)&&r().redirectTo({url:"/pages/my/index"})},safeAreaInsetBottom:!0,children:[(0,d.jsx)(l.default,{icon:"home-o",children:"首页"}),(0,d.jsx)(l.default,{icon:"friends-o",children:"活动"}),(0,d.jsx)(l.default,{icon:"setting-o",children:"我的"})]})})}},"./src/utils/index.ts":function(e,n,t){t.d(n,{getTable:function(){return s},getTableid:function(){return u},updateTableid:function(){return d},phoneLogin:function(){return f},cloudcall:function(){return p}});var a=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),l=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=t("webpack/container/remote/@tarojs/taro"),c=t.n(o),i=t("./config.js"),r=function addTable(e){var n=e.env,t=e.tableName,a=e.objData,l=e.okFun,o=c().cloud.database({env:n}),i=null==o?void 0:o.collection(t);null==i||i.add({data:a,success:function success(e){l(e)},fail:function fail(e){console.log("err",e)}})},s=function getTable(e){var n,t=e.env,a=e.tableName,l=e.keyValue,o=void 0===l?{}:l,i=e.okFun,r=c().cloud.database({env:t}),s=null==r?void 0:r.collection(a);(null===(n=Object.keys(o))||void 0===n?void 0:n.length)>0?null==s||s.where(o).get({success:function success(e){i(e)}}):null==s||s.get({success:function success(e){i(e)}})},u=function getTableid(e){var n,t,a=e.env,l=e.tableName,o=e.id,i=e.keyValue,r=void 0===i?{}:i,s=e.okFun,u=c().cloud.database({env:a}),d=null==u?void 0:u.collection(l);(null===(n=Object.keys(r))||void 0===n?void 0:n.length)>0?null==d||d.doc(o).where(r).get({success:function success(e){s(e)},fail:function fail(e){console.log("err",e)}}):null==d||null===(t=d.doc(o))||void 0===t||t.get({success:function success(e){s(e)},fail:function fail(e){console.log("err",e)}})},d=function updateTableid(e){var n=e.env,t=e.tableName,a=e.objData,l=e.id,o=e.okFun,i=c().cloud.database({env:n});(null==i?void 0:i.collection(t)).doc(l).update({data:a,success:function success(e){o(e)},fail:function fail(e){console.log("err",e)}})},f=function(){var e=(0,l.default)((0,a.default)().mark((function _callee4(){return(0,a.default)().wrap((function _callee4$(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var t,o=c().cloud.database({}).command,u="";c().cloud.callFunction({name:"getOpenid",complete:(t=(0,l.default)((0,a.default)().mark((function _callee3(n){var t,l,c;return(0,a.default)().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:console.log("callFunction test result: ",n),u=null==n||null===(t=n.result)||void 0===t||null===(l=t.event)||void 0===l||null===(c=l.userInfo)||void 0===c?void 0:c.openId,console.log("openId--",u),s({tableName:"userInfo",keyValue:{openId:o.eq(u)},okFun:function okFun(n){var t;console.log("res",n);var a,l,o,c=null!==(t=null==n?void 0:n.data)&&void 0!==t?t:[];if(0!==(null==c?void 0:c.length))return null!=c&&null!==(a=c[0])&&void 0!==a&&null!==(l=a.authInfo)&&void 0!==l&&null!==(o=l[0])&&void 0!==o&&o.telNumber?(e(!0),!0):(i.type,e(!1),!1);r({tableName:"userInfo",objData:{openId:u},okFun:function okFun(e){}})}});case 4:case"end":return a.stop()}}),_callee3)}))),function complete(e){return t.apply(this,arguments)})})})));case 1:case"end":return e.stop()}}),_callee4)})));return function phoneLogin(){return e.apply(this,arguments)}}(),p=function(){var e=(0,l.default)((0,a.default)().mark((function _callee5(e){var n,t,l,o,r=arguments;return(0,a.default)().wrap((function _callee5$(a){for(;;)switch(a.prev=a.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:0,(t={}).cloud=new(c().cloud.Cloud)({resourceAppid:i.appId,resourceEnv:"prod-4go74loxa6ac34a8"}),a.next=5,null==t?void 0:t.cloud.init();case 5:return a.prev=5,a.next=8,t.cloud.callContainer({path:e.path,method:e.method||"GET",header:{"X-WX-SERVICE":"fastapiweb"}});case 8:return l=a.sent,console.log("微信云托管调用结果".concat(l.errMsg," | callid:").concat(l.callID)),a.abrupt("return",l.data);case 13:if(a.prev=13,a.t0=a.catch(5),!(-1!=(o=a.t0.toString()).indexOf("Cloud API isn't enabled")&&n<3)){a.next=20;break}return a.abrupt("return",new Promise((function(a){setTimeout((function(){a(t.call(e,n+1))}),300)})));case 20:throw new Error("微信云托管调用失败".concat(o));case 21:case"end":return a.stop()}}),_callee5,null,[[5,13]])})));return function cloudcall(n){return e.apply(this,arguments)}}()}}]); \ No newline at end of file diff --git a/dist/pages/home/index.js b/dist/pages/home/index.js index 18e20de..eadffd1 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"),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 _callee10(){return(0,p.default)().wrap((function _callee10$(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()}}),_callee10)})))}),(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 +"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 _callee11(){return(0,p.default)().wrap((function _callee11$(e){for(;;)switch(e.prev=e.next){case 0:if(!ae){e.next=4;break}y().getLocation({type:"gcj02",success:function success(e){console.log("lbs",e);null==e||e.latitude,null==e||e.longitude;var n={latitude:null==e?void 0:e.latitude,longitude:null==e?void 0:e.longitude};de(n)},fail:function fail(){m.default.fail({message:"定位授权异常,无法签到打卡",selector:"#vanToast-demo2"})}}),e.next=7;break;case 4:return e.next=6,ce();case 6:m.default.fail({message:"请先登录",selector:"#vanToast-demo2",duration:2e3,onClose:function onClose(){y().navigateTo({url:"/pages/my/index"})}});case 7:case"end":return e.stop()}}),_callee11)})))}),(0,S.jsx)(a.default,{icon:"like",className:"iconStyle",text:"深圳十峰",onClick:function onClick(){y().navigateTo({url:"/pages/mountainPeak/index"})}}),(0,S.jsx)(a.default,{icon:"eye",className:"iconStyle",text:"活动",onClick:function onClick(){y().navigateTo({url:"/pages/activityList/index"})}}),(0,S.jsx)(a.default,{icon:"video",className:"iconStyle",text:"视频",onClick:function onClick(){var e,n,t,o,r,a;y().openChannelsActivity({finderUserName:null!==(e=null==J||null===(n=J[0])||void 0===n||null===(t=n.videoObj)||void 0===t?void 0:t.finderUserName)&&void 0!==e?e:"sphqzUmI0BlppCI",feedId:null!==(o=null==J||null===(r=J[0])||void 0===r||null===(a=r.videoObj)||void 0===a?void 0:a.feedId)&&void 0!==o?o:"export/UzFfAgtgekIEAQAAAAAAeIIQA5S-0wAAAAstQy6ubaLX4KHWvLEZgBPEj6MUcExXaL37zNPgMJpEUVVnZ9njxR_hb9_u-bQj",success:function success(e){console.log("res",e)}})}})]}),(null==$?void 0:$.length)>0?(0,S.jsx)(b.View,{children:(null!==(N=null==$||null===(O=$.reverse())||void 0===O?void 0:O.splice(0,2))&&void 0!==N?N:[]).map((function(e,n){return(0,S.jsx)(b.View,{onClick:function onClick(){console.log("Card"),y().navigateTo({url:"/pages/activityList/components/details/index?id=".concat(null==e?void 0:e._id)})},children:(0,S.jsx)(k.default,{dataSource:e})})}))}):(0,S.jsx)(o.default,{title:!0,row:4}),(0,S.jsxs)(b.View,{style:{marginTop:"20px"},children:[" ",(0,S.jsx)(b.OfficialAccount,{onLoad:function onLoad(e){console.log("加载成功",e)},onError:function onError(e){console.log("加载失败",e)}})]}),(0,S.jsx)(m.default,{id:"vanToast-demo2"}),(0,S.jsx)(_.default,{active:0})]})}},"./src/pages/home/index.tsx":function(e,n,t){var o=t("webpack/container/remote/@tarojs/runtime"),r=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/home/index.tsx");r.default.enableShareTimeline=!0,r.default.enableShareAppMessage=!0;Page((0,o.createPageConfig)(r.default,"pages/home/index",{root:{cn:[]}},{navigationBarTitleText:"首页"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return n="./src/pages/home/index.tsx",e(e.s=n);var n}));e.O()}]); \ No newline at end of file diff --git a/src/pages/home/index.tsx b/src/pages/home/index.tsx index 6479097..c310f78 100644 --- a/src/pages/home/index.tsx +++ b/src/pages/home/index.tsx @@ -98,12 +98,23 @@ const Home = () => { // 云托管测试 const testCloud = async () => { const res = await cloudcall({ - path:'/feishu' + path:'/feishu', + method:'GET' + }) + console.log('业务返回结果',res) + }; + + // 云托管本地测试 + const testPost = async () => { + const res = await cloudcall({ + path:'/nihao', + method:'POST' }) console.log('业务返回结果',res) }; useEffect(() => { // testCloud(); + // testPost() }, []); useEffect(() => { diff --git a/src/utils/index.ts b/src/utils/index.ts index 292a8cb..8d24bc7 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -263,7 +263,7 @@ export const cloudcall = async (obj: any, number = 0) => { method: obj.method || "GET", // 按照自己的业务开发,选择对应的方法 // dataType:'text', // 如果返回的不是 json 格式,需要添加此项 header: { - "X-WX-SERVICE": "fastapi", // xxx中填入服务名称(微信云托管 - 服务管理 - 服务列表 - 服务名称) + "X-WX-SERVICE": "fastapiweb", // xxx中填入服务名称(微信云托管 - 服务管理 - 服务列表 - 服务名称) // 其他 header 参数 }, // 其余参数同 wx.request