diff --git a/app/components/pages/about/LearnMoreCard.vue b/app/components/pages/about/LearnMoreCard.vue
new file mode 100644
index 0000000..49eb285
--- /dev/null
+++ b/app/components/pages/about/LearnMoreCard.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
diff --git a/app/pages/about/index.vue b/app/pages/about/index.vue
index ff613a8..37ce79a 100644
--- a/app/pages/about/index.vue
+++ b/app/pages/about/index.vue
@@ -17,15 +17,16 @@
{{ $t('learn-more') }}
-
-
-
-
-
-
- {{ $t('navigation.contact-info') }}
-
-
+
+
@@ -85,25 +86,7 @@
justify-content: left;
margin-top: 2rem;
margin-left: 2rem;
- }
-
- .card-button {
- width: 20%;
- min-width: 200px;
- padding: 20px;
- margin: 0 auto;
- cursor: pointer;
- text-align: center;
- font-size: 1.5em;
- }
-
- .card-button:hover {
- transform: translateY(-4px);
- box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
- }
-
- .icon {
- padding: 10px;
+ gap: 2rem;
}
.loading {
diff --git a/app/utils/autoMap.ts b/app/utils/autoMap.ts
new file mode 100644
index 0000000..c55efde
--- /dev/null
+++ b/app/utils/autoMap.ts
@@ -0,0 +1,43 @@
+async function testSpeed(url: string, timeout = 1500) {
+ const start = performance.now();
+
+ try {
+ await Promise.race([
+ fetch(url, { method: 'HEAD', mode: 'no-cors' }),
+ new Promise((_, reject) => setTimeout(() => reject('timeout'), timeout)),
+ ]);
+
+ return performance.now() - start;
+ } catch {
+ return Infinity; // unreachable or timed out
+ }
+}
+
+async function selectBestMap() {
+ const testTargets = {
+ amap: 'https://www.amap.com/favicon.ico',
+ google: 'https://maps.google.com/favicon.ico',
+ };
+
+ const results: Record = {};
+
+ for (const key in testTargets) {
+ results[key] = await testSpeed(testTargets[key]);
+ }
+
+ logger.debug(results);
+
+ // 根据延迟排序,选择最稳最快的平台
+ return Object.entries(results).sort((a, b) => a[1] - b[1])[0][0];
+}
+
+export async function getAutoMappedService(): Promise {
+ const target = {
+ amap: 'https://surl.amap.com/2dYNorIJ1dgoN',
+ google: 'https://maps.app.goo.gl/9LqvMwEq7VaRkqnM6',
+ };
+
+ const fastestMap = await selectBestMap();
+
+ return target[fastestMap];
+}
diff --git a/i18n/locales/en.json b/i18n/locales/en.json
index aaa5fc1..f9fde1c 100644
--- a/i18n/locales/en.json
+++ b/i18n/locales/en.json
@@ -37,7 +37,8 @@
"downloads": "Downloads",
"faq": "FAQ",
"documents": "Documents",
- "calculator": "Calculator"
+ "calculator": "Calculator",
+ "address": "Company Address"
},
"contact-info": "Contact Us",
"telephone": "Telephone",
diff --git a/i18n/locales/zh.json b/i18n/locales/zh.json
index 7d3d16f..ad4373c 100644
--- a/i18n/locales/zh.json
+++ b/i18n/locales/zh.json
@@ -37,7 +37,8 @@
"downloads": "文件下载",
"faq": "常见问题",
"documents": "文档资料",
- "calculator": "纸管计算工具"
+ "calculator": "纸管计算工具",
+ "address": "公司地址"
},
"contact-info": "联系我们",
"telephone": "电话",