百度小程序数字自增

79 阅读1分钟

 要求点击下一页的时候,data中的数字+1

​编辑

this.setData({
    pages : this.data.pages+1
})

点击上一页的时候同理,只需要-1就可以