From 4aa35b76e976afe1b3962c221d0ac2939f6d523d Mon Sep 17 00:00:00 2001 From: shuiqing Date: Thu, 19 Jul 2018 21:36:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=87=E6=8D=A2=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 7f66945..63a56da 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -45,7 +45,7 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { + onShow: function (options) { var that = this; //获取本地数据 // 获取地址 @@ -191,29 +191,29 @@ Page({ /** * 生命周期函数--监听页面显示 */ - onShow: function () { - let that = this; - //获取本地数据 - // 获取地址 - wx.getStorage({ - key: 'districtName', - success: function (res) { - // console.log(res.data) - that.setData({ - districtName: res.data - }) - } - }); - // 商家编号 - wx.getStorage({ - key: 'merchantNo', - success: function (res) { - that.setData({ - merchantNo: res.data - }) - } - }); - }, + // onShow: function () { + // let that = this; + // //获取本地数据 + // // 获取地址 + // wx.getStorage({ + // key: 'districtName', + // success: function (res) { + // // console.log(res.data) + // that.setData({ + // districtName: res.data + // }) + // } + // }); + // // 商家编号 + // wx.getStorage({ + // key: 'merchantNo', + // success: function (res) { + // that.setData({ + // merchantNo: res.data + // }) + // } + // }); + // }, /** * 生命周期函数--监听页面隐藏