feat: 悬挂ICP备案号,修复验证码、500登录、/admin Failed to Fetch,优化首页编辑器100%全屏平铺
This commit is contained in:
@@ -16,7 +16,7 @@ export default function Profile() {
|
||||
const [smtpEnabled, setSmtpEnabled] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
fetch('http://localhost:3001/api/sys/config')
|
||||
fetch('/api/sys/config')
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
if (data && data.smtp_enabled !== undefined) {
|
||||
@@ -37,7 +37,7 @@ export default function Profile() {
|
||||
setLoadingCode(true);
|
||||
try {
|
||||
const token = localStorage.getItem('token');
|
||||
const res = await fetch('http://localhost:3001/api/auth/send-code', {
|
||||
const res = await fetch('/api/auth/send-code', {
|
||||
method: 'POST',
|
||||
headers: { Authorization: `Bearer ${token}` }
|
||||
});
|
||||
@@ -69,7 +69,7 @@ export default function Profile() {
|
||||
setLoadingSubmit(true);
|
||||
try {
|
||||
const token = localStorage.getItem('token');
|
||||
const res = await fetch('http://localhost:3001/api/auth/update-profile', {
|
||||
const res = await fetch('/api/auth/update-profile', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user