diff --git a/src/components/Businesses2.vue b/src/components/Businesses2.vue
index d45ebd1..ae6bede 100644
--- a/src/components/Businesses2.vue
+++ b/src/components/Businesses2.vue
@@ -78,9 +78,9 @@ const pages = ref({
const loadOrderList = (pramas) => {
logisticsList(pramas).then((res) => {
- initData(res.data.currOrderList);
- pages.value.total = res.data.currOrderCount;
- pages.value.pageAll = Math.ceil(res.data.currOrderCount / pages.value.limit);
+ initData(res.data.list);
+ pages.value.total = res.data.count;
+ pages.value.pageAll = Math.ceil(res.data.count / pages.value.limit);
}).catch(err => {
console.error(err);
})
diff --git a/src/components/headView.vue b/src/components/headView.vue
index 10dc0f7..adfbf04 100644
--- a/src/components/headView.vue
+++ b/src/components/headView.vue
@@ -6,6 +6,7 @@ import mitt from "@/utils/mitt";
import { getStreet } from "@/api/index.js";
import { useAppStore } from "@/store/app.js";
import { useUserStore } from "@/store/user.js";
+import axios from "axios";
const reload = inject('reload');
@@ -105,11 +106,25 @@ const logout = () => {
router.push('/login')
}
+const weather = ref("暂无天气信息")
+const initWeather = (city = 510500) => {
+ axios.get(`https://restapi.amap.com/v3/weather/weatherInfo?city=${city}&key=5731d3b4c3f34e09226e084ce556e259`).then((res) => {
+ if (res.data.status == 1) {
+ weather.value = res.data.lives[0].weather;
+ }
+ }).catch((e) => {
+ console.log(e);
+ })
+}
+
+
onMounted(() => {
initList();
// 每秒钟更新一次时间
setInterval(updateClock, 1000);
+
+ initWeather();
})
@@ -141,7 +156,7 @@ onMounted(() => {