diff --git a/components/bargain/index.js b/components/bargain/index.js new file mode 100644 index 0000000..e69de29 diff --git a/pages/main/bargain/index.js b/pages/main/bargain/index.js index 0b9e8f5..4498cf5 100644 --- a/pages/main/bargain/index.js +++ b/pages/main/bargain/index.js @@ -23,6 +23,31 @@ Component({ * 组件的方法列表 */ methods: { + getList1() { + let that = this; + Http.get({ + url: config.api.couponChannelList, + data: { + pageNum: 1, + pageSize: 5, + targetAd: 6 + } + }).then(res => { + that.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 + }); + }) + }, gotomore: function() { wx.navigateTo({ url: "/pages/bargain/bargain" @@ -69,30 +94,5 @@ Component({ if (app.globalData.token && app.globalData.token != null) { app.couponChannelListCallback(app.globalData.token); } - }, - getList1(){ - let that = this; - Http.get({ - url: config.api.couponChannelList, - data: { - pageNum: 1, - pageSize: 5, - targetAd: 6 - } - }).then(res => { - that.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 - }); - }) } });