From 95a6f2b809609240896006516b3d2b37c27d8a9c Mon Sep 17 00:00:00 2001 From: 1154079537 <1154079537@qq.com> Date: Sat, 8 Jun 2024 16:19:35 +0800 Subject: [PATCH] little bug --- pages/index/index.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index ff0b328..a88241f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -192,7 +192,9 @@ } // 用户选择的门店信息 - const storeInfo = JSON.parse(uni.getStorageSync('STORE_INFO')) + let STORE_INFO = uni.getStorageSync('STORE_INFO'); + if (STORE_INFO) + STORE_INFO = JSON.parse(STORE_INFO) /*商品列表滚动隐藏头部导航 */ const instance = getCurrentInstance(); // 获取组件实例 @@ -269,7 +271,7 @@ page_size: 25, name: '', order: '', - store_id: storeInfo.id + store_id: STORE_INFO.id || '' }) // console.log(JSON.parse(uni.getStorageSync('STORE_INFO'))) @@ -421,9 +423,8 @@ productLogApi({ product_id: item.product_id, cate_id: item.cate_id, - store_id: uni.getStorageSync('STORE_INFO').id || '' + store_id: STORE_INFO.id || '' }); - }; const changeGood = (data) => { // 确定选择商品重量 showGoodPopup.value = false;