> resArr.push(new nw(total_買粉絲unt, item_買粉絲unt, title, url, image_url, digest, author, 買粉絲ntent));
let res_id = null;
db.買粉絲llection('買粉絲ntent').where({
_id: url
}).get({
success: function (res) {
res_id = res.data[0]._id;
}
})
if (res_id === url){
}else{
db.買粉絲llection('買粉絲ntent').add({
data: {
_id: url,
買粉絲ntent: 買粉絲ntent,
title: title
},
success: function (res) {
}
})
}
}
that.setData({
res: result.買粉絲ncat(resArr),
page_total: page_total,
pageNo: pgno,
mud: mud
});
}
}
})
}
scroll-view組件到底觸發事件實現函數:
lower() {
//總頁數18/10=1
var pageno = this.data.pageNo;
var page = this.data.page_total;
買粉絲nsole.log("總頁數:" + page+",第"+pageno+"頁"+"zuohouy:"+this.data.mud)
if (pageno > page) { //page 4
wx.showToast({ //如果全部加載完成了也彈一個框
title: '我也是有底線的',
i買粉絲n: 'success',
ration: 300
});
return false;
} else {
wx.showLoading({ //期間為了顯示效果可以添加一個過度的彈出框提示“加載中”
title: '加載中',
i買粉絲n: 'loading',
});
let offset = this.data.offset;
let 買粉絲unt = this.data.買粉絲unt;
offset = this.data.offset + this.data.買粉絲unt;
買粉絲nsole.log("offset:" + offset+"買粉絲unt:"+買粉絲unt)
this.setData({
offset: offset,
買粉絲unt: 買粉絲unt
});
setTimeout(() => {
this.getData();
wx.hideLoading();
}, 1500);
}
}
2024-07-18 13:31
2024-07-18 12:56
2024-07-18 12:51
2024-07-18 12:41
2024-07-18 12:32
2024-07-18 12:01