diff --git a/cloudfunctions/getPhoneNum/config.json b/cloudfunctions/getPhoneNum/config.json new file mode 100644 index 0000000..5ecc33e --- /dev/null +++ b/cloudfunctions/getPhoneNum/config.json @@ -0,0 +1,6 @@ +{ + "permissions": { + "openapi": [ + ] + } +} \ No newline at end of file diff --git a/cloudfunctions/getPhoneNum/index.js b/cloudfunctions/getPhoneNum/index.js new file mode 100644 index 0000000..9afdd19 --- /dev/null +++ b/cloudfunctions/getPhoneNum/index.js @@ -0,0 +1,11 @@ +// 云函数入口文件 +const cloud = require('wx-server-sdk') + +cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) // 使用当前云环境 + +// 云函数入口函数 +exports.main = async (event, context) => { + const wxContext = cloud.getWXContext() + var moblie = event.weRunData.data.phoneNumber; + return moblie +} diff --git a/cloudfunctions/getPhoneNum/package.json b/cloudfunctions/getPhoneNum/package.json new file mode 100644 index 0000000..68b16e0 --- /dev/null +++ b/cloudfunctions/getPhoneNum/package.json @@ -0,0 +1,14 @@ +{ + "name": "getPhoneNum", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "wx-server-sdk": "~2.6.3" + } +} \ No newline at end of file diff --git a/dist/pages/my/index.js b/dist/pages/my/index.js index 8e7f6e9..de79276 100644 --- a/dist/pages/my/index.js +++ b/dist/pages/my/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./node_modules/@antmjs/vantui/es/mixins/page-scroll.js":function(e,t,n){n.d(t,{usePageScroll:function(){return usePageScroll}});var r=n("webpack/container/remote/react"),o=n("webpack/container/remote/@tarojs/taro");n("webpack/container/remote/@tarojs/runtime"),n("webpack/container/remote/@tarojs/runtime").document;function usePageScroll(e){(0,r.useEffect)((function(){return void 0}),[e]),(0,o.usePageScroll)((function(t){e(t)}))}},"./node_modules/@antmjs/vantui/es/sticky/index.js":function(e,t,n){n.d(t,{Sticky:function(){return Sticky}});var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),s=n("webpack/container/remote/react"),a=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/common/utils.js"),u=n("./node_modules/@antmjs/vantui/es/common/validator.js"),d=n("./node_modules/@antmjs/vantui/es/mixins/page-scroll.js"),f=n("./node_modules/@antmjs/vantui/es/sticky/wxs.js"),m=n("webpack/container/remote/react/jsx-runtime"),p=["zIndex","offsetTop","scrollTop","disabled","container","onScroll","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return t(e[0])}))}))}),[g]),N=(0,s.useCallback)((function(e){var t=Object.keys(e).reduce((function(t,n){return e[n]!==b[n]&&(t[n]=e[n]),t}),{});Object.keys(t).length>0&&j((function(e){return _objectSpread(_objectSpread({},e),t)})),null==_||_({detail:{scrollTop:C.current.scrollTop,isFixed:e.fixed||b.fixed}})}),[_,b]),I=(0,s.useCallback)((function(e){w?N({fixed:!1,transform:0}):(C.current.scrollTop=e||C.current.scrollTop,"function"!=typeof g?(0,l.getRect)(null,"#sticky-com-index".concat(t.current)).then((function(e){(0,u.isDef)(e)&&(x>=e.top?N({fixed:!0,height:e.height}):N({fixed:!1}))})):Promise.all([(0,l.getRect)(null,"#sticky-com-index".concat(t.current)),P()]).then((function(e){var t=(0,i.default)(e,2),n=t[0],r=t[1];n&&r&&(x+n.height>r.height+r.top?N({fixed:!1,transform:r.height-n.height}):x>=n.top?N({fixed:!0,height:n.height,transform:0}):N({fixed:!1,transform:0}))})).catch((function(e){console.log(e)})))}),[g,w,P,x,N]);return(0,s.useEffect)((function(){I(y)}),[y,g,w,x]),(0,d.usePageScroll)((function(e){I(e.scrollTop)})),(0,m.jsx)(a.View,_objectSpread(_objectSpread({id:"sticky-com-index".concat(t.current),className:" van-sticky "+(S||""),style:c.style([f.containerStyle({fixed:b.fixed,height:b.height,zIndex:h}),k])},T),{},{children:(0,m.jsx)(a.View,{className:c.bem("sticky-wrap",{fixed:b.fixed})+" ".concat(S||""),style:c.style([f.wrapStyle({fixed:b.fixed,offsetTop:x,transform:b.transform,zIndex:h}),k]),children:O})}))}},"./node_modules/@antmjs/vantui/es/sticky/wxs.js":function(e,t,n){n.d(t,{wrapStyle:function(){return wrapStyle},containerStyle:function(){return containerStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js");function wrapStyle(e){return(0,r.style)({transform:e.transform?"translate3d(0, "+e.transform+"px, 0)":"",top:e.fixed?e.offsetTop+"px":"","z-index":e.zIndex})}function containerStyle(e){return(0,r.style)({height:e.fixed?e.height+"px":"","z-index":e.zIndex})}},"./node_modules/@antmjs/vantui/es/tab/index.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),s=n("webpack/container/remote/react"),a=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("webpack/container/remote/react/jsx-runtime"),u=["children","style","className","active","lazyRender","lazyTimeout","animated","title"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t=we.length||e<0)&&e!==z){var t=null!==z;N((function(t){return _objectSpread(_objectSpread({},t),{},{currentIndex:e})})),(0,j.requestAnimationFrame)((function(){Oe(e),Ce(e)})),(0,l.nextTick)((function(){t&&ge("onChange",we[e])}))}},Se=function setCurrentIndexByName(e){var t=we.filter((function(t){return(t.props.name||t.props.index)===e}));t.length&&ke(t[0].props.index)},Oe=function resize(e){var r;"line"===K&&(e=null!==(r=e)&&void 0!==r?r:z,(0,l.nextTick)((function(){Promise.all([(0,j.getAllRect)(null,".tabs-com-index".concat(n.current," .van-tab")),(0,j.getRect)(null,".tabs-com-index".concat(n.current," .van-tabs__line"))]).then((function(n){var r=(0,i.default)(n,2),o=r[0],s=void 0===o?[]:o,a=r[1];if(s&&a){var c=s[e];if(null==c)return;var u=s.slice(0,e).reduce((function(e,t){return e+t.width}),0);u+=(c.width-a.width)/2+(Q?0:8),N((function(e){return _objectSpread(_objectSpread({},e),{},{lineOffsetLeft:u})})),t.current.swiping=!0,V&&(0,l.nextTick)((function(){N((function(e){return _objectSpread(_objectSpread({},e),{},{skipTransition:!1})}))}))}}))})))},Te=function onTap(e){var t=e.currentTarget.dataset.index;t=parseInt(t);var n=we[t];n.props.disabled?ge("onDisabled",n):(ke(t),(0,l.nextTick)((function(){ge("onClick",n)})))},Ce=function scrollIntoView(e){var t;D&&(e=null!==(t=e)&&void 0!==t?t:z,Promise.all([(0,j.getAllRect)(null,".tabs-com-index".concat(n.current," .van-tab")),(0,j.getRect)(null,".tabs-com-index".concat(n.current," .van-tabs__nav"))]).then((function(t){var n=(0,i.default)(t,2),r=n[0],o=n[1];if(r&&o){var s=r[e],a=r.slice(0,e).reduce((function(e,t){return e+t.width}),0);N((function(e){return _objectSpread(_objectSpread({},e),{},{scrollLeft:a-(o.width-s.width)/2})})),E||(0,l.nextTick)((function(){N((function(e){return _objectSpread(_objectSpread({},e),{},{scrollWithAnimation:!0})}))}))}})))},Pe=function touchStart(e){!function resetTouchStatus(){t.current.direction="",t.current.deltaX=0,t.current.deltaY=0,t.current.offsetX=0,t.current.offsetY=0}();var n=e.touches[0];t.current.startX=n.clientX,t.current.startY=n.clientY},Ne=function onTouchEnd(){if(A&&t.current.swiping){var e=t.current,n=e.direction,r=e.deltaX,o=e.offsetX;if("horizontal"===n&&o>=50){var i=function getAvaiableTab(e){for(var t=e>0?-1:1,n=t;z+n=0;n+=t){var r=z+n;if(r>=0&&rce||!Q})}))}),[ce,we,Q]),(0,u.useEffect)((function(){(0,l.nextTick)((function(){Oe()}))}),[we]);var Ie=(0,u.useCallback)((0,r.default)(c().mark((function _callee(){var e,t,r;return c().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(e=0,!ue||!w){o.next=6;break}return o.next=4,(0,j.getAllRect)(null,"."+m.bem("renderNavLeft"+n.current));case 4:(t=o.sent).length&&(e+=t[0].width);case 6:if(!de||!w){o.next=11;break}return o.next=9,(0,j.getAllRect)(null,"."+m.bem("renderNavRight"+n.current));case 9:(r=o.sent).length&&(e+=r[0].width);case 11:e&&O("calc(100% - ".concat(e,"px)"));case 12:case"end":return o.stop()}}),_callee)}))),[ue,w,de]);return(0,u.useEffect)((function(){setTimeout((function(){Ie()}))}),[Ie,w]),(0,x.jsxs)(f.View,_objectSpread(_objectSpread({className:"tabs-com-index".concat(n.current," ")+" "+m.bem("tabs",[K]+" ".concat(he||"")),style:je},xe),{},{children:[(0,x.jsx)(b.Sticky,{disabled:!H,zIndex:G,offsetTop:F,container:U,onScroll:fe,children:(0,x.jsxs)(f.View,{className:m.bem("tabs__wrap",{scrollable:D})+" "+("line"===K&&B?"van-hairline--top-bottom":""),children:[(0,x.jsx)(f.View,{className:m.bem("renderNavLeft"+n.current),children:ue}),(0,x.jsx)(f.ScrollView,{scrollX:D,scrollWithAnimation:E,scrollLeft:I,className:m.bem("tabs__scroll",[K]),style:{width:S,borderColor:J},children:(0,x.jsxs)(f.View,{className:m.bem("tabs__nav",[K,{complete:!Q}])+" nav-class",style:v.navStyle(J,K),children:["line"===K&&(0,x.jsx)(f.View,{className:"van-tabs__line",style:v.lineStyle({color:J,lineOffsetLeft:R,lineHeight:ee,skipTransition:V,duration:ne,lineWidth:oe})}),ye.map((function(e,t){return(0,x.jsx)(f.View,{"data-index":t,className:v.tabClass(t===z,Q)+" "+m.bem("tab",{active:t===z,disabled:e.disabled,complete:!Q}),style:v.tabStyle({active:t===z,ellipsis:Q,color:J,type:K,disabled:e.disabled,titleActiveColor:ie,titleInactiveColor:se,swipeThreshold:ce,scrollable:D}),onClick:Te,children:(0,x.jsxs)(f.View,{className:Q?"van-ellipsis":"",style:e.titleStyle,children:[e.title,(null!==e.info||e.dot)&&(0,x.jsx)(h.Info,{info:e.info,dot:e.dot,className:"van-tab__title__info"})]})},t)}))]})}),(0,x.jsx)(f.View,{className:m.bem("renderNavRight"+n.current),children:de})]})}),(0,x.jsx)(f.View,{className:"van-tabs__content",onTouchStart:function onTouchStart(e){A&&(t.current.swiping=!0,Pe(e))},onTouchMove:function onTouchMove(e){A&&t.current.swiping&&function touchMove(e){var n=e.touches[0];t.current.deltaX=n.clientX-t.current.startX,t.current.deltaY=n.clientY-t.current.startY,t.current.offsetX=Math.abs(t.current.deltaX),t.current.offsetY=Math.abs(t.current.deltaY),t.current.direction=t.current.direction||function getDirection(e,t){return e>t&&e>10?"horizontal":t>e&&t>10?"vertical":""}(t.current.offsetX,t.current.offsetY)}(e)},onTouchEnd:Ne,onTouchCancel:Ne,children:(0,x.jsx)(f.View,{className:m.bem("tabs__track",[{animated:le}])+" van-tabs__track",style:v.trackStyle({duration:ne,currentIndex:z,animated:le}),children:we})})]}))}},"./node_modules/@antmjs/vantui/es/tabs/wxs.js":function(e,t,n){n.d(t,{tabClass:function(){return tabClass},tabStyle:function(){return tabStyle},trackStyle:function(){return trackStyle},lineStyle:function(){return lineStyle},navStyle:function(){return navStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),o=n("./node_modules/@antmjs/vantui/es/wxs/utils.js");function tabClass(e,t){var n=["tab-class"];return e&&n.push("tab-active-class"),t&&n.push("van-ellipsis"),n.join(" ")}function tabStyle(e){var t=e.active?e.titleActiveColor:e.titleInactiveColor,n=e.scrollable&&e.ellipsis;return"card"===e.type?(0,r.style)({"border-color":e.color,"background-color":!e.disabled&&e.active?e.color:null,color:t||(e.disabled||e.active?null:e.color),"flex-basis":n?88/e.swipeThreshold+"%":null}):(0,r.style)({color:t,"flex-basis":n?88/e.swipeThreshold+"%":null})}function navStyle(e,t){return(0,r.style)({"border-color":"card"===t&&e?e:null})}function trackStyle(e){return e.animated?(0,r.style)({transform:"translate3d(".concat(-100*e.currentIndex,"%, 0px, 0px)"),"-webkit-transform":"translate3d(".concat(-100*e.currentIndex,"%, 0px, 0px)"),"transition-duration":e.duration+"s","-webkit-transition-duration":e.duration+"s",transition:e.duration+"s"}):""}function lineStyle(e){return(0,r.style)({visibility:0===e.lineOffsetLeft?"hidden":"visible",width:o.addUnit(e.lineWidth),transform:"translateX("+e.lineOffsetLeft+"px)","-webkit-transform":"translateX("+e.lineOffsetLeft+"px)","background-color":e.color,height:-1!==e.lineHeight?o.addUnit(e.lineHeight):null,"border-radius":-1!==e.lineHeight?o.addUnit(e.lineHeight):null,"transition-duration":e.skipTransition?null:e.duration+"s","-webkit-transition-duration":e.skipTransition?null:e.duration+"s"})}},"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx":function(e,t,n){var r=n("./node_modules/@antmjs/vantui/es/cell/index.js"),o=n("./node_modules/@antmjs/vantui/es/tabs/index.js"),i=n("./node_modules/@antmjs/vantui/es/tab/index.js"),s=n("./node_modules/@antmjs/vantui/es/button/index.js"),a=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=n("webpack/container/remote/react"),l=n("./src/pages/components/TabbarCom/index.tsx"),u=n("webpack/container/remote/@tarojs/taro"),d=n.n(u),f=n("./src/pages/components/ActiveCard/index.tsx"),m=n("webpack/container/remote/react/jsx-runtime");t.default=function my(e){(0,c.useEffect)((function(){}),[]);var t=function CardCom(){return(0,m.jsx)(a.View,{children:[1,2,3,4].splice(0,2).map((function(e){return(0,m.jsx)(f.default,{})}))})},n=function getPhoneNumber(e){console.log("点击获取手机事件",e.detail.cloudID),d().cloud.callFunction({name:"getPhone",data:{cloudID:e.detail.cloudID}}).then((function(e){console.log(e),console.log(e.result.list[0].data.phoneNumber)}))};return(0,m.jsxs)(a.View,{className:"myContent",children:[(0,m.jsx)(a.View,{className:"myImage",children:(0,m.jsx)(a.OpenData,{type:"userAvatarUrl"})}),(0,m.jsxs)(a.View,{children:[(0,m.jsx)(s.default,{"open-type":"getUserInfo",lang:"zh_CN",onGetUserInfo:function onGetUserInfo(e){console.log("info",e)},children:"获取用户信息"}),(0,m.jsx)(s.default,{"open-type":"getPhoneNumber",lang:"zh_CN",onGetPhoneNumber:function onGetPhoneNumber(e){console.log("info",e),n(e)},children:"获取手机信息"})]}),(0,m.jsx)(a.View,{children:(0,m.jsxs)(o.default,{sticky:!0,children:[(0,m.jsx)(i.default,{title:"待审核",children:t()}),(0,m.jsx)(i.default,{title:"已报名",children:t()}),(0,m.jsx)(i.default,{title:"待参加",children:t()}),(0,m.jsx)(i.default,{title:"已结束",children:t()})]})}),(0,m.jsxs)(a.View,{className:"cellArr",children:[(0,m.jsx)(r.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){d().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,m.jsx)(r.default,{icon:"friends",title:"关于我们",isLink:!0}),(0,m.jsx)(r.default,{icon:"setting",title:"版本日志",isLink:!0,onClick:function onClick(){d().navigateTo({url:"/pages/my/components/Version/index"})}})]}),(0,m.jsx)(l.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,t,n){var r=n("webpack/container/remote/@tarojs/runtime"),o=n("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx");Page((0,r.createPageConfig)(o.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/my/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file +"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./node_modules/@antmjs/vantui/es/mixins/page-scroll.js":function(e,t,n){n.d(t,{usePageScroll:function(){return usePageScroll}});var r=n("webpack/container/remote/react"),o=n("webpack/container/remote/@tarojs/taro");n("webpack/container/remote/@tarojs/runtime"),n("webpack/container/remote/@tarojs/runtime").document;function usePageScroll(e){(0,r.useEffect)((function(){return void 0}),[e]),(0,o.usePageScroll)((function(t){e(t)}))}},"./node_modules/@antmjs/vantui/es/sticky/index.js":function(e,t,n){n.d(t,{Sticky:function(){return Sticky}});var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),s=n("webpack/container/remote/react"),a=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("./node_modules/@antmjs/vantui/es/common/utils.js"),u=n("./node_modules/@antmjs/vantui/es/common/validator.js"),d=n("./node_modules/@antmjs/vantui/es/mixins/page-scroll.js"),f=n("./node_modules/@antmjs/vantui/es/sticky/wxs.js"),m=n("webpack/container/remote/react/jsx-runtime"),p=["zIndex","offsetTop","scrollTop","disabled","container","onScroll","style","className","children"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return t(e[0])}))}))}),[w]),N=(0,s.useCallback)((function(e){var t=Object.keys(e).reduce((function(t,n){return e[n]!==b[n]&&(t[n]=e[n]),t}),{});Object.keys(t).length>0&&j((function(e){return _objectSpread(_objectSpread({},e),t)})),null==_||_({detail:{scrollTop:C.current.scrollTop,isFixed:e.fixed||b.fixed}})}),[_,b]),I=(0,s.useCallback)((function(e){g?N({fixed:!1,transform:0}):(C.current.scrollTop=e||C.current.scrollTop,"function"!=typeof w?(0,l.getRect)(null,"#sticky-com-index".concat(t.current)).then((function(e){(0,u.isDef)(e)&&(x>=e.top?N({fixed:!0,height:e.height}):N({fixed:!1}))})):Promise.all([(0,l.getRect)(null,"#sticky-com-index".concat(t.current)),P()]).then((function(e){var t=(0,i.default)(e,2),n=t[0],r=t[1];n&&r&&(x+n.height>r.height+r.top?N({fixed:!1,transform:r.height-n.height}):x>=n.top?N({fixed:!0,height:n.height,transform:0}):N({fixed:!1,transform:0}))})).catch((function(e){console.log(e)})))}),[w,g,P,x,N]);return(0,s.useEffect)((function(){I(y)}),[y,w,g,x]),(0,d.usePageScroll)((function(e){I(e.scrollTop)})),(0,m.jsx)(a.View,_objectSpread(_objectSpread({id:"sticky-com-index".concat(t.current),className:" van-sticky "+(S||""),style:c.style([f.containerStyle({fixed:b.fixed,height:b.height,zIndex:h}),k])},T),{},{children:(0,m.jsx)(a.View,{className:c.bem("sticky-wrap",{fixed:b.fixed})+" ".concat(S||""),style:c.style([f.wrapStyle({fixed:b.fixed,offsetTop:x,transform:b.transform,zIndex:h}),k]),children:O})}))}},"./node_modules/@antmjs/vantui/es/sticky/wxs.js":function(e,t,n){n.d(t,{wrapStyle:function(){return wrapStyle},containerStyle:function(){return containerStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js");function wrapStyle(e){return(0,r.style)({transform:e.transform?"translate3d(0, "+e.transform+"px, 0)":"",top:e.fixed?e.offsetTop+"px":"","z-index":e.zIndex})}function containerStyle(e){return(0,r.style)({height:e.fixed?e.height+"px":"","z-index":e.zIndex})}},"./node_modules/@antmjs/vantui/es/tab/index.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),s=n("webpack/container/remote/react"),a=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=n("./node_modules/@antmjs/vantui/es/wxs/utils.js"),l=n("webpack/container/remote/react/jsx-runtime"),u=["children","style","className","active","lazyRender","lazyTimeout","animated","title"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t=ge.length||e<0)&&e!==z){var t=null!==z;N((function(t){return _objectSpread(_objectSpread({},t),{},{currentIndex:e})})),(0,j.requestAnimationFrame)((function(){Oe(e),Ce(e)})),(0,l.nextTick)((function(){t&&we("onChange",ge[e])}))}},Se=function setCurrentIndexByName(e){var t=ge.filter((function(t){return(t.props.name||t.props.index)===e}));t.length&&ke(t[0].props.index)},Oe=function resize(e){var r;"line"===K&&(e=null!==(r=e)&&void 0!==r?r:z,(0,l.nextTick)((function(){Promise.all([(0,j.getAllRect)(null,".tabs-com-index".concat(n.current," .van-tab")),(0,j.getRect)(null,".tabs-com-index".concat(n.current," .van-tabs__line"))]).then((function(n){var r=(0,i.default)(n,2),o=r[0],s=void 0===o?[]:o,a=r[1];if(s&&a){var c=s[e];if(null==c)return;var u=s.slice(0,e).reduce((function(e,t){return e+t.width}),0);u+=(c.width-a.width)/2+(Q?0:8),N((function(e){return _objectSpread(_objectSpread({},e),{},{lineOffsetLeft:u})})),t.current.swiping=!0,R&&(0,l.nextTick)((function(){N((function(e){return _objectSpread(_objectSpread({},e),{},{skipTransition:!1})}))}))}}))})))},Te=function onTap(e){var t=e.currentTarget.dataset.index;t=parseInt(t);var n=ge[t];n.props.disabled?we("onDisabled",n):(ke(t),(0,l.nextTick)((function(){we("onClick",n)})))},Ce=function scrollIntoView(e){var t;D&&(e=null!==(t=e)&&void 0!==t?t:z,Promise.all([(0,j.getAllRect)(null,".tabs-com-index".concat(n.current," .van-tab")),(0,j.getRect)(null,".tabs-com-index".concat(n.current," .van-tabs__nav"))]).then((function(t){var n=(0,i.default)(t,2),r=n[0],o=n[1];if(r&&o){var s=r[e],a=r.slice(0,e).reduce((function(e,t){return e+t.width}),0);N((function(e){return _objectSpread(_objectSpread({},e),{},{scrollLeft:a-(o.width-s.width)/2})})),V||(0,l.nextTick)((function(){N((function(e){return _objectSpread(_objectSpread({},e),{},{scrollWithAnimation:!0})}))}))}})))},Pe=function touchStart(e){!function resetTouchStatus(){t.current.direction="",t.current.deltaX=0,t.current.deltaY=0,t.current.offsetX=0,t.current.offsetY=0}();var n=e.touches[0];t.current.startX=n.clientX,t.current.startY=n.clientY},Ne=function onTouchEnd(){if(A&&t.current.swiping){var e=t.current,n=e.direction,r=e.deltaX,o=e.offsetX;if("horizontal"===n&&o>=50){var i=function getAvaiableTab(e){for(var t=e>0?-1:1,n=t;z+n=0;n+=t){var r=z+n;if(r>=0&&rce||!Q})}))}),[ce,ge,Q]),(0,u.useEffect)((function(){(0,l.nextTick)((function(){Oe()}))}),[ge]);var Ie=(0,u.useCallback)((0,r.default)(c().mark((function _callee(){var e,t,r;return c().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(e=0,!ue||!g){o.next=6;break}return o.next=4,(0,j.getAllRect)(null,"."+m.bem("renderNavLeft"+n.current));case 4:(t=o.sent).length&&(e+=t[0].width);case 6:if(!de||!g){o.next=11;break}return o.next=9,(0,j.getAllRect)(null,"."+m.bem("renderNavRight"+n.current));case 9:(r=o.sent).length&&(e+=r[0].width);case 11:e&&O("calc(100% - ".concat(e,"px)"));case 12:case"end":return o.stop()}}),_callee)}))),[ue,g,de]);return(0,u.useEffect)((function(){setTimeout((function(){Ie()}))}),[Ie,g]),(0,x.jsxs)(f.View,_objectSpread(_objectSpread({className:"tabs-com-index".concat(n.current," ")+" "+m.bem("tabs",[K]+" ".concat(he||"")),style:je},xe),{},{children:[(0,x.jsx)(b.Sticky,{disabled:!H,zIndex:G,offsetTop:F,container:U,onScroll:fe,children:(0,x.jsxs)(f.View,{className:m.bem("tabs__wrap",{scrollable:D})+" "+("line"===K&&B?"van-hairline--top-bottom":""),children:[(0,x.jsx)(f.View,{className:m.bem("renderNavLeft"+n.current),children:ue}),(0,x.jsx)(f.ScrollView,{scrollX:D,scrollWithAnimation:V,scrollLeft:I,className:m.bem("tabs__scroll",[K]),style:{width:S,borderColor:J},children:(0,x.jsxs)(f.View,{className:m.bem("tabs__nav",[K,{complete:!Q}])+" nav-class",style:v.navStyle(J,K),children:["line"===K&&(0,x.jsx)(f.View,{className:"van-tabs__line",style:v.lineStyle({color:J,lineOffsetLeft:E,lineHeight:ee,skipTransition:R,duration:ne,lineWidth:oe})}),ye.map((function(e,t){return(0,x.jsx)(f.View,{"data-index":t,className:v.tabClass(t===z,Q)+" "+m.bem("tab",{active:t===z,disabled:e.disabled,complete:!Q}),style:v.tabStyle({active:t===z,ellipsis:Q,color:J,type:K,disabled:e.disabled,titleActiveColor:ie,titleInactiveColor:se,swipeThreshold:ce,scrollable:D}),onClick:Te,children:(0,x.jsxs)(f.View,{className:Q?"van-ellipsis":"",style:e.titleStyle,children:[e.title,(null!==e.info||e.dot)&&(0,x.jsx)(h.Info,{info:e.info,dot:e.dot,className:"van-tab__title__info"})]})},t)}))]})}),(0,x.jsx)(f.View,{className:m.bem("renderNavRight"+n.current),children:de})]})}),(0,x.jsx)(f.View,{className:"van-tabs__content",onTouchStart:function onTouchStart(e){A&&(t.current.swiping=!0,Pe(e))},onTouchMove:function onTouchMove(e){A&&t.current.swiping&&function touchMove(e){var n=e.touches[0];t.current.deltaX=n.clientX-t.current.startX,t.current.deltaY=n.clientY-t.current.startY,t.current.offsetX=Math.abs(t.current.deltaX),t.current.offsetY=Math.abs(t.current.deltaY),t.current.direction=t.current.direction||function getDirection(e,t){return e>t&&e>10?"horizontal":t>e&&t>10?"vertical":""}(t.current.offsetX,t.current.offsetY)}(e)},onTouchEnd:Ne,onTouchCancel:Ne,children:(0,x.jsx)(f.View,{className:m.bem("tabs__track",[{animated:le}])+" van-tabs__track",style:v.trackStyle({duration:ne,currentIndex:z,animated:le}),children:ge})})]}))}},"./node_modules/@antmjs/vantui/es/tabs/wxs.js":function(e,t,n){n.d(t,{tabClass:function(){return tabClass},tabStyle:function(){return tabStyle},trackStyle:function(){return trackStyle},lineStyle:function(){return lineStyle},navStyle:function(){return navStyle}});var r=n("./node_modules/@antmjs/vantui/es/wxs/style.js"),o=n("./node_modules/@antmjs/vantui/es/wxs/utils.js");function tabClass(e,t){var n=["tab-class"];return e&&n.push("tab-active-class"),t&&n.push("van-ellipsis"),n.join(" ")}function tabStyle(e){var t=e.active?e.titleActiveColor:e.titleInactiveColor,n=e.scrollable&&e.ellipsis;return"card"===e.type?(0,r.style)({"border-color":e.color,"background-color":!e.disabled&&e.active?e.color:null,color:t||(e.disabled||e.active?null:e.color),"flex-basis":n?88/e.swipeThreshold+"%":null}):(0,r.style)({color:t,"flex-basis":n?88/e.swipeThreshold+"%":null})}function navStyle(e,t){return(0,r.style)({"border-color":"card"===t&&e?e:null})}function trackStyle(e){return e.animated?(0,r.style)({transform:"translate3d(".concat(-100*e.currentIndex,"%, 0px, 0px)"),"-webkit-transform":"translate3d(".concat(-100*e.currentIndex,"%, 0px, 0px)"),"transition-duration":e.duration+"s","-webkit-transition-duration":e.duration+"s",transition:e.duration+"s"}):""}function lineStyle(e){return(0,r.style)({visibility:0===e.lineOffsetLeft?"hidden":"visible",width:o.addUnit(e.lineWidth),transform:"translateX("+e.lineOffsetLeft+"px)","-webkit-transform":"translateX("+e.lineOffsetLeft+"px)","background-color":e.color,height:-1!==e.lineHeight?o.addUnit(e.lineHeight):null,"border-radius":-1!==e.lineHeight?o.addUnit(e.lineHeight):null,"transition-duration":e.skipTransition?null:e.duration+"s","-webkit-transition-duration":e.skipTransition?null:e.duration+"s"})}},"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx":function(e,t,n){var r=n("./node_modules/@antmjs/vantui/es/cell/index.js"),o=n("./node_modules/@antmjs/vantui/es/tabs/index.js"),i=n("./node_modules/@antmjs/vantui/es/tab/index.js"),s=n("./node_modules/@antmjs/vantui/es/button/index.js"),a=n("./node_modules/@antmjs/vantui/es/image/index.js"),c=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),l=n("webpack/container/remote/react"),u=n("./src/pages/components/TabbarCom/index.tsx"),d=n("webpack/container/remote/@tarojs/taro"),f=n.n(d),m=n("./src/pages/components/ActiveCard/index.tsx"),p=n("webpack/container/remote/react/jsx-runtime");t.default=function my(e){(0,l.useEffect)((function(){}),[]);var t=function CardCom(){return(0,p.jsx)(c.View,{children:[1,2,3,4].splice(0,2).map((function(e){return(0,p.jsx)(m.default,{})}))})},n=function getPhoneNumber(e){console.log("点击获取手机事件",e.detail.cloudID),function getLogin(e){f().cloud.callFunction({name:"getPhoneNum",data:{weRunData:f().cloud.CloudID(e.detail.cloudID)}}).then((function(e){console.log("res11"),console.log("res",e)}))}(e)};return(0,p.jsxs)(c.View,{className:"myContent",children:[(0,p.jsx)(c.View,{className:"myImage",children:(0,p.jsx)(a.default,{round:!0,width:"100px",height:"100px",src:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images/images-2.jpg"})}),(0,p.jsxs)(c.View,{children:[(0,p.jsx)(s.default,{"open-type":"getUserInfo",lang:"zh_CN",onGetUserInfo:function onGetUserInfo(e){console.log("info",e)},children:"获取用户信息"}),(0,p.jsx)(s.default,{"open-type":"getPhoneNumber",lang:"zh_CN",onGetPhoneNumber:function onGetPhoneNumber(e){console.log("info",e),n(e)},children:"获取手机信息"})]}),(0,p.jsx)(c.View,{children:(0,p.jsxs)(o.default,{sticky:!0,children:[(0,p.jsx)(i.default,{title:"待审核",children:t()}),(0,p.jsx)(i.default,{title:"已报名",children:t()}),(0,p.jsx)(i.default,{title:"待参加",children:t()}),(0,p.jsx)(i.default,{title:"已结束",children:t()})]})}),(0,p.jsxs)(c.View,{className:"cellArr",children:[(0,p.jsx)(r.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){f().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,p.jsx)(r.default,{icon:"friends",title:"关于我们",isLink:!0}),(0,p.jsx)(r.default,{icon:"setting",title:"版本日志",isLink:!0,onClick:function onClick(){f().navigateTo({url:"/pages/my/components/Version/index"})}})]}),(0,p.jsx)(u.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,t,n){var r=n("webpack/container/remote/@tarojs/runtime"),o=n("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx");Page((0,r.createPageConfig)(o.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/my/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/dist/pages/my/index.js.LICENSE.txt b/dist/pages/my/index.js.LICENSE.txt index 2b25104..a6942d3 100644 --- a/dist/pages/my/index.js.LICENSE.txt +++ b/dist/pages/my/index.js.LICENSE.txt @@ -24,6 +24,8 @@ /*! @antmjs/vantui/es/cell */ +/*! @antmjs/vantui/es/image */ + /*! @antmjs/vantui/es/tab */ /*! @antmjs/vantui/es/tabs */ diff --git a/dist/project.config.json b/dist/project.config.json index 15090d7..abb7afb 100644 --- a/dist/project.config.json +++ b/dist/project.config.json @@ -1,5 +1,5 @@ { - "miniprogramRoot": "", + "miniprogramRoot": "./", "projectname": "myApp", "description": "city", "appid": "wx2b2ec2ba5ee694bc", @@ -28,7 +28,8 @@ "simulatorType": "wechat", "simulatorPluginLibVersion": {}, "condition": {}, - "libVersion": "2.27.2", + "libVersion": "2.27.3", + "srcMiniprogramRoot": "dist/", "packOptions": { "ignore": [], "include": [] diff --git a/dist/taro.js b/dist/taro.js index fd3d52a..6b38314 100644 --- a/dist/taro.js +++ b/dist/taro.js @@ -1,2 +1,2 @@ /*! For license information please see taro.js.LICENSE.txt */ -"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["taro"],{"./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js":function(t,n,e){e.d(n,{Button:function(){return a},Form:function(){return i},Image:function(){return f},Input:function(){return c},Navigator:function(){return m},OpenData:function(){return w},RichText:function(){return o},ScrollView:function(){return s},Text:function(){return u},Textarea:function(){return p},View:function(){return r}});var r="view",o="rich-text",u="text",a="button",i="form",c="input",p="textarea",s="scroll-view",m="navigator",f="image",w="open-data"},"./node_modules/@tarojs/webpack5-runner/dist/template/comp.js":function(t,n,e){var r=e("webpack/container/remote/@tarojs/runtime");Component((0,r.createRecursiveComponentConfig)())},"./node_modules/@tarojs/webpack5-runner/dist/template/custom-wrapper.js":function(t,n,e){var r=e("webpack/container/remote/@tarojs/runtime");Component((0,r.createRecursiveComponentConfig)("custom-wrapper"))}}]); \ No newline at end of file +"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["taro"],{"./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js":function(t,n,e){e.d(n,{Button:function(){return a},Form:function(){return i},Image:function(){return f},Input:function(){return c},Navigator:function(){return m},RichText:function(){return o},ScrollView:function(){return s},Text:function(){return u},Textarea:function(){return p},View:function(){return r}});var r="view",o="rich-text",u="text",a="button",i="form",c="input",p="textarea",s="scroll-view",m="navigator",f="image"},"./node_modules/@tarojs/webpack5-runner/dist/template/comp.js":function(t,n,e){var r=e("webpack/container/remote/@tarojs/runtime");Component((0,r.createRecursiveComponentConfig)())},"./node_modules/@tarojs/webpack5-runner/dist/template/custom-wrapper.js":function(t,n,e){var r=e("webpack/container/remote/@tarojs/runtime");Component((0,r.createRecursiveComponentConfig)("custom-wrapper"))}}]); \ No newline at end of file diff --git a/project.config.json b/project.config.json index 4efb3ed..7193d63 100644 --- a/project.config.json +++ b/project.config.json @@ -17,10 +17,26 @@ "coverView": true, "showShadowRootInWxmlPanel": false, "scopeDataCheck": false, - "useCompilerModule": false + "useCompilerModule": false, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + } }, "compileType": "miniprogram", "simulatorType": "wechat", "simulatorPluginLibVersion": {}, - "condition": {} -} + "condition": {}, + "libVersion": "2.27.3", + "srcMiniprogramRoot": "dist/", + "packOptions": { + "ignore": [], + "include": [] + }, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "cloudfunctionTemplateRoot": "cloudfunctionTemplate/" +} \ No newline at end of file diff --git a/src/pages/my/index.tsx b/src/pages/my/index.tsx index 0711b46..2d1ea33 100644 --- a/src/pages/my/index.tsx +++ b/src/pages/my/index.tsx @@ -20,23 +20,31 @@ import ActiveCard from "../components/ActiveCard"; const my = (props: any) => { // const [active, setActive] = react.useState(props?.active ?? 0); + + // 云函数,-获取手机号 + const getLogin = (e:any) => { + Taro.cloud + .callFunction({ + name: "getPhoneNum", + data: { + weRunData: Taro.cloud.CloudID(e.detail.cloudID) + }, + }) + .then((res:any) => { + console.log('res11') + console.log('res',res) + // this.setState({ + // context: res.result, + // }); + }); + }; + useEffect(() => { // 设置标题 definePageConfig({ navigationBarTitleText: "我的", }); - // Taro.getUserProfile({ - // desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 - // success: (res) => { - // // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗 - // console.log('res',res) - // // this.setState({ - // // userInfo: res.userInfo, - // // hasUserInfo: true - // // }) - // } - // }) }, []); const CardCom = () => { @@ -63,17 +71,9 @@ const my = (props: any) => { const getPhoneNumber = (e:any) => { console.log('点击获取手机事件', e.detail.cloudID); - Taro.cloud.callFunction({ - name: "getPhone", - data: { - cloudID: e.detail.cloudID - // weRunData - }, - }).then((res:any) => { - console.log(res); - console.log(res.result.list[0].data.phoneNumber); - - }) + // 调用云函数获取手机号 + getLogin(e) + } return ( @@ -83,13 +83,13 @@ const my = (props: any) => { {/* 头像 */} {/* 微信开放api-用户头像 */} - - {/* */} + */} + />