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 + // }) + // } + // }); + // }, /** * 生命周期函数--监听页面隐藏