fix: 部分配置无效 #155

This commit is contained in:
imsyy 2023-06-19 11:21:37 +08:00
parent 21914f8937
commit 12808714c1
7 changed files with 62 additions and 50 deletions

4
.env
View File

@ -7,7 +7,8 @@ VITE_SITE_URL = "imsyy.top"
VITE_SITE_LOGO = "/images/icon/favicon.ico" VITE_SITE_LOGO = "/images/icon/favicon.ico"
VITE_SITE_APPLE_LOGO = "/images/logo/apple-touch-icon.png" VITE_SITE_APPLE_LOGO = "/images/logo/apple-touch-icon.png"
# 百度统计(若不需要可不填) # 百度统计
## 若不需要,请设为空即可
VITE_SITE_BAIDUTONGJI = "14e9f35ff8bc67fd4bcb5f07a6e6655a" VITE_SITE_BAIDUTONGJI = "14e9f35ff8bc67fd4bcb5f07a6e6655a"
# 简介文本 # 简介文本
@ -30,6 +31,7 @@ VITE_DESC_TEXT_OTHER = "哎呀,这都被你发现了( 再点击一次可关
VITE_WEATHER_KEY = "6c13af6fc30868bee488faf2cc652ab4" VITE_WEATHER_KEY = "6c13af6fc30868bee488faf2cc652ab4"
# 建站日期 # 建站日期
## 若不需要,请设为空即可
## 请按照 YYYY-MM-DD 格式填写或者仅填写年份 YYYY ## 请按照 YYYY-MM-DD 格式填写或者仅填写年份 YYYY
VITE_SITE_START = "2020-10-24" VITE_SITE_START = "2020-10-24"

View File

@ -134,7 +134,7 @@ make clean all
### API ### API
* [MetingAPI By 武恩赐](https://api.wuenci.com/meting/api/) * [MetingAPI By 武恩赐](https://api.wuenci.com/meting/api/)
* [小歪 API](https://api.ixiaowai.cn/) * [搏天 API](https://api.btstu.cn/doc/sjbz.php)
* [高德开放平台](https://lbs.amap.com/) * [高德开放平台](https://lbs.amap.com/)
* [Hitokoto 一言](https://hitokoto.cn/) * [Hitokoto 一言](https://hitokoto.cn/)

View File

@ -119,7 +119,7 @@ make clean all
### API ### API
* [MetingAPI By 武恩赐](https://api.wuenci.com/meting/api/) * [MetingAPI By 武恩赐](https://api.wuenci.com/meting/api/)
* [小歪 API](https://api.ixiaowai.cn/) * [搏天 API](https://api.btstu.cn/doc/sjbz.php)
* [高德开放平台](https://lbs.amap.com/) * [高德开放平台](https://lbs.amap.com/)
* [Hitokoto 一言](https://hitokoto.cn/) * [Hitokoto 一言](https://hitokoto.cn/)

View File

@ -1,5 +1,4 @@
[ [
[
{ {
"icon": "Blog", "icon": "Blog",
"name": "博客", "name": "博客",
@ -29,13 +28,10 @@
"icon": "Fire", "icon": "Fire",
"name": "今日热榜", "name": "今日热榜",
"link": "https://hot.imsyy.top/" "link": "https://hot.imsyy.top/"
} },
],
[
{ {
"icon": "LaptopCode", "icon": "LaptopCode",
"name": "站点监测", "name": "站点监测",
"link": "https://status.imsyy.top/" "link": "https://status.imsyy.top/"
} }
]
] ]

View File

@ -18,10 +18,11 @@
import { onMounted, ref, watch, h } from "vue"; import { onMounted, ref, watch, h } from "vue";
import { SuccessPicture } from "@icon-park/vue-next"; import { SuccessPicture } from "@icon-park/vue-next";
import { mainStore } from "@/store"; import { mainStore } from "@/store";
const store = mainStore();
const store = mainStore();
const bgUrl = ref(null); // const bgUrl = ref(null); //
//
const changeBg = (type) => { const changeBg = (type) => {
if (type == 0) { if (type == 0) {
bgUrl.value = `/images/background${Math.floor( bgUrl.value = `/images/background${Math.floor(
@ -32,7 +33,7 @@ const changeBg = (type) => {
} else if (type == 2) { } else if (type == 2) {
bgUrl.value = "https://api.btstu.cn/sjbz/api.php?lx=fengjing&format=images"; bgUrl.value = "https://api.btstu.cn/sjbz/api.php?lx=fengjing&format=images";
} else if (type == 3) { } else if (type == 3) {
bgUrl.value = "https://www.dmoe.cc/random.php"; bgUrl.value = "https://api.btstu.cn/sjbz/api.php?lx=dongman&format=images";
} }
}; };

View File

@ -8,7 +8,7 @@
- -
</span> </span>
{{ fullYear }} {{ fullYear }}
<a href="https://imsyy.top">無名</a> <a :href="SiteUrl">{{ SiteAnthor }}</a>
</span> </span>
<!-- 以下信息请不要修改哦 --> <!-- 以下信息请不要修改哦 -->
<span class="hidden"> <span class="hidden">
@ -45,6 +45,8 @@ const fullYear = new Date().getFullYear();
// //
const siteStartDate = ref(import.meta.env.VITE_SITE_START); const siteStartDate = ref(import.meta.env.VITE_SITE_START);
const siteIcp = ref(import.meta.env.VITE_SITE_ICP); const siteIcp = ref(import.meta.env.VITE_SITE_ICP);
const SiteAnthor = ref(import.meta.env.VITE_SITE_ANTHOR);
const SiteUrl = ref(import.meta.env.VITE_SITE_URL);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="links"> <div v-if="siteLinks[0]" class="links">
<div class="line"> <div class="line">
<Icon size="20"> <Icon size="20">
<Link /> <Link />
@ -19,11 +19,11 @@
}" }"
:mousewheel="true" :mousewheel="true"
> >
<SwiperSlide v-for="site in siteLinks" :key="site"> <SwiperSlide v-for="site in siteLinksList" :key="site">
<el-row class="link-all" :gutter="20"> <el-row class="link-all" :gutter="20">
<el-col <el-col
:span="8"
v-for="(item, index) in site" v-for="(item, index) in site"
:span="8"
:key="item" :key="item"
@click="jumpLink(item)" @click="jumpLink(item)"
> >
@ -45,7 +45,7 @@
</template> </template>
<script setup> <script setup>
import { onMounted } from "vue"; import { onMounted, computed } from "vue";
import { Icon } from "@vicons/utils"; import { Icon } from "@vicons/utils";
// https://www.xicons.org // https://www.xicons.org
import { import {
@ -67,6 +67,16 @@ import "swiper/scss/pagination";
const store = mainStore(); const store = mainStore();
//
const siteLinksList = computed(() => {
const result = [];
for (let i = 0; i < siteLinks.length; i += 6) {
const subArr = siteLinks.slice(i, i + 6);
result.push(subArr);
}
return result;
});
// //
const siteIcon = { const siteIcon = {
Blog, Blog,
@ -131,6 +141,7 @@ onMounted(() => {
} }
} }
.link-all { .link-all {
height: 220px;
.item { .item {
height: 100px; height: 100px;
width: 100%; width: 100%;