更新
This commit is contained in:
parent
d1a9622d96
commit
7d814d7737
|
@ -34,5 +34,5 @@ func main() {
|
||||||
movie.Use(jwtMiddleware())
|
movie.Use(jwtMiddleware())
|
||||||
movie.GET("/", MovieList)
|
movie.GET("/", MovieList)
|
||||||
|
|
||||||
eg.Run(":4444")
|
eg.Run("0.0.0.0:4444")
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ const Main = () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(
|
const response = await axios.get(
|
||||||
`${config.Host}/movie/?page=${page}&limit=${limit}&category=${category}`
|
`${window.location.origin}/movie/?page=${page}&limit=${limit}&category=${category}`
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
@ -74,7 +74,7 @@ const Main = () => {
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, [config.Host, limit]);
|
}, [window.location.origin, limit]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const currentCategory = params.lastCategory;
|
const currentCategory = params.lastCategory;
|
||||||
|
|
|
@ -23,7 +23,7 @@ function LoginForm() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(`${config.Host}/api/login`, new URLSearchParams({
|
const response = await axios.post(`${window.location.origin}/api/login`, new URLSearchParams({
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
}), {
|
}), {
|
||||||
|
|
|
@ -38,7 +38,7 @@ const MovieCard = ({ movie, config }) => {
|
||||||
<CardMedia
|
<CardMedia
|
||||||
component="img"
|
component="img"
|
||||||
height="120"
|
height="120"
|
||||||
image={`${config.Host}/res/${movie.image}`}
|
image={`${window.location.origin}/res/${movie.image}`}
|
||||||
/>
|
/>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Typography>{truncateFilename(movie.filename, 15)}</Typography>
|
<Typography>{truncateFilename(movie.filename, 15)}</Typography>
|
||||||
|
|
|
@ -30,7 +30,7 @@ const VideoPlayer = () => {
|
||||||
{filename}
|
{filename}
|
||||||
</Typography>
|
</Typography>
|
||||||
<ReactPlayer
|
<ReactPlayer
|
||||||
url={`${config.Host}/res/${filename}`}
|
url={`${window.location.origin}/res/${filename}`}
|
||||||
controls
|
controls
|
||||||
width="100%"
|
width="100%"
|
||||||
height="auto"
|
height="auto"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user