MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / initWeather

Function initWeather

public/iframe/lib/js/mixinsComponents.js:3080–3084  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3078 },
3079 methods: {
3080 async initWeather() {
3081 // 查询当前位置天气
3082 const { data } = await axios.get(`https://restapi.amap.com/v3/weather/weatherInfo?key=502123a4f08bd95be55b49ae6eabd728&city=${this.option.address}&extensions=base`)
3083 this.data = {...this.data, ...data.lives[0] }
3084 },
3085 handleResize() {
3086 this.initWeather()
3087 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected