fix: vite process

This commit is contained in:
ckt1031 2023-07-09 17:01:14 +08:00
parent 4e6f9f67b3
commit ebd62c3bfc
3 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ const Footer = () => {
href='https://github.com/songquanpeng/one-api' href='https://github.com/songquanpeng/one-api'
target='_blank' target='_blank'
> >
{systemName} {process.env.REACT_APP_VERSION}{' '} {systemName} {import.meta.env.REACT_APP_VERSION}{' '}
</a> </a>
{' '} {' '}
<a href='https://github.com/songquanpeng' target='_blank'> <a href='https://github.com/songquanpeng' target='_blank'>

View File

@ -92,7 +92,7 @@ const OtherSetting = () => {
'https://api.github.com/repos/songquanpeng/one-api/releases/latest' 'https://api.github.com/repos/songquanpeng/one-api/releases/latest'
); );
const { tag_name, body } = res.data; const { tag_name, body } = res.data;
if (tag_name === process.env.REACT_APP_VERSION) { if (tag_name === import.meta.env.REACT_APP_VERSION) {
showSuccess(`已是最新版本:${tag_name}`); showSuccess(`已是最新版本:${tag_name}`);
} else { } else {
setUpdateData({ setUpdateData({

View File

@ -2,7 +2,7 @@ import { showError } from './utils';
import axios from 'axios'; import axios from 'axios';
export const API = axios.create({ export const API = axios.create({
baseURL: process.env.REACT_APP_SERVER ? process.env.REACT_APP_SERVER : '', baseURL: 'http://localhost:3000',
}); });
API.interceptors.response.use( API.interceptors.response.use(