fix: BUG修改

This commit is contained in:
kun 2024-03-31 10:20:46 +08:00
parent 87bb410c27
commit 1bd62d87d5

View File

@ -28,6 +28,14 @@ import { GlobalStore } from "@/stores";
const store = GlobalStore(); const store = GlobalStore();
const weatherList = ref([]); 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 loadWeather = async () => {
const res = await getWeatherDataApi({ cityid: "", areaId: projectTimeInfo.value.areaCode}); const res = await getWeatherDataApi({ cityid: "", areaId: projectTimeInfo.value.areaCode});
@ -44,14 +52,6 @@ const loadWeather = async () => {
weatherList.value.push(element); weatherList.value.push(element);
}); });
}; };
//
const projectTimeInfo = ref({} as any);
const getProjectInfo = async () => {
const res: any = await getTaskTimeDetail({ projectSn: store.sn });
console.log("获取项目信息", res);
projectTimeInfo.value = res.result;
loadWeather();
};
onMounted(() => { onMounted(() => {
getProjectInfo(); getProjectInfo();
}); });