success: function(res) {this.setData({selfintegral: res.data.integral,selfthrowtimes: res.data.throw_times})}
这时候会报错 Cannot read property ‘setData’ of undefined
我们只需要吧function换成箭头函数就可以
success: (res) => {this.setData({selfintegral: res.data.integral,selfthrowtimes: res.data.throw_times})}
或者 let that = this