mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-08 07:28:37 +08:00
fix: proxy B站图片 CDN 解决 web 端防盗链图片不显示问题
- dev-proxy.js 新增 /bilibili-img 路由,代理 *.hdslb.com 并注入正确 Referer - utils/imageUrl.ts 新增 proxyImageUrl(),web 端将图片 URL 转为本地代理地址 - VideoCard / CommentItem / MiniPlayer / [bvid] 对所有 B站图片应用 proxyImageUrl
This commit is contained in:
@@ -13,6 +13,7 @@ import { useVideoDetail } from '../../hooks/useVideoDetail';
|
||||
import { useComments } from '../../hooks/useComments';
|
||||
import { useVideoStore } from '../../store/videoStore';
|
||||
import { formatCount } from '../../utils/format';
|
||||
import { proxyImageUrl } from '../../utils/imageUrl';
|
||||
|
||||
type Tab = 'intro' | 'comments';
|
||||
|
||||
@@ -90,7 +91,7 @@ export default function VideoDetailScreen() {
|
||||
</View>
|
||||
|
||||
<View style={styles.upRow}>
|
||||
<Image source={{ uri: video.owner.face }} style={styles.avatar} />
|
||||
<Image source={{ uri: proxyImageUrl(video.owner.face) }} style={styles.avatar} />
|
||||
<Text style={styles.upName}>{video.owner.name}</Text>
|
||||
<TouchableOpacity style={styles.followBtn}>
|
||||
<Text style={styles.followTxt}>+ 关注</Text>
|
||||
|
||||
Reference in New Issue
Block a user