Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
WindWaving committed Mar 19, 2024
1 parent 9713700 commit 6edcabf
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
---
import BaseLayout from '@layouts/BaseLayout.astro';
import HomeIntroduce from '@components/home/HomeIntroduce.astro';
import ChooseReason from '@components/home/ChooseReason.astro';
import NacosEBook from '@components/home/NacosEBook.astro';
import ExploreFeatures from '@components/home/ExploreFeatures.astro';
import UseCompanies from '@components/home/UseCompanies.astro';
import HomeSolutionsCard from '@components/home/HomeSolutionsCard.astro';
import HomeFooter from '@components/common/Footer.astro';
import BaseLayout from "@layouts/BaseLayout.astro";
import HomeIntroduce from "@components/home/HomeIntroduce.astro";
import ChooseReason from "@components/home/ChooseReason.astro";
import NacosEBook from "@components/home/NacosEBook.astro";
import ExploreFeatures from "@components/home/ExploreFeatures.astro";
import UseCompanies from "@components/home/UseCompanies.astro";
import HomeSolutionsCard from "@components/home/HomeSolutionsCard.astro";
import HomeFooter from "@components/common/Footer.astro";
import { useTranslations } from "@i18n/util";
const t = useTranslations(Astro);
---

<BaseLayout
title={t('home.title')}
description={t('home.description')}
>
<BaseLayout title={t("home.title")} description={t("home.description")}>
<home-body>
<HomeIntroduce />
<ChooseReason />
Expand All @@ -34,24 +31,26 @@ const t = useTranslations(Astro);
super();
}
}
customElements.define('home-body', HomeBody);
customElements.define("home-body", HomeBody);

const copilotJSScript = document.createElement('script');
copilotJSScript.type = 'text/javascript';
copilotJSScript.src = '//dev.g.alicdn.com/cm-design/copilot-booter/0.0.21/copilot-booter.js';
copilotJSScript.addEventListener('load', function (){
if(window.CNPilot){
window.CNPilot.mounted({
CNPilot_NODE_ENV: 'development',
showFloatICON: true,
globalStyle:{
top:'64px'
},
headerProps:{
closeIcon: { show: true }, // 关闭按钮
}
});
};
});
const copilotJSScript = document.createElement("script");
copilotJSScript.type = "text/javascript";
copilotJSScript.src =
"//dev.g.alicdn.com/cm-design/copilot-booter/0.0.21/copilot-booter.js";
copilotJSScript.addEventListener("load", function () {
if (window.CNPilot) {
window.CNPilot.mounted({
CNPilot_NODE_ENV: "development",
showFloatICON: true,
globalStyle: {
top: "64px",
},
headerProps: {
closeIcon: { show: true }, // 关闭按钮
},
});
}
});
document.body.append(copilotJSScript);
console.log("test");
</script>

0 comments on commit 6edcabf

Please sign in to comment.