leo 1 år sedan
förälder
incheckning
59e43af568
1 ändrade filer med 3 tillägg och 9 borttagningar
  1. 3 9
      nuxt.config.js

+ 3 - 9
nuxt.config.js

@@ -17,7 +17,6 @@ dotenv.config({
 });
 
 export default {
-  target: 'static',
   // Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
   ssr: false,
   // Global page headers: https://go.nuxtjs.dev/config-head
@@ -66,7 +65,9 @@ export default {
     '~/assets/style/main.scss',
     'vant/lib/index.css'
   ],
-
+  generate: {
+    routes: ['/claimCloudPhone/0', '/claimCloudPhone/1', '/claimCloudPhone/2', '/claimCloudPhone/3', '/claimCloudPhone/4', '/claimCloudPhone/4'] // 指定动态路由
+  },
   // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
   plugins: [
     // '~/plugins/api',
@@ -274,13 +275,6 @@ export default {
   router: {
     base: '/h5/',
     middleware: ['auth'],
-    extendRoutes(routes, resolve) {
-      routes.push({
-        name: 'claim-cloud-phone',
-        path: '/claimCloudPhone/:id',
-        component: resolve(__dirname, 'pages/claimCloudPhone/_type.vue')
-      });
-    }
   },
   styleResources: {
     scss: ['~/assets/style/variables.scss'],