diff --git a/dist/app.js b/dist/app.js index 9fcf769..1f3f6f5 100644 --- a/dist/app.js +++ b/dist/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -"use strict";require("./prebundle/vendors-node_modules_taro_weapp_prebundle_antmjs_vantui_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_lodash_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_moment_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_plu-b2bd19.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js.js"),require("./prebundle/remoteEntry.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_run-08648c.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_react-dom_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_taro_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94890.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94891.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94892.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94893.js"),require("./common"),require("./vendors"),require("./taro"),require("./runtime"),(wx.webpackJsonp=wx.webpackJsonp||[]).push([["app"],{"./config.js":function(e,r,t){t.d(r,{envConfig:function(){return n}});var n="citynew-0givkbre03955d8c"},"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts":function(e,r,t){var n=t("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),o=t("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=t("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=t("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),i=t("webpack/container/remote/@tarojs/taro"),d=t.n(i),a=t("webpack/container/remote/react"),p=t("./config.js"),l=function(e){(0,s.default)(App,e);var r=(0,u.default)(App);function App(){return(0,n.default)(this,App),r.apply(this,arguments)}return(0,o.default)(App,[{key:"componentDidMount",value:function componentDidMount(){d().cloud.init({env:p.envConfig,traceUser:!0}),new(d().cloud.Cloud)({resourceEnv:p.envConfig}).init()}},{key:"componentDidShow",value:function componentDidShow(){}},{key:"componentDidHide",value:function componentDidHide(){}},{key:"render",value:function render(){return this.props.children}}]),App}(a.Component);r.default=l},"./src/app.ts":function(e,r,t){t("webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime");var n=t("webpack/container/remote/@tarojs/runtime"),o=t("webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime"),s=t("webpack/container/remote/@tarojs/taro"),u=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts"),i=t("webpack/container/remote/react"),d=t("webpack/container/remote/react-dom"),a=t.n(d),p={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"}};n.window.__taroAppConfig=p;App((0,o.createReactApp)(u.default,i,a(),p));(0,s.initPxTransform)({designWidth:750,deviceRatio:{640:1.17,750:1,828:.905}})},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":function(e,r,t){function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(r,{default:function(){return _assertThisInitialized}})},"./node_modules/@babel/runtime/helpers/esm/createSuper.js":function(e,r,t){t.d(r,{default:function(){return _createSuper}});var n=t("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),o=t("./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"),s=t("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");function _createSuper(e){var r=(0,o.default)();return function _createSuperInternal(){var t,o=(0,n.default)(e);if(r){var u=(0,n.default)(this).constructor;t=Reflect.construct(o,arguments,u)}else t=o.apply(this,arguments);return(0,s.default)(this,t)}}},"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":function(e,r,t){function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}t.d(r,{default:function(){return _getPrototypeOf}})},"./node_modules/@babel/runtime/helpers/esm/inherits.js":function(e,r,t){t.d(r,{default:function(){return _inherits}});var n=t("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&(0,n.default)(e,r)}},"./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":function(e,r,t){function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}t.d(r,{default:function(){return _isNativeReflectConstruct}})},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":function(e,r,t){t.d(r,{default:function(){return _possibleConstructorReturn}});var n=t("./node_modules/@babel/runtime/helpers/esm/typeof.js"),o=t("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function _possibleConstructorReturn(e,r){if(r&&("object"===(0,n.default)(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.default)(e)}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":function(e,r,t){function _setPrototypeOf(e,r){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(e,r){return e.__proto__=r,e},_setPrototypeOf(e,r)}t.d(r,{default:function(){return _setPrototypeOf}})}},function(e){e.O(0,["vendors","common"],(function(){return r="./src/app.ts",e(e.s=r);var r}));e.O()}]); \ No newline at end of file +"use strict";require("./prebundle/vendors-node_modules_taro_weapp_prebundle_antmjs_vantui_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_lodash_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_moment_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_plu-b2bd19.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js.js"),require("./prebundle/remoteEntry.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_run-08648c.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_react-dom_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_taro_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94890.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94891.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94892.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94893.js"),require("./common"),require("./vendors"),require("./taro"),require("./runtime"),(wx.webpackJsonp=wx.webpackJsonp||[]).push([["app"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts":function(e,r,t){var n=t("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),o=t("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=t("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=t("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),i=t("webpack/container/remote/@tarojs/taro"),a=t.n(i),d=t("webpack/container/remote/react"),p=t("./config.js"),l=function(e){(0,s.default)(App,e);var r=(0,u.default)(App);function App(){return(0,n.default)(this,App),r.apply(this,arguments)}return(0,o.default)(App,[{key:"componentDidMount",value:function componentDidMount(){a().cloud.init({env:p.envConfig,traceUser:!0}),new(a().cloud.Cloud)({resourceEnv:p.envConfig}).init()}},{key:"componentDidShow",value:function componentDidShow(){}},{key:"componentDidHide",value:function componentDidHide(){}},{key:"render",value:function render(){return this.props.children}}]),App}(d.Component);r.default=l},"./src/app.ts":function(e,r,t){t("webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime");var n=t("webpack/container/remote/@tarojs/runtime"),o=t("webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime"),s=t("webpack/container/remote/@tarojs/taro"),u=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts"),i=t("webpack/container/remote/react"),a=t("webpack/container/remote/react-dom"),d=t.n(a),p={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"}};n.window.__taroAppConfig=p;App((0,o.createReactApp)(u.default,i,d(),p));(0,s.initPxTransform)({designWidth:750,deviceRatio:{640:1.17,750:1,828:.905}})},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":function(e,r,t){function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(r,{default:function(){return _assertThisInitialized}})},"./node_modules/@babel/runtime/helpers/esm/createSuper.js":function(e,r,t){t.d(r,{default:function(){return _createSuper}});var n=t("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),o=t("./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"),s=t("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");function _createSuper(e){var r=(0,o.default)();return function _createSuperInternal(){var t,o=(0,n.default)(e);if(r){var u=(0,n.default)(this).constructor;t=Reflect.construct(o,arguments,u)}else t=o.apply(this,arguments);return(0,s.default)(this,t)}}},"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":function(e,r,t){function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}t.d(r,{default:function(){return _getPrototypeOf}})},"./node_modules/@babel/runtime/helpers/esm/inherits.js":function(e,r,t){t.d(r,{default:function(){return _inherits}});var n=t("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&(0,n.default)(e,r)}},"./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":function(e,r,t){function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}t.d(r,{default:function(){return _isNativeReflectConstruct}})},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":function(e,r,t){t.d(r,{default:function(){return _possibleConstructorReturn}});var n=t("./node_modules/@babel/runtime/helpers/esm/typeof.js"),o=t("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function _possibleConstructorReturn(e,r){if(r&&("object"===(0,n.default)(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.default)(e)}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":function(e,r,t){function _setPrototypeOf(e,r){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(e,r){return e.__proto__=r,e},_setPrototypeOf(e,r)}t.d(r,{default:function(){return _setPrototypeOf}})}},function(e){e.O(0,["vendors","common"],(function(){return r="./src/app.ts",e(e.s=r);var r}));e.O()}]); \ No newline at end of file diff --git a/dist/app.js.LICENSE.txt b/dist/app.js.LICENSE.txt index 3a8505e..1e19eef 100644 --- a/dist/app.js.LICENSE.txt +++ b/dist/app.js.LICENSE.txt @@ -34,10 +34,6 @@ /*! react-dom */ -/*!*******************!*\ - !*** ./config.js ***! - \*******************/ - /*!********************!*\ !*** ./src/app.ts ***! \********************/ diff --git a/dist/common.js b/dist/common.js index 9b00f27..1010358 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"],{"./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"),s=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=t("webpack/container/remote/react"),u=t("webpack/container/remote/moment"),r=t.n(u),d=t("webpack/container/remote/react/jsx-runtime");n.default=function ActiveCard(e){var n,t=(0,c.useState)({}),u=(0,s.default)(t,2),m=(u[0],u[1],null==e?void 0:e.dataSource),v=m.title,p=m.address,f=m.date,b=m.tagName,h=(m.tagCode,m.Status,m.images);m.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==h||null===(n=h[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:v})]}),(0,d.jsxs)(i.View,{className:"down",children:[(0,d.jsxs)(i.View,{className:"date",children:[(0,d.jsx)(i.View,{className:"",children:p}),(0,d.jsx)(i.View,{className:"",children:r()(f).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"),s=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=t("webpack/container/remote/@tarojs/taro"),c=t.n(i),u=t("webpack/container/remote/react"),r=t.n(u),d=t("webpack/container/remote/react/jsx-runtime");n.default=function TabbarCom(e){var n,t=r().useState(null!==(n=null==e?void 0:e.active)&&void 0!==n?n:0),i=(0,o.default)(t,2),u=i[0],m=i[1];return(0,d.jsx)(s.View,{style:{marginTop:"40px"},children:(0,d.jsxs)(a.default,{active:u,onChange:function onChange(e){console.log("e",e),m(null==e?void 0:e.detail),0===(null==e?void 0:e.detail)&&c().redirectTo({url:"/pages/home/index"}),1===(null==e?void 0:e.detail)&&c().redirectTo({url:"/pages/activityList/index"}),2===(null==e?void 0:e.detail)&&c().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 c},getTableid:function(){return u},updateTableid:function(){return r},phoneLogin:function(){return d}});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"),s=t.n(o),i=function addTable(e){var n=e.env,t=e.tableName,a=e.objData,l=e.okFun,o=s().cloud.database({env:n}),i=null==o?void 0:o.collection(t);null==i||i.add({data:a,success:function success(e){l(e)}})},c=function getTable(e){var n,t=e.env,a=e.tableName,l=e.keyValue,o=void 0===l?{}:l,i=e.okFun,c=s().cloud.database({env:t}),u=null==c?void 0:c.collection(a);(null===(n=Object.keys(o))||void 0===n?void 0:n.length)>0?null==u||u.where(o).get({success:function success(e){i(e)}}):null==u||u.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,c=void 0===i?{}:i,u=e.okFun,r=s().cloud.database({env:a}),d=null==r?void 0:r.collection(l);(null===(n=Object.keys(c))||void 0===n?void 0:n.length)>0?null==d||d.doc(o).where(c).get({success:function success(e){u(e)}}):null==d||null===(t=d.doc(o))||void 0===t||t.get({success:function success(e){u(e)}})},r=function updateTableid(e){var n=e.env,t=e.tableName,a=e.objData,l=e.id,o=e.okFun,i=s().cloud.database({env:n});(null==i?void 0:i.collection(t)).doc(l).update({data:a,success:function success(e){o(e)}})},d=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=s().cloud.database({}).command,u="";s().cloud.callFunction({name:"getOpenid",complete:(t=(0,l.default)((0,a.default)().mark((function _callee3(n){var t,l,s;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===(s=l.userInfo)||void 0===s?void 0:s.openId,console.log("openId--",u),c({tableName:"userInfo",keyValue:{openId:o.eq(u)},okFun:function okFun(n){var t;console.log("res",n);var a,l,o=null!==(t=null==n?void 0:n.data)&&void 0!==t?t:[];if(0!==(null==o?void 0:o.length))return null!=o&&null!==(a=o[0])&&void 0!==a&&null!==(l=a.authInfo)&&void 0!==l&&l.authPhonenum?(e(!0),!0):(e(!1),!1);i({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)}}()}}]); \ 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},envConfig:function(){return o}});var a="people",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"),o=t("./node_modules/@antmjs/vantui/es/image/index.js"),l=t("./node_modules/@antmjs/vantui/es/tag/index.js"),s=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=t("webpack/container/remote/react"),u=t("webpack/container/remote/moment"),r=t.n(u),d=t("webpack/container/remote/react/jsx-runtime");n.default=function ActiveCard(e){var n,t=(0,c.useState)({}),u=(0,s.default)(t,2),m=(u[0],u[1],null==e?void 0:e.dataSource),p=m.title,v=m.address,f=m.date,b=m.tagName,j=(m.tagCode,m.Status,m.images);m.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)(o.default,{width:"100%",height:"100px",fit:"cover",src:null==j||null===(n=j[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)(l.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:v}),(0,d.jsx)(i.View,{className:"",children:r()(f).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"),o=t("./node_modules/@antmjs/vantui/es/tabbar-item/index.js"),l=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),s=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),i=t("webpack/container/remote/@tarojs/taro"),c=t.n(i),u=t("webpack/container/remote/react"),r=t.n(u),d=t("webpack/container/remote/react/jsx-runtime");n.default=function TabbarCom(e){var n,t=r().useState(null!==(n=null==e?void 0:e.active)&&void 0!==n?n:0),i=(0,l.default)(t,2),u=i[0],m=i[1];return(0,d.jsx)(s.View,{style:{marginTop:"40px"},children:(0,d.jsxs)(a.default,{active:u,onChange:function onChange(e){console.log("e",e),m(null==e?void 0:e.detail),0===(null==e?void 0:e.detail)&&c().redirectTo({url:"/pages/home/index"}),1===(null==e?void 0:e.detail)&&c().redirectTo({url:"/pages/activityList/index"}),2===(null==e?void 0:e.detail)&&c().redirectTo({url:"/pages/my/index"})},safeAreaInsetBottom:!0,children:[(0,d.jsx)(o.default,{icon:"home-o",children:"首页"}),(0,d.jsx)(o.default,{icon:"friends-o",children:"活动"}),(0,d.jsx)(o.default,{icon:"setting-o",children:"我的"})]})})}},"./src/utils/index.ts":function(e,n,t){t.d(n,{getTable:function(){return u},getTableid:function(){return r},updateTableid:function(){return d},phoneLogin:function(){return m}});var a=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),o=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),l=t("webpack/container/remote/@tarojs/taro"),s=t.n(l),i=t("./config.js"),c=function addTable(e){var n=e.env,t=e.tableName,a=e.objData,o=e.okFun,l=s().cloud.database({env:n}),i=null==l?void 0:l.collection(t);null==i||i.add({data:a,success:function success(e){o(e)}})},u=function getTable(e){var n,t=e.env,a=e.tableName,o=e.keyValue,l=void 0===o?{}:o,i=e.okFun,c=s().cloud.database({env:t}),u=null==c?void 0:c.collection(a);(null===(n=Object.keys(l))||void 0===n?void 0:n.length)>0?null==u||u.where(l).get({success:function success(e){i(e)}}):null==u||u.get({success:function success(e){i(e)}})},r=function getTableid(e){var n,t,a=e.env,o=e.tableName,l=e.id,i=e.keyValue,c=void 0===i?{}:i,u=e.okFun,r=s().cloud.database({env:a}),d=null==r?void 0:r.collection(o);(null===(n=Object.keys(c))||void 0===n?void 0:n.length)>0?null==d||d.doc(l).where(c).get({success:function success(e){u(e)}}):null==d||null===(t=d.doc(l))||void 0===t||t.get({success:function success(e){u(e)}})},d=function updateTableid(e){var n=e.env,t=e.tableName,a=e.objData,o=e.id,l=e.okFun,i=s().cloud.database({env:n});(null==i?void 0:i.collection(t)).doc(o).update({data:a,success:function success(e){l(e)}})},m=function(){var e=(0,o.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,l=s().cloud.database({}).command,r="";s().cloud.callFunction({name:"getOpenid",complete:(t=(0,o.default)((0,a.default)().mark((function _callee3(n){var t,o,s;return(0,a.default)().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:console.log("callFunction test result: ",n),r=null==n||null===(t=n.result)||void 0===t||null===(o=t.event)||void 0===o||null===(s=o.userInfo)||void 0===s?void 0:s.openId,console.log("openId--",r),u({tableName:"userInfo",keyValue:{openId:l.eq(r)},okFun:function okFun(n){var t;console.log("res",n);var a,o,l=null!==(t=null==n?void 0:n.data)&&void 0!==t?t:[];if(0!==(null==l?void 0:l.length))return null!=l&&null!==(a=l[0])&&void 0!==a&&null!==(o=a.authInfo)&&void 0!==o&&o.authPhonenum||"people"===i.type?(e(!0),!0):(e(!1),!1);c({tableName:"userInfo",objData:{openId:r},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)}}()}}]); \ No newline at end of file diff --git a/dist/common.js.LICENSE.txt b/dist/common.js.LICENSE.txt index 8a7be8a..4a00280 100644 --- a/dist/common.js.LICENSE.txt +++ b/dist/common.js.LICENSE.txt @@ -1,3 +1,5 @@ +/*! ../../config */ + /*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ @@ -24,6 +26,10 @@ /*! react/jsx-runtime */ +/*!*******************!*\ + !*** ./config.js ***! + \*******************/ + /*!****************************!*\ !*** ./src/utils/index.ts ***! \****************************/ diff --git a/src/utils/index.ts b/src/utils/index.ts index e823498..9cde0af 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,6 +1,7 @@ import { Toast } from "@antmjs/vantui"; import Taro from "@tarojs/taro"; import { getCurrentInstance } from "@tarojs/taro"; +import {type} from '../../config' // 数据库环境 // const db: any = Taro.cloud.database({ @@ -211,8 +212,14 @@ export const phoneLogin = async () => { resolve(true) return true; } else { - resolve(false) - return false; + if(type==='people'){ + resolve(true) + return true; + }else{ + resolve(false) + return false; + } + } } },