"use strict"; const common_vendor = require("../../common/vendor.js"); const pagesOne_winner_utils_source = require("./utils/source.js"); const services_ams = require("../../services/ams.js"); if (!Array) { const _easycom_wd_gap2 = common_vendor.resolveComponent("wd-gap"); _easycom_wd_gap2(); } const _easycom_wd_gap = () => "../../node-modules/wot-design-uni/components/wd-gap/wd-gap.js"; if (!Math) { (_easycom_wd_gap + PhotoExamplePopup + UploadReceptPopop + WinRecordPopup + UploadRecordPopup + ActivityDescPopup)(); } const PhotoExamplePopup = () => "./components/photoExamplePopup.js"; const UploadReceptPopop = () => "./components/uploadReceptPopop.js"; const WinRecordPopup = () => "./components/winRecordPopup.js"; const UploadRecordPopup = () => "./components/uploadRecordPopup.js"; const ActivityDescPopup = () => "./components/activityDescPopup.js"; const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "index", setup(__props) { let showExample = common_vendor.ref(false); let showUpload = common_vendor.ref(false); let showWiner = common_vendor.ref(false); let showRecord = common_vendor.ref(false); let showDesc = common_vendor.ref(false); const appid = common_vendor.index.getStorageSync("appid"); const backImage = common_vendor.ref( "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/Group%201.png" ); let aData = common_vendor.reactive({ discounts: [] }); let list = common_vendor.ref([]); const openid = common_vendor.index.getStorageSync("openid"); common_vendor.computed(() => { return aData.authCheck.includes("2") ? true : false; }); const getList = () => { services_ams.getActivity(appid).then((res) => { aData = res.data[0] || {}; aData.authCheck = aData.authCheck.split(","); list.value = aData.discounts.map((item) => { return { ...item, checked: false }; }); common_vendor.index.setStorageSync("activityData", JSON.stringify(aData)); }).catch((err) => { console.log(err); }); }; const rewardData = common_vendor.ref([]); const getRewardList = () => { console.log("openid", openid); services_ams.rewardList({ openid }).then((res) => { rewardData.value = res.rows; console.log("获奖记录", rewardData); }); }; const showUploadRecord = () => { getRewardList(); showRecord.value = true; }; const cinnerData = common_vendor.ref([]); const getWinnerList = () => { services_ams.auditSuccessList({ openid }).then((res) => { cinnerData.value = res.rows; console.log("获奖记录", rewardData); }); }; const showWinerRecord = () => { getWinnerList(); showWiner.value = true; }; const handledUpload = () => { showUpload.value = true; }; common_vendor.onShow(() => { getList(); }); return (_ctx, _cache) => { return { a: backImage.value, b: common_vendor.o(($event) => common_vendor.isRef(showDesc) ? showDesc.value = true : showDesc = true), c: common_vendor.unref(pagesOne_winner_utils_source.imgObj).rule, d: common_vendor.unref(pagesOne_winner_utils_source.imgObj).record, e: common_vendor.o(showWinerRecord), f: common_vendor.unref(pagesOne_winner_utils_source.imgObj).photo, g: common_vendor.o(($event) => common_vendor.isRef(showExample) ? showExample.value = true : showExample = true), h: common_vendor.unref(pagesOne_winner_utils_source.imgObj).book, i: common_vendor.o(showUploadRecord), j: common_vendor.unref(pagesOne_winner_utils_source.gifObj).pointer, k: common_vendor.o(handledUpload), l: common_vendor.f(common_vendor.unref(list), (item, k0, i0) => { return { a: common_vendor.t(item.cashbackAmount), b: common_vendor.t(item.thresholdAmount), c: common_vendor.t(item.cashbackAmount), d: item.id }; }), m: common_vendor.p({ ["bg-color"]: "transparent" }), n: common_vendor.o(($event) => common_vendor.isRef(showExample) ? showExample.value = $event : showExample = $event), o: common_vendor.p({ show: common_vendor.unref(showExample) }), p: common_vendor.o(($event) => common_vendor.isRef(showUpload) ? showUpload.value = $event : showUpload = $event), q: common_vendor.p({ list: common_vendor.unref(list), show: common_vendor.unref(showUpload) }), r: common_vendor.o(($event) => common_vendor.isRef(showWiner) ? showWiner.value = $event : showWiner = $event), s: common_vendor.p({ show: common_vendor.unref(showWiner) }), t: common_vendor.o(($event) => common_vendor.isRef(showRecord) ? showRecord.value = $event : showRecord = $event), v: common_vendor.p({ show: common_vendor.unref(showRecord) }), w: common_vendor.o(($event) => common_vendor.isRef(showDesc) ? showDesc.value = $event : showDesc = $event), x: common_vendor.p({ show: common_vendor.unref(showDesc) }) }; }; } }); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3457e999"]]); wx.createPage(MiniProgramPage);