From 40082957612d9bb0a7bd4ad45da051cbc846b4e6 Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Thu, 8 Aug 2019 11:15:32 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=A3=E4=BC=A0=E9=A1=B5][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9]:[=E4=BF=AE=E6=94=B9=E8=87=AA=E7=94=B1=E5=9B=BE?= =?UTF-8?q?=E6=96=87=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/bannerdetail/index.wxml | 2 +- pages/freeBannerDetail/index.js | 67 +++++++++------------------------ 2 files changed, 18 insertions(+), 51 deletions(-) diff --git a/pages/bannerdetail/index.wxml b/pages/bannerdetail/index.wxml index 5fe0335..0f4350b 100644 --- a/pages/bannerdetail/index.wxml +++ b/pages/bannerdetail/index.wxml @@ -1,5 +1,5 @@ - + diff --git a/pages/freeBannerDetail/index.js b/pages/freeBannerDetail/index.js index 95c03c3..255ab5c 100644 --- a/pages/freeBannerDetail/index.js +++ b/pages/freeBannerDetail/index.js @@ -30,26 +30,22 @@ Page({ id:options.id, token: app.globalData.token }) - wx.request({ - url: configUrls + config.api.printHtmlById, - data: { - token: app.globalData.token, - id: options.id, - date: new Date() - }, - header: { - 'content-type': 'application/html' - }, - success: function (res) { - var temp = WxParse.wxParse('article', 'html',res.data, that, 5); - } - }) - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - + if (options&&options.id){ + wx.request({ + url: configUrls + config.api.printHtmlById, + data: { + token: app.globalData.token, + id: options.id, + date: new Date() + }, + header: { + 'content-type': 'application/html' + }, + success: function (res) { + var temp = WxParse.wxParse('article', 'html', res.data, that, 5); + } + }) + } }, /** * 生命周期函数--监听页面显示 @@ -58,34 +54,5 @@ Page({ this.setData({ date:new Date() }) - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - + } }) \ No newline at end of file