正在显示
1 个修改的文件
包含
6 行增加
和
2 行删除
@@ -271,18 +271,22 @@ router.post('/fileExists', async function (req, res, next) { | @@ -271,18 +271,22 @@ router.post('/fileExists', async function (req, res, next) { | ||
271 | const timeFiles = fs.readdirSync(timeDir) | 271 | const timeFiles = fs.readdirSync(timeDir) |
272 | let classIdStr = `${body.classId}.mp4` | 272 | let classIdStr = `${body.classId}.mp4` |
273 | let isFile = false | 273 | let isFile = false |
274 | + let fileTime = "" | ||
274 | for(let i=0;i<timeFiles.length;i++){ | 275 | for(let i=0;i<timeFiles.length;i++){ |
275 | let classDir = `${timeDir}/${timeFiles[i]}` | 276 | let classDir = `${timeDir}/${timeFiles[i]}` |
276 | const classFiles = fs.readdirSync(classDir) | 277 | const classFiles = fs.readdirSync(classDir) |
277 | if(classFiles.indexOf(classIdStr) > -1){ | 278 | if(classFiles.indexOf(classIdStr) > -1){ |
279 | + fileTime = timeFiles[i] | ||
278 | isFile = true | 280 | isFile = true |
279 | break | 281 | break |
280 | } | 282 | } |
281 | } | 283 | } |
282 | if(isFile){ | 284 | if(isFile){ |
283 | - res.send({ code: 0,message:"文件已生成" }); | 285 | + let classUrl = `https://xdymp4.xuedianyun.com/oss/${body.siteId}/${fileTime}/${body.classId}.mp4` |
286 | + res.send({ code: 0,message:"文件已生成",classUrl }); | ||
284 | }else { | 287 | }else { |
285 | - res.send({ code: 1,message:"文件未生成" }); | 288 | + let classUrl = `https://pclive.xuedianyun.com/pcBase/pclive2/release/index.html?portalIP=saas.xuedianyun.com&portalPort=80&classId=${body.classId}&channels=2&playRecord=1#/` |
289 | + res.send({ code: 1,message:"文件未生成",classUrl }); | ||
286 | } | 290 | } |
287 | 291 | ||
288 | }) | 292 | }) |
-
请 注册 或 登录 后发表评论