"use strict"; const common_vendor = require("../../common/vendor.js"); const common_request = require("../../common/request.js"); const common_util = require("../../common/util.js"); const _sfc_main = { data() { return { getNumData: common_util.getNumData, requestx: common_request.requestx, list: [], loadingMore: true, currentGoodsPage: 1, nomore: false, nodata: false, isRefresher: false, baseUrl: "" }; }, onShow() { this.GetRankingGoodsList(1); }, onShareAppMessage: function() { return { title: "淘券获取", path: "/pages/index/index" // promise }; }, onShareTimeline() { return { title: "淘券获取", query: "/pages/index/index" }; }, methods: { GetRankingGoodsList(cur, t) { if (t) { this.isRefresher = true; } this.requestx({ url: "/TkProduct/GetRankingGoodsList", method: "POST", data: { pageNo: cur, pageSize: 100, hasCoupon: true } }).then((res) => { if (res.success) { this.list = res.result; this.currentGoodsPage = cur; this.loadingMore = true; if (t) { this.isRefresher = false; } } }); }, gotogoodDetail(type, id) { if (type == 1) { common_vendor.index.navigateTo({ url: "/pages/goodDetail/index?id=" + id }); } }, loadMore() { this.loadingMore = false; this.GetRankingGoodsList(this.currentGoodsPage + 1); }, goHome() { common_vendor.index.switchTab({ url: "/pages/index/index" }); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l; return { a: common_vendor.o((...args) => $options.goHome && $options.goHome(...args)), b: (_a = $data.list[1]) == null ? void 0 : _a.mainPic, c: common_vendor.t($data.getNumData((_b = $data.list[1]) == null ? void 0 : _b.monthsale)), d: common_vendor.t((_c = $data.list[1]) == null ? void 0 : _c.dtitle), e: common_vendor.t((_d = $data.list[1]) == null ? void 0 : _d.actualPrice), f: common_vendor.o(($event) => { var _a2; return $options.gotogoodDetail(1, (_a2 = $data.list[1]) == null ? void 0 : _a2.goodsId); }), g: (_e = $data.list[0]) == null ? void 0 : _e.mainPic, h: common_vendor.t($data.getNumData((_f = $data.list[0]) == null ? void 0 : _f.monthsale)), i: common_vendor.t((_g = $data.list[0]) == null ? void 0 : _g.dtitle), j: common_vendor.t((_h = $data.list[0]) == null ? void 0 : _h.actualPrice), k: common_vendor.o(($event) => { var _a2; return $options.gotogoodDetail(1, (_a2 = $data.list[0]) == null ? void 0 : _a2.goodsId); }), l: (_i = $data.list[2]) == null ? void 0 : _i.mainPic, m: common_vendor.t($data.getNumData((_j = $data.list[2]) == null ? void 0 : _j.monthsale)), n: common_vendor.t((_k = $data.list[2]) == null ? void 0 : _k.dtitle), o: common_vendor.t((_l = $data.list[2]) == null ? void 0 : _l.actualPrice), p: common_vendor.o(($event) => { var _a2; return $options.gotogoodDetail(1, (_a2 = $data.list[2]) == null ? void 0 : _a2.goodsId); }), q: common_vendor.f($data.list, (i, ind, i0) => { return common_vendor.e({ a: ind > 2 }, ind > 2 ? common_vendor.e({ b: common_vendor.t(ind > 8 ? ind + 1 : "0" + (ind + 1)), c: i == null ? void 0 : i.mainPic, d: (i == null ? void 0 : i.shopType) == 0 || (i == null ? void 0 : i.shopType) == 1 }, (i == null ? void 0 : i.shopType) == 0 || (i == null ? void 0 : i.shopType) == 1 ? { e: (i == null ? void 0 : i.shopType) == 0 ? "https://img.alicdn.com/imgextra/i4/751308485/O1CN01ppfg8j2CYBRpPtb51_!!751308485.png" : "https://img.alicdn.com/imgextra/i4/751308485/O1CN01mKVp3U2CYBRzeHVcG_!!751308485.png" } : {}, { f: common_vendor.t(i == null ? void 0 : i.dtitle), g: common_vendor.t(i == null ? void 0 : i.couponPrice), h: common_vendor.t(i == null ? void 0 : i.actualPrice), i: common_vendor.t(Number(i == null ? void 0 : i.actualPrice) + Number(i == null ? void 0 : i.couponPrice)), j: common_vendor.t($data.getNumData(i.monthsale)), k: common_vendor.o(($event) => $options.gotogoodDetail(1, i.goodsId), i == null ? void 0 : i.goodsId) }) : {}, { l: i == null ? void 0 : i.goodsId }); }), r: $data.isRefresher, s: common_vendor.o(($event) => $options.GetRankingGoodsList(1, 1)) }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/OPProject/TK_H5_Web/pages/rankingList/index.vue"]]); _sfc_main.__runtimeHooks = 6; wx.createPage(MiniProgramPage);