Kaynağa Gözat

📦 服务端渲染测试

imengyu 1 ay önce
ebeveyn
işleme
a67a05412a
74 değiştirilmiş dosya ile 10164 ekleme ve 3525 silme
  1. 2 0
      .gitignore
  2. 0 4
      1.cjs
  3. 28 0
      nuxt.config.ts
  4. 10050 3072
      package-lock.json
  5. 8 0
      package.json
  6. 2 0
      public/robots.txt
  7. 3 0
      server/tsconfig.json
  8. 23 1
      src/App.vue
  9. 5 0
      src/api/village/VillageApi.ts
  10. 1 1
      src/components/Footer.vue
  11. 1 1
      src/components/NavBar.vue
  12. 1 1
      src/components/content/CommonListPage.vue
  13. 0 42
      src/main.ts
  14. 1 6
      src/views/NotFoundView.vue
  15. 0 0
      src/pages/about-company.vue
  16. 1 1
      src/views/AboutView.vue
  17. 0 0
      src/pages/communicate.vue
  18. 0 0
      src/pages/communicate/activity.vue
  19. 0 0
      src/pages/communicate/fujian-and-taiwan.vue
  20. 0 0
      src/pages/communicate/hk-macao-and-taiwan.vue
  21. 0 0
      src/pages/communicate/outside.vue
  22. 1 1
      src/views/details/TabDetailView.vue
  23. 0 0
      src/pages/details/artifact.vue
  24. 0 0
      src/pages/details/intangible.vue
  25. 5 4
      src/views/FusionView.vue
  26. 0 0
      src/pages/fusion/demo-site.vue
  27. 0 0
      src/pages/fusion/fashion.vue
  28. 0 0
      src/pages/fusion/point.vue
  29. 0 0
      src/pages/fusion/products.vue
  30. 0 0
      src/pages/fusion/route.vue
  31. 0 0
      src/pages/fusion/scenic-spot.vue
  32. 6 6
      src/views/HomeView.vue
  33. 1 1
      src/views/InheritorView.vue
  34. 0 0
      src/pages/inheritor/activity.vue
  35. 0 0
      src/pages/inheritor/area.vue
  36. 0 0
      src/pages/inheritor/block.vue
  37. 0 0
      src/pages/inheritor/heritage.vue
  38. 0 0
      src/pages/inheritor/inheritor.vue
  39. 0 0
      src/pages/inheritor/language.vue
  40. 0 0
      src/pages/inheritor/moveable.vue
  41. 0 0
      src/pages/inheritor/products.vue
  42. 0 0
      src/pages/inheritor/projects.vue
  43. 0 0
      src/pages/inheritor/seminar.vue
  44. 0 0
      src/pages/inheritor/submit.vue
  45. 0 0
      src/pages/inheritor/unmoveable.vue
  46. 0 0
      src/pages/introduction.vue
  47. 0 0
      src/pages/introduction/about.vue
  48. 0 0
      src/pages/introduction/book.vue
  49. 0 0
      src/pages/introduction/building.vue
  50. 0 0
      src/pages/introduction/character.vue
  51. 0 0
      src/pages/introduction/custom.vue
  52. 0 0
      src/pages/introduction/feature.vue
  53. 0 0
      src/pages/introduction/history.vue
  54. 0 0
      src/pages/introduction/language.vue
  55. 0 0
      src/pages/introduction/policy.vue
  56. 0 0
      src/pages/introduction/sea.vue
  57. 0 0
      src/pages/introduction/victuals.vue
  58. 1 1
      src/views/NewsView.vue
  59. 0 0
      src/pages/news/detail.vue
  60. 0 0
      src/pages/research.vue
  61. 0 0
      src/pages/research/discuss.vue
  62. 0 0
      src/pages/research/expert.vue
  63. 0 0
      src/pages/research/projects.vue
  64. 0 0
      src/pages/research/result.vue
  65. 0 0
      src/pages/research/teams.vue
  66. 1 1
      src/views/village/content.vue
  67. 16 26
      src/views/village/detail.vue
  68. 4 4
      src/views/village/index.vue
  69. 1 1
      src/views/village/list.vue
  70. 0 290
      src/router/index.ts
  71. 0 12
      tsconfig.app.json
  72. 2 9
      tsconfig.json
  73. 0 19
      tsconfig.node.json
  74. 0 21
      vite.config.ts

+ 2 - 0
.gitignore

@@ -14,6 +14,8 @@ dist-ssr
 coverage
 *.local
 
+.nuxt
+
 /cypress/videos/
 /cypress/screenshots/
 

