Browse Source

修改切换页面

feature/v1.1.0
shuiqing 7 years ago
parent
commit
4aa35b76e9
1 changed files with 24 additions and 24 deletions
  1. 48
      pages/index/index.js

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

Loading…
Cancel
Save