Merge branch 'dev_aliyun' into dev_chen

PCqiandao
cxt 5 years ago
commit 93cf97c4a3

3
.gitignore vendored

@ -7,6 +7,7 @@
# Ignore bundler config.
/.bundle
/bundle
/node_modules
# Ignore lock config file
*.lock
@ -46,6 +47,8 @@
/public/h5build
/public/npm-debug.log
/dist
# avatars
/public/images/avatars

@ -367,9 +367,9 @@ class FilesController < ApplicationController
@category_name = category.try(:module_name)
else
@category = CourseSecondCategory.find category_id
@category_id = category.try(:id)
@category_name = category.try(:name)
@parent_category_id = category&.parent_id.to_i
@category_id = @category.try(:id)
@category_name = @category.try(:name)
@parent_category_id = @category&.parent_id.to_i
end
end

@ -43,7 +43,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
let isSeeking = false
let pos = []//
const log = useCallback((callback) => {
const log = useCallback((callback, isEnd = false) => {
let params = {}
if (logId) {
params['log_id'] = logId
@ -59,6 +59,9 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
params['duration'] = totalDuration
params['device'] = device
}
if (isEnd) {
params['ed'] = "1"
}
async function getLogId() {
isLoging = true
let id = await logWatchHistory(params)
@ -119,7 +122,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
isLoging = false
isSeeking = false
pos = []
})
}, true)
}
function onTimeupdate() {

Loading…
Cancel
Save