+ 0 - 4
1.cjs

@@ -1,4 +0,0 @@
-const v8 = require('v8');
-const totalHeapSize = v8.getHeapStatistics().total_available_size;
-let totalHeapSizeInGB = (totalHeapSize / 1024 / 1024 / 1024).toFixed(2);
-console.log(`Total heap size: ${totalHeapSizeInGB} GB`);

+ 28 - 0
nuxt.config.ts

@@ -0,0 +1,28 @@
+// https://nuxt.com/docs/api/configuration/nuxt-config
+export default defineNuxtConfig({
+  compatibilityDate: '2025-05-15',
+  devtools: { enabled: true },
+  srcDir: 'src/',
+  modules: ['@pinia/nuxt', '@ant-design-vue/nuxt'],
+  routeRules: {
+    '/': { swr: 3600 },
+    '/about': { prerender: true },
+    '/communicate': { swr: 3600 },
+    '/fusion': { swr: 3600 },
+    '/inheritor': { swr: 3600 },
+    '/introduction': { swr: 3600 },
+    '/news': { swr: 3600 },
+    '/research': { swr: 3600 },
+
+    '/introduction/**': { swr: true },
+    '/communicate/**': { swr: true },
+    '/fusion/**': { swr: true },
+    '/inheritor/**': { swr: true },
+    '/news/**': { swr: true },
+    '/research/**': { swr: true },
+    '/village/**': { swr: true },
+
+
+    '/inheritor/submit': { ssr: false },
+  }
+})

Dosya farkı çok büyük olduğundan ihmal edildi
+ 10050 - 3072
package-lock.json


+ 8 - 0
package.json

@@ -4,6 +4,11 @@
   "private": true,
   "type": "module",
   "scripts": {
+    "nuxt-build": "nuxt build",
+    "nuxt-dev": "nuxt dev",
+    "nuxt-generate": "nuxt generate",
+    "nuxt-preview": "nuxt preview",
+    "nuxt-postinstall": "nuxt prepare",
     "dev": "vite",
     "build": "run-p type-check \"build-only {@}\" --",
     "preview": "vite preview",
@@ -12,9 +17,11 @@
     "updater": "node src/scripts/UpdateScript/index.mjs"
   },
   "dependencies": {
+    "@ant-design-vue/nuxt": "^1.4.6",
     "@imengyu/js-request-transform": "^0.3.3",
     "@imengyu/vue-dynamic-form": "^0.1.1",
     "@imengyu/vue-scroll-rect": "^0.1.3",
+    "@pinia/nuxt": "^0.11.1",
     "@vuemap/vue-amap": "^2.1.12",
     "ant-design-vue": "^4.2.6",
     "axios": "^1.9.0",
@@ -22,6 +29,7 @@
     "lodash-es": "^4.17.21",
     "md5": "^2.3.0",
     "mitt": "^3.0.1",
+    "nuxt": "^3.17.6",
     "pinia": "^3.0.1",
     "tslib": "^2.8.1",
     "vue": "^3.5.13",

+ 2 - 0
public/robots.txt

@@ -0,0 +1,2 @@
+User-Agent: *
+Disallow:

+ 3 - 0
server/tsconfig.json

@@ -0,0 +1,3 @@
+{
+  "extends": "../.nuxt/tsconfig.server.json"
+}

+ 23 - 1
src/App.vue

@@ -9,7 +9,7 @@
   >
     <NavBar />
     <main>
-      <RouterView />
+      <NuxtPage />
     </main>
     <Footer />
   </a-config-provider>
@@ -22,6 +22,18 @@ import NavBar from './components/NavBar.vue';
 import Footer from './components/Footer.vue';
 import { useAuthStore } from './stores/auth';
 import zhCN from 'ant-design-vue/es/locale/zh_CN';
+import VueAMap, {initAMapApiLoader} from '@vuemap/vue-amap';
+import { registryConvert } from './common/ConvertRgeistry'
+import { registerAllFormComponents } from './components/dynamicf';
+
+if (import.meta.client) {
+  initAMapApiLoader({
+    key: '212b86dc49a5116a34e945d31da7ad14',
+    securityJsCode: '46cae8205a707cfaf5801abcc4301566',
+  });
+  registerAllFormComponents();
+} 
+registryConvert();
 
 const authStore = useAuthStore();
 
@@ -38,3 +50,13 @@ watch(route, () => {
   })
 });
 </script>
