chache/pages/disclaimers/disclaimers.js
2024-01-23 19:04:21 +08:00

41 lines
1.1 KiB
JavaScript

var t, a;
(t = getApp()),
(a = 2),
Page({
data: { notices: [], clicknotice: "", dropdown: 1 },
onLoad: function (a) {
var e = this;
t.util.request({
url: "entry/wxapp/Api",
data: { leftid: "", r: "sale.index.getnotice" },
cachetime: "0",
success: function (t) {
e.setData({ notices: t.data.data });
},
});
},
showindexdesc: function (t) {
console.log(t.currentTarget.dataset.id),
this.setData({ clicknotice: t.currentTarget.dataset.id });
},
onReachBottom: function () {
var e = this,
n = e.data.notices;
2 != e.data.dropdown &&
((e.data.dropdown = 2),
t.util.request({
url: "entry/wxapp/Api",
data: { leftid: a, r: "sale.salelist.getnotice" },
success: function (t) {
var o = t.data.data.length;
if ((a++, o > 0))
for (var i = 0; i < o; i++) n.push(t.data.data[i]);
e.setData({ notices: n });
},
complete: function () {
e.data.dropdown = 1;
},
}));
},
});