修复正式域名下后台接口地址
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
import { FormEvent, useEffect, useState } from 'react';
|
import { FormEvent, useEffect, useState } from 'react';
|
||||||
|
|
||||||
const API_URL = process.env.API_URL || 'http://localhost:24731';
|
const API_URL = typeof window !== 'undefined'
|
||||||
|
? (process.env.NEXT_PUBLIC_API_URL ?? '')
|
||||||
|
: (process.env.API_URL || 'http://localhost:24731');
|
||||||
const contentTypes = [
|
const contentTypes = [
|
||||||
{ value: 'page', label: '页面' }, { value: 'article', label: '文章' }, { value: 'case', label: '案例' },
|
{ value: 'page', label: '页面' }, { value: 'article', label: '文章' }, { value: 'case', label: '案例' },
|
||||||
{ value: 'faq', label: '常见问题' }, { value: 'capability', label: '企业能力' }, { value: 'service', label: '服务' },
|
{ value: 'faq', label: '常见问题' }, { value: 'capability', label: '企业能力' }, { value: 'service', label: '服务' },
|
||||||
|
|||||||
Reference in New Issue
Block a user