| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- export default {
- // Global page headers (https://go.nuxtjs.dev/config-head)
- head: {
- title: '合方圆-合天地方圆',
- meta: [
- { charset: 'utf-8' },
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
- { hid: 'description', name: 'description', content: '' }
- ],
- link: [
- { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
- ]
- },
- css: [
- '@/assets/public.css'
- ],
- // Auto import components (https://go.nuxtjs.dev/config-components)
- components: true,
- // Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
- buildModules: [
- '@nuxtjs/tailwindcss'
- ],
- // Modules (https://go.nuxtjs.dev/config-modules)
- modules: [
- // https://go.nuxtjs.dev/axios
- '@nuxtjs/axios',
- ],
- // api中间件
- serverMiddleware: [
- '~/server/index.js'
- ],
- // Axios module configuration (https://go.nuxtjs.dev/config-axios)
- axios: {
- proxy: true
- },
- proxy: {
- '/api': {
- target: 'http://szhfy.com.cn/', // 目标接口域名
- pathRewrite: {
- '^/api': '/api', // 把 /api 替换成 /
- changeOrigin: true // 表示是否跨域
- }
- },
- '/public': {
- target: 'http://szhfy.com.cn/', // 目标接口域名
- pathRewrite: {
- changeOrigin: true // 表示是否跨域
- }
- }
- },
- // Build Configuration (https://go.nuxtjs.dev/config-build)
- build: {},
- server: {
- port: 8000, // default: 3000
- host: '0.0.0.0', // default: localhost
- }
- }
|