diff --git a/app/components/index/index.vue b/app/components/index/index.vue
index 61455cf..9208379 100644
--- a/app/components/index/index.vue
+++ b/app/components/index/index.vue
@@ -4,49 +4,9 @@ import {
iotSolutionsData,
multiScenarioData,
softwareDevelopmentData,
- smartHardwareData,
- pageConfig
+ smartHardwareData
} from '~/data/indexData'
-// 动态加载资源
-const loadResources = () => {
- // 加载CSS
- pageConfig.cssFiles.forEach(href => {
- if (!document.querySelector(`link[href="${href}"]`)) {
- const link = document.createElement('link')
- link.rel = 'stylesheet'
- link.href = href
- link.type = 'text/css'
- document.head.appendChild(link)
- }
- })
-
- // 加载JS
- pageConfig.jsFiles.forEach(src => {
- if (!document.querySelector(`script[src="${src}"]`)) {
- const script = document.createElement('script')
- script.src = src
- script.type = 'text/javascript'
- document.head.appendChild(script)
- }
- })
-
- // 添加favicon
- if (!document.querySelector('link[rel="shortcut icon"]')) {
- const link = document.createElement('link')
- link.rel = 'shortcut icon'
- link.href = pageConfig.favicon
- document.head.appendChild(link)
- }
-
- // 加载百度统计
- const protocol = window.location.protocol === 'https:' ? 'https://' : 'http://'
- const script = document.createElement('script')
- script.src = `${protocol}hm.baidu.com/h.js?${pageConfig.baiduAnalytics}`
- script.type = 'text/javascript'
- document.head.appendChild(script)
-}
-
// 处理锚点链接
const handleAnchorLinks = () => {
if (window.location.hash) {
@@ -86,7 +46,6 @@ const handleDropdownImageHover = (index: number) => {
}
onMounted(() => {
- loadResources()
handleAnchorLinks()
// 绑定事件
diff --git a/app/pages/index.vue b/app/pages/index.vue
index f92370f..88467b6 100644
--- a/app/pages/index.vue
+++ b/app/pages/index.vue
@@ -1,4 +1,34 @@