mirror of
https://github.com/imsyy/home.git
synced 2024-11-16 03:32:17 +08:00
fix: 修复站点链接问题 #197
This commit is contained in:
parent
802cca0f44
commit
8cb8aba71f
|
@ -43,9 +43,9 @@ const changeBg = (type) => {
|
|||
} else if (type == 1) {
|
||||
bgUrl.value = "https://api.dujin.org/bing/1920.php";
|
||||
} else if (type == 2) {
|
||||
bgUrl.value = "https://api.btstu.cn/sjbz/api.php?lx=fengjing&format=images";
|
||||
bgUrl.value = "https://api.aixiaowai.cn/gqapi/gqapi.php";
|
||||
} else if (type == 3) {
|
||||
bgUrl.value = "https://api.btstu.cn/sjbz/api.php?lx=dongman&format=images";
|
||||
bgUrl.value = "https://api.aixiaowai.cn/api/api.php";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
-
|
||||
</span>
|
||||
{{ fullYear }}
|
||||
<a :href="SiteUrl">{{ SiteAnthor }}</a>
|
||||
<a :href="siteUrl">{{ siteAnthor }}</a>
|
||||
</span>
|
||||
<!-- 以下信息请不要修改哦 -->
|
||||
<span class="hidden">
|
||||
|
@ -48,8 +48,16 @@ const fullYear = new Date().getFullYear();
|
|||
// 加载配置数据
|
||||
const siteStartDate = ref(import.meta.env.VITE_SITE_START);
|
||||
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);
|
||||
const siteAnthor = ref(import.meta.env.VITE_SITE_ANTHOR);
|
||||
const siteUrl = computed(() => {
|
||||
const url = import.meta.env.VITE_SITE_URL;
|
||||
if (!url) return "https://www.imsyy.top";
|
||||
// 判断协议前缀
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://")) {
|
||||
return "//" + url;
|
||||
}
|
||||
return url;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -37,7 +37,16 @@ const store = mainStore();
|
|||
// 主页站点logo
|
||||
const siteLogo = import.meta.env.VITE_SITE_MAIN_LOGO;
|
||||
// 站点链接
|
||||
const siteUrl = import.meta.env.VITE_SITE_URL.split(".");
|
||||
const siteUrl = computed(() => {
|
||||
const url = import.meta.env.VITE_SITE_URL;
|
||||
if (!url) return "imsyy.top".split(".");
|
||||
// 判断协议前缀
|
||||
if (url.startsWith("http://") || url.startsWith("https://")) {
|
||||
const urlFormat = url.replace(/^(https?:\/\/)/, "");
|
||||
return urlFormat.split(".");
|
||||
}
|
||||
return url.split(".");
|
||||
});
|
||||
|
||||
// 简介区域文字
|
||||
const descriptionText = reactive({
|
||||
|
|
|
@ -19,7 +19,16 @@ import Link from "@/components/Links.vue";
|
|||
const store = mainStore();
|
||||
|
||||
// 站点链接
|
||||
const siteUrl = import.meta.env.VITE_SITE_URL.split(".");
|
||||
const siteUrl = computed(() => {
|
||||
const url = import.meta.env.VITE_SITE_URL;
|
||||
if (!url) return "imsyy.top".split(".");
|
||||
// 判断协议前缀
|
||||
if (url.startsWith("http://") || url.startsWith("https://")) {
|
||||
const urlFormat = url.replace(/^(https?:\/\/)/, "");
|
||||
return urlFormat.split(".");
|
||||
}
|
||||
return url.split(".");
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -61,7 +61,16 @@ const store = mainStore();
|
|||
const closeShow = ref(false);
|
||||
|
||||
// 站点链接
|
||||
const siteUrl = import.meta.env.VITE_SITE_URL.split(".");
|
||||
const siteUrl = computed(() => {
|
||||
const url = import.meta.env.VITE_SITE_URL;
|
||||
if (!url) return "imsyy.top".split(".");
|
||||
// 判断协议前缀
|
||||
if (url.startsWith("http://") || url.startsWith("https://")) {
|
||||
const urlFormat = url.replace(/^(https?:\/\/)/, "");
|
||||
return urlFormat.split(".");
|
||||
}
|
||||
return url.split(".");
|
||||
});
|
||||
|
||||
// 更新日志
|
||||
const upData = reactive({
|
||||
|
|
Loading…
Reference in New Issue
Block a user