|
|
@@ -38,11 +38,8 @@ Component({ |
|
|
|
e.currentTarget.dataset.targetad |
|
|
|
}` |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
ready() { |
|
|
|
app.couponChannelListCallback = token => { |
|
|
|
Http.setToken(token); |
|
|
|
}, |
|
|
|
getList(){ |
|
|
|
Http.get({ |
|
|
|
url: config.api.couponChannelList, |
|
|
|
data: { |
|
|
@@ -53,18 +50,24 @@ Component({ |
|
|
|
}).then(res => { |
|
|
|
this.setData({ |
|
|
|
list: res.data.list, |
|
|
|
total:res.data.total |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
console.log(err) |
|
|
|
wx.showToast({ |
|
|
|
title: err.errMsg, |
|
|
|
icon: 'none', |
|
|
|
duration: 2000, |
|
|
|
mask: false |
|
|
|
total: res.data.total |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
console.log(err) |
|
|
|
wx.showToast({ |
|
|
|
title: err.errMsg, |
|
|
|
icon: 'none', |
|
|
|
duration: 2000, |
|
|
|
mask: false |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
ready() { |
|
|
|
app.couponChannelListCallback = token => { |
|
|
|
Http.setToken(token); |
|
|
|
this.getList(); |
|
|
|
}; |
|
|
|
if (app.globalData.token && app.globalData.token != null) { |
|
|
|
app.couponChannelListCallback(app.globalData.token); |
|
|
|