diff --git a/src/components/consoleMenu.vue b/src/components/consoleMenu.vue index 639fdd9..1eac73a 100644 --- a/src/components/consoleMenu.vue +++ b/src/components/consoleMenu.vue @@ -8,7 +8,7 @@ import menuInfo from "@/util/consoleMenu.js"; const props = defineProps({ collapsed: Boolean, }); -const activeKey = ref("0"); +const activeKey = ref("1"); const route = useRoute() const { path } = route; diff --git a/src/components/wea.vue b/src/components/wea.vue index 3cb4311..fb6afb9 100644 --- a/src/components/wea.vue +++ b/src/components/wea.vue @@ -25,8 +25,15 @@ function gotoWea(){ } onMounted(async () => { - const res = await $http.addr.getAddressByIP(); - console.log("111", res); + const ress = await $http.addr.getAddressByIP(); + console.log("111", ress); + const reg = ress.data.split("|") + console.log("***********",reg); + const res = { + country:reg[0], + province:reg[2], + city:reg[3] + } city.value = res.city; addr.value = ['上海','重庆','北京','天津'].includes(res.province) ? res.country + res.city : res.province + res.city; const r = await $http.wea.getWeather({ city: city.value }); diff --git a/src/icon/navi.svg b/src/icon/navi.svg new file mode 100644 index 0000000..15d9ac2 --- /dev/null +++ b/src/icon/navi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index b7162d5..3aec23f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -51,7 +51,7 @@ const router = createRouter({ { path: "/console", component: () => import("@/views/console/index.vue"), - redirect: "/console/home", + redirect: "/console/profile", children: [ { path: "/console/home", diff --git a/src/util/consoleMenu.js b/src/util/consoleMenu.js index d2d033d..13f28f7 100644 --- a/src/util/consoleMenu.js +++ b/src/util/consoleMenu.js @@ -1,4 +1,5 @@ import article from "@/icon/article.svg"; +import navi from "@/icon/navi.svg"; import orange from "@/icon/orange.svg"; import pic from "@/icon/pic.svg"; import profile from "@/icon/profile.svg"; @@ -6,7 +7,7 @@ import { NIcon } from "naive-ui"; import { RouterLink } from "vue-router"; const options = [ { - label: () => h(RouterLink, { to: "/console/home", class: "menu-item" }, { default: () => "黑心柚子" }), + label: () => h(RouterLink, { to: "/home", class: "menu-item" }, { default: () => "返回首页" }), key: "0", icon: () => h(NIcon, { class: "orange" }, { default: () => h(orange) }), }, @@ -28,7 +29,7 @@ const options = [ { label: () => h(RouterLink, { to: "/console/menu", class: "menu-item" }, { default: () => "导航管理" }), key: "4", - icon: () => h(NIcon, { class: "orange" }, { default: () => h(article) }), + icon: () => h(NIcon, { class: "orange" }, { default: () => h(navi) }), }, ]; diff --git a/src/views/console/index.vue b/src/views/console/index.vue index 5752fdb..32a8a17 100644 --- a/src/views/console/index.vue +++ b/src/views/console/index.vue @@ -25,7 +25,7 @@ - 回首页 + diff --git a/src/views/gallery/xPic.vue b/src/views/gallery/xPic.vue index 95bc15a..239837f 100644 --- a/src/views/gallery/xPic.vue +++ b/src/views/gallery/xPic.vue @@ -3,10 +3,10 @@
-
- {{ file.filename }} +
+ {{ file.filename }}
-
+
由{{ file.nickname }}分享 diff --git a/src/views/home/side.vue b/src/views/home/side.vue index 1489403..bfd5d3b 100644 --- a/src/views/home/side.vue +++ b/src/views/home/side.vue @@ -9,7 +9,7 @@ {{ date }}
- 还有 {{ holi.holiday.rest }} 天就是 {{ holi.holiday.name }} 了 +
@@ -107,6 +107,8 @@ const isBaidu = ref(false); const holi = await $http.wea.getNextHoliday() +console.log(555555555555555555,holi); +