Compare commits
6 Commits
release/1.
...
release/1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4abc761109 | ||
|
|
49daf7a423 | ||
|
|
6b3d439bdd | ||
|
|
c49a736cfa | ||
|
|
8aa6530880 | ||
|
|
aedd6eb1ca |
2
dist/app.js
vendored
2
dist/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/app.json
vendored
2
dist/app.json
vendored
@@ -1 +1 @@
|
|||||||
{"pages":["pages/home/index","pages/home/components/CheckIn/index","pages/home/components/Certified/index","pages/activityList/index","pages/formSubmit/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index","pages/my/components/Version/index","pages/my/components/AbountUs/index"],"permission":{"scope.userLocation":{"desc":"你的位置信息将用于小程序位置接口的效果展示"}},"requiredPrivateInfos":["getLocation","chooseLocation"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}}
|
{"pages":["pages/home/index","pages/home/components/CheckIn/index","pages/home/components/Certified/index","pages/activityList/index","pages/formSubmit/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index","pages/my/components/Version/index","pages/my/components/AbountUs/index","pages/my/components/CheckinDetail/index"],"permission":{"scope.userLocation":{"desc":"你的位置信息将用于小程序位置接口的效果展示"}},"requiredPrivateInfos":["getLocation","chooseLocation"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}}
|
||||||
2
dist/common.js
vendored
2
dist/common.js
vendored
File diff suppressed because one or more lines are too long
2
dist/common.js.LICENSE.txt
vendored
2
dist/common.js.LICENSE.txt
vendored
@@ -1,7 +1,5 @@
|
|||||||
/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
|
||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */
|
||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
/*! ../../../../utils/index */
|
/*! ../../../../utils/index */
|
||||||
|
|
||||||
/*! ./arrayLikeToArray.js */
|
|
||||||
|
|
||||||
/*! ./arrayWithoutHoles.js */
|
|
||||||
|
|
||||||
/*! ./iterableToArray.js */
|
|
||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
||||||
@@ -18,10 +12,6 @@
|
|||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
||||||
|
|
||||||
/*! ./nonIterableSpread.js */
|
|
||||||
|
|
||||||
/*! ./unsupportedIterableToArray.js */
|
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/button */
|
/*! @antmjs/vantui/es/button */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/cell */
|
/*! @antmjs/vantui/es/cell */
|
||||||
@@ -48,22 +38,6 @@
|
|||||||
!*** ./src/pages/activityList/components/details/index.tsx ***!
|
!*** ./src/pages/activityList/components/details/index.tsx ***!
|
||||||
\*************************************************************/
|
\*************************************************************/
|
||||||
|
|
||||||
/*!********************************************************************!*\
|
|
||||||
!*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
|
|
||||||
\********************************************************************/
|
|
||||||
|
|
||||||
/*!**********************************************************************!*\
|
|
||||||
!*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***!
|
|
||||||
\**********************************************************************/
|
|
||||||
|
|
||||||
/*!**********************************************************************!*\
|
|
||||||
!*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***!
|
|
||||||
\**********************************************************************/
|
|
||||||
|
|
||||||
/*!**********************************************************************!*\
|
|
||||||
!*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
|
|
||||||
\**********************************************************************/
|
|
||||||
|
|
||||||
/*!***************************************************************************************************************************************************************************!*\
|
/*!***************************************************************************************************************************************************************************!*\
|
||||||
!*** ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/activityList/components/details/index.tsx ***!
|
!*** ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/activityList/components/details/index.tsx ***!
|
||||||
\***************************************************************************************************************************************************************************/
|
\***************************************************************************************************************************************************************************/
|
||||||
|
|||||||
2
dist/pages/home/index.js
vendored
2
dist/pages/home/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/my/index.js
vendored
2
dist/pages/my/index.js
vendored
@@ -1,2 +1,2 @@
|
|||||||
/*! For license information please see index.js.LICENSE.txt */
|
/*! For license information please see index.js.LICENSE.txt */
|
||||||
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./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,n,t){var o=t("./node_modules/@antmjs/vantui/es/cell/index.js"),a=t("./node_modules/@antmjs/vantui/es/button/index.js"),s=t("./node_modules/@antmjs/vantui/es/image/index.js"),l=t("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),u=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),i=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),d=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),r=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=t("webpack/container/remote/react"),m=t("./src/pages/components/TabbarCom/index.tsx"),f=t("webpack/container/remote/@tarojs/taro"),p=t.n(f),x=(t("./src/pages/components/ActiveCard/index.tsx"),t("./src/utils/index.ts")),g=t("webpack/container/remote/react/jsx-runtime");n.default=function my(e){var n=(0,c.useState)({}),t=(0,d.default)(n,2),f=(t[0],t[1],(0,c.useState)([])),v=(0,d.default)(f,2),b=(v[0],v[1],(0,c.useState)(0)),j=(0,d.default)(b,2),h=(j[0],j[1],(0,c.useState)(!0)),k=(0,d.default)(h,2),w=k[0],_=k[1];(0,c.useEffect)((function(){y()}),[]);var y=function(){var e=(0,i.default)((0,u.default)().mark((function _callee(){var e;return(0,u.default)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,x.phoneLogin)();case 2:e=n.sent,console.log("isok",e),_(e);case 5:case"end":return n.stop()}}),_callee)})));return function getok(){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){}),[]);var N=function getPhoneNumber(e){console.log("点击获取手机事件",e.detail.cloudID),function getLogin(e){p().cloud.callFunction({name:"getPhoneNum",data:{weRunData:p().cloud.CloudID(e.detail.cloudID)}}).then((function(e){var n,t,o,a,s,u,i,d,r;console.log("res222",e);var c=null==e||null===(n=e.result)||void 0===n||null===(t=n.event)||void 0===t||null===(o=t.weRunData)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.phoneNumber,m=null==e||null===(s=e.result)||void 0===s||null===(u=s.context)||void 0===u?void 0:u.tencentcloud_uin,f={tableName:"userInfo",keyValue:{openId:null==e||null===(i=e.result)||void 0===i||null===(d=i.event)||void 0===d||null===(r=d.userInfo)||void 0===r?void 0:r.openId},okFun:function okFun(e){var n,t;console.log("q",e),(0,x.updateTableid)({id:null==e||null===(n=e.data)||void 0===n||null===(t=n[0])||void 0===t?void 0:t._id,tableName:"userInfo",objData:{tencentcloud_uin:m,authInfo:{authPhonenum:c}},okFun:function okFun(e){y()}})}};(0,x.getTable)((0,l.default)({},f))}))}(e)};return(0,g.jsxs)(r.View,{className:"myContent",children:[(0,g.jsxs)(r.View,{className:"myImage",children:[(0,g.jsx)(s.default,{round:!0,width:"100px",height:"100px",src:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images/images-2.jpg"}),!w&&(0,g.jsx)(r.View,{className:"loginBtn",children:(0,g.jsx)(a.default,{type:"primary",size:"mini","open-type":"getPhoneNumber",lang:"zh_CN",onGetPhoneNumber:function onGetPhoneNumber(e){console.log("info",e),N(e)},children:"登录"})})]}),(0,g.jsxs)(r.View,{className:"cellArr",children:[(0,g.jsx)(o.default,{icon:"manager",title:"打卡记录",isLink:!0}),(0,g.jsx)(o.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){p().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,g.jsx)(o.default,{icon:"friends",title:"关于我们",isLink:!0,onClick:function onClick(){p().navigateTo({url:"/pages/my/components/AbountUs/index"})}})]}),(0,g.jsx)(m.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,n,t){var o=t("webpack/container/remote/@tarojs/runtime"),a=t("./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,o.createPageConfig)(a.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return n="./src/pages/my/index.tsx",e(e.s=n);var n}));e.O()}]);
|
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./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,n,t){var o=t("./node_modules/@antmjs/vantui/es/cell/index.js"),a=t("./node_modules/@antmjs/vantui/es/toast/index.js"),s=t("./node_modules/@antmjs/vantui/es/button/index.js"),l=t("./node_modules/@antmjs/vantui/es/image/index.js"),u=t("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),i=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),d=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),r=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),c=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),m=t("webpack/container/remote/react"),f=t("./src/pages/components/TabbarCom/index.tsx"),p=t("webpack/container/remote/@tarojs/taro"),x=t.n(p),g=(t("./src/pages/components/ActiveCard/index.tsx"),t("./src/utils/index.ts")),v=t("webpack/container/remote/react/jsx-runtime");n.default=function my(e){var n=(0,m.useState)({}),t=(0,r.default)(n,2),p=(t[0],t[1],(0,m.useState)([])),j=(0,r.default)(p,2),b=(j[0],j[1],(0,m.useState)(0)),h=(0,r.default)(b,2),k=(h[0],h[1],(0,m.useState)(!0)),w=(0,r.default)(k,2),_=w[0],y=w[1];(0,m.useEffect)((function(){C()}),[]);var C=function(){var e=(0,d.default)((0,i.default)().mark((function _callee(){var e;return(0,i.default)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,g.phoneLogin)();case 2:e=n.sent,console.log("isok",e),y(e);case 5:case"end":return n.stop()}}),_callee)})));return function getok(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){}),[]);var N=function getPhoneNumber(e){console.log("点击获取手机事件",e.detail.cloudID),function getLogin(e){x().cloud.callFunction({name:"getPhoneNum",data:{weRunData:x().cloud.CloudID(e.detail.cloudID)}}).then((function(e){var n,t,o,a,s,l,i,d,r;console.log("res222",e);var c=null==e||null===(n=e.result)||void 0===n||null===(t=n.event)||void 0===t||null===(o=t.weRunData)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.phoneNumber,m=null==e||null===(s=e.result)||void 0===s||null===(l=s.context)||void 0===l?void 0:l.tencentcloud_uin,f={tableName:"userInfo",keyValue:{openId:null==e||null===(i=e.result)||void 0===i||null===(d=i.event)||void 0===d||null===(r=d.userInfo)||void 0===r?void 0:r.openId},okFun:function okFun(e){var n,t;console.log("q",e),(0,g.updateTableid)({id:null==e||null===(n=e.data)||void 0===n||null===(t=n[0])||void 0===t?void 0:t._id,tableName:"userInfo",objData:{tencentcloud_uin:m,authInfo:{authPhonenum:c}},okFun:function okFun(e){C()}})}};(0,g.getTable)((0,u.default)({},f))}))}(e)};return(0,v.jsxs)(c.View,{className:"myContent",children:[(0,v.jsxs)(c.View,{className:"myImage",children:[(0,v.jsx)(l.default,{round:!0,width:"100px",height:"100px",src:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images/images-2.jpg"}),!_&&(0,v.jsx)(c.View,{className:"loginBtn",children:(0,v.jsx)(s.default,{type:"primary",size:"mini","open-type":"getPhoneNumber",lang:"zh_CN",onGetPhoneNumber:function onGetPhoneNumber(e){console.log("info",e),N(e)},children:"登录"})})]}),(0,v.jsxs)(c.View,{className:"cellArr",children:[(0,v.jsx)(o.default,{icon:"manager",title:"打卡记录",isLink:!0,onClick:function onClick(){_?x().navigateTo({url:"/pages/my/components/CheckinDetail/index"}):a.default.fail({message:"请先登录",selector:"#vanToast-demo2"})}}),(0,v.jsx)(o.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){x().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,v.jsx)(o.default,{icon:"friends",title:"关于我们",isLink:!0,onClick:function onClick(){x().navigateTo({url:"/pages/my/components/AbountUs/index"})}})]}),(0,v.jsx)(a.default,{id:"vanToast-demo2"}),(0,v.jsx)(f.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,n,t){var o=t("webpack/container/remote/@tarojs/runtime"),a=t("./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,o.createPageConfig)(a.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return n="./src/pages/my/index.tsx",e(e.s=n);var n}));e.O()}]);
|
||||||
2
dist/pages/my/index.js.LICENSE.txt
vendored
2
dist/pages/my/index.js.LICENSE.txt
vendored
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
/*! @antmjs/vantui/es/image */
|
/*! @antmjs/vantui/es/image */
|
||||||
|
|
||||||
|
/*! @antmjs/vantui/es/toast */
|
||||||
|
|
||||||
/*! @tarojs/components */
|
/*! @tarojs/components */
|
||||||
|
|
||||||
/*! @tarojs/runtime */
|
/*! @tarojs/runtime */
|
||||||
|
|||||||
2
dist/runtime.js
vendored
2
dist/runtime.js
vendored
@@ -1 +1 @@
|
|||||||
!function(){"use strict";var e,r,t,_,n={},a={};function __webpack_require__(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={id:e,loaded:!1,exports:{}};return n[e].call(t.exports,t,t.exports,__webpack_require__),t.loaded=!0,t.exports}__webpack_require__.m=n,__webpack_require__.amdO={},e=[],__webpack_require__.O=function(r,t,_,n){if(!t){var a=1/0;for(c=0;c<e.length;c++){t=e[c][0],_=e[c][1],n=e[c][2];for(var i=!0,o=0;o<t.length;o++)(!1&n||a>=n)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](t[o])}))?t.splice(o--,1):(i=!1,n<a&&(a=n));if(i){e.splice(c--,1);var u=_();void 0!==u&&(r=u)}}return r}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[t,_,n]},__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=function(e,r){for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(r,t){return __webpack_require__.f[t](e,r),r}),[]))},__webpack_require__.u=function(e){},__webpack_require__.miniCssF=function(e){},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r={},t="myApp:",__webpack_require__.l=function(e,_,n,a){if(r[e])r[e].push(_);else{var i,o;if(void 0!==n)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var p=u[c];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==t+n){i=p;break}}i||(o=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",t+n),i.src=e),r[e]=[_];var onScriptComplete=function(t,_){i.onerror=i.onload=null,clearTimeout(l);var n=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach((function(e){return e(_)})),t)return t(_)},l=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=onScriptComplete.bind(null,i.onerror),i.onload=onScriptComplete.bind(null,i.onload),o&&document.head.appendChild(i)}},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},_={"webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime":["default","./@tarojs/plugin-platform-weapp/dist/runtime",null],"webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime":["default","./@tarojs/plugin-framework-react/dist/runtime",null],"webpack/container/remote/lodash":["default","./lodash",null],"webpack/container/remote/@tarojs/runtime":["default","./@tarojs/runtime",null],"webpack/container/remote/@tarojs/taro":["default","./@tarojs/taro",null],"webpack/container/remote/react":["default","./react",null],"webpack/container/remote/react-dom":["default","./react-dom",null],"webpack/container/remote/react/jsx-runtime":["default","./react/jsx-runtime",null],"webpack/container/remote/moment":["default","./moment",null]},__webpack_require__.taro=function(e){for(var r in _){var t=e(_[r][1]);n[r]=function(e){return function(r){r.exports=e()}}(t)}},__webpack_require__.p="/",function(){var e={runtime:0};__webpack_require__.f.j=function(r,t){var _=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==_)if(_)t.push(_[2]);else if("runtime"!=r){var n=new Promise((function(t,n){_=e[r]=[t,n]}));t.push(_[2]=n);var a=__webpack_require__.p+__webpack_require__.u(r),i=new Error;__webpack_require__.l(a,(function(t){if(__webpack_require__.o(e,r)&&(0!==(_=e[r])&&(e[r]=void 0),_)){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+n+": "+a+")",i.name="ChunkLoadError",i.type=n,i.request=a,_[1](i)}}),"chunk-"+r,r)}else e[r]=0},__webpack_require__.O.j=function(r){return 0===e[r]};var webpackJsonpCallback=function(r,t){var _,n,a=t[0],i=t[1],o=t[2],u=0;if(a.some((function(r){return 0!==e[r]}))){for(_ in i)__webpack_require__.o(i,_)&&(__webpack_require__.m[_]=i[_]);if(o)var c=o(__webpack_require__)}for(r&&r(t);u<a.length;u++)n=a[u],__webpack_require__.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return __webpack_require__.O(c)},r=wx.webpackJsonp=wx.webpackJsonp||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))}()}();
|
!function(){"use strict";var e,r,t,_,n={},a={};function __webpack_require__(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={id:e,loaded:!1,exports:{}};return n[e].call(t.exports,t,t.exports,__webpack_require__),t.loaded=!0,t.exports}__webpack_require__.m=n,__webpack_require__.amdO={},e=[],__webpack_require__.O=function(r,t,_,n){if(!t){var a=1/0;for(c=0;c<e.length;c++){t=e[c][0],_=e[c][1],n=e[c][2];for(var i=!0,o=0;o<t.length;o++)(!1&n||a>=n)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](t[o])}))?t.splice(o--,1):(i=!1,n<a&&(a=n));if(i){e.splice(c--,1);var u=_();void 0!==u&&(r=u)}}return r}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[t,_,n]},__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=function(e,r){for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(r,t){return __webpack_require__.f[t](e,r),r}),[]))},__webpack_require__.u=function(e){},__webpack_require__.miniCssF=function(e){},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r={},t="myApp:",__webpack_require__.l=function(e,_,n,a){if(r[e])r[e].push(_);else{var i,o;if(void 0!==n)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var p=u[c];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==t+n){i=p;break}}i||(o=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",t+n),i.src=e),r[e]=[_];var onScriptComplete=function(t,_){i.onerror=i.onload=null,clearTimeout(l);var n=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach((function(e){return e(_)})),t)return t(_)},l=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=onScriptComplete.bind(null,i.onerror),i.onload=onScriptComplete.bind(null,i.onload),o&&document.head.appendChild(i)}},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},_={"webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime":["default","./@tarojs/plugin-platform-weapp/dist/runtime",null],"webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime":["default","./@tarojs/plugin-framework-react/dist/runtime",null],"webpack/container/remote/lodash":["default","./lodash",null],"webpack/container/remote/@tarojs/runtime":["default","./@tarojs/runtime",null],"webpack/container/remote/@tarojs/taro":["default","./@tarojs/taro",null],"webpack/container/remote/react":["default","./react",null],"webpack/container/remote/react-dom":["default","./react-dom",null],"webpack/container/remote/moment":["default","./moment",null],"webpack/container/remote/react/jsx-runtime":["default","./react/jsx-runtime",null]},__webpack_require__.taro=function(e){for(var r in _){var t=e(_[r][1]);n[r]=function(e){return function(r){r.exports=e()}}(t)}},__webpack_require__.p="/",function(){var e={runtime:0};__webpack_require__.f.j=function(r,t){var _=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==_)if(_)t.push(_[2]);else if("runtime"!=r){var n=new Promise((function(t,n){_=e[r]=[t,n]}));t.push(_[2]=n);var a=__webpack_require__.p+__webpack_require__.u(r),i=new Error;__webpack_require__.l(a,(function(t){if(__webpack_require__.o(e,r)&&(0!==(_=e[r])&&(e[r]=void 0),_)){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+n+": "+a+")",i.name="ChunkLoadError",i.type=n,i.request=a,_[1](i)}}),"chunk-"+r,r)}else e[r]=0},__webpack_require__.O.j=function(r){return 0===e[r]};var webpackJsonpCallback=function(r,t){var _,n,a=t[0],i=t[1],o=t[2],u=0;if(a.some((function(r){return 0!==e[r]}))){for(_ in i)__webpack_require__.o(i,_)&&(__webpack_require__.m[_]=i[_]);if(o)var c=o(__webpack_require__)}for(r&&r(t);u<a.length;u++)n=a[u],__webpack_require__.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return __webpack_require__.O(c)},r=wx.webpackJsonp=wx.webpackJsonp||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))}()}();
|
||||||
2
dist/vendors.js
vendored
2
dist/vendors.js
vendored
File diff suppressed because one or more lines are too long
22
dist/vendors.js.LICENSE.txt
vendored
22
dist/vendors.js.LICENSE.txt
vendored
@@ -62,6 +62,8 @@
|
|||||||
|
|
||||||
/*! ./arrayWithHoles.js */
|
/*! ./arrayWithHoles.js */
|
||||||
|
|
||||||
|
/*! ./arrayWithoutHoles.js */
|
||||||
|
|
||||||
/*! ./bem */
|
/*! ./bem */
|
||||||
|
|
||||||
/*! ./cjs/react-is.development.js */
|
/*! ./cjs/react-is.development.js */
|
||||||
@@ -78,6 +80,8 @@
|
|||||||
|
|
||||||
/*! ./formstore */
|
/*! ./formstore */
|
||||||
|
|
||||||
|
/*! ./iterableToArray.js */
|
||||||
|
|
||||||
/*! ./iterableToArrayLimit.js */
|
/*! ./iterableToArrayLimit.js */
|
||||||
|
|
||||||
/*! ./label */
|
/*! ./label */
|
||||||
@@ -92,6 +96,8 @@
|
|||||||
|
|
||||||
/*! ./nonIterableRest.js */
|
/*! ./nonIterableRest.js */
|
||||||
|
|
||||||
|
/*! ./nonIterableSpread.js */
|
||||||
|
|
||||||
/*! ./object */
|
/*! ./object */
|
||||||
|
|
||||||
/*! ./objectWithoutPropertiesLoose.js */
|
/*! ./objectWithoutPropertiesLoose.js */
|
||||||
@@ -420,6 +426,10 @@
|
|||||||
!*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
|
!*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
|
||||||
\*******************************************************************/
|
\*******************************************************************/
|
||||||
|
|
||||||
|
/*!********************************************************************!*\
|
||||||
|
!*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
|
||||||
|
\********************************************************************/
|
||||||
|
|
||||||
/*!********************************************************************!*\
|
/*!********************************************************************!*\
|
||||||
!*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
|
!*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
|
||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
@@ -436,6 +446,18 @@
|
|||||||
!*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
|
!*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
|
||||||
\*********************************************************************/
|
\*********************************************************************/
|
||||||
|
|
||||||
|
/*!**********************************************************************!*\
|
||||||
|
!*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***!
|
||||||
|
\**********************************************************************/
|
||||||
|
|
||||||
|
/*!**********************************************************************!*\
|
||||||
|
!*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***!
|
||||||
|
\**********************************************************************/
|
||||||
|
|
||||||
|
/*!**********************************************************************!*\
|
||||||
|
!*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
|
||||||
|
\**********************************************************************/
|
||||||
|
|
||||||
/*!**********************************************************************!*\
|
/*!**********************************************************************!*\
|
||||||
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
|
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
|
||||||
\**********************************************************************/
|
\**********************************************************************/
|
||||||
|
|||||||
@@ -30,6 +30,20 @@
|
|||||||
"query": "id=807e0f55637b15a200aa1c4a2970189e",
|
"query": "id=807e0f55637b15a200aa1c4a2970189e",
|
||||||
"launchMode": "default",
|
"launchMode": "default",
|
||||||
"scene": null
|
"scene": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "打卡",
|
||||||
|
"pathName": "pages/home/components/CheckIn/index",
|
||||||
|
"query": "fileID=http%3A%2F%2Ftmp%2F8X3J8R5FfJma6891872b4a0e24b61c323769b8a8addb.png",
|
||||||
|
"launchMode": "default",
|
||||||
|
"scene": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "打卡记录",
|
||||||
|
"pathName": "pages/my/components/CheckinDetail/index",
|
||||||
|
"query": "",
|
||||||
|
"launchMode": "default",
|
||||||
|
"scene": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ export default {
|
|||||||
"pages/my/index",
|
"pages/my/index",
|
||||||
"pages/my/components/Version/index",
|
"pages/my/components/Version/index",
|
||||||
"pages/my/components/AbountUs/index",
|
"pages/my/components/AbountUs/index",
|
||||||
|
"pages/my/components/CheckinDetail/index", //打卡详情
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
permission: {
|
permission: {
|
||||||
|
|||||||
@@ -17,12 +17,15 @@ import { getCurrentInstance } from "@tarojs/taro";
|
|||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
import "./index.scss";
|
import "./index.scss";
|
||||||
import { Uploader } from "@antmjs/vantui";
|
import { Uploader } from "@antmjs/vantui";
|
||||||
|
import { getparams, getTable, updateTableid } from "../../../../utils/index";
|
||||||
|
|
||||||
const CheckIn = () => {
|
const CheckIn = () => {
|
||||||
const formIt = Form.useForm();
|
const formIt = Form.useForm();
|
||||||
const [bottomheight, setbottomheight] = useState(0);
|
const [bottomheight, setbottomheight] = useState(0);
|
||||||
const [cloudfileID, setcloudfileID] = useState();
|
const [cloudfileID, setcloudfileID] = useState();
|
||||||
|
const [address, setaddress] = useState(); //地址
|
||||||
|
const [openid, setopenid] = useState();
|
||||||
|
const [fileID, setfileID] = useState("");
|
||||||
const [value, setValue] = useState([
|
const [value, setValue] = useState([
|
||||||
// {
|
// {
|
||||||
// url: "https://img.yzcdn.cn/vant/leaf.jpg",
|
// url: "https://img.yzcdn.cn/vant/leaf.jpg",
|
||||||
@@ -64,14 +67,22 @@ const CheckIn = () => {
|
|||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
let $instance: any = getCurrentInstance();
|
|
||||||
const { fileID } = $instance?.router?.params;
|
|
||||||
console.log("fileID---", fileID);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if ($instance?.router?.params?.fileID) {
|
let $instance: any = getCurrentInstance();
|
||||||
|
let fileID: any = $instance?.router?.params?.fileID;
|
||||||
|
if (fileID) {
|
||||||
|
setfileID(fileID)
|
||||||
uploadTaro([fileID]);
|
uploadTaro([fileID]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Taro.cloud.callFunction({
|
||||||
|
name: "getOpenid",
|
||||||
|
complete: async (res: any) => {
|
||||||
|
// console.log("callFunction test result: ", res);
|
||||||
|
let openid = res?.result?.event?.userInfo?.openId;
|
||||||
|
setopenid(openid);
|
||||||
|
},
|
||||||
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const uploadTaro = (tempFilePaths: any) => {
|
const uploadTaro = (tempFilePaths: any) => {
|
||||||
@@ -128,53 +139,86 @@ const CheckIn = () => {
|
|||||||
value=""
|
value=""
|
||||||
icon="location"
|
icon="location"
|
||||||
isLink
|
isLink
|
||||||
|
onClick={() => {
|
||||||
|
Taro.chooseLocation({
|
||||||
|
success: (res: any) => {
|
||||||
|
console.log("res", res);
|
||||||
|
const { address } = res;
|
||||||
|
setaddress(res?.address);
|
||||||
|
// setaddress(res?.name)
|
||||||
|
|
||||||
|
// address: "广东省深圳市宝安区创业一路1号"
|
||||||
|
// errMsg: "chooseLocation:ok"
|
||||||
|
// latitude: 22.55329 //纬度
|
||||||
|
// longitude: 113.88308 //经度
|
||||||
|
// name: "宝安区创业一路(深圳市宝安区人民政府)"
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
renderTitle={
|
renderTitle={
|
||||||
<View>
|
<View>
|
||||||
<View className="title">深圳梧桐山</View>
|
<View className="address">{address}</View>
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* 文件上传 */}
|
|
||||||
{/* <Uploader
|
|
||||||
fileList={value}
|
|
||||||
onAfterRead={afterRead}
|
|
||||||
onDelete={deleteAction}
|
|
||||||
deletable
|
|
||||||
maxCount={1}
|
|
||||||
/> */}
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
bottom: `${bottomheight ?? 0}px`,
|
bottom: `${bottomheight ?? 0}px`,
|
||||||
position: "fixed",
|
position: "fixed",
|
||||||
width: "95%",
|
width: "95%",
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={async () => {
|
||||||
// formIt?.submit()
|
// formIt?.submit()
|
||||||
formIt?.validateFields((errorMessage: any, fieldValues: any) => {
|
formIt?.validateFields((errorMessage: any, fieldValues: any) => {
|
||||||
console.log("fieldValues---", fieldValues);
|
console.log("fieldValues---", fieldValues);
|
||||||
|
|
||||||
// 提交打卡记录
|
// 提交打卡记录
|
||||||
|
|
||||||
let postData = {
|
let postData = {
|
||||||
imagePath: cloudfileID,
|
tableName: "userInfo",
|
||||||
|
keyValue: { openId: openid },
|
||||||
|
okFun: (res: any) => {
|
||||||
|
console.log("提交打卡,res", res);
|
||||||
|
|
||||||
|
let newobj = {
|
||||||
|
tableName: "userInfo",
|
||||||
|
id: res?.data?.[0]?._id,
|
||||||
|
objData: {
|
||||||
|
checkInArr: [
|
||||||
|
...(res?.data?.[0]?.checkInArr ?? []),
|
||||||
|
{
|
||||||
|
imageUrl: cloudfileID,
|
||||||
remark: fieldValues?.remark,
|
remark: fieldValues?.remark,
|
||||||
};
|
location: address,
|
||||||
// xxxsubmit()
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
okFun: (okFunres: any) => {
|
||||||
|
console.log("提交打卡,res", okFunres);
|
||||||
Toast.success({
|
Toast.success({
|
||||||
message: "打卡成功",
|
message: "打卡成功",
|
||||||
selector: "#vanToast-demo2",
|
selector: "#vanToast-demo2",
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
});
|
onClose: () => {
|
||||||
|
// 跳转到打卡页面
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
// 返回首页 [上一页]
|
// 返回首页 [上一页]
|
||||||
Taro.navigateBack({
|
Taro.navigateBack({
|
||||||
// url: "/pages/home/index",
|
// url: "/pages/home/index",
|
||||||
delta: 1,
|
delta: 1,
|
||||||
});
|
});
|
||||||
}, 2000);
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
updateTableid({ ...newobj });
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查询openid
|
||||||
|
getTable({ ...postData });
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { NoticeBar } from "@antmjs/vantui";
|
|||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
import { Tabbar, TabbarItem } from "@antmjs/vantui";
|
import { Tabbar, TabbarItem } from "@antmjs/vantui";
|
||||||
import TabbarCom from "../components/TabbarCom";
|
import TabbarCom from "../components/TabbarCom";
|
||||||
import { getTable, getTableid } from "../../utils/index";
|
import { getTable, getTableid, phoneLogin } from "../../utils/index";
|
||||||
import { Icon } from "@antmjs/vantui";
|
import { Icon } from "@antmjs/vantui";
|
||||||
import "./index.scss";
|
import "./index.scss";
|
||||||
import { Search } from "@antmjs/vantui";
|
import { Search } from "@antmjs/vantui";
|
||||||
@@ -39,6 +39,8 @@ const Home = () => {
|
|||||||
// 系统配置
|
// 系统配置
|
||||||
const [systemConfig, setsystemConfig] = useState<any>({});
|
const [systemConfig, setsystemConfig] = useState<any>({});
|
||||||
|
|
||||||
|
// const [openid,setopenid]=useState()
|
||||||
|
|
||||||
const onChange = (e) => {};
|
const onChange = (e) => {};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -56,11 +58,11 @@ const Home = () => {
|
|||||||
success() {},
|
success() {},
|
||||||
});
|
});
|
||||||
|
|
||||||
getdetails(); //获取活动详情
|
|
||||||
getsystemConfig(); //获取系统配置
|
getsystemConfig(); //获取系统配置
|
||||||
|
getdetails(); //获取活动详情
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getdetails = () => {
|
const getdetails = async () => {
|
||||||
let objParams = {
|
let objParams = {
|
||||||
tableName: "details",
|
tableName: "details",
|
||||||
// id: "80516fb66370bcf300b8f43c5f4dd52b",
|
// id: "80516fb66370bcf300b8f43c5f4dd52b",
|
||||||
@@ -69,10 +71,10 @@ const Home = () => {
|
|||||||
setdetails(res?.data ?? []);
|
setdetails(res?.data ?? []);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
getTable(objParams);
|
await getTable(objParams);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getsystemConfig = () => {
|
const getsystemConfig = async () => {
|
||||||
let objParams = {
|
let objParams = {
|
||||||
tableName: "systemConfig",
|
tableName: "systemConfig",
|
||||||
// id: "80516fb66370bcf300b8f43c5f4dd52b",
|
// id: "80516fb66370bcf300b8f43c5f4dd52b",
|
||||||
@@ -81,7 +83,7 @@ const Home = () => {
|
|||||||
setsystemConfig(res?.data ?? []);
|
setsystemConfig(res?.data ?? []);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
getTable(objParams);
|
await getTable(objParams);
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploadTaro = (tempFilePaths: any) => {
|
const uploadTaro = (tempFilePaths: any) => {
|
||||||
@@ -263,9 +265,18 @@ const Home = () => {
|
|||||||
icon="star"
|
icon="star"
|
||||||
text="打卡"
|
text="打卡"
|
||||||
className="iconStyle"
|
className="iconStyle"
|
||||||
onClick={() => {
|
onClick={async() => {
|
||||||
// getLocation();
|
// getLocation();
|
||||||
|
let isin: any =await phoneLogin();
|
||||||
|
console.log('isin',isin)
|
||||||
|
if (isin) {
|
||||||
chooseImage();
|
chooseImage();
|
||||||
|
} else {
|
||||||
|
Toast.fail({
|
||||||
|
message: "请先登录",
|
||||||
|
selector: "#vanToast-demo2",
|
||||||
|
});
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<GridItem
|
<GridItem
|
||||||
@@ -350,7 +361,6 @@ const Home = () => {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
|
||||||
{/* 直播live专区 */}
|
{/* 直播live专区 */}
|
||||||
{/* <View>视频号直播</View> */}
|
{/* <View>视频号直播</View> */}
|
||||||
|
|
||||||
|
|||||||
10
src/pages/my/components/CheckinDetail/index.scss
Normal file
10
src/pages/my/components/CheckinDetail/index.scss
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
.CheckinDetail{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 20px;
|
||||||
|
.checkCom{
|
||||||
|
margin-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
65
src/pages/my/components/CheckinDetail/index.tsx
Normal file
65
src/pages/my/components/CheckinDetail/index.tsx
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
import { View } from "@tarojs/components";
|
||||||
|
import react, { useEffect, useState } from "react";
|
||||||
|
import { Image } from "@antmjs/vantui";
|
||||||
|
|
||||||
|
import "./index.scss";
|
||||||
|
import Taro from "@tarojs/taro";
|
||||||
|
import { getTable } from "../../../../utils/index";
|
||||||
|
|
||||||
|
const CheckinDetail = () => {
|
||||||
|
const [checkArr, setcheckArr] = useState([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// 设置标题
|
||||||
|
definePageConfig({
|
||||||
|
navigationBarTitleText: "打卡记录",
|
||||||
|
});
|
||||||
|
getcheckArr();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const getcheckArr = () => {
|
||||||
|
Taro.cloud.callFunction({
|
||||||
|
name: "getOpenid",
|
||||||
|
complete: async (res: any) => {
|
||||||
|
let openid: any = res?.result?.event?.userInfo?.openId;
|
||||||
|
let postData = {
|
||||||
|
tableName: "userInfo",
|
||||||
|
keyValue: {
|
||||||
|
openId: openid,
|
||||||
|
},
|
||||||
|
okFun: (res: any) => {
|
||||||
|
console.log('res',res)
|
||||||
|
let _id = res?.data?._id;
|
||||||
|
setcheckArr(res?.data?.[0]?.checkInArr ?? []);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
getTable({...postData})
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const checkCom = () => {
|
||||||
|
return checkArr.map((item: any) => {
|
||||||
|
return (
|
||||||
|
<View className="checkCom">
|
||||||
|
<View>{item?.remark}</View>
|
||||||
|
<View>
|
||||||
|
<Image
|
||||||
|
width="100%"
|
||||||
|
height="150px"
|
||||||
|
fit="cover"
|
||||||
|
src={item.imageUrl}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
{/* 打卡日期 */}
|
||||||
|
<View>{item?.checkTime}</View>
|
||||||
|
{location&& <View>{item?.location}</View>}
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return <View className="CheckinDetail">{checkCom()}</View>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CheckinDetail;
|
||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
Row,
|
Row,
|
||||||
Tabbar,
|
Tabbar,
|
||||||
TabbarItem,
|
TabbarItem,
|
||||||
|
Toast,
|
||||||
} from "@antmjs/vantui";
|
} from "@antmjs/vantui";
|
||||||
import { OpenData, View } from "@tarojs/components";
|
import { OpenData, View } from "@tarojs/components";
|
||||||
import react, { useEffect, useState } from "react";
|
import react, { useEffect, useState } from "react";
|
||||||
@@ -201,7 +202,24 @@ const my = (props: any) => {
|
|||||||
</View> */}
|
</View> */}
|
||||||
|
|
||||||
<View className="cellArr">
|
<View className="cellArr">
|
||||||
<Cell icon="manager" title="打卡记录" isLink />
|
<Cell
|
||||||
|
icon="manager"
|
||||||
|
title="打卡记录"
|
||||||
|
isLink
|
||||||
|
onClick={() => {
|
||||||
|
if (isin) {
|
||||||
|
// 跳转到目的页面,打开新页面
|
||||||
|
Taro.navigateTo({
|
||||||
|
url: "/pages/my/components/CheckinDetail/index",
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
Toast.fail({
|
||||||
|
message: '请先登录',
|
||||||
|
selector: '#vanToast-demo2',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
{/* <Cell icon="manager" title="个人资料" isLink /> */}
|
{/* <Cell icon="manager" title="个人资料" isLink /> */}
|
||||||
|
|
||||||
<Cell
|
<Cell
|
||||||
@@ -243,6 +261,8 @@ const my = (props: any) => {
|
|||||||
/> */}
|
/> */}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
<Toast id="vanToast-demo2" />
|
||||||
|
|
||||||
{/* tabbar */}
|
{/* tabbar */}
|
||||||
<TabbarCom active={2} />
|
<TabbarCom active={2} />
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -16,9 +16,10 @@ interface Typeint {
|
|||||||
okFun: any;
|
okFun: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
const params = () => {
|
// 获取params参数
|
||||||
|
export const getparams = () => {
|
||||||
let $instance: any = getCurrentInstance();
|
let $instance: any = getCurrentInstance();
|
||||||
return $instance.router.params;
|
return $instance?.router?.params;
|
||||||
};
|
};
|
||||||
// 添加数据
|
// 添加数据
|
||||||
export const addTable: any = ({ env, tableName, objData, okFun }: Typeint) => {
|
export const addTable: any = ({ env, tableName, objData, okFun }: Typeint) => {
|
||||||
@@ -37,19 +38,28 @@ export const addTable: any = ({ env, tableName, objData, okFun }: Typeint) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取指定集合数据表
|
// 获取指定集合数据表 (keyValue指定条件)
|
||||||
export const getTable: any = ({ env, tableName, keyValue, okFun }: Typeint) => {
|
export const getTable: any = ({ env, tableName, keyValue={}, okFun }: Typeint) => {
|
||||||
// 数据库环境
|
// 数据库环境
|
||||||
const db: any = Taro.cloud.database({
|
const db: any = Taro.cloud.database({
|
||||||
env: env,
|
env: env,
|
||||||
});
|
});
|
||||||
|
|
||||||
let nowtable: any = db?.collection(tableName);
|
let nowtable: any = db?.collection(tableName);
|
||||||
nowtable?.where({ ...(keyValue ?? {}) }).get({
|
if(Object.keys(keyValue)?.length>0){
|
||||||
|
nowtable?.where(keyValue).get({
|
||||||
success: (res: any) => {
|
success: (res: any) => {
|
||||||
okFun(res);
|
okFun(res);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
nowtable?.get({
|
||||||
|
success: (res: any) => {
|
||||||
|
okFun(res);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取指定id数据数据
|
// 获取指定id数据数据
|
||||||
@@ -57,7 +67,7 @@ export const getTableid: any = ({
|
|||||||
env,
|
env,
|
||||||
tableName,
|
tableName,
|
||||||
id,
|
id,
|
||||||
keyValue,
|
keyValue={},
|
||||||
okFun,
|
okFun,
|
||||||
}: Typeint) => {
|
}: Typeint) => {
|
||||||
// 数据库环境
|
// 数据库环境
|
||||||
@@ -66,14 +76,25 @@ export const getTableid: any = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
let nowtable: any = db?.collection(tableName);
|
let nowtable: any = db?.collection(tableName);
|
||||||
|
|
||||||
|
if(Object.keys(keyValue)?.length>0){
|
||||||
nowtable
|
nowtable
|
||||||
?.doc(id)
|
?.doc(id)
|
||||||
// .where({ ...(keyValue ?? {}) })
|
.where(keyValue)
|
||||||
.get({
|
.get({
|
||||||
success: (res: any) => {
|
success: (res: any) => {
|
||||||
okFun(res);
|
okFun(res);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
nowtable
|
||||||
|
?.doc(id)?.get({
|
||||||
|
success: (res: any) => {
|
||||||
|
okFun(res);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 更新数据
|
// 更新数据
|
||||||
|
|||||||
Reference in New Issue
Block a user