From 02dcb5ecafa607b6e60d5a50195dac27d6d458a1 Mon Sep 17 00:00:00 2001 From: wbb <1975655432@qq.com> Date: Thu, 24 Nov 2022 20:23:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9C=80=E6=9C=80=E6=9C=80?= =?UTF-8?q?=E7=BB=88=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scr/food/pages/select1/select1.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/scr/food/pages/select1/select1.js b/scr/food/pages/select1/select1.js index 4ddaa43..3ccd8a5 100644 --- a/scr/food/pages/select1/select1.js +++ b/scr/food/pages/select1/select1.js @@ -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) { - + }, /**