fix: BUG修改

This commit is contained in:
kun 2024-04-01 09:08:32 +08:00
parent ff138974b0
commit fdc5a25879

View File

@ -23,10 +23,21 @@
import Card from "@/components/card.vue";
import { reactive, onMounted, ref } from "vue";
import { getWeatherDataApi } from "@/api/modules/headNoise";
import { getTaskTimeDetail } from "@/api/modules/schedulePlan";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const weatherList = ref([]);
//
const projectTimeInfo = ref({} as any);
const getProjectInfo = async () => {
const res: any = await getTaskTimeDetail({ projectSn: store.sn });
console.log("获取项目信息", res);
projectTimeInfo.value = res.result;
loadWeather();
};
//
const loadWeather = async () => {
const res = await getWeatherDataApi({ cityid: "" });
const res = await getWeatherDataApi({ cityid: "", areaId: projectTimeInfo.value.areaCode });
let json = JSON.parse(res.result);
let list = json;
console.log("获取天气", res.result);
@ -41,7 +52,7 @@ const loadWeather = async () => {
});
};
onMounted(() => {
loadWeather();
getProjectInfo();
});
const weatherIcon = ref([
{