|
|
|
@ -10,7 +10,7 @@ Page({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tabSelect:function(e){
|
|
|
|
|
tabSelect(e){
|
|
|
|
|
var foodlist=[]
|
|
|
|
|
var current = e.currentTarget.dataset.tab
|
|
|
|
|
this.setData({
|
|
|
|
@ -31,20 +31,23 @@ Page({
|
|
|
|
|
.get()
|
|
|
|
|
.then(res => {
|
|
|
|
|
this.setData({
|
|
|
|
|
foodlist: res.data,
|
|
|
|
|
selectlist: res.data,
|
|
|
|
|
})
|
|
|
|
|
wx.hideLoading({
|
|
|
|
|
})
|
|
|
|
|
wx.setStorageSync('foodlist', res.data)
|
|
|
|
|
var foodlist= wx.getStorageSync('foodlist')
|
|
|
|
|
console.log(foodlist)
|
|
|
|
|
|
|
|
|
|
wx.setStorageSync('selectlist', res.data)
|
|
|
|
|
var selectlist= wx.getStorageSync('selectlist')
|
|
|
|
|
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)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 页面的初始数据
|
|
|
|
@ -55,7 +58,7 @@ Page({
|
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
|
*/
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|