fix: BUG修改
This commit is contained in:
parent
ff138974b0
commit
fdc5a25879
@ -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([
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user