diff --git a/README.md b/README.md new file mode 100644 index 0000000..0d74b7c --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +## 数值人直播间 +### Start + +```shell +git clone git@e.coding.net:starbite/aixiaodui/fengmang-backend.git +npm install +npm run dev +``` +打开 [http://localhost:10021/](http://localhost:10021/) 查看效果 +### Deploy +**直接部署** +> 需要配置 /mgmt 及 /api 反向代理 +```shell +; 如果需要指定前缀(CDN)或者需要运行在相对路径中,不需要则跳过此命令 +export PUBLIC_PATH=xxxxxxxx(相应路径) +npm run build +``` +生成的资源在dist目录中,将此目录中所有文件放置在待部署web目录即可。 + +**使用docker** + +[x] TODO +```shell +dockercompose up -d +``` diff --git a/src/pages/live/index.tsx b/src/pages/live/index.tsx index abfab21..e5a92d3 100644 --- a/src/pages/live/index.tsx +++ b/src/pages/live/index.tsx @@ -177,7 +177,7 @@ export default function LiveIndex() { const totalDuration = useMemo(() => { if (!videoData || videoData.length == 0) return 0; // 计算总时长 - return videoData.reduce((sum, v) => sum + v.video_duration, 0); + return videoData.reduce((sum, v) => sum + Math.ceil(v.video_duration / 1000), 0); }, [videoData]) return (