diff --git a/pages/home/index.vue b/pages/home/index.vue index d86130f..c2f5ead 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -1327,6 +1327,7 @@ export default { const { latitude, longitude } = mapData getCurAddress(latitude, longitude).then(address => { this.cityName = address[1].data.result.ad_info.city + uni.setStorageSync('locationCityName', this.cityName) this.isLocating = false this.getPageData() }).catch(() => { diff --git a/pkg_common/views/roomLogs.vue b/pkg_common/views/roomLogs.vue index aabcd30..13a1046 100644 --- a/pkg_common/views/roomLogs.vue +++ b/pkg_common/views/roomLogs.vue @@ -101,8 +101,9 @@ export default { }, methods: { enterAiChat() { + const cityName = uni.getStorageSync('locationCityName') || '' uni.navigateTo({ - url: '/aiChat/views/index?click=1' + url: `/aiChat/views/index?click=1&cityName=${cityName}` }) }, /**