From d73ed09cdb624f3477f723650ba870b78966c5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=B7=E6=B4=8B=E4=B9=8B=E5=A3=B0?= Date: Mon, 25 Mar 2019 19:03:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A0=8D=E4=BB=B7=E7=BB=84=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bargain/index.js | 0 pages/main/bargain/index.js | 50 ++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 components/bargain/index.js 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 - }); - }) } });