1 line
8.5 KiB
JavaScript
1 line
8.5 KiB
JavaScript
(self["webpackChunkfitness_walk_nwnu"]=self["webpackChunkfitness_walk_nwnu"]||[]).push([[347],{3719:function(e,t,i){"use strict";i.r(t);var a=i(31601),n=i.n(a),s=i(76314),o=i.n(s),c=o()(n());c.push([e.id,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-18144b1e] .u-tabs__wrapper__nav .u-tabs__wrapper__nav__item{flex:1!important}.item-list[data-v-18144b1e]{width:100%;padding:%?20?% %?40?%;position:relative;box-sizing:border-box}.item-space[data-v-18144b1e]{width:100%;background-color:#f5f5f5;border-radius:%?20?%;overflow:hidden;margin-bottom:%?20?%}.item-space .item-space-top[data-v-18144b1e]{display:flex;box-sizing:border-box;width:100%;padding:%?40?%;justify-content:space-between;align-items:center;background-color:#fff}.item-space .item-space-top .item-space-top-left[data-v-18144b1e]{display:flex;align-items:center;width:100%}.item-space .item-space-top .item-space-top-left .item-space-top-left-desc[data-v-18144b1e]{width:calc(100% - %?102?%);padding-left:%?30?%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-space .item-space-top .item-space-top-left .item-space-top-left-desc .item-space-top-left-name[data-v-18144b1e]{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-space .item-space-top .item-space-top-left .item-space-top-left-desc .item-space-top-left-time[data-v-18144b1e]{margin-top:5px;display:flex;-webkit-column-gap:%?15?%;column-gap:%?15?%}.item-space .item-space-top .item-space-top-left .item-space-top-left-desc .item-space-top-left-time .tag[data-v-18144b1e]{background-color:#ff6464;position:relative;display:inline-flex;align-items:center;padding:0 4px;color:#fff;font-size:12px;line-height:16px;border-radius:2px}.item-space .dashed[data-v-18144b1e]{padding:0 20px;position:relative;box-sizing:border-box;background-color:#fff}.item-space .dashed .dashed-left-round[data-v-18144b1e]{left:-.5rem}.item-space .dashed .dashed-right-round[data-v-18144b1e]{right:-.5rem}.item-space .dashed .dashed-left-round[data-v-18144b1e], .item-space .dashed .dashed-right-round[data-v-18144b1e]{position:absolute;width:1rem;height:1rem;top:-.5rem;border-radius:.5rem;background-color:#f5f5f5}.item-space .dashed .dashed-view[data-v-18144b1e]{width:100%;height:1px;background-image:linear-gradient(90deg,#ccc 0,#ccc 50%,transparent 0);background-size:8px 1px;background-repeat:repeat-x}.item-space .item-space-bottom[data-v-18144b1e]{display:flex;box-sizing:border-box;width:100%;padding:20px;justify-content:space-between;align-items:center;background-color:#fff}.item-space .item-space-bottom .item-space-bottom-left[data-v-18144b1e]{color:#969696;font-size:.8rem}',""]),t["default"]=c},25051:function(e,t,i){var a=i(3719);a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.id,a,""]]),a.locals&&(e.exports=a.locals);var n=i(69333).A;n("cf07595e",a,!0,{sourceMap:!1,shadowMode:!1})},51516:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return g}});var a,n={uSticky:i(44097).A,uTabs:i(11057).A,uButton:i(81478).A,uEmpty:i(32671).A},s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",[i("u-sticky",{attrs:{bgColor:"#fff"}},[i("u-tabs",{attrs:{list:[{name:"未使用"},{name:"已使用"}],lineWidth:"30",lineColor:"#081776",itemStyle:"padding-left: 15px; padding-right: 15px; height: 46px;"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.tabChange.apply(void 0,arguments)}}})],1),e.giftList&&e.giftList.length>0?i("v-uni-view",e._l(e.giftList,function(t){return i("v-uni-view",{staticClass:"item-list"},[i("v-uni-view",{key:t.id,staticClass:"item-space"},[i("v-uni-view",{staticClass:"item-space-top"},[i("v-uni-view",{staticClass:"item-space-top-left"},[i("v-uni-image",{staticStyle:{width:"102rpx",height:"102rpx"},attrs:{src:"/static/images/gift/gift1.svg"}}),i("v-uni-view",{staticClass:"item-space-top-left-desc"},[i("v-uni-view",{staticClass:"item-space-top-left-name"},[e._v(e._s(t.masterActivityName))]),i("v-uni-view",{staticClass:"item-space-top-left-time"},[i("v-uni-view",{staticClass:"tag"},[e._v(e._s(e.$moment(t.grant_time).format("M月DD日 HH:mm"))+" 获取")]),t.use_time?i("v-uni-view",{staticClass:"tag"},[e._v(e._s(e.$moment(t.use_time).format("M月DD日 HH:mm"))+" 使用")]):e._e()],1)],1)],1)],1),i("v-uni-view",{staticClass:"dashed"},[i("v-uni-view",{staticClass:"dashed-left-round"}),i("v-uni-view",{staticClass:"dashed-view"}),i("v-uni-view",{staticClass:"dashed-right-round"})],1),i("v-uni-view",{staticClass:"item-space-bottom"},[i("v-uni-view",{staticClass:"item-space-bottom-left"},[e._v(e._s(t.gift_name||""))]),i("v-uni-view",{staticClass:"item-space-bottom-right"},[i("u-button",{attrs:{size:"small",color:"#ff4646",shape:"circle",disabled:t.used,text:t.used?"已使用":"去使用"},on:{click:function(i){arguments[0]=i=e.$handleEvent(i),e.goGiftVoucher(t)}}})],1)],1)],1)],1)}),1):e._e(),0===e.giftList.length?i("u-empty",{attrs:{mode:"data",marginTop:"200",text:"暂无数据"}}):e._e()],1)},o=[],c=i(95223),r=i(84673),d=i(50575),p=(i(2008),i(23418),i(62062),i(18111),i(22489),i(7588),i(61701),i(26099),i(31415),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(47764),i(23500),i(62953),i(79633)),l=wx.cloud.database(),u=l.command,f={name:"gift",props:{},data:function(){return{giftList:[],used:!1}},methods:{appendGiftActivityConfig:function(e){return(0,d.A)((0,c.A)().m(function t(){var i,a,n;return(0,c.A)().w(function(t){while(1)switch(t.n){case 0:if(i=Array.from(new Set(e.map(function(e){return e.activity_id}).filter(Boolean))),0!==i.length){t.n=1;break}return t.a(2,e);case 1:return t.n=2,l.collection("activity").where({_id:u.in(i)}).field({_id:!0,welfareId:!0}).get();case 2:return a=t.v,n={},a.data.forEach(function(e){n[e._id]=e}),t.a(2,e.map(function(e){var t=n[e.activity_id]||{},i=t.welfareId||"";return(0,r.A)((0,r.A)({},e),{},{welfareId:i,redirect:i?encodeURIComponent("/mobile/welfare/list/weApp?projectId="+i+"&weActivityId="+e.activity_id+"&weType=punch"):""})}))}},t)}))()},getList:function(){var e=this;uni.showLoading({}),wx.cloud.callFunction({name:"getGiftVoucherWithActivity",data:{loginname:this.$store.state.user.loginname,used:this.used}}).then(function(t){uni.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(i){console.error("补充礼品券活动配置失败:",i),e.giftList=t.result.list||[]}))}).catch(function(e){uni.hideLoading(),console.error("调用云函数失败:",e)})},tabChange:function(e){this.used=1===e.index,this.getList()},goGiftVoucher:function(e){var t=this;return(0,d.A)((0,c.A)().m(function i(){var a;return(0,c.A)().w(function(i){while(1)switch(i.n){case 0:console.log(e),e.welfareId&&e.redirect?(a=(0,p.i)(e.redirect,t.$store.state.user.userid),a?uni.navigateTo({url:"/pages/webview/index?link="+encodeURIComponent(a)}):uni.showModal({title:"提示",content:"CAS 登录地址生成失败",showCancel:!1})):uni.navigateTo({url:"/pages/activityPackage/giftVoucher?id="+e._id+"&masterActivityName="+encodeURIComponent(e.masterActivityName)+"&branchActivityName="+encodeURIComponent(e.branchActivityName)});case 1:return i.a(2)}},i)}))()}},onShow:function(){this.getList()}},m=f,v=(i(25051),i(18535)),h=(0,v.A)(m,s,o,!1,null,"18144b1e",null,!1,n,a),g=h.exports},79633:function(e,t,i){"use strict";i.d(t,{i:function(){return a}});i(44114);var a=function(e,t){var i="https://zhihuigonghui.com.cn//platform/weapp/doLogin",a=[];return t&&a.push("userId="+encodeURIComponent(t)),e&&a.push("redirect="+e),a.length>0&&(i=i+"?"+a.join("&")),"https://cas.zufe.edu.cn/cas/login?service="+encodeURIComponent(i)}}}]); |