+
+<style>
+@import "bootstrap/dist/css/bootstrap.css";
+@import "bootstrap/dist/css/bootstrap-grid.css";
+@import "bootstrap/dist/css/bootstrap-utilities.css";
+@import "./assets/scss/main.scss";
+@import "vue3-carousel/carousel.css";
+@import "@vuemap/vue-amap/dist/style.css";
+@import "@imengyu/vue-scroll-rect/lib/vue-scroll-rect.css";
+</style>

+ 5 - 0
src/api/village/VillageApi.ts

@@ -62,8 +62,13 @@ export class VillageMenuListItem extends DataModel<VillageMenuListItem> {
     };
 
   }
+
+  id = 0;
   name = '';
   logo = '';
+  region = 0;
+  modelId = 0;
+  mainBodyColumnId = 0;
 }
 
 export class VillageApi extends AppServerRequestModule<DataModel> {

+ 1 - 1
src/components/Footer.vue

@@ -10,7 +10,7 @@
         </div>
         <div class="col-sm-12 col-md-6">
           <div class="d-block links text-md-end">
-            <RouterLink :to="{ name: 'InheritorSubmit' }">申报入口</RouterLink>
+            <NuxtLink to="/inheritor/submit">申报入口</NuxtLink>
             <span>友情链接:</span>
             <a href="#">厦门市文化馆</a>
             <a href="#">厦门市图书馆</a>

+ 1 - 1
src/components/NavBar.vue

@@ -79,7 +79,7 @@ const headerBlur = computed(() => {
 });
 
 function goIndex() {
-  router.push({ name: 'home' });
+  router.push({ path: '/' });
 }
 function onScroll() {
   scrollValue.value = window.scrollY;

+ 1 - 1
src/components/content/CommonListPage.vue

@@ -112,7 +112,7 @@ const props = defineProps({
   },
   defaultImage: {
     type: String,
-    default: 'https://mncdn.wenlvti.net/app_static/minnan/EmptyImage.png'
+    default: 'https://mn.wenlvti.net/app_static/minnan/EmptyImage.png'
   },
 })
 </script>

+ 0 - 42
src/main.ts

@@ -1,42 +0,0 @@
-
-import 'bootstrap/dist/css/bootstrap.css'
-import 'bootstrap/dist/css/bootstrap-grid.css'
-import 'bootstrap/dist/css/bootstrap-utilities.css'
-import './assets/scss/main.scss'
-import 'ant-design-vue/dist/reset.css';
-import 'vue3-carousel/carousel.css'
-import '@vuemap/vue-amap/dist/style.css'
-import '@imengyu/vue-scroll-rect/lib/vue-scroll-rect.css'
-
-createApp(App)
-import { createApp } from 'vue'
-import { createPinia } from 'pinia'
-
-import App from './App.vue'
-import router from './router'
-import Antd from 'ant-design-vue';
-import ScrollRect from '@imengyu/vue-scroll-rect'
-import VueAMap, {initAMapApiLoader} from '@vuemap/vue-amap';
-import CommonListPage from './components/content/CommonListPage.vue';
-import { registryConvert } from './common/ConvertRgeistry'
-import { registerAllFormComponents } from './components/dynamicf';
-
-initAMapApiLoader({
-  key: '212b86dc49a5116a34e945d31da7ad14',
-  securityJsCode: '46cae8205a707cfaf5801abcc4301566',
-});
-registerAllFormComponents();
-
-const app = createApp(App);
-
-app.use(createPinia());
-app.use(VueAMap);
-app.use(Antd);
-app.use(router);
-app.use(ScrollRect);
-app.component('CommonListPage', CommonListPage);
-
-app.mount('#app');
-
-
-registryConvert();

+ 1 - 6
src/views/NotFoundView.vue

@@ -4,17 +4,12 @@
     <div class="empty-page">
       <img src="@/assets/images/404.svg" />
       <h1>抱歉,您访问的页面不存在</h1>
-      <a href="javascript:void(0)" @click="back">点击这里返回上一页</a>
+      <NuxtLink to="/">点击这里返回上一页</NuxtLink>
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
-import router from '@/router';
-
-function back() {
-  router.back();
-}
 </script>
 
 <style lang="scss">

src/views/AboutCompanyView.vue → src/pages/about-company.vue


+ 1 - 1
src/views/AboutView.vue

@@ -88,7 +88,7 @@
             v-for="(item, k) in newsLoader.list.value"
             :key="item.id"
             class="item"
-            @click="router.push({ name: 'news-detail', query: { id: item.id }})"
+            @click="router.push({ path: 'news/detail', query: { id: item.id }})"
           >
             <img :src="item.image" alt="新闻图片" />
             <TitleDescBlock

src/views/CommunicateView.vue → src/pages/communicate.vue


src/views/communicate/activity.vue → src/pages/communicate/activity.vue


src/views/communicate/fujian-and-taiwan.vue → src/pages/communicate/fujian-and-taiwan.vue


src/views/communicate/hk-macao-and-taiwan.vue → src/pages/communicate/hk-macao-and-taiwan.vue


src/views/communicate/outside.vue → src/pages/communicate/outside.vue


+ 1 - 1
src/views/details/TabDetailView.vue

@@ -189,7 +189,7 @@ useLoadQuerys({
   id: 0
 }, async ({ id }) => {
   if (id <= 0) {
-    router.push({ name: 'NotFound' });
+    router.push({ path: '/404' });
     return;
   }
   currentTabIndex.value = 0;

src/views/details/ArtifactDetailView.vue → src/pages/details/artifact.vue


src/views/details/IntangibleDetailView.vue → src/pages/details/intangible.vue


+ 5 - 4
src/views/FusionView.vue

@@ -20,7 +20,7 @@
         </div>
         <div class="calandar row">
           <div class="col col-12 col-lg-6 col-xl-6 p-0">
-            <scroll-rect class="left-list">
+            <ScrollRect class="left-list">
               <h3 class="month-title">{{monthSelected}}月</h3>
               <ImageTitleDescBlock
                 v-for="(item, index) in daysData"
@@ -30,10 +30,10 @@
                 :desc="item.desc || item.title"
                 @click="goDetail(item.id)"
               />
-            </scroll-rect>
+            </ScrollRect>
           </div>
           <div class="month-grid col-12 col-lg-6 col-xl-6 p-0">
-            <scroll-rect 
+            <ScrollRect
               class="grid"
               v-for="(month, k) in monthData"
               :key="k"
@@ -49,7 +49,7 @@
                   {{ holiday.title }}
                 </span>
               </div>
-            </scroll-rect>
+            </ScrollRect>
           </div>
         </div>
       </div>
@@ -84,6 +84,7 @@ import ThreeImageList from '@/components/parts/ThreeImageList.vue';
 import { usePageAction } from '@/composeable/PageAction';
 import CommonContent, { GetContentListItem, GetContentListParams } from '@/api/CommonContent';
 import CalendarContent from '@/api/fusion/CalendarContent';
+import { ScrollRect } from '@imengyu/vue-scroll-rect';
 
 const carouselConfig = {
   itemsToShow: 1,

src/views/fusion/demo-site.vue → src/pages/fusion/demo-site.vue


src/views/fusion/fashion.vue → src/pages/fusion/fashion.vue


src/views/fusion/point.vue → src/pages/fusion/point.vue


src/views/fusion/products.vue → src/pages/fusion/products.vue


src/views/fusion/route.vue → src/pages/fusion/route.vue


src/views/fusion/scenic-spot.vue → src/pages/fusion/scenic-spot.vue


+ 6 - 6
src/views/HomeView.vue

@@ -103,7 +103,7 @@
               :image="item.image"
               :title="item.title"
               :desc="item.desc"
-              @click="router.push({ name: 'intangible-detail', query: { id: item.id } })"
+              @click="router.push({ path: '/details/intangible', query: { id: item.id } })"
             />
           </div>
         </SimplePageContentLoader>
@@ -125,7 +125,7 @@
               :image="item.image"
               :title="item.title"
               :desc="item.desc"
-              @click="router.push({ name: 'artifact-detail', query: { id: item.id } })"
+              @click="router.push({ path: '/details/artifact', query: { id: item.id } })"
             />
           </div>
         </SimplePageContentLoader>
@@ -144,7 +144,7 @@
             <Slide 
               v-for="(item, index) in recommend3Data.content.value"
               :key="index"
-              @click="router.push({ name: 'news-detail', query: { id: item.id } })"
+              @click="router.push({ path: '/news/detail', query: { id: item.id } })"
             >
               <ImageTitleBlock 
                 :image="item.image"
@@ -167,7 +167,7 @@
       <div class="content">
         <div class="title left-right">
           <h2>最新资讯动态</h2>
-          <div class="small-more" @click="router.push({ name: 'news' })">
+          <div class="small-more" @click="router.push({ path: '/news' })">
             <span>更多动态信息</span>
             <img src="@/assets/images/index/ButtonMore.png" alt="更多" />
           </div>
@@ -181,7 +181,7 @@
               :image="item.image"
               :title="item.title"
               :desc="item.typeText"
-              @click="router.push({ name: 'news-detail', query: { id: item.id } })"
+              @click="router.push({ path: '/news/detail', query: { id: item.id } })"
             />
           </div>
         </SimplePageContentLoader>
@@ -316,7 +316,7 @@ const statsData = useSimpleDataLoader(async () => {
         },
         {
           title: '传统村落',
-          value: data.villageData[0].total,
+          value: data.villageData[0]?.total ?? 0,
           onClick: () => router.push({ path: '/village/index' }),
         },
         {

+ 1 - 1
src/views/InheritorView.vue

@@ -300,7 +300,7 @@ const statsData = useSimpleDataLoader(async () => {
         },
         {
           title: '传统村落',
-          value: data.villageData[0].total,
+          value: data.villageData[0]?.total ?? 0,
           onClick: () => navTo('/village/index'),
         },
         {

src/views/inheritor/activity.vue → src/pages/inheritor/activity.vue


src/views/inheritor/area.vue → src/pages/inheritor/area.vue


src/views/inheritor/block.vue → src/pages/inheritor/block.vue


src/views/inheritor/heritage.vue → src/pages/inheritor/heritage.vue


src/views/inheritor/inheritor.vue → src/pages/inheritor/inheritor.vue


src/views/inheritor/language.vue → src/pages/inheritor/language.vue


src/views/inheritor/moveable.vue → src/pages/inheritor/moveable.vue


src/views/inheritor/products.vue → src/pages/inheritor/products.vue


src/views/inheritor/projects.vue → src/pages/inheritor/projects.vue


src/views/inheritor/seminar.vue → src/pages/inheritor/seminar.vue


src/views/inheritor/submit.vue → src/pages/inheritor/submit.vue


src/views/inheritor/unmoveable.vue → src/pages/inheritor/unmoveable.vue


src/views/IntrodView.vue → src/pages/introduction.vue


src/views/introduction/about.vue → src/pages/introduction/about.vue


src/views/introduction/book.vue → src/pages/introduction/book.vue


src/views/introduction/building.vue → src/pages/introduction/building.vue


src/views/introduction/character.vue → src/pages/introduction/character.vue


src/views/introduction/custom.vue → src/pages/introduction/custom.vue


src/views/introduction/feature.vue → src/pages/introduction/feature.vue


src/views/introduction/history.vue → src/pages/introduction/history.vue


src/views/introduction/language.vue → src/pages/introduction/language.vue


src/views/introduction/policy.vue → src/pages/introduction/policy.vue


src/views/introduction/sea.vue → src/pages/introduction/sea.vue


src/views/introduction/victuals.vue → src/pages/introduction/victuals.vue


+ 1 - 1
src/views/NewsView.vue

@@ -64,7 +64,7 @@
             v-for="(item, k) in newsLoader.list.value"
             :key="item.id"
             class="item"
-            @click="router.push({ name: 'news-detail', query: { id: item.id }})"
+            @click="router.push({ path: '/news/detail', query: { id: item.id }})"
           >
             <img :src="item.image" alt="新闻图片" />
             <TitleDescBlock

src/views/NewsDetailView.vue → src/pages/news/detail.vue


src/views/ResearchView.vue → src/pages/research.vue


src/views/research/discuss.vue → src/pages/research/discuss.vue


src/views/research/expert.vue → src/pages/research/expert.vue


src/views/research/projects.vue → src/pages/research/projects.vue


src/views/research/result.vue → src/pages/research/result.vue


src/views/research/teams.vue → src/pages/research/teams.vue


+ 1 - 1
src/views/village/content.vue

@@ -52,7 +52,7 @@ useLoadQuerys({
   modelId: 0,
 }, async (p) => {
   if (p.id <= 0) {
-    router.push({ name: 'NotFound' });
+    router.push({ path: '404' });
     return;
   }
   newsLoader.loadData(p);

+ 16 - 26
src/views/village/detail.vue

@@ -40,13 +40,22 @@
       <div class="mt-3" />
       <div class="d-flex flex-row flex-wrap">
         <div
-          v-for="(i, k) in tagsData"
+          v-for="(item, k) in tagsData"
           :key="k"
           class="tag-item"
-          @click="handleGoDetail(i)"
         >
-          <img :src="i.image" />
-          <span>{{ i.title }}</span>
+          <NuxtLink :to="{ 
+            path: '/village/list',
+            query: { 
+              id: item.id,
+              model_id: item.modelId,
+              main_body_column_id: item.mainBodyColumnId,
+              region: item.region,
+            }, 
+          }">
+            <img :src="item.logo" />
+            <span>{{ item.name }}</span>
+          </NuxtLink> 
         </div>
       </div>
       <div class="mt-3" />
@@ -65,13 +74,12 @@
 
 <script setup lang="ts">
 import SimpleRichHtml from '@/components/display/SimpleRichHtml.vue';
-import router from '@/router';
 import { useRoute } from 'vue-router';
 import { ref, watch } from 'vue';
-import VillageApi from '@/api/village/VillageApi';
+import VillageApi, { VillageMenuListItem } from '@/api/village/VillageApi';
 import ImageSwiper from '@/components/content/ImageSwiper.vue';
 
-const tagsData = ref<{ image: string, title: string }[]>([]);
+const tagsData = ref<VillageMenuListItem[]>([]);
 const route = useRoute();
 const data = ref({
   image: '',
@@ -119,25 +127,7 @@ async function loadInfo() {
   const menu = await VillageApi.getVillageMenuList(id);
 
   loading.value = false;
-  tagsData.value = menu.map((item, index) => {
-    return {
-      title: item.name,
-      image: item.logo,
-      region: data.value.region,
-      ...item,
-    };
-  });
-}
-function handleGoDetail(item: any) {
-  router.push({
-    name: 'VillageList2',
-    query: { 
-      id: item.id,
-      model_id: item.modelId,
-      main_body_column_id: item.mainBodyColumnId,
-      region: item.region,
-    }, 
-  })
+  tagsData.value = menu;
 }
 
 </script>

+ 4 - 4
src/views/village/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 传统村落 -->
-   <CommonListPage
+  <CommonListPage
     :title="'传统村落'"
     :prevPage="{ title: '保护传承' }"
     :dropDownNames="[]"
@@ -19,14 +19,14 @@
 </template>
 
 <script setup lang="ts">
-import router from '@/router';
 import { computed, onMounted, ref } from 'vue';
-import { useRoute } from 'vue-router';
+import { useRoute, useRouter } from 'vue-router';
 import VillageApi from '@/api/village/VillageApi';
 import ContentDialog from '@/components/parts/ContentDialog.vue';
 import CommonContent from '@/api/CommonContent';
 
 const route = useRoute();
+const router = useRouter();
 const popupContentShow = ref(false);
 const smallDialog = computed(() => {
   return route.name === 'VillageList2' || route.name === 'VillageDetail'; 
@@ -38,7 +38,7 @@ async function showDetail(item: any) {
 
   setTimeout(() => {
     router.push({
-      name: 'VillageDetail',
+      path: '/village/detail',
       query: { id: item.id }, 
     })
   }, 200);

+ 1 - 1
src/views/village/list.vue

@@ -27,7 +27,7 @@ const route = useRoute();
 const list = ref();
 
 async function showDetail(item: any) {
-  router.push({ name: 'VillageContent', query: { id: item.id } });
+  router.push({ path: '/village/content', query: { id: item.id } });
 }
 async function loadData(
   page: number, 

+ 0 - 290
src/router/index.ts

@@ -1,290 +0,0 @@
-import { createRouter, createWebHashHistory } from 'vue-router'
-import HomeView from '../views/HomeView.vue'
-import NotFoundView from '../views/NotFoundView.vue'
-
-const router = createRouter({
-  history: createWebHashHistory(import.meta.env.BASE_URL),
-  routes: [
-    {
-      path: '/',
-      name: 'home',
-      component: HomeView,
-    },
-    {
-      path: '/about',
-      name: 'about',
-      // route level code-splitting
-      // this generates a separate chunk (About.[hash].js) for this route
-      // which is lazy-loaded when the route is visited.
-      component: () => import('../views/AboutView.vue'),
-    },
-    {
-      path: '/news',
-      name: 'news',
-      component: () => import('../views/NewsView.vue'),
-    },
-    {
-      path: '/news/detail',
-      name: 'news-detail',
-      component: () => import('../views/NewsDetailView.vue'),
-    },
-    {
-      path: '/introduction',
-      name: 'introduction',
-      component: () => import('../views/IntrodView.vue'),
-    },
-    {
-      path: '/introduction/about',
-      name: 'IntroductionAbout',
-      component: () => import('../views/introduction/about.vue'),
-    },
-    {
-      path: '/introduction/history',
-      name: 'IntroductionHistory',
-      component: () => import('../views/introduction/history.vue'),
-    },
-    {
-      path: '/introduction/character',
-      name: 'IntroductionCharacter',
-      component: () => import('../views/introduction/character.vue'),
-    },
-    {
-      path: '/introduction/language',
-      name: 'IntroductionLanguage',
-      component: () => import('../views/introduction/language.vue'),
-    },
-    {
-      path: '/introduction/custom',
-      name: 'IntroductionCustom',
-      component: () => import('../views/introduction/custom.vue'),
-    },
-    {
-      path: '/introduction/feature',
-      name: 'IntroductionFeature',
-      component: () => import('../views/introduction/feature.vue'),
-    },
-    {
-      path: '/introduction/building',
-      name: 'IntroductionBuilding',
-      component: () => import('../views/introduction/building.vue'),
-    },
-    {
-      path: '/introduction/victuals',
-      name: 'IntroductionVictuals',
-      component: () => import('../views/introduction/victuals.vue'),
-    },
-    {
-      path: '/introduction/sea',
-      name: 'IntroductionSea',
-      component: () => import('../views/introduction/sea.vue'),
-    },
-    {
-      path: '/introduction/book',
-      name: 'IntroductionBook',
-      component: () => import('../views/introduction/book.vue'),
-    },
-    {
-      path: '/introduction/policy',
-      name: 'IntroductionPolicy',
-      component: () => import('../views/introduction/policy.vue'),
-    },
-    {
-      path: '/communicate',
-      name: 'communicate',
-      component: () => import('../views/CommunicateView.vue'),
-    },
-    {
-      path: '/communicate/fujian-and-taiwan',
-      name: 'CommunicateFujianAndTaiwan',
-      component: () => import('../views/communicate/fujian-and-taiwan.vue'),
-    },
-    {
-      path: '/communicate/hk-macao-and-taiwan',
-      name: 'CommunicateHKMacaoAndTiwanAndTaiwan',
-      component: () => import('../views/communicate/hk-macao-and-taiwan.vue'),
-    },
-    {
-      path: '/communicate/activity',
-      name: 'CommunicateActivity',
-      component: () => import('../views/communicate/activity.vue'),
-    },
-    {
-      path: '/communicate/outside',
-      name: 'CommunicateOutside',
-      component: () => import('../views/communicate/outside.vue'),
-    },
-    {
-      path: '/research',
-      name: 'research',
-      component: () => import('../views/ResearchView.vue'),
-    },
-    {
-      path: '/research/teams',
-      name: 'ResearchTeams',
-      component: () => import('../views/research/teams.vue'),
-    },
-    {
-      path: '/research/discuss',
-      name: 'ResearchDiscuss',
-      component: () => import('../views/research/discuss.vue'),
-    },
-    {
-      path: '/research/projects',
-      name: 'ResearchProjects',
-      component: () => import('../views/research/projects.vue'),
-    },
-    {
-      path: '/research/result',
-      name: 'ResearchResult',
-      component: () => import('../views/research/result.vue'),
-    },
-    {
-      path: '/research/expert',
-      name: 'ResearchExpert',
-      component: () => import('../views/research/expert.vue'),
-    },
-    {
-      path: '/fusion',
-      name: 'fusion',
-      component: () => import('../views/FusionView.vue'),
-    },
-    {
-      path: '/fusion/scenic-spot',
-      name: 'FusionScenicSpot',
-      component: () => import('../views/fusion/scenic-spot.vue'),
-    },
-    {
-      path: '/fusion/route',
-      name: 'FusionRoute',
-      component: () => import('../views/fusion/route.vue'),
-    },
-    {
-      path: '/fusion/products',
-      name: 'FusionProducts',
-      component: () => import('../views/fusion/products.vue'),
-    },
-    {
-      path: '/fusion/demo-site',
-      name: 'FusionDemoSite',
-      component: () => import('../views/fusion/demo-site.vue'),
-    },
-    {
-      path: '/fusion/fashion',
-      name: 'FusionFashion',
-      component: () => import('../views/fusion/fashion.vue'),
-    },
-    {
-      path: '/fusion/point',
-      name: 'FusionPoint',
-      component: () => import('../views/fusion/point.vue'),
-    },
-    {
-      path: '/inheritor',
-      name: 'inheritor',
-      component: () => import('../views/InheritorView.vue'),
-    },
-    {
-      path: '/inheritor/submit',
-      name: 'InheritorSubmit',
-      component: () => import('../views/inheritor/submit.vue'),
-    },
-    {
-      path: '/inheritor/inheritor',
-      name: 'InheritorList',
-      component: () => import('../views/inheritor/inheritor.vue'),
-    },
-    {
-      path: '/inheritor/products',
-      name: 'InheritorProducts',
-      component: () => import('../views/inheritor/products.vue'),
-    },
-    {
-      path: '/inheritor/projects',
-      name: 'InheritorProjects',
-      component: () => import('../views/inheritor/projects.vue'),
-    },
-    {
-      path: '/inheritor/seminar',
-      name: 'InheritorSeminar',
-      component: () => import('../views/inheritor/seminar.vue'),
-    },
-    {
-      path: '/inheritor/unmoveable',
-      name: 'InheritorUnmoveable',
-      component: () => import('../views/inheritor/unmoveable.vue'),
-    },
-    {
-      path: '/inheritor/area',
-      name: 'InheritorArea',
-      component: () => import('../views/inheritor/area.vue'),
-    },
-    {
-      path: '/inheritor/heritage',
-      name: 'InheritorHeritage',
-      component: () => import('../views/inheritor/heritage.vue'),
-    },
-    {
-      path: '/inheritor/block',
-      name: 'InheritorBlock',
-      component: () => import('../views/inheritor/block.vue'),
-    },
-    {
-      path: '/inheritor/language',
-      name: 'InheritorLanguage',
-      component: () => import('../views/inheritor/language.vue'),
-    },
-    {
-      path: '/inheritor/artifact-detail',
-      name: 'artifact-detail',
-      component: () => import('../views/details/ArtifactDetailView.vue'),
-    },
-    {
-      path: '/inheritor/intangible-detail',
-      name: 'intangible-detail',
-      component: () => import('../views/details/IntangibleDetailView.vue'),
-    },
-    {
-      path: '/inheritor/moveable',
-      name: 'InheritorMoveable',
-      component: () => import('../views/inheritor/moveable.vue'),
-    },
-    {
-      path: '/inheritor/activity',
-      name: 'InheritorActivity',
-      component: () => import('../views/inheritor/activity.vue'),
-    },
-    {
-      path: '/village/index',
-      name: 'VillageList',
-      component: () => import('../views/village/index.vue'),
-      children: [
-        {
-          path: 'content',
-          name: 'VillageContent',
-          component: () => import('../views/village/content.vue'),
-        },
-        {
-          path: 'list',
-          name: 'VillageList2',
-          component: () => import('../views/village/list.vue'),
-        },
-        {
-          path: 'detail',
-          name: 'VillageDetail',
-          component: () => import('../views/village/detail.vue'),
-        },
-      ]
-    },
-    {
-      path: '/404',
-      name: 'NotFound',
-      component: NotFoundView
-    },
-    {
-      path: '/:pathMatch(.*)*', // 匹配所有不存在的路径
-      redirect: '/404'
-    }
-  ],
-})
-
-export default router

+ 0 - 12
tsconfig.app.json

@@ -1,12 +0,0 @@
-{
-  "extends": "@vue/tsconfig/tsconfig.dom.json",
-  "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
-  "exclude": ["src/**/__tests__/*"],
-  "compilerOptions": {
-    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
-
-    "paths": {
-      "@/*": ["./src/*"]
-    }
-  }
-}

+ 2 - 9
tsconfig.json

@@ -1,11 +1,4 @@
 {
-  "files": [],
-  "references": [
-    {
-      "path": "./tsconfig.node.json"
-    },
-    {
-      "path": "./tsconfig.app.json"
-    }
-  ]
+  // https://nuxt.com/docs/guide/concepts/typescript
+  "extends": "./.nuxt/tsconfig.json"
 }

+ 0 - 19
tsconfig.node.json

@@ -1,19 +0,0 @@
-{
-  "extends": "@tsconfig/node22/tsconfig.json",
-  "include": [
-    "vite.config.*",
-    "vitest.config.*",
-    "cypress.config.*",
-    "nightwatch.conf.*",
-    "playwright.config.*",
-    "eslint.config.*"
-  ],
-  "compilerOptions": {
-    "noEmit": true,
-    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
-
-    "module": "ESNext",
-    "moduleResolution": "Bundler",
-    "types": ["node"]
-  }
-}

+ 0 - 21
vite.config.ts

@@ -1,21 +0,0 @@
-import { fileURLToPath, URL } from 'node:url'
-
-import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
-import vueJsx from '@vitejs/plugin-vue-jsx'
-import vueDevTools from 'vite-plugin-vue-devtools'
-
-// https://vite.dev/config/
-export default defineConfig({
-  plugins: [
-    vue(),
-    vueJsx(),
-    vueDevTools(),
-  ],
-  base: './',
-  resolve: {
-    alias: {
-      '@': fileURLToPath(new URL('./src', import.meta.url))
-    },
-  },
-})