"use strict";const e=require("../../common/vendor.js"),o=require("../../utils/system.js"),t=require("./utils/source.js"),n=require("../../services/ams.js");if(!Array){(e.resolveComponent("wd-icon")+e.resolveComponent("wd-gap"))()}Math||((()=>"../../node-modules/wot-design-uni/components/wd-icon/wd-icon.js")+(()=>"../../node-modules/wot-design-uni/components/wd-gap/wd-gap.js")+s+r+a+i+u)();const s=()=>"./components/photoExamplePopup.js",r=()=>"./components/uploadReceptPopop.js",a=()=>"./components/winRecordPopup.js",i=()=>"./components/uploadRecordPopup.js",u=()=>"./components/activityDescPopup.js",c=e.defineComponent({__name:"index",setup(s){let r=e.ref(!1),a=e.ref(!1),i=e.ref(!1),u=e.ref(!1),c=e.ref(!1);const p=e.index.getStorageSync("appid"),d=e.ref("");let f=e.reactive({discounts:[]}),l=e.ref([]);const m=e.index.getStorageSync("openid");e.computed((()=>!!f.authCheck.includes("2")));const v=e.ref([]),g=()=>{console.log("openid",m),n.rewardList({openid:m}).then((e=>{v.value=e.rows})),u.value=!0},h=e.ref([]),w=()=>{n.auditSuccessList({openid:m}).then((e=>{h.value=e.rows})),i.value=!0},j=()=>{e.index.navigateBack({delta:1})},b=()=>{a.value=!0};return e.onShow((()=>{n.getActivity(p).then((o=>{f=o.data[0]||{},f.authCheck=f.authCheck.split(","),l.value=f.discounts.map((e=>({...e,checked:!1}))),e.index.setStorageSync("activityData",JSON.stringify(f)),d.value=o.data[0].activityImage})).catch((e=>{console.log(e)}))})),e.ref(0),e.onLoad((()=>{})),(n,s)=>({a:e.unref(o.getStatusBarHeight)()+"px",b:e.o(j),c:e.p({name:"thin-arrow-left",size:"44rpx",color:"#000"}),d:e.unref(o.getNavBarPaddingTop)()+"px",e:d.value,f:e.o((o=>e.isRef(c)?c.value=!0:c=!0)),g:e.unref(t.imgObj).rule,h:e.unref(t.imgObj).record,i:e.o(w),j:e.unref(t.imgObj).photo,k:e.o((o=>e.isRef(r)?r.value=!0:r=!0)),l:e.unref(t.imgObj).book,m:e.o(g),n:e.unref(t.gifObj).pointer,o:e.o(b),p:e.t(e.unref(f).startTime),q:e.t(e.unref(f).endTime),r:e.f(e.unref(l),((o,t,n)=>({a:e.t(o.cashbackAmount),b:e.t(o.thresholdAmount),c:e.t(o.cashbackAmount),d:o.id}))),s:e.p({"bg-color":"transparent"}),t:e.o((o=>e.isRef(r)?r.value=o:r=o)),v:e.p({show:e.unref(r)}),w:e.unref(f).id,x:e.o((o=>e.isRef(a)?a.value=o:a=o)),y:e.p({list:e.unref(l),id:e.unref(f).id,show:e.unref(a)}),z:e.o((o=>e.isRef(i)?i.value=o:i=o)),A:e.p({list:h.value,show:e.unref(i)}),B:e.o((o=>e.isRef(u)?u.value=o:u=o)),C:e.p({list:v.value,show:e.unref(u)}),D:e.o((o=>e.isRef(c)?c.value=o:c=o)),E:e.p({show:e.unref(c)})})}}),p=e._export_sfc(c,[["__scopeId","data-v-373fb54c"]]);wx.createPage(p);