Support http

This commit is contained in:
zimplexing
2025-07-04 16:30:20 +08:00
parent 680edee499
commit 92fd2fa76f
4 changed files with 8 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ export default function DetailScreen() {
if (error) {
return (
<ThemedView style={styles.centered}>
<ThemedText type="subtitle">Error: {error}</ThemedText>
<ThemedText type="subtitle">{error}</ThemedText>
</ThemedView>
);
}

View File

@@ -46,6 +46,7 @@ const initialCategories: Category[] = [
{ title: "热门剧集", type: "tv", tag: "热门" },
{ title: "热门电影", type: "movie", tag: "热门" },
{ title: "豆瓣 Top250", type: "movie", tag: "top250" },
// { title: "儿童", type: "movie", tag: "儿童" },
{ title: "美剧", type: "tv", tag: "美剧" },
{ title: "韩剧", type: "tv", tag: "韩剧" },
{ title: "日剧", type: "tv", tag: "日剧" },

View File

@@ -43,7 +43,11 @@ export default function SearchScreen() {
setError(null);
try {
const response = await moonTVApi.searchVideos(keyword);
setResults(response.results);
if (response.results.length > 0) {
setResults(response.results);
} else {
setError("没有找到相关内容");
}
} catch (err) {
setError("搜索失败,请稍后重试。");
console.error("Search failed:", err);

View File

@@ -15,7 +15,7 @@
"test": "jest --watchAll",
"lint": "expo lint",
"prebuild": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo prebuild --clean",
"prebuild-tv": "EXPO_TV=1 EXPO_USE_METRO_WORKSPACE_ROOT=1 expo prebuild --clean",
"prebuild-tv": "EXPO_TV=1 EXPO_USE_METRO_WORKSPACE_ROOT=1 expo prebuild --clean && yarn copy-config",
"copy-config": "cp -r xml/* android/app/src/*",
"build-local": "cd android && ./gradlew assembleRelease"
},