From 4b51d24d211b183a6d211b1970fd7ce29017fccc Mon Sep 17 00:00:00 2001 From: lcc <805383944@qq.com> Date: Thu, 16 Oct 2025 09:21:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CityChooseList.vue | 5 +++-- src/pages/Home.vue | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/CityChooseList.vue b/src/components/CityChooseList.vue index 2f0994b..9f96801 100644 --- a/src/components/CityChooseList.vue +++ b/src/components/CityChooseList.vue @@ -47,6 +47,7 @@ import { useUserStore } from '@/stores/user'; import { useCityStore } from '../stores/city'; import api from '@/utils/api'; import WechatUtils,{ WechatLocation } from '@/utils/wechat' +import { getCookie, setCookie } from '@/utils/cookie' export default { name: 'CityChooseList', data() { @@ -103,8 +104,8 @@ export default { }; // localStorage.setItem('cityInfo', JSON.stringify(result.data)); // localStorage.setItem('userLocation', JSON.stringify({ ...location, time: new Date().getTime() })); - setCookie('cityInfo', JSON.stringify(result.data),1); - setCookie('userLocation', JSON.stringify({...location, time: new Date().getTime()},1)); + // setCookie('cityInfo', JSON.stringify(result.data),1); + // setCookie('userLocation', JSON.stringify({...location, time: new Date().getTime()},1)); userStore.setCity(result.data); this.$emit('cityItem',{ cityName: result.data.cityName, diff --git a/src/pages/Home.vue b/src/pages/Home.vue index dd3769b..f3678ce 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -490,7 +490,7 @@ const handleBrandItem = (item) => { getProductList(); } -const handleCityItem = (item) => { +const handleCityItem = (item) => { const userStore = useUserStore(); query_data.cityId = item.cityId; query_data.page = 1;