const { api } = require("../../utils/api") // pages/store/index.js Page({ /** * 页面的初始数据 */ data: { list:[ { name:'傲娇薄荷•斯基', tag:'夏日续命草', url:'https://res.catter.cn/pub/2025/12/04/20251204113223290.png', count:1, status:0 }, { name:'呆萌多肉•丸子', tag:'佛系晒太阳', url:'https://res.catter.cn/pub/2025/12/04/20251204113419078.png', count:2, status:1 } ] }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { this.fetchList() }, fetchList(){ api('/claim/list','POST',{current:0,pageSize:10,name:'',keyword:''},'json').then(res => { if (res.code === 200){ console.log(res); } }) }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })