Fix(消息):点击进入AI首页使用首页定位的城市获取天气数据
This commit is contained in:
@@ -1327,6 +1327,7 @@ export default {
|
|||||||
const { latitude, longitude } = mapData
|
const { latitude, longitude } = mapData
|
||||||
getCurAddress(latitude, longitude).then(address => {
|
getCurAddress(latitude, longitude).then(address => {
|
||||||
this.cityName = address[1].data.result.ad_info.city
|
this.cityName = address[1].data.result.ad_info.city
|
||||||
|
uni.setStorageSync('locationCityName', this.cityName)
|
||||||
this.isLocating = false
|
this.isLocating = false
|
||||||
this.getPageData()
|
this.getPageData()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|||||||
@@ -101,8 +101,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
enterAiChat() {
|
enterAiChat() {
|
||||||
|
const cityName = uni.getStorageSync('locationCityName') || ''
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/aiChat/views/index?click=1'
|
url: `/aiChat/views/index?click=1&cityName=${cityName}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user