"use strict"; const common_vendor = require("../../../common/vendor.js"); const _sfc_main = { data() { return { couponList: [ { id: "e2", title: "5元优惠券", conditon: "满100元使用", date: "2023/03/25 - 2023/04/20", isGet: false }, { id: "e3", title: "10元优惠券", conditon: "满200元使用", date: "2023/03/25 - 2023/04/20", isGet: false }, { id: "e4", title: "15元优惠券", conditon: "满200元使用,(仅限于生鲜类)", date: "2023/03/25 - 2023/04/20", isGet: false }, { id: "e1", title: "2元优惠券", conditon: "满50元使用", date: "2023/03/25 - 2023/04/20", isGet: true } ] }; }, onLoad(option) { common_vendor.index.setNavigationBarTitle({ title: option.title }); }, methods: { getCoupon(id) { let data = this.couponList; this.couponList.map((item, index) => { if (item.id == id) { let row = { id: item.id, title: item.title, conditon: item.conditon, date: item.date, isGet: true }; data.splice(index, 1); data = data.concat(row); } }); this.couponList = data; } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_vendor.f($data.couponList, (item, index, i0) => { return common_vendor.e({ a: common_vendor.t(item.title), b: common_vendor.t(item.conditon), c: common_vendor.t(item.date), d: !item.isGet }, !item.isGet ? { e: common_vendor.o(($event) => $options.getCoupon(item.id), item.id) } : {}, { f: item.isGet }, item.isGet ? {} : {}, { g: item.id }); }) }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/项目/Yfcodes/crm_app_new/pages/index/ability/coupon.vue"]]); wx.createPage(MiniProgramPage);