Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
张艾宸
/
webScreen
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
799967501@qq.com
2021-01-18 16:27:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f781fea04c9918008bf36ebb1c2f4ee3cbc0447c
f781fea0
1 parent
1cc69536
接口添加回放地址返回
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
6 行增加
和
2 行删除
routes/index.js
routes/index.js
查看文件 @
f781fea
...
...
@@ -271,18 +271,22 @@ router.post('/fileExists', async function (req, res, next) {
const
timeFiles
=
fs
.
readdirSync
(
timeDir
)
let
classIdStr
=
`
$
{
body
.
classId
}.
mp4
`
let
isFile
=
false
let
fileTime
=
""
for
(
let
i
=
0
;
i
<
timeFiles
.
length
;
i
++
){
let
classDir
=
`
$
{
timeDir
}
/${timeFiles
[
i
]
}
`
const
classFiles
=
fs
.
readdirSync
(
classDir
)
if
(
classFiles
.
indexOf
(
classIdStr
)
>
-
1
){
fileTime
=
timeFiles
[
i
]
isFile
=
true
break
}
}
if
(
isFile
){
res
.
send
({
code
:
0
,
message
:
"文件已生成"
});
let
classUrl
=
`
https
:
//xdymp4.xuedianyun.com/oss/${body.siteId}/${fileTime}/${body.classId}.mp4`
res
.
send
({
code
:
0
,
message
:
"文件已生成"
,
classUrl
});
}
else
{
res
.
send
({
code
:
1
,
message
:
"文件未生成"
});
let
classUrl
=
`
https
:
//pclive.xuedianyun.com/pcBase/pclive2/release/index.html?portalIP=saas.xuedianyun.com&portalPort=80&classId=${body.classId}&channels=2&playRecord=1#/`
res
.
send
({
code
:
1
,
message
:
"文件未生成"
,
classUrl
});
}
})
...
...
请
注册
或
登录
后发表评论