代码最最最终版

master
wbb 2 years ago
parent 62dfcdad82
commit 02dcb5ecaf

@ -10,7 +10,7 @@ Page({
}, },
tabSelect:function(e){ tabSelect(e){
var foodlist=[] var foodlist=[]
var current = e.currentTarget.dataset.tab var current = e.currentTarget.dataset.tab
this.setData({ this.setData({
@ -31,20 +31,23 @@ Page({
.get() .get()
.then(res => { .then(res => {
this.setData({ this.setData({
foodlist: res.data, selectlist: res.data,
}) })
wx.hideLoading({ wx.hideLoading({
}) })
wx.setStorageSync('foodlist', res.data) wx.setStorageSync('selectlist', res.data)
var foodlist= wx.getStorageSync('foodlist') var selectlist= wx.getStorageSync('selectlist')
console.log(foodlist) console.log(selectlist)
wx.navigateTo({
url: '/pages/select2/select2?info='+JSON.stringify(this.data.selectlist)
})
},
)
}),
wx.navigateTo({
url: '/pages/select2/select2?info='+JSON.stringify(this.data.foodlist)
})
}, },
/** /**
* 页面的初始数据 * 页面的初始数据

Loading…
Cancel
Save