This commit is contained in:
heixinyouzi 2024-10-17 10:50:42 +08:00
parent 81dccc0ef7
commit af928a81e1
8 changed files with 22 additions and 11 deletions

View File

@ -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;

View File

@ -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 });

1
src/icon/navi.svg Normal file
View File

@ -0,0 +1 @@
<svg t="1718348760379" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1497" width="200" height="200"><path d="M409.6 661.333333l-256-119.466666 721.066667-345.6-345.6 721.066666-119.466667-256z m34.133333-34.133333l85.333334 187.733333 260.266666-537.6L256 541.866667l187.733333 85.333333z" fill="#ffffff" p-id="1498"></path></svg>

After

Width:  |  Height:  |  Size: 376 B

View File

@ -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",

View File

@ -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) }),
},
];

View File

@ -25,7 +25,7 @@
</n-button>
</div>
</div>
<n-button color="#8a2be2" size="small" class="mr-4" @click="goHome"> 回首页 </n-button>
<!-- <n-button color="#8a2be2" size="small" class="mr-4" @click="goHome"> 回首页 </n-button> -->
</div>
</div>
</n-layout-header>

View File

@ -3,10 +3,10 @@
<falls :fileList="fileList" :count="acount" :bot="bottomLen" pathname="filepath" v-slot="{ file }">
<div class="img" @mouseenter="movein(file)" @mouseleave="moveout(file)">
<n-image width="200px" :imgW="pivW" :src="file.filepath" object-fit="cover" :img-props="{ loading: 'lazy' }" />
<div class="title w-[120px]" v-if="!ismobile && file.ishow">
<n-ellipsis style="max-width: 120px" :line-clamp="1">{{ file.filename }}</n-ellipsis>
<div class="title" v-if="!ismobile && file.ishow">
<n-ellipsis :style="{maxWidth: pivW+'px'}" :line-clamp="1">{{ file.filename }}</n-ellipsis>
</div>
<div class="tooltip" v-if="ismobile || file.ishow">
<div class="tooltip" >
<div class="block">
<div class="uploadBy flex items-center">
<n-ellipsis :line-clamp="1">{{ file.nickname }}分享</n-ellipsis>

View File

@ -9,7 +9,7 @@
{{ date }}
</div>
<div class="holi text-center">
还有 {{ holi.holiday.rest }} 天就是 <span class="text-pp-300 text-lg">{{ holi.holiday.name }}</span>
<!-- 还有 {{ holi.holiday.rest }} 天就是 <span class="text-pp-300 text-lg">{{ holi.holiday.name }}</span> -->
</div>
</div>
<div class="right h-[150px]">
@ -107,6 +107,8 @@ const isBaidu = ref(false);
const holi = await $http.wea.getNextHoliday()
console.log(555555555555555555,holi);