2 lines
2.4 KiB
JavaScript
2 lines
2.4 KiB
JavaScript
"use strict";var n=(n,e,s)=>new Promise(((t,o)=>{var i=n=>{try{g(s.next(n))}catch(e){o(e)}},a=n=>{try{g(s.throw(n))}catch(e){o(e)}},g=n=>n.done?t(n.value):Promise.resolve(n.value).then(i,a);g((s=s.apply(n,e)).next())}));const e=require("../../../common/vendor.js"),s=require("../../../sheep/index.js"),t=require("../../../sheep/api/member/signin.js");if(!Array){(e.resolveComponent("s-empty")+e.resolveComponent("su-popup")+e.resolveComponent("s-layout")+e.resolveComponent("layout-default-uni"))()}Math||((()=>"../../../sheep/components/s-empty/s-empty.js")+(()=>"../../../sheep/ui/su-popup/su-popup.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const o={__name:"sign",setup(o){e.useCssVars((n=>({"290aaab0":e.unref(i)})));const i=s.sheep.$url.css("/static/img/shop/app/sign.png"),a=e.reactive({loading:!0,signInfo:{},signConfigList:[],maxDay:0,showModel:!1,signResult:{}});function g(){return n(this,null,(function*(){const{code:n,data:e}=yield t.SignInApi.createSignInRecord();0===n&&(a.showModel=!0,a.signResult=e,yield l())}))}function u(){a.showModel=!1}function l(){return n(this,null,(function*(){const{code:n,data:e}=yield t.SignInApi.getSignInRecordSummary();0===n&&(a.signInfo=e,a.loading=!1)}))}return e.onReady((()=>{l(),function(){n(this,null,(function*(){const{code:n,data:e}=yield t.SignInApi.getSignInConfigList();0===n&&(a.signConfigList=e,e.length>0&&(a.maxDay=e[e.length-1].day))}))}()})),(n,s)=>e.e({a:a.loading},a.loading?{b:e.p({icon:"/static/data-empty.png",text:"签到活动还未开始"})}:{},{c:a.loading},a.loading||a.loading?{}:e.e({e:e.t(a.signInfo.continuousDay),f:e.f(a.signConfigList,((n,s,t)=>({a:e.t(n.day),b:e.n((s===a.signConfigList.length?"reward":"")+" "+(a.signInfo.continuousDay>=n.day?"rewardTxt":"")),c:e.n((s+1===a.signConfigList.length?"reward":"")+" "+(a.signInfo.continuousDay>=n.day?"venusSelect":"")),d:e.t(n.point),e:e.n(a.signInfo.continuousDay>=n.day?"on":""),f:s}))),g:!a.signInfo.todaySignIn},a.signInfo.todaySignIn?{}:{h:e.o(g)},{i:e.t(a.signInfo.totalDay),j:e.t(a.maxDay)}),{d:!a.loading,k:a.signResult.point},a.signResult.point?{l:e.t(a.signResult.point)}:{},{m:a.signResult.experience},a.signResult.experience?{n:e.t(a.signResult.experience)}:{},{o:e.t(a.signResult.day),p:e.o(u),q:e.p({show:a.showModel,type:"center",round:"10",isMaskClick:!1}),r:e.p({title:"签到有礼"}),s:e.s(n.__cssVars())})}},i=e._export_sfc(o,[["__scopeId","data-v-218760d4"]]);wx.createPage(i);
|