diff --git a/dist/app.js b/dist/app.js index fda3681..b71bb9d 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_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/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js"),require("./prebundle/remoteEntry.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("./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=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:"cloud1-5g5xrgza12a0dd6d",traceUser:!0}),new(a().cloud.Cloud)({resourceEnv:"cloud1-5g5xrgza12a0dd6d"}).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=p},"./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"],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 +"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"),d=t("webpack/container/remote/@tarojs/taro"),i=t.n(d),a=t("webpack/container/remote/react"),p=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(){i().cloud.init({env:"cloud1-5g5xrgza12a0dd6d",traceUser:!0}),new(i().cloud.Cloud)({resourceEnv:"cloud1-5g5xrgza12a0dd6d"}).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=p},"./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"),d=t("webpack/container/remote/react"),i=t("webpack/container/remote/react-dom"),a=t.n(i),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"],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,d,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 diff --git a/dist/pages/activityList/components/details/index.js b/dist/pages/activityList/components/details/index.js index 603653d..7ca7527 100644 --- a/dist/pages/activityList/components/details/index.js +++ b/dist/pages/activityList/components/details/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/activityList/components/details/index"],{"./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":function(e,t,n){var i=n("./node_modules/@antmjs/vantui/es/button/index.js"),s=n("./node_modules/@antmjs/vantui/es/cell/index.js"),o=n("./node_modules/@antmjs/vantui/es/image/index.js"),a=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),l=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),d=n("webpack/container/remote/@tarojs/taro"),c=n.n(d),r=n("webpack/container/remote/react"),u=n("./src/utils/index.ts"),m=n("webpack/container/remote/react/jsx-runtime");t.default=function details(){var e,t,n,v,x,p,j=(0,r.useState)([]),f=(0,a.default)(j,2),g=f[0],b=f[1],h=(0,r.useState)(0),w=(0,a.default)(h,2),k=w[0],y=w[1],T=(0,d.getCurrentInstance)(),_=(null!==(e=null==T||null===(t=T.router)||void 0===t?void 0:t.params)&&void 0!==e?e:{}).id;return(0,r.useEffect)((function(){}),[]),(0,r.useEffect)((function(){var e,t=c().getSystemInfoSync(),n=t.screenHeight,i=t.safeArea,s=void 0===i?{}:i,o=null!==(e=n-(null==s?void 0:s.bottom))&&void 0!==e?e:0;y(o);var a={tableName:"details",id:_,okFun:function okFun(e){var t;console.log("res",e),b(null!==(t=null==e?void 0:e.data)&&void 0!==t?t:[])}};(0,u.getTableid)(a)}),[]),(0,m.jsxs)(l.View,{className:"detailContent",children:[(0,m.jsxs)(l.View,{children:[(0,m.jsx)(l.View,{children:null==g?void 0:g.title}),(0,m.jsx)(o.default,{width:"100%",height:"180px",fit:"cover",src:null==g||null===(n=g.images)||void 0===n||null===(v=n[0])||void 0===v?void 0:v.url}),(0,m.jsxs)(l.View,{children:[(0,m.jsx)(s.default,{icon:"clock",title:"开始时间 ".concat(null==g?void 0:g.startTime)}),(0,m.jsx)(s.default,{isLink:!0,icon:"location",title:"".concat(null==g?void 0:g.address),linkType:"navigateTo",url:"/pages/dashboard/index"}),(0,m.jsx)(s.default,{icon:"friends",title:"已报名人数 ".concat(null!==(x=null==g||null===(p=g.useridArr)||void 0===p?void 0:p.length)&&void 0!==x?x:0)})]})]}),(0,m.jsx)(l.View,{onClick:function onClick(){},className:"RichText",children:(0,m.jsx)(l.RichText,{nodes:null==g?void 0:g.richText})}),(0,m.jsx)(l.View,{className:"detailBtn",style:{bottom:"".concat(null!=k?k:0,"px")},children:(0,m.jsx)(i.default,{type:"primary",block:!0,children:"立即参加"})})]})}},"./src/pages/activityList/components/details/index.tsx":function(e,t,n){var i=n("webpack/container/remote/@tarojs/runtime"),s=n("./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");Page((0,i.createPageConfig)(s.default,"pages/activityList/components/details/index",{root:{cn:[]}},{navigationBarTitleText:"活动详情"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/activityList/components/details/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file +"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/activityList/components/details/index"],{"./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":function(e,t,n){var l=n("./node_modules/@antmjs/vantui/es/button/index.js"),i=n("./node_modules/@antmjs/vantui/es/toast/index.js"),s=n("./node_modules/@antmjs/vantui/es/cell/index.js"),o=n("./node_modules/@antmjs/vantui/es/image/index.js"),a=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),d=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=n("webpack/container/remote/@tarojs/taro"),u=n.n(c),r=n("webpack/container/remote/react"),v=n("./src/utils/index.ts"),m=n("webpack/container/remote/react/jsx-runtime");t.default=function details(){var e,t,n,x,f,p,j=(0,r.useState)([]),b=(0,a.default)(j,2),g=b[0],h=b[1],k=(0,r.useState)(0),w=(0,a.default)(k,2),y=w[0],T=w[1],_=(0,c.getCurrentInstance)(),C=(null!==(e=null==_||null===(t=_.router)||void 0===t?void 0:t.params)&&void 0!==e?e:{}).id;(0,r.useEffect)((function(){}),[]),(0,r.useEffect)((function(){var e,t=u().getSystemInfoSync(),n=t.screenHeight,l=t.safeArea,i=void 0===l?{}:l,s=null!==(e=n-(null==i?void 0:i.bottom))&&void 0!==e?e:0;T(s);var o={tableName:"details",id:C,okFun:function okFun(e){var t;console.log("res",e),h(null!==(t=null==e?void 0:e.data)&&void 0!==t?t:[])}};(0,v.getTableid)(o)}),[]);return(0,m.jsxs)(d.View,{className:"detailContent",children:[(0,m.jsxs)(d.View,{children:[(0,m.jsx)(d.View,{children:null==g?void 0:g.title}),(0,m.jsx)(o.default,{width:"100%",height:"180px",fit:"cover",src:null==g||null===(n=g.images)||void 0===n||null===(x=n[0])||void 0===x?void 0:x.url}),(0,m.jsxs)(d.View,{children:[(0,m.jsx)(s.default,{icon:"clock",title:"开始时间 ".concat(null==g?void 0:g.startTime)}),(0,m.jsx)(s.default,{icon:"clock",title:"结束时间 ".concat(null==g?void 0:g.endTime)}),(0,m.jsx)(s.default,{isLink:!0,icon:"location",title:"".concat(null==g?void 0:g.address),linkType:"navigateTo",url:"/pages/dashboard/index"}),(0,m.jsx)(s.default,{icon:"friends",title:"已报名人数 ".concat(null!==(f=null==g||null===(p=g.useridArr)||void 0===p?void 0:p.length)&&void 0!==f?f:0)})]})]}),(0,m.jsx)(d.View,{onClick:function onClick(){},className:"RichText",children:(0,m.jsx)(d.RichText,{nodes:null==g?void 0:g.richText})}),(0,m.jsxs)(d.View,{className:"detailBtn",style:{bottom:"".concat(null!=y?y:0,"px")},onClick:function onClick(){u().checkSession({success:function success(e){console.log("res",e)},fail:function fail(e){console.log("err",e),i.default.fail({message:"请先登录",selector:"#vanToast-demo2",duration:2e3,onClose:function onClose(){u().navigateTo({url:"/pages/my/index"})}})}})},children:[(0,m.jsx)(l.default,{type:"primary",block:!0,disabled:!["1"].includes(null==g?void 0:g.Status),children:[{label:"活动待开放",value:"0"},{label:"立即报名",value:"1"},{label:"活动已取消",value:"2"},{label:"活动进行中",value:"3"},{label:"活动已结束",value:"4"},{label:"活动已关闭",value:"5"}].map((function(e){var t=null==g?void 0:g.Status;if((null==e?void 0:e.value)===t)return null==e?void 0:e.label}))}),(0,m.jsx)(i.default,{id:"vanToast-demo2"})]})]})}},"./src/pages/activityList/components/details/index.tsx":function(e,t,n){var l=n("webpack/container/remote/@tarojs/runtime"),i=n("./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");Page((0,l.createPageConfig)(i.default,"pages/activityList/components/details/index",{root:{cn:[]}},{navigationBarTitleText:"活动详情"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return t="./src/pages/activityList/components/details/index.tsx",e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/dist/pages/activityList/components/details/index.js.LICENSE.txt b/dist/pages/activityList/components/details/index.js.LICENSE.txt index 728ed47..1c3de1b 100644 --- a/dist/pages/activityList/components/details/index.js.LICENSE.txt +++ b/dist/pages/activityList/components/details/index.js.LICENSE.txt @@ -10,6 +10,8 @@ /*! @antmjs/vantui/es/image */ +/*! @antmjs/vantui/es/toast */ + /*! @tarojs/components */ /*! @tarojs/runtime */ diff --git a/dist/prebundle/remoteEntry.js b/dist/prebundle/remoteEntry.js index e5e7414..9895041 100644 --- a/dist/prebundle/remoteEntry.js +++ b/dist/prebundle/remoteEntry.js @@ -1,2 +1,2 @@ /*! For license information please see remoteEntry.js.LICENSE.txt */ -"use strict";var taro_app_library;(wx.webpackJsonp=wx.webpackJsonp||[]).push([["taro_app_library"],{"webpack/container/entry/taro_app_library":function(e,n,r){var o={"./react":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js"),r.e("node_modules_taro_weapp_prebundle_react_js")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react.js")}}))},"./@tarojs/taro":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_taro_js")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_taro.js")}}))},"./@antmjs/vantui":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js"),r.e("vendors-node_modules_taro_weapp_prebundle_antmjs_vantui_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-_94890")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@antmjs_vantui.js")}}))},"./moment":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_moment_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-_94891")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/moment.js")}}))},"./react/jsx-runtime":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js"),r.e("node_modules_taro_weapp_prebundle_react_jsx-runtime_js")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react_jsx-runtime.js")}}))},"./@tarojs/runtime":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_run-08648c")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_runtime.js")}}))},"./@tarojs/plugin-framework-react/dist/runtime":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-_94892")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_plugin-framework-react_dist_runtime.js")}}))},"./@tarojs/plugin-platform-weapp/dist/runtime":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_plu-b2bd19")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js")}}))},"./react-dom":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_react-dom_js")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react-dom.js")}}))}},get=function(e,n){return r.R=n,n=r.o(o,e)?o[e]():Promise.resolve().then((function(){throw new Error('Module "'+e+'" does not exist in container.')})),r.R=void 0,n},init=function(e,n){if(r.S){var o="default",t=r.S[o];if(t&&t!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[o]=e,r.I(o,n)}};r.d(n,{get:function(){return get},init:function(){return init}});var t={"./react":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react.js")}},"./@tarojs/taro":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_taro.js")}},"./@antmjs/vantui":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@antmjs_vantui.js")}},"./moment":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/moment.js")}},"./react/jsx-runtime":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react_jsx-runtime.js")}},"./@tarojs/runtime":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_runtime.js")}},"./@tarojs/plugin-framework-react/dist/runtime":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_plugin-framework-react_dist_runtime.js")}},"./@tarojs/plugin-platform-weapp/dist/runtime":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js")}},"./react-dom":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react-dom.js")}}};r.taro((function(e){return t[e]()}))}},function(e){var n,r=(n="webpack/container/entry/taro_app_library",e(e.s=n));taro_app_library=r}]); \ No newline at end of file +"use strict";var taro_app_library;(wx.webpackJsonp=wx.webpackJsonp||[]).push([["taro_app_library"],{"webpack/container/entry/taro_app_library":function(e,n,r){var o={"./react":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js"),r.e("node_modules_taro_weapp_prebundle_react_js")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react.js")}}))},"./@tarojs/taro":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_taro_js")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_taro.js")}}))},"./@antmjs/vantui":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js"),r.e("vendors-node_modules_taro_weapp_prebundle_antmjs_vantui_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-_94890")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@antmjs_vantui.js")}}))},"./lodash":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_lodash_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-_94891")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/lodash.js")}}))},"./moment":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_moment_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-_94892")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/moment.js")}}))},"./react/jsx-runtime":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js"),r.e("node_modules_taro_weapp_prebundle_react_jsx-runtime_js")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react_jsx-runtime.js")}}))},"./@tarojs/runtime":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_run-08648c")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_runtime.js")}}))},"./@tarojs/plugin-framework-react/dist/runtime":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-_94893")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_plugin-framework-react_dist_runtime.js")}}))},"./@tarojs/plugin-platform-weapp/dist/runtime":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_plu-b2bd19")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js")}}))},"./react-dom":function(){return Promise.all([r.e("vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js"),r.e("vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js"),r.e("node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_react-dom_js")]).then((function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react-dom.js")}}))}},get=function(e,n){return r.R=n,n=r.o(o,e)?o[e]():Promise.resolve().then((function(){throw new Error('Module "'+e+'" does not exist in container.')})),r.R=void 0,n},init=function(e,n){if(r.S){var o="default",t=r.S[o];if(t&&t!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[o]=e,r.I(o,n)}};r.d(n,{get:function(){return get},init:function(){return init}});var t={"./react":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react.js")}},"./@tarojs/taro":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_taro.js")}},"./@antmjs/vantui":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@antmjs_vantui.js")}},"./lodash":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/lodash.js")}},"./moment":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/moment.js")}},"./react/jsx-runtime":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react_jsx-runtime.js")}},"./@tarojs/runtime":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_runtime.js")}},"./@tarojs/plugin-framework-react/dist/runtime":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_plugin-framework-react_dist_runtime.js")}},"./@tarojs/plugin-platform-weapp/dist/runtime":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/@tarojs_plugin-platform-weapp_dist_runtime.js")}},"./react-dom":function(){return function(){return r("./node_modules/.taro/weapp/prebundle/react-dom.js")}}};r.taro((function(e){return t[e]()}))}},function(e){var n,r=(n="webpack/container/entry/taro_app_library",e(e.s=n));taro_app_library=r}]); \ No newline at end of file diff --git a/dist/prebundle/remoteEntry.js.LICENSE.txt b/dist/prebundle/remoteEntry.js.LICENSE.txt index 30fde2b..b21e0aa 100644 --- a/dist/prebundle/remoteEntry.js.LICENSE.txt +++ b/dist/prebundle/remoteEntry.js.LICENSE.txt @@ -8,6 +8,8 @@ /*! ./node_modules/.taro/weapp/prebundle/@tarojs_taro.js */ +/*! ./node_modules/.taro/weapp/prebundle/lodash.js */ + /*! ./node_modules/.taro/weapp/prebundle/moment.js */ /*! ./node_modules/.taro/weapp/prebundle/react-dom.js */ diff --git a/src/pages/activityList/components/details/index.tsx b/src/pages/activityList/components/details/index.tsx index a5fe5ba..3fed4fc 100644 --- a/src/pages/activityList/components/details/index.tsx +++ b/src/pages/activityList/components/details/index.tsx @@ -1,10 +1,16 @@ -import { Button, Cell } from "@antmjs/vantui"; +import { Button, Cell, Toast } from "@antmjs/vantui"; import { RichText, View } from "@tarojs/components"; import Taro, { getCurrentInstance } from "@tarojs/taro"; import react, { useEffect, useState } from "react"; -import { getTable, getTableid } from "../../../../utils/index"; +import { + addTable, + getTable, + getTableid, + updateTableid, +} from "../../../../utils/index"; import "./index.scss"; import { Image } from "@antmjs/vantui"; +import _ from "lodash"; const details = () => { const [dataSource, setdataSource] = useState([]); @@ -39,6 +45,33 @@ const details = () => { // console.log('SafeAreaResult',Taro.getSystemInfoSync()) + const btnStatus = [ + { + label: "活动待开放", + value: "0", + }, + { + label: "立即报名", //开放中 + value: "1", + }, + { + label: "活动已取消", + value: "2", + }, + { + label: "活动进行中", + value: "3", + }, + { + label: "活动已结束", + value: "4", + }, + { + label: "活动已关闭", + value: "5", + }, + ]; + return ( @@ -58,6 +91,13 @@ const details = () => { // linkType="navigateTo" // url="/pages/dashboard/index" /> + { { { + // 检查登录态,获取openid + Taro.checkSession({ + success: function (res: any) { + //session_key 未过期,并且在本生命周期一直有效 + console.log("res", res); + // 获取用户openid + }, + fail: function (err: any) { + console.log("err", err); + // session_key 已经失效,需要重新执行登录流程 + //重新登录- 跳转到我的页面 + Toast.fail({ + message: '请先登录', + selector: '#vanToast-demo2', + duration:2000, + onClose: () => { + // 跳转到目的页面,打开新页面 + Taro.navigateTo({ + url: "/pages/my/index", + }); + }, + }) + + + // Taro.login({ + // success:(res:any)=>{ + // console.log('sures--',res) + // // 获取code,获取用户的openid + // },fail:(err:any)=>{ + // console.log("err",err) + // } + // }) + }, + }); + + // console.log('id',id) + // // 立即报名 + // let postData={ + // // env: "any", + // id:id, + // tableName: "details", + // objData: { + // // ..._.cloneDeep(dataSource), + // useridArr:['openid'] + // }, + // okFun: (res:any)=>{ + // console.log('res',res) + + // } + // } + + // console.log('postData',postData) + // updateTableid({...postData}) + }} > {/* style={{width:'375px'}} */} - + ); diff --git a/src/utils/index.ts b/src/utils/index.ts index a2d058a..4f6b31b 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -36,6 +36,7 @@ export const addTable: any = ({ env,tableName, objData, okFun }: Typeint) => { }); }; + // 获取指定集合数据表 export const getTable: any = ({ env,tableName, okFun }: Typeint) => { // 数据库环境 @@ -77,6 +78,7 @@ export const updateTableid: any = ({ env,tableName,objData, id, okFun }: Typeint }); let nowtable: any = db?.collection(tableName); nowtable.doc(id).update({ + // nowtable.doc(id).set({ // data 传入需要局部更新的数据 data: objData, success: (res: any) => {