"use strict";
|
const common_vendor = require("../../common/vendor.js");
|
const common_util = require("../../common/util.js");
|
const _sfc_main = {
|
data() {
|
return {
|
getNumData: common_util.getNumData,
|
list: [],
|
loadingMore: true,
|
currentGoodsPage: 1,
|
nomore: false,
|
nodata: false
|
};
|
},
|
onShow() {
|
this.GetRankingGoodsList(1);
|
},
|
onShareAppMessage: function() {
|
return {
|
title: "淘券获取",
|
path: "/pages/index/index"
|
// promise
|
};
|
},
|
onShareTimeline() {
|
return {
|
title: "淘券获取",
|
query: "/pages/index/index"
|
};
|
},
|
methods: {
|
GetRankingGoodsList(cur) {
|
let me = this;
|
common_vendor.index.request({
|
url: "https://h.ushopvip.com/api/TkProduct/GetRankingGoodsList",
|
method: "POST",
|
data: {
|
pageNo: cur,
|
pageSize: 100,
|
hasCoupon: true
|
},
|
success(res) {
|
var _a;
|
if ((_a = res.data) == null ? void 0 : _a.success) {
|
if (res.data.result.length < 20) {
|
me.nomore = true;
|
}
|
if (cur === 1) {
|
me.list = res.data.result;
|
me.currentGoodsPage = cur;
|
me.loadingMore = true;
|
} else {
|
let data = me.list;
|
me.list = data.concat(res.data.result);
|
me.currentGoodsPage = cur;
|
me.loadingMore = true;
|
}
|
} else {
|
if (cur === 1) {
|
me.nodata = true;
|
} else {
|
me.nodata = false;
|
}
|
}
|
},
|
fail(err) {
|
console.log("GetRankingGoodsList失败:", err);
|
}
|
});
|
},
|
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) {
|
return {
|
a: common_vendor.o((...args) => $options.goHome && $options.goHome(...args)),
|
b: $data.list[1].mainPic,
|
c: common_vendor.t($data.getNumData($data.list[1].monthsale)),
|
d: common_vendor.t($data.list[1].dtitle),
|
e: common_vendor.t($data.list[1].actualPrice),
|
f: common_vendor.o(($event) => $options.gotogoodDetail(1, $data.list[1].goodsId)),
|
g: $data.list[0].mainPic,
|
h: common_vendor.t($data.getNumData($data.list[0].monthsale)),
|
i: common_vendor.t($data.list[0].dtitle),
|
j: common_vendor.t($data.list[0].actualPrice),
|
k: common_vendor.o(($event) => $options.gotogoodDetail(1, $data.list[0].goodsId)),
|
l: $data.list[2].mainPic,
|
m: common_vendor.t($data.getNumData($data.list[2].monthsale)),
|
n: common_vendor.t($data.list[2].dtitle),
|
o: common_vendor.t($data.list[2].actualPrice),
|
p: common_vendor.o(($event) => $options.gotogoodDetail(1, $data.list[2].goodsId)),
|
q: common_vendor.f($data.list, (i, ind, i0) => {
|
return common_vendor.e({
|
a: ind > 2
|
}, ind > 2 ? {
|
b: common_vendor.t(ind > 8 ? ind + 1 : "0" + (ind + 1)),
|
c: i.mainPic,
|
d: common_vendor.t(i.dtitle),
|
e: common_vendor.t(i.couponPrice),
|
f: common_vendor.t(i.actualPrice),
|
g: common_vendor.t(Number(i.actualPrice) + Number(i.couponPrice)),
|
h: common_vendor.t($data.getNumData(i.monthsale)),
|
i: common_vendor.o(($event) => $options.gotogoodDetail(1, i.goodsId), i.goodsId)
|
} : {}, {
|
j: i.goodsId
|
});
|
})
|
};
|
}
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/项目/Yfcodes/crm_app_new/pages/rankingList/index.vue"]]);
|
_sfc_main.__runtimeHooks = 6;
|
wx.createPage(MiniProgramPage);
|