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