first commit

This commit is contained in:
2026-09-08 20:28:54 +08:00
commit 2ada8d3d5a
37380 changed files with 4886169 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
(global["webpackChunkfitness_walk_nwnu"]=global["webpackChunkfitness_walk_nwnu"]||[]).push([["pages/my/gift"],{1708:function(e,t,n){"use strict";n(923);var i={uSticky:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-sticky/u-sticky")]).then(n.bind(n,4431))},uTabs:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-tabs/u-tabs")]).then(n.bind(n,8304))},uButton:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-button/u-button")]).then(n.bind(n,3619))},uEmpty:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-empty/u-empty")]).then(n.bind(n,594))}},r=function(){var e=this,t=e.$createElement,n=(e._self._c,e.giftList&&e.giftList.length>0),i=n?e.__map(e.giftList,function(t,n){var i=e.__get_orig(t),r=e.$moment(t.grant_time).format("M月DD日 HH:mm"),o=t.use_time?e.$moment(t.use_time).format("M月DD日 HH:mm"):null;return{$orig:i,g1:r,g2:o}}):null,r=e.giftList.length;e.$mp.data=Object.assign({},{$root:{g0:n,l0:i,g3:r}})},o=[],u=n(2775),c=n(575),a=n(6766),s=n.n(a),l=n(9633),f=n(1372)["default"],d=n(1687)["default"];function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){(0,u["default"])(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var g,h=f.cloud.database(),v=h.command,b={name:"gift",props:{},data:function(){return{giftList:[],used:!1}},methods:{appendGiftActivityConfig:function(e){return(0,c["default"])(s().mark(function t(){var n,i,r;return s().wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(n=Array.from(new Set(e.map(function(e){return e.activity_id}).filter(Boolean))),0!==n.length){t.next=1;break}return t.abrupt("return",e);case 1:return t.next=2,h.collection("activity").where({_id:v.in(n)}).field({_id:!0,welfareId:!0}).get();case 2:return i=t.sent,r={},i.data.forEach(function(e){r[e._id]=e}),t.abrupt("return",e.map(function(e){var t=r[e.activity_id]||{},n=t.welfareId||"";return p(p({},e),{},{welfareId:n,redirect:n?encodeURIComponent("/mobile/welfare/list/weApp?projectId="+n+"&weActivityId="+e.activity_id+"&weType=punch"):""})}));case 3:case"end":return t.stop()}},t)}))()},getList:function(){var e=this;d.showLoading({}),f.cloud.callFunction({name:"getGiftVoucherWithActivity",data:{loginname:this.$store.state.user.loginname,used:this.used}}).then(function(t){d.hideLoading(),t.result.error?console.error("查询失败:",t.result.error):(console.log("查询成功,数据:",t.result.list),e.appendGiftActivityConfig(t.result.list||[]).then(function(t){e.giftList=t}).catch(function(n){console.error("补充礼品券活动配置失败:",n),e.giftList=t.result.list||[]}))}).catch(function(e){d.hideLoading(),console.error("调用云函数失败:",e)})},tabChange:function(e){this.used=1===e.index,this.getList()},goGiftVoucher:function(e){var t=this;return(0,c["default"])(s().mark(function n(){var i;return s().wrap(function(n){while(1)switch(n.prev=n.next){case 0:console.log(e),e.welfareId&&e.redirect?(i=(0,l.buildCasLoginUrl)(e.redirect,t.$store.state.user.userid),i?d.navigateTo({url:"/pages/webview/index?link="+encodeURIComponent(i)}):d.showModal({title:"提示",content:"CAS 登录地址生成失败",showCancel:!1})):d.navigateTo({url:"/pages/activityPackage/giftVoucher?id="+e._id+"&masterActivityName="+encodeURIComponent(e.masterActivityName)+"&branchActivityName="+encodeURIComponent(e.branchActivityName)});case 1:case"end":return n.stop()}},n)}))()}},onShow:function(){this.getList()}},w=b,y=n(4453),_=n.n(y),O=(_(),n(8535)),k=(0,O["default"])(w,r,o,!1,null,"3e963efd",null,!1,i,g),P=k.exports,L=n(1372)["default"],j=n(1687)["createPage"];L.__webpack_require_UNI_MP_PLUGIN__=n,j(P)},4453:function(){}},function(e){var t=function(t){return e(e.s=t)};e.O(0,["common/vendor"],function(){return t(1708)});e.O()}]);