onPullDownRefresh() {
this.page = 1;
this.shopList = []
this.init()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
onReachBottom() {
let that = this;
that.init();
},
methods: {
init() {
let _this = this
uni.request({
url: this.global.url + '/api/task/merchant',
method: 'POST',
header: {
'content-type': 'application/x-www-form-urlencoded'
},
data: {
page: _this.page,
token: uni.getStorageSync('token').token
},
success: (res) => {
let list = res.data.data.data;
if (list.length) {
_this.page += 1;
for (let a in list) {
list[a].avatar = _this.global.url + list[a].avatar
_this.shopList.push(list[a])
}
console.log(this.shopList)
}
}
})
},